/* GSAP animation support — only active when <html> has .anim
   (added by an inline head script when motion is allowed).
   Elements are pre-hidden here to avoid FOUC; GSAP reveals them. */

.anim .hero .badge,
.anim h1.hero-title,
.anim .hero-sub,
.anim .hero-cta,
.anim .stats .stat,
.anim #why .why-grid > *,
.anim .sec-head,
.anim .phase,
.anim .beta-cta > *,
.anim .about-cards .ac { visibility: hidden; }

/* when GSAP is active, disable the legacy .reveal fade so it doesn't double-handle */
.anim .reveal { opacity: 1; transform: none; transition: none; }

/* CSS fail-safe: if GSAP never runs (script error, stalled ticker, etc.),
   the above-the-fold hero copy + stats must never stay hidden. GSAP, when it
   runs, sets inline visibility:visible earlier and wins over this. */
.anim .hero .badge,
.anim h1.hero-title,
.anim .hero-sub,
.anim .hero-cta > *,
.anim .stats .stat {
  animation: anim-failsafe 0.01s linear 3.4s forwards;
}
@keyframes anim-failsafe { to { visibility: visible; opacity: 1; } }

/* hero title — per-word rise mask */
h1.hero-title.split .word { display: inline-block; overflow: hidden; vertical-align: top; }
h1.hero-title.split .word-i { display: inline-block; will-change: transform; }

/* nav gains a subtle shadow once scrolled */
header.nav { transition: box-shadow .3s ease, background-color .3s ease; }
header.nav.scrolled { box-shadow: 0 8px 30px -22px rgba(11,18,32,.55); }

/* magnetic buttons need a transform origin that won't fight layout */
.btn-cta, .hero-cta .btn-primary { will-change: transform; }
