/* =========================================================
   ANIMATIONS.CSS — Scroll reveals + keyframes
   Uses [data-reveal="..."]; toggled by js/animations.js
   ========================================================= */

[data-reveal] {
  opacity: 0;
  transition: opacity 800ms var(--ease), transform 800ms var(--ease);
  will-change: opacity, transform;
}
[data-reveal="fade-up"]    { transform: translateY(36px); }
[data-reveal="fade-down"]  { transform: translateY(-36px); }
[data-reveal="slide-left"] { transform: translateX(-60px); }
[data-reveal="slide-right"]{ transform: translateX(60px); }
[data-reveal="zoom"]       { transform: scale(.96); }
[data-reveal="fade"]       { transform: none; }

[data-reveal].is-visible {
  opacity: 1;
  transform: translate(0,0) scale(1);
}

/* Staggered children: parent has data-stagger; children inherit small delays */
[data-stagger] > * { transition-delay: 0ms; }
[data-stagger].is-visible > *:nth-child(1) { transition-delay: 50ms; }
[data-stagger].is-visible > *:nth-child(2) { transition-delay: 130ms; }
[data-stagger].is-visible > *:nth-child(3) { transition-delay: 210ms; }
[data-stagger].is-visible > *:nth-child(4) { transition-delay: 290ms; }
[data-stagger].is-visible > *:nth-child(5) { transition-delay: 370ms; }
[data-stagger].is-visible > *:nth-child(6) { transition-delay: 450ms; }

/* Word-by-word reveal for big headlines */
.reveal-words .word {
  display: inline-block; overflow: hidden;
  vertical-align: top;
}
.reveal-words .word > span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 800ms var(--ease);
}
.reveal-words.is-visible .word > span { transform: translateY(0); }
.reveal-words.is-visible .word:nth-child(1) > span { transition-delay:  60ms; }
.reveal-words.is-visible .word:nth-child(2) > span { transition-delay: 130ms; }
.reveal-words.is-visible .word:nth-child(3) > span { transition-delay: 200ms; }
.reveal-words.is-visible .word:nth-child(4) > span { transition-delay: 270ms; }
.reveal-words.is-visible .word:nth-child(5) > span { transition-delay: 340ms; }
.reveal-words.is-visible .word:nth-child(6) > span { transition-delay: 410ms; }
.reveal-words.is-visible .word:nth-child(7) > span { transition-delay: 480ms; }
.reveal-words.is-visible .word:nth-child(8) > span { transition-delay: 550ms; }

/* Counter (stats) */
.counter { display: inline-block; }

/* Reduced motion: collapse to plain fades, no parallax */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .hero__bg-shape { animation: none !important; }
}
