/* ============================================================
   LANDING / HERO — v4.7 "STABLE INSTRUMENT"
   Complete architecture rebuild. The hero must be mechanically
   stable on Android Chrome — no drift, no float.

   ARCHITECTURE PRINCIPLES:
   • hero-visual container: contain:strict so the orb canvas and
     all decorative layers are fully isolated from document layout.
   • NO transform on .hero-visual (the JS gate is belt; this is
     suspenders — position+contain replaces it at source).
   • heroBloom: opacity-only on mobile, scale allowed on desktop.
   • hv-frame: overflow:hidden so canvas never overflows its box.
   • Chip floats: translateY-only, never translateX.
   • Floor light (.hero-visual::after): transform-free centering.
   ============================================================ */
#s0 { background: transparent; justify-content: flex-start; }
.s0-body {
  position: relative; z-index: 2; flex: 1;
  display: flex; flex-direction: column; justify-content: flex-start;
  padding: 18px 24px 28px;
}

/* ---- HERO VISUAL STAGE ---- */
/* ============================================================
   HERO ORB STAGE — v4.9 "LOADER PARITY"
   Rebuilt to INHERIT the loader's proven-stable render architecture
   (components/loader/loader.css → #s7 / .loader-orb). Identical pipeline:
   a plain flex-centered box, EXPLICIT width+height anchored to viewport
   WIDTH via min(vw,px) — never aspect-ratio + contain:size — a single
   opacity/scale bloom pseudo-element, and ONE <canvas> mounted by the
   shared centerpiece engine into an #id stage (exactly like the loader).
   Deliberately removed (these were the ONLY things the stable loader does
   NOT have): #s0 containment, .hero-visual size-containment, the .hv-frame
   overflow-clip lens, the rotating masked conic rim, the floor light, the
   scanline, both SVG mesh layers, the CSS particle field, the floating
   chips, and the pointer parallax transform. See VALIDATION-v4.9.md. */
.hero-visual {
  position: relative;
  /* v5.7: breaks out of .s0-body's own 24px side padding (negative
     margin + matching width-add) so the visual spans edge-to-edge
     within the app column instead of sitting as an inset block with
     its own margins either side -- reads as part of the page
     background rather than a picture placed inside the content
     column. Still fully contained by #app's own 480px cap (base.css),
     so this never spills into the desktop gutters. */
  width: calc(100% + 48px);
  margin-left: -24px;
  margin-right: -24px;
  height: min(168vw, 680px);  /* explicit + viewport-WIDTH-anchored -> does NOT resize during the Android URL-bar height transition (v4.9 fix, see VALIDATION-v4.9.md). Height is still a pure function of vw + a px cap, never aspect-ratio/contain:size. Not enlarged further this pass -- existing header-to-headline space is used more intelligently instead (see the mask + negative margin below). */
  margin-top: 0;
  /* v5.8: negative bottom margin pulls the headline block up to
     overlap the LAST stretch of the fade (see .hero-media-frame mask
     below) -- that stretch is already dissolved to near-transparent
     background, so nothing of the face itself is covered. This is
     what turns "image box, then text box" into one continuous
     cinematic layer: the darkness the face fades into IS the darkness
     the headline sits on, rather than two adjacent flat sections. */
  margin-bottom: -54px;
  /* NO contain. NO aspect-ratio. NO transform. (v4.9 parity preserved) */
}

/* ============================================================
   v5.5 — GENERATED LIVE FACE-ANALYSIS VIDEO
   Replaces the v5.2 static photo + CSS scanning overlay. The live
   analysis effect (mesh, scan line, landmark pulses) is baked into
   the video asset itself -- no CSS/JS scanning system is layered on
   top of it. No card: no border-radius, no border, no box-shadow --
   every edge is masked so the video dissolves directly into the
   shared dark page background instead of reading as a boxed clip.
   ============================================================ */
.hero-media-frame {
  position: absolute; inset: 0; z-index: 1;
  overflow: hidden;
  opacity: 0;
  animation: heroAvatarReveal 1.1s var(--ease-out) .2s forwards;
  /* v5.8: bottom fade widened again (80-99% opaque->transparent ->
     66-99%) and softened -- the face still reads large and sharp
     through the same generous opaque band, but the dissolve into the
     background is longer and gentler, which is what makes the
     headline-overlap above (negative margin) read as smooth continuity
     instead of a visible seam. */
  -webkit-mask-image:
    linear-gradient(to bottom, transparent 0%, black 6%, black 66%, transparent 99%),
    linear-gradient(to right,  transparent 0%, black 4%, black 96%, transparent 100%);
  -webkit-mask-composite: source-in;
          mask-image:
    linear-gradient(to bottom, transparent 0%, black 6%, black 66%, transparent 99%),
    linear-gradient(to right,  transparent 0%, black 4%, black 96%, transparent 100%);
          mask-composite: intersect;
}
@keyframes heroAvatarReveal { to { opacity: 1; } }
.hero-media { width: 100%; height: 100%; object-fit: cover; object-position: center 12%; display: block; background: var(--ink-raised-2); }

