/* ============================================================
   AEIVA v3 — Motion states & reduced-motion fallbacks
   Content is ALWAYS visible without JS. Reveal states apply
   only when JS marks <html class="anim-ready"> (motion allowed).
   ============================================================ */

html.anim-ready [data-fade] {
  opacity: 0;
  transform: translateY(34px);
  will-change: opacity, transform;
}
html.anim-ready [data-hero-device] { opacity: 0; transform: translateY(50px) scale(0.97); }
html.anim-ready [data-action-card] { opacity: 0; }

/* Magnetic buttons + tilt hint */
[data-magnetic] { will-change: transform; }

/* Loop nodes pre-state — opacity only, so link geometry stays measurable */
html.anim-ready .loop-node { opacity: 0; transition: opacity 0.6s var(--ease-out); }
html.anim-ready .loop-brain { opacity: 0; transition: opacity 0.7s var(--ease-out); }
/* visual-loop.js adds .is-revealed to the stage when it scrolls into view */
html.anim-ready .loop-stage.is-revealed .loop-node,
html.anim-ready .loop-stage.is-revealed .loop-brain { opacity: 1; }

/* Split-text hero: masked word units (built by JS).
   Padding+negative margin keep italic descenders unclipped. */
.st-word { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: 0.14em; margin-bottom: -0.14em; }
.st-inner { display: inline-block; will-change: transform; }
html.anim-ready .st-inner { transform: translateY(112%); }

/* Gold shimmer sweep on the hero's gilt word (triggered after intro) */
.hero-title .gilt.shimmer {
  background: linear-gradient(100deg, var(--gold) 20%, #f4e9b5 38%, var(--gold) 55%);
  background-size: 250% 100%; background-position: 110% 0;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: giltShimmer 1.6s var(--ease-inout) 1 both;
}
@keyframes giltShimmer { from { background-position: 110% 0; } to { background-position: -60% 0; } }

/* Tree draw-in pre-state (JS sets pathLength=1) */
html.anim-ready .hero-tree path { stroke-dasharray: 1; stroke-dashoffset: 1; }
html.anim-ready .hero-tree circle { opacity: 0; }

/* ---- Reduced motion: strip all motion, guarantee legibility ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .hero-scroll span,
  .nutri-scanline,
  .marquee-track,
  .orbfield i,
  .orb-ring,
  .grain-overlay,
  .float-wrap,
  .phone-frame.glare::after,
  .film-badge i,
  .dot-gold,
  .pl-orb,
  .pin.blink,
  .cube3d,
  .memb-stack b,
  .eco-av,
  .brain-core.pulse,
  .hero-title .gilt.shimmer,
  .loop-particle { animation: none !important; }
  [data-fade], [data-hero-title], [data-hero-device], [data-action-card],
  .loop-node, .loop-brain, .st-inner { opacity: 1 !important; transform: none !important; }
  .hero-tree path { stroke-dasharray: none !important; stroke-dashoffset: 0 !important; }
  .hero-tree circle { opacity: 1 !important; }
  .hero-title .gilt.shimmer {
    background: none !important;
    -webkit-text-fill-color: currentColor !important;
  }
  .sv-sync .sync-line { stroke-dasharray: none !important; stroke-dashoffset: 0 !important; }
  .eco-corridor { stroke-dasharray: none !important; stroke-dashoffset: 0 !important; }
  .sweep::after { transform: scaleX(1) !important; }
  .pin.blink { opacity: 1 !important; }
  .hero-canvas { display: none !important; }
  .cursor-ring, .preloader { display: none !important; }
  .scroll-progress { transition: none !important; }
}
