/* ============================================================================
   hero.css — chapter 00
   ========================================================================== */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding-block: calc(var(--nav-h) + var(--space-16)) var(--space-16);
  overflow: clip;
  isolation: isolate;
}

/* Ambient glow. Mirrors --hero-gradient from the DS, re-lit for a navy ground:
   yellow warmth top-right, navy depth bottom-left. Sits on its own layer so
   motion.js can drift it with yPercent without touching the copy. */
.hero__bg {
  position: absolute;
  inset: -12% 0 -12% 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 70% 55% at 78% 8%, rgba(255, 199, 0, 0.16), transparent 62%),
    radial-gradient(ellipse 90% 60% at 12% 96%, rgba(29, 42, 114, 0.85), transparent 64%),
    linear-gradient(180deg, #000A40 0%, #050F4A 55%, #000A40 100%);
  background-color: var(--navy-900);
  will-change: transform;
}

/* Fine grid, barely there — gives the navy some structure under big type. */
.hero__grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 88px 88px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 20%, transparent 78%);
}

.hero__inner {
  display: grid;
  gap: var(--space-10);
  width: 100%;
}

@media (min-width: 1024px) {
  .hero__inner {
    grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
    align-items: end;
    gap: var(--chapter-gap);
  }
}

.hero__title {
  margin-top: var(--space-6);
  max-width: 15ch;
}

.hero__lead {
  margin-top: var(--space-6);
  max-width: 54ch;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-8);
}

/* -- Right rail: the one number worth showing before the story starts ----- */

.hero__rail {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  padding-left: var(--space-6);
  border-left: 1px solid var(--page-border);
}

@media (max-width: 1023px) {
  .hero__rail {
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--space-8);
    padding-left: 0;
    padding-top: var(--space-6);
    border-left: 0;
    border-top: 1px solid var(--page-border);
  }
}

.hero__fact {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero__fact-num {
  font-family: var(--font-mono);
  font-size: clamp(1.75rem, 1.2rem + 1.9vw, 2.5rem);
  font-weight: var(--weight-semibold);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--yellow-500);
  font-variant-numeric: tabular-nums;
}

.hero__fact-lbl {
  font-size: var(--text-sm);
  color: var(--page-body);
}

/* -- Scroll cue ----------------------------------------------------------- */

.hero__cue {
  position: absolute;
  inset-block-end: var(--space-6);
  inset-inline-end: var(--gutter-sm);
  display: none;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--page-muted);
}

@media (min-width: 1200px) {
  .hero__cue {
    display: flex;
    inset-inline-end: var(--gutter);
  }

  /* Leave the cue its own lane so the stat rail never runs through it. */
  .hero { padding-bottom: 132px; }
}

.hero__cue-rail {
  position: relative;
  width: 1px;
  height: 56px;
  background: var(--page-border);
  overflow: hidden;
}

.hero__cue-rail::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  height: 18px;
  background: var(--yellow-500);
  animation: cue-run 1.9s var(--ease-out-power3) infinite;
}

@keyframes cue-run {
  0%   { transform: translateY(-20px); opacity: 0; }
  35%  { opacity: 1; }
  100% { transform: translateY(56px); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__cue-rail::after { animation: none; opacity: 1; transform: translateY(0); }
}
