/* =========================================================================
   animations.css — keyframes, reveal contract, and the two fallback modes.

   REVEAL CONTRACT
   [data-anim] elements are pre-hidden ONLY when JS is running (html.js).
   They are made visible again by:
     - GSAP, on their ScrollTrigger, or
     - html.no-gsap, when GSAP failed to load, or
     - the 6s failsafe in animations.js (.anim-done), or
     - having no .js class at all (JS disabled -> never hidden in the first place)
   Nothing decorative may be able to hide content. See A2.
   ========================================================================= */

html.js [data-anim] { opacity: 0; }

html.js.no-gsap [data-anim],
html.js [data-anim].anim-done {
  opacity: 1 !important;
  transform: none !important;
  clip-path: none !important;
}

/* GSAP missing: everything animated is simply visible and static. */
html.no-gsap .hero { border-bottom-left-radius: var(--r-lg); border-bottom-right-radius: var(--r-lg); }
html.no-gsap .marquee__row { transform: none; }

/* =========================================================================
   KEYFRAMES
   ========================================================================= */
@keyframes cb-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes cb-cue {
  0%   { transform: scaleY(0); transform-origin: top center; }
  45%  { transform: scaleY(1); transform-origin: top center; }
  55%  { transform: scaleY(1); transform-origin: bottom center; }
  100% { transform: scaleY(0); transform-origin: bottom center; }
}

@keyframes cb-pulse-ring {
  0%   { transform: scale(1);    opacity: .55; }
  70%  { transform: scale(1.55); opacity: 0; }
  100% { transform: scale(1.55); opacity: 0; }
}

/* =========================================================================
   REDUCED MOTION — a real pass, not a stub.
   Kills parallax, marquees, spin, cue, scrub, pin, cursor, crumbs and Lenis
   (main.js reads the same query and never constructs Lenis). Opacity fades
   are deliberately preserved.
   ========================================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }

  /* Opacity fades survive — they are the one motion we keep. */
  html.js [data-anim] { transition: opacity .3s linear !important; }

  .hero__badge-spin { animation: none !important; }
  .hero__cue { display: none; }

  /* HERO SLIDER — an auto-advancing carousel is among the clearest
     reduced-motion violations there is, so the JS never starts the timer
     and never runs Ken Burns. Belt and braces here: even if a timer were
     to fire, there is no zoom and no crossfade left to see. The dots stay
     fully operable as MANUAL controls — this removes the animation, not
     the ability to look at slide 2. */
  .hero__slides { scale: 1; }
  .hero__img,
  .hero__slide.is-active .hero__img { scale: 1 !important; transition: none !important; }
  .hero__slide { transition: none !important; }
  .hero {
    border-bottom-left-radius: var(--r-lg);
    border-bottom-right-radius: var(--r-lg);
    position: relative; /* no sticky reveal */
  }

  /* Marquees render as a single static, non-scrolling row. */
  .marquee__row { transform: none !important; }
  .marquee { overflow: hidden; }

  .cursor { display: none !important; }
  .crumb  { display: none !important; }
}
