/* ═══════════════════════════════════════════════════════════════
   TERMINAL PAGE
   ═══════════════════════════════════════════════════════════════ */

/* Local accent: phosphor green earned here for status=done signals */
:root {
  --term-green: #39D353;
}

.term-section {
  padding: 128px 0 96px;
}

/* Intro block above the terminal window */
.term-intro {
  margin-bottom: 64px;
}

.term-intro h1 {
  font-family: 'Archivo', sans-serif;
  font-weight: 900;
  font-size: clamp(2.8rem, 9vw, 7rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 32px;
  max-width: 16ch;
}

.term-intro__body {
  font-family: 'Archivo', sans-serif;
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.7;
  max-width: 58ch;
  margin-bottom: 32px;
}

/* ─── TERMINAL WINDOW ─────────────────────────────────────────── */

.term-window {
  border: 1px solid var(--line);
  background: var(--bg-panel);
  overflow: hidden;
  transition: border-color 0.2s;
  margin-bottom: 40px;
}

.term-window:hover {
  border-color: var(--blue);
}

/* Chrome bar */
.term-chrome {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.term-chrome__dots {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.term-chrome__dot {
  width: 10px;
  height: 10px;
  display: block;
  flex-shrink: 0;
}

.term-chrome__dot--a { background: var(--muted); }
.term-chrome__dot--b { background: var(--amber); }
.term-chrome__dot--c { background: var(--blue);  }

.term-chrome__label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.70rem;
  font-weight: 500;
  letter-spacing: 0.10em;
  color: var(--muted);
  white-space: nowrap;
}

/* Terminal scrollable body */
.term-body {
  position: relative;
  padding: 24px 28px;
  overflow-x: auto;
}

/* Scanline overlay */
.term-body::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.06) 2px,
    rgba(0, 0, 0, 0.06) 4px
  );
  animation: scan-move 10s linear infinite;
}

@keyframes scan-move {
  from { background-position: 0 0;    }
  to   { background-position: 0 64px; }
}

/* ─── TRANSCRIPT ──────────────────────────────────────────────── */

.term__pre {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.88rem;
  line-height: 1.85;
  color: var(--muted);
  white-space: pre;
  position: relative;
  z-index: 1;
  min-width: max-content;
}

/* Token color classes: color encodes meaning, not decoration */
.term__prompt  { color: var(--blue);       font-weight: 600; }
.term__cmd     { color: var(--ink);                          }
.term__worker  { color: var(--sodium);                       }
.term__running { color: var(--amber);                        }
.term__done    { color: var(--term-green);                   }
.term__ok      { color: var(--term-green);                   }
.term__on      { color: var(--term-green);                   }
.term__hot     { color: var(--amber);                        }
.term__branch  { color: var(--blue);                         }

/* Blinking block cursor */
.term__caret {
  display: inline-block;
  width: 8px;
  height: 0.92em;
  vertical-align: text-bottom;
  background: var(--blue);
  margin-left: 3px;
  animation: caret-blink 1.1s step-end infinite;
}

@keyframes caret-blink {
  0%,  100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* CTA row below the terminal */
.term-cta {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* ─── RESPONSIVE ──────────────────────────────────────────────── */

@media (max-width: 900px) {
  .term-section { padding: 80px 0 64px; }
  .term-intro   { margin-bottom: 48px;  }
}

@media (max-width: 560px) {
  .term-section  { padding: 56px 0 48px; }
  .term-intro    { margin-bottom: 40px;  }
  .term-body     { padding: 16px;        }
  .term__pre     { font-size: 0.72rem;   }
  .term-intro h1 { font-size: clamp(2.2rem, 12vw, 3.5rem); }
}

/* ─── REDUCED MOTION ──────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .term-window { transition: none; }

  /* Kill the scanline movement and hide it entirely */
  .term-body::after {
    animation: none;
    opacity: 0;
  }

  /* Freeze the caret, visible but static */
  .term__caret {
    animation: none;
    opacity: 1;
  }
}
