/* Hero A — Flow of inventory */

.hero {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 640px;
  background: var(--bg);
  overflow: hidden;
  isolation: isolate;
  color: var(--text);
  font-family: var(--font-sans);
}

/* --- Flow layer (back) ---------------------------------------- */

.flow {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;  /* spread lanes across full hero height */
  gap: 0;
  padding: 72px 0 88px;  /* breathe away from top/bottom edges */
  opacity: 0.6;  /* dimmed so the headline wins; was 0.92 (too busy) */
  /* no side mask — full-bleed, cards enter/exit off-screen */
}

.lane {
  position: relative;
  height: 72px;
  display: flex;
  align-items: center;
  flex: 1 1 auto;  /* lanes share vertical space evenly */
}

.lane-label {
  position: absolute;
  left: 32px;
  top: 2px;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-weight: 600;
  color: var(--text-muted);
  z-index: 2;
  opacity: 0.92;
}

/* Em-dash divider — SVG animated stroke */
.lane-rail {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  overflow: hidden;
  pointer-events: none;
}
.lane-rail svg {
  display: block;
  width: 100%;
  height: 2px;
}
.lane-rail line {
  stroke: rgba(139, 148, 158, 0.28);
  stroke-width: 1.5;
  stroke-dasharray: 10 8;
  animation: rail-drift 18s linear infinite;
}
@keyframes rail-drift {
  to { stroke-dashoffset: -360; }
}
.lane-rail .tip {
  fill: rgba(139, 148, 158, 0.4);
  font-size: 11px;
  font-weight: 600;
}

/* Card track — cards drift */
.card-track {
  position: absolute;
  inset: 0;
}

.v-card {
  position: absolute;
  top: 50%;
  transform: translateY(-50%) translateX(var(--x, 0px));
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6px 10px;
  background: rgba(22, 27, 34, 0.50);  /* was 0.92 — now ambient, not aggressive */
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text);
  width: 148px;
  height: 44px;
  font-size: 11.5px;
  font-family: var(--font-sans);
  box-shadow: 0 1px 0 rgba(0,0,0,0.5);
  backdrop-filter: blur(2px);
  will-change: transform;
  animation: card-drift var(--dur, 24s) linear infinite;
  animation-delay: var(--delay, 0s);
  animation-play-state: paused;
}
.hero.live .v-card { animation-play-state: running; }

/* Mobile: keep the drifting flow for personality, but dial it way down.
 * 3 drifters per lane at 50% opacity is visual noise on a 400px screen;
 * 1 drifter per lane at 25% opacity with smaller cards is branded ambience.
 * Stuck cards stay (they're the signature moment for the ignition pulse). */
@media (max-width: 768px) {
  .flow {
    opacity: 1;                  /* let individual cards carry opacity instead */
    padding: 56px 0 60px;        /* tighter vertical so it doesn't eat the headline */
  }

  .lane { height: 48px; }

  .lane-label {
    font-size: 9px;
    left: 14px;
    letter-spacing: 0.18em;
  }

  /* Hide 2nd+ drifter per lane via sibling combinator — keep one drifter
   * moving per lane. Stuck cards don't have .drifter so they're untouched. */
  .drifter ~ .drifter { display: none; }

  .v-card {
    width: 108px;
    height: 30px;
    font-size: 10px;
    padding: 4px 7px;
    background: rgba(22, 27, 34, 0.28);  /* near-invisible — ambient only */
    border-color: rgba(139, 148, 158, 0.18);
    animation-duration: calc(var(--dur, 24s) * 1.5);  /* slower = calmer */
  }
  .v-card .name { font-size: 10px; }
  .v-card .meta { display: none; }  /* single-line tile; name only */

  /* Stuck cards keep a bit more presence so the pulse still reads */
  .v-card.stuck {
    background: rgba(22, 27, 34, 0.45);
    border-color: rgba(139, 148, 158, 0.35);
  }
}

