/* ═══ HERO + STAT BAND ══════════════════════════════════════════════════ */

#hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-h);
  padding-bottom: clamp(3rem, 8vh, 6rem);
  z-index: var(--z-content);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  gap: clamp(2.4rem, 5vw, 4rem);
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  width: 100%;
}
@media (min-width: 1060px) {
  .hero-grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
}

/* ── Status pill ───────────────────────────────────────── */
.hero-status {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .42rem .95rem .42rem .7rem;
  border: 1px solid var(--hairline-2);
  border-radius: var(--r-pill);
  background: var(--surface-2);
  backdrop-filter: blur(10px);
  margin-bottom: 1.9rem;
  font-family: var(--ff-mono);
  font-size: var(--fs-xs);
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--bone-dim);
}
.hero-status .dot { color: var(--signal); }
.hero-status b { color: var(--signal); font-weight: 600; }

/* ── Wordmark ──────────────────────────────────────────── */
.hero-title {
  font-family: var(--ff-display);
  font-weight: 900;
  font-stretch: 120%;
  text-transform: uppercase;
  letter-spacing: -0.052em;
  line-height: .8;
  color: var(--bone);
  font-size: var(--fs-mega);
  margin-bottom: 1.9rem;
}
.hero-title .l1,
.hero-title .l2 { white-space: nowrap; }

.hero-title .l1 { display: block; }
.hero-title .l2 {
  display: block;
  color: transparent;
  -webkit-text-stroke: 1.6px var(--bone-ghost);
  transition: -webkit-text-stroke-color var(--t-slow) var(--e-out), color var(--t-slow) var(--e-out);
}
#hero:hover .hero-title .l2 { -webkit-text-stroke-color: var(--signal); }

/* per-letter entrance */
.hero-title .ch {
  display: inline-block;
  transform: translate3d(0, 108%, 0) rotate(6deg);
  opacity: 0;
  will-change: transform;
}
.hero-title.is-in .ch {
  animation: chIn 900ms var(--e-out) forwards;
  animation-delay: var(--d, 0ms);
}
@keyframes chIn { to { transform: none; opacity: 1; } }

.hero-lead {
  max-width: 54ch;
  font-size: var(--fs-lead);
  color: var(--bone-dim);
  margin-bottom: 2.2rem;
  text-wrap: pretty;
}
.hero-lead b { color: var(--bone); font-weight: 600; }
.hero-lead code {
  font-family: var(--ff-mono);
  font-size: .86em;
  color: var(--signal);
  background: color-mix(in srgb, var(--signal) 10%, transparent);
  padding: .1em .42em;
  border-radius: var(--r-xs);
  border: 1px solid color-mix(in srgb, var(--signal) 22%, transparent);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 2.4rem; }

/* ── Toolbelt marquee ──────────────────────────────────── */
.hero-belt {
  position: relative;
  min-width: 0;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.hero-belt ul {
  display: flex;
  gap: 2.2rem;
  width: max-content;
  animation: beltRun 26s linear infinite;
}
#hero:hover .hero-belt ul { animation-play-state: paused; }
@keyframes beltRun { to { transform: translateX(-50%); } }
.hero-belt li {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--ff-mono);
  font-size: var(--fs-xs);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--bone-ghost);
  white-space: nowrap;
}
.hero-belt li::before {
  content: '';
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--ink-400);
}

/* ═══ HERO TERMINAL CARD ════════════════════════════════ */

/* The card clips its own scanlines, so the floating badges live on a wrapper
   that doesn't clip — otherwise they get cut off at the card edge. */
.hero-term-wrap {
  position: relative;
}

.hero-term {
  position: relative;
  border-radius: var(--r-lg);
  border: 1px solid var(--hairline-2);
  background: linear-gradient(170deg, var(--ink-800), var(--ink-900));
  box-shadow: var(--sh-lg);
  overflow: hidden;
  transform-style: preserve-3d;
}
.hero-term::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.024) 0 1px, transparent 1px 3px);
  z-index: 3;
}
.hero-term::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 34%;
  top: -34%;
  z-index: 4;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--wire) 8%, transparent), transparent);
  animation: crtSweep 5.2s var(--e-inout) infinite;
}
@keyframes crtSweep { to { top: 118%; } }

