/* REVEAL — anti-FOUC pre-hide. Only active when JS is on (html.js, set by the
   inline head script before first paint) AND motion is allowed. These elements
   are staged by GSAP (sections.js / hero.js) on scroll-in or on leader-done;
   without this rule they flash visible for a frame before JS hides them.
   No JS → no .js class → content stays visible (progressive enhancement).
   Reduced motion → shown.

   hero.js uses gsap.fromTo() (not .from()) so it sets an explicit target
   opacity:1 regardless of this pre-hide — safe to pre-hide the hero text too,
   which is what stops the title flashing during the ~1.5s leader countdown. */

/* Critical pre-paint leader cover. Without this, the hero can paint once before
   leader.js arrives and turns #leader into a fixed cover, creating a bright
   start-frame flash before the countdown. The animation is a no-JS/module-fail
   escape hatch; leader.js cancels it as soon as it owns the element. */
html.js:not(.reduced) #leader {
  position: fixed;
  inset: 0;
  z-index: 9900;
  display: block;
  background: var(--void);
  animation: leader-preflight-failsafe 0s linear 4s forwards;
}

html.reduced #leader {
  display: none;
  animation: none;
}

@keyframes leader-preflight-failsafe {
  to { visibility: hidden; }
}

html.js:not(.reduced) .display,
html.js:not(.reduced) .display .line {
  opacity: 0;
}

html.js:not(.reduced) .card,
html.js:not(.reduced) .statement,
html.js:not(.reduced) .ai-tools,
html.js:not(.reduced) .marker {
  opacity: 0;
}

html.js:not(.reduced) #hero .hero-title .line,
html.js:not(.reduced) #hero .hero-eyebrow,
html.js:not(.reduced) #hero .hero-sub,
html.js:not(.reduced) #hero .hero-meta {
  opacity: 0;
}