/* The generated video already contains its own extremely subtle
   motion (see the generation brief) -- it is treated as essential
   hero content, not decorative chrome, so it keeps autoplaying under
   reduced-motion too; only the reveal fade-in is skipped. */
@media (prefers-reduced-motion: reduce) {
  .hero-media-frame { animation: none; opacity: 1; }
}

/* v5.3 — supporting-text typography pass. Copy/content untouched
   (same data-i18n keys); only presentation is refined: a touch more
   air from the avatar above, a stronger clinical-mono treatment on
   the eyebrow label, and a calmer, more legible paragraph below the
   headline. */
.specimen-tag { display: inline-flex; align-items: center; gap: 9px; margin-top: 4px; margin-bottom: 24px; width: fit-content; }
.specimen-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--gold-bright); flex-shrink: 0; animation: pulseDot 2.6s ease-in-out infinite; box-shadow: 0 0 8px rgba(221,184,104,.8); }
@keyframes pulseDot { 0%,100%{ opacity: 1; transform: scale(1);} 50%{ opacity: .45; transform: scale(.8);} }
.specimen-text { font-family: var(--ff-mono); font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-bright); font-weight: 700; text-shadow: 0 0 14px rgba(221,184,104,.28); }

.hero-headline { font-family: var(--ff-display); font-size: clamp(36px, 10vw, 58px); font-weight: 800; line-height: 1.08; letter-spacing: -0.018em; color: var(--snow); margin-bottom: 20px; }
.hero-headline .line-strike { color: var(--mist-dim); text-decoration: line-through; text-decoration-color: var(--rose); text-decoration-thickness: 1.5px; font-weight: 600; font-size: 0.80em; display: block; margin-bottom: 10px; }
.hero-headline .line-truth { display: block; }

.hero-sub { font-family: var(--ff-body); font-size: var(--fs-base); font-weight: 500; color: var(--mist); line-height: 1.78; letter-spacing: .002em; margin-bottom: 30px; max-width: 340px; }
.hero-trust { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: var(--fs-xs); color: var(--mist-dim); font-weight: 500; padding-top: 18px; padding-bottom: 22px; border-top: 1px solid var(--hairline); margin-bottom: 28px; }
.ht-sep { color: var(--hairline-strong); }
.hero-cta-group { display: flex; flex-direction: column; gap: 10px; }

.s0-footer { position: relative; z-index: 2; padding: 16px 24px calc(16px + var(--sab)); display: flex; align-items: center; justify-content: center; gap: 10px; border-top: 1px solid var(--hairline); }
.s0-footer-mark { width: 22px; height: 22px; border: 1px solid var(--hairline-strong); border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; font-family: var(--ff-latin-display); font-size: 11px; font-weight: 700; color: var(--gold-bright); flex-shrink: 0; }
.s0-footer-text { font-size: var(--fs-2xs); color: var(--mist-dim); }

/* ============================================================
   v5.3 — PRIMARY CTA, PREMIUM TREATMENT
   Scoped to .hero-cta-group .btn-start ONLY (single-class selectors
   here, loaded after components/buttons/buttons.css, so these rules
   win the cascade for the hero button alone -- the shared base rule
   in buttons.css that .btn-next/.btn-get-protocol/.btn-submit also
   read from is left byte-for-byte untouched; every other screen's
   button is unaffected). Refines shape/depth/icon only -- text,
   onclick target and the existing light-sweep animation are unchanged.
   ============================================================ */
.hero-cta-group .btn-start {
  border-radius: var(--r-xl);
  padding: 18px 20px calc(18px + var(--sab)) 24px;
  box-shadow:
    var(--edge-light-strong),
    0 0 0 1px rgba(196,154,74,.30),
    0 10px 26px rgba(8,7,5,.42),
    0 2px 10px rgba(196,154,74,.20);
}
@media (pointer: fine) {
  .hero-cta-group .btn-start:hover {
    box-shadow:
      var(--edge-light-strong),
      0 0 0 1px rgba(196,154,74,.38),
      0 14px 34px rgba(8,7,5,.48),
      0 3px 16px rgba(221,184,104,.28);
  }
}
.hero-cta-group .btn-start span { font-weight: 800; letter-spacing: -0.008em; }
.hero-cta-group .btn-start-arrow {
  width: 32px; height: 32px;
  box-shadow: inset 0 0 0 1px rgba(247,242,230,.10), inset 0 1px 2px rgba(0,0,0,.25), 0 1px 3px rgba(0,0,0,.3);
}