.term-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem .6rem;
  padding: .72rem .95rem;
  border-bottom: 1px solid var(--hairline);
  background: var(--ink-900);
}
.term-dots { display: flex; gap: .32rem; }
.term-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--ink-500); }
.term-dots i:nth-child(1) { background: #FF5F57; }
.term-dots i:nth-child(2) { background: #FEBC2E; }
.term-dots i:nth-child(3) { background: #28C840; }
.term-bar b {
  font-family: var(--ff-mono);
  font-size: var(--fs-xs);
  letter-spacing: .09em;
  color: var(--bone-ghost);
  font-weight: 500;
}
.term-bar .chip { margin-left: auto; padding: .2rem .55rem; }

.term-body {
  padding: 1.15rem 1.2rem 1.35rem;
  font-family: var(--ff-mono);
  font-size: .765rem;
  line-height: 1.85;
  letter-spacing: .01em;
  min-height: 258px;
  white-space: pre;          /* it's source code — newlines are content */
  overflow-x: auto;
  scrollbar-width: thin;
}
.term-body::-webkit-scrollbar { height: 6px; }
.term-body::-webkit-scrollbar-thumb { background: var(--ink-500); border-radius: 3px; }
.term-body .k { color: var(--pulse); }
.term-body .f { color: var(--wire); }
.term-body .s { color: var(--signal); }
.term-body .c { color: var(--bone-ghost); }
.term-body .n { color: var(--ember); }
.term-body .p { color: var(--bone-dim); }
.term-caret {
  display: inline-block;
  width: 7px; height: 1.05em;
  vertical-align: -.18em;
  background: var(--signal);
  animation: bootBlink .82s steps(2) infinite;
}

/* Floating tilt badges */
.term-badge {
  position: absolute;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: .45rem;
  padding: .42rem .7rem;
  border-radius: var(--r-pill);
  border: 1px solid var(--hairline-2);
  background: color-mix(in srgb, var(--ink-800) 92%, transparent);
  backdrop-filter: blur(10px);
  font-family: var(--ff-mono);
  font-size: .64rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--bone-dim);
  box-shadow: var(--sh-md);
  animation: floaty 5.4s var(--e-inout) infinite;
}
.term-badge:nth-of-type(2) { animation-delay: -2.6s; }
@keyframes floaty { 50% { transform: translateY(-9px); } }
.term-badge--a { top: -14px; right: 18px; color: var(--signal); }
.term-badge--b { bottom: -14px; left: 20px; color: var(--wire); }

/* ═══ STAT BAND ═════════════════════════════════════════ */
#stats {
  position: relative;
  z-index: var(--z-content);
  border-block: 1px solid var(--hairline);
  background: color-mix(in srgb, var(--ink-900) 62%, transparent);
  backdrop-filter: blur(8px);
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 780px) { .stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.stat {
  padding: clamp(1.6rem, 3.4vw, 2.6rem) clamp(1rem, 2vw, 1.6rem);
  border-right: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  position: relative;
  overflow: hidden;
  transition: background var(--t-base);
}
@media (min-width: 780px) { .stat { border-bottom: none; } }
.stat:last-child { border-right: none; }
@media (max-width: 779px) { .stat:nth-child(2n) { border-right: none; } .stat:nth-last-child(-n+2) { border-bottom: none; } }
.stat:hover { background: var(--surface); }
.stat::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  height: 2px; width: 0;
  background: var(--signal);
  transition: width var(--t-slow) var(--e-out);
}
.stat:hover::after { width: 100%; }

.stat-val {
  font-family: var(--ff-display);
  font-weight: 900;
  font-stretch: 112%;
  font-size: clamp(2rem, 4.4vw, 3.2rem);
  line-height: 1;
  letter-spacing: -0.045em;
  color: var(--bone);
  font-variant-numeric: tabular-nums;
  margin-bottom: .5rem;
}
.stat-val sup {
  font-size: .42em;
  color: var(--signal);
  vertical-align: super;
  margin-left: .12em;
  letter-spacing: 0;
}
.stat-key {
  font-family: var(--ff-mono);
  font-size: var(--fs-xs);
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--bone-ghost);
}

/* ── Small screens ─────────────────────────────────────── */
@media (max-width: 620px) {
  .hero-title { font-size: clamp(2.2rem, 11.4vw, 3.6rem); }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .hero-status { font-size: .64rem; padding: .38rem .75rem .38rem .6rem; }
  .term-body { font-size: .66rem; min-height: 200px; }
  .term-badge { font-size: .58rem; }
  .term-bar b { font-size: .6rem; }
  .term-bar .chip { margin-left: 0; }
}
