/* ═══════════════════════════════════════════════════════════════════════════
   FEDERAL INDEX — the homepage hero and proof strip
   Linked by the homepage only, after /tokens.css and /site.css. The template
   (bands, headings, buttons, header, footer) is in site.css; the explainer
   components are in explain.css. This file holds only what the home opening
   adds: the sky poster, the headline beside the flag, the stage line and the
   proof strip. Every colour is a token; the token-drift guard fails the build
   on a raw colour.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── the hero: the same dark band as every page, taller, with the flag ──── */
.fi-hero-home { overflow: hidden; isolation: isolate; padding-block: clamp(3.5rem, 2rem + 6vw, 7rem) clamp(2.5rem, 2rem + 3vw, 4.5rem); }
.fi-hero-home > .fi-in { position: relative; z-index: 1; }

.hero-media { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero-poster, .hero-video, .hero-veil { position: absolute; inset: 0; width: 100%; height: 100%; }
/* The poster: a quiet night sky, zenith to horizon, a soft moonlit haze. Static. */
.hero-poster {
  background:
    radial-gradient(60% 45% at 76% 24%, var(--fi-night-haze), transparent 72%),
    radial-gradient(110% 55% at 68% 100%, var(--fi-night-glow-soft) 0%, transparent 70%),
    linear-gradient(180deg, var(--fi-night-sky-zenith) 0%, var(--fi-night-sky-mid) 56%, var(--fi-night-sky-low) 100%);
}
/* An optional silent loop plays over the poster only if a file exists (home-sections.js); a veil keeps the words readable. */
.hero-video { object-fit: cover; opacity: 0; transition: opacity var(--fi-dur-fade) var(--fi-ease-standard); }
.hero-video.is-playing { opacity: .62; }
.hero-veil { background: linear-gradient(180deg, var(--fi-night-veil-0) 0%, var(--fi-night-veil-0) 70%, var(--fi-color-surface) 100%); }
.hero-veil::before {
  content: ""; position: absolute; inset: 0; opacity: 0;
  transition: opacity var(--fi-dur-fade) var(--fi-ease-standard);
  background:
    linear-gradient(180deg, var(--fi-night-veil-0) 0%, var(--fi-night-veil-2) 80%, var(--fi-color-surface) 100%),
    linear-gradient(90deg, var(--fi-night-veil-3) 0%, var(--fi-night-veil-2) 100%);
}
.hero-video.is-playing ~ .hero-veil::before { opacity: 1; }
.hero-pause {
  position: absolute; right: var(--fi-space-3); bottom: var(--fi-space-3); z-index: 2;
  display: inline-flex; align-items: center; gap: var(--fi-space-1);
  min-height: 44px; padding: 0 var(--fi-space-2);
  border: 1px solid var(--fi-color-border-strong); border-radius: var(--fi-radius-sm);
  background: var(--fi-night-veil-glass); color: var(--fi-color-ink-secondary);
  font: 600 var(--fi-size-3xs) / 1 var(--fi-font-sans); letter-spacing: .04em; cursor: pointer;
}
.hero-pause:hover { color: var(--fi-color-ink); border-color: var(--fi-color-ink); }
.hero-pause-icon { width: 10px; height: 12px; border-left: 3px solid currentColor; border-right: 3px solid currentColor; }
.hero-pause[data-state="paused"] .hero-pause-icon {
  width: 0; height: 0; border-right: 0;
  border-top: 6px solid transparent; border-bottom: 6px solid transparent; border-left: 10px solid currentColor;
}
@media (prefers-reduced-motion: reduce) { .hero-video { display: none; } }

/* ── the headline: display scale, a red rule under one phrase ──────────── */
.fi-hero-home h1 {
  font-family: var(--fi-font-serif); font-weight: 500;
  font-size: var(--fi-t-display); line-height: 1.02; letter-spacing: -.025em;
  color: var(--fi-color-primary); max-width: 20ch; margin: var(--fi-space-3) 0 0;
}
.fi-hero-home h1 .mark-rule { position: relative; white-space: nowrap; }
.fi-hero-home h1 .mark-rule::after {
  content: ""; position: absolute; left: 0; bottom: .04em; height: .07em; width: 100%;
  background: var(--fi-color-accent);
}
.fi-hero-home .lede {
  margin: var(--fi-space-4) 0 0; max-width: 50ch;
  font-size: var(--fi-t-lede); line-height: 1.6; color: var(--fi-color-ink-secondary);
}
.fi-hero-home .lede strong { color: var(--fi-color-ink); font-weight: 600; }
.stage {
  margin-top: var(--fi-space-4); max-width: 62rem;
  font: 400 var(--fi-t-label)/1.7 var(--fi-font-mono); letter-spacing: .02em; color: var(--fi-color-ink-muted);
  display: flex; align-items: flex-start; gap: var(--fi-space-1);
}
.dot { width: 7px; height: 7px; margin-top: .55em; border-radius: 50%; background: var(--fi-status-ok); flex: none; }

/* The flag's pole is taller than the headline; on a wide screen the lede rises beside it. */
@media (min-width: 760px) { .fi-hero-home .hero-title-row { margin-bottom: calc(var(--fi-space-8) * -1); } }

/* ── the proof strip: measured figures, ruled, with the date beside them ─ */
.proof {
  display: grid; grid-template-columns: repeat(2, 1fr);
  margin-top: var(--fi-space-8);
  border-top: 1px solid var(--fi-color-border);
}
@media (min-width: 720px) { .proof { grid-template-columns: repeat(3, 1fr); } }
.proof > div { padding: var(--fi-space-4) var(--fi-space-3) var(--fi-space-3) 0; }
@media (min-width: 720px) { .proof > div + div { padding-left: var(--fi-space-3); border-left: 1px solid var(--fi-color-border); } }
.proof .n {
  font-family: var(--fi-font-serif); font-weight: 500; letter-spacing: -.02em;
  font-size: clamp(2.25rem, 1.4rem + 2.6vw, 3.5rem); line-height: 1;
  color: var(--fi-color-primary); font-variant-numeric: tabular-nums;
}
.proof .n .u { font-family: var(--fi-font-sans); font-size: var(--fi-size-md); color: var(--fi-color-ink-secondary); letter-spacing: 0; }
.proof .k { font-size: var(--fi-size-2xs); line-height: 1.5; color: var(--fi-color-ink-secondary); margin-top: var(--fi-space-1); max-width: 22ch; }
.proof-asof { margin-top: var(--fi-space-2); }
.proof-asof a { font-weight: 600; }
.spec .status-label { white-space: normal; align-items: flex-start; }

/* A fade-in of an element above the fold: the lede and the proof strip. */
@media (prefers-reduced-motion: no-preference) and (scripting: enabled) {
  [data-rise] { opacity: 0; transform: translateY(8px); transition: opacity var(--fi-dur-fade) var(--fi-ease-standard), transform var(--fi-dur-fade) var(--fi-ease-standard); }
  [data-rise].in { opacity: 1; transform: none; }
}
@media print { [data-rise] { opacity: 1 !important; transform: none !important; } }