.v-card .name {
  color: var(--text);
  font-weight: 600;
  font-size: 11.5px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.v-card .meta {
  color: var(--text-muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
  white-space: nowrap;
}

/* Near plane (slightly bigger, faint blur) */
.v-card.near {
  width: 168px;
  height: 50px;
  filter: blur(0.6px);
  opacity: 1;
}
.v-card.near .name { font-size: 12.5px; }
.v-card.near .meta { font-size: 10.5px; }

/* Far plane (smaller, dimmer, more blur) */
.v-card.far {
  width: 128px;
  height: 38px;
  filter: blur(1.5px);
  opacity: 0.55;
}
.v-card.far .name { font-size: 10.5px; }
.v-card.far .meta { font-size: 9.5px; }

@keyframes card-drift {
  from { transform: translate3d(-240px, -50%, 0); }
  to   { transform: translate3d(calc(100vw + 240px), -50%, 0); }
}

/* Stuck card — amber, not red (per feedback) */
.v-card.stuck {
  animation-play-state: paused !important;
  border-color: var(--accent);
  border-left-width: 2px;
  background: rgba(38, 28, 10, 0.92);
}
.v-card.stuck::before {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 10px;
  background: radial-gradient(ellipse at center, rgba(245,158,11,0.28) 0%, transparent 70%);
  filter: blur(12px);
  z-index: -1;
  animation: stuck-pulse 8s ease-in-out infinite;
  pointer-events: none;
}
@keyframes stuck-pulse {
  0%,100% { opacity: 0.35; }
  45%     { opacity: 0.9; }
  60%     { opacity: 0.9; }
}

.v-card.stuck .name { color: var(--accent); }

/* when a stuck card resolves (.resumed added via JS) */
.v-card.resumed {
  animation-play-state: running !important;
  border-color: var(--border);
  background: rgba(22, 27, 34, 0.92);
  transition: border-color 400ms, background 400ms;
}
.v-card.resumed::before { opacity: 0; transition: opacity 400ms; }
.v-card.resumed .name { color: var(--text); transition: color 400ms; }

/* Center vignette — dims cards behind copy instead of blacking them out.
   Cards keep drifting underneath; they just fade where they cross the text. */
.copy-vignette {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 1100px;
  height: 640px;
  pointer-events: none;
  z-index: 2;
  background: radial-gradient(
    ellipse at center,
    rgba(10,10,15,0.82) 0%,
    rgba(10,10,15,0.62) 35%,
    rgba(10,10,15,0.28) 60%,
    rgba(10,10,15,0.0)  82%
  );
}

/* --- Copy layer (front) -------------------------------------- */

.copy {
  position: relative;
  z-index: 3;
  max-width: 860px;
  margin: 0 auto;
  padding: 96px 32px 0;  /* headline moves up now that wordmark is gone */
  text-align: center;
  pointer-events: none;
}
.copy > * { pointer-events: auto; }

.copy .brand {
  display: inline-block;
  font-size: var(--fs-md);
  color: var(--text-muted);
  margin-bottom: var(--sp-6);
  letter-spacing: 0.02em;
}

.copy h1 {
  font-family: var(--font-display);
  font-size: clamp(36px, 5.6vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-weight: 600;
  margin: 0 0 var(--sp-4);
  color: var(--text);
  text-wrap: balance;
}
.copy h1 em {
  font-style: normal;
  color: var(--accent);
  font-weight: 700;
  margin: 0 -0.02em;
}
.copy h1 .dot {
  color: var(--accent);
  margin-left: -0.05em;
}

.copy p.sub {
  margin: 0 auto var(--sp-6);
  max-width: 600px;
  color: var(--text-muted);
  font-size: clamp(15px, 1.15vw, 17px);
  line-height: 1.45;
  text-wrap: pretty;
  letter-spacing: -0.005em;
}
.copy p.sub em {
  font-style: normal;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0.04em;
}

.cta-row {
  display: inline-flex;
  position: relative;
  justify-content: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
  padding: 6px;
  border-radius: var(--r-lg);
}
/* Subtle amber presence behind the primary CTA — anchors it without glowing */
.cta-row::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 6px;
  width: 240px;
  height: 44px;
  border-radius: var(--r-sm);
  background: radial-gradient(ellipse at center,
    rgba(245,158,11,0.22) 0%,
    rgba(245,158,11,0.08) 40%,
    transparent 75%);
  filter: blur(18px);
  z-index: -1;
  pointer-events: none;
}

/* Entry fade — applied when .hero.live */
.hero .reveal {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 500ms ease-out, transform 500ms ease-out;
}
.hero.live .reveal { opacity: 1; transform: none; }
.hero.live .reveal.d1 { transition-delay: 120ms; }
.hero.live .reveal.d2 { transition-delay: 220ms; }
.hero.live .reveal.d3 { transition-delay: 320ms; }
.hero.live .reveal.d4 { transition-delay: 420ms; }

/* Ignition pulse — amber ring */
.ignition-pulse {
  position: absolute;
  left: 50%;
  top: 48%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  transform: translate(-50%, -50%) scale(1);
  opacity: 0;
  pointer-events: none;
  z-index: 2;
}
.hero.igniting .ignition-pulse {
  animation: ignition 900ms ease-out forwards;
}
@keyframes ignition {
  0%   { opacity: 0.8; transform: translate(-50%, -50%) scale(1); }
  80%  { opacity: 0.15; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(140); }
}

/* Signal strip — reads as evidence ticker, separated from CTA */
.signal {
  position: relative;
  z-index: 3;
  margin-top: var(--sp-9);  /* 96px — clear separation from CTA */
  padding-top: var(--sp-6);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 180px));
  justify-content: center;
  gap: 0;
}
.signal::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 1px;
  background: var(--border);
  opacity: 0.6;
}
.signal .stat {
  text-align: center;
  color: var(--text-dim);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 500;
  padding: 0 var(--sp-4);
  position: relative;
}
.signal .stat + .stat::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 1px;
  background: var(--border);
}
.signal .stat b {
  display: block;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 10px;
}
.signal .stat b.warn { color: var(--accent); }
