/* ============================================================
   ANIMATIONS.CSS — Initial states + reveal classes
   The "in" state is applied by GSAP ScrollTrigger (scroll.js).
   CSS only defines initial styles + fallback transitions.
   ============================================================ */

/* -------- Base initial states (hidden until JS reveals) -------- */
.reveal,
.reveal-left,
.reveal-right,
.scale-in {
  opacity: 0;
  will-change: transform, opacity;
}

.reveal       { transform: translateY(60px); }
.reveal-left  { transform: translateX(-60px); }
.reveal-right { transform: translateX(60px); }
.scale-in     { transform: scale(0.85); }

/* -------- "in" state (applied by GSAP or fallback CSS) -------- */
.reveal.is-in,
.reveal-left.is-in,
.reveal-right.is-in,
.scale-in.is-in {
  opacity: 1;
  transform: none;
  transition:
    opacity .9s cubic-bezier(.2,.7,.2,1),
    transform .9s cubic-bezier(.2,.7,.2,1);
}

/* -------- Cascading delays (for grids/lists) -------- */
.delay-1 { transition-delay: .12s; }
.delay-2 { transition-delay: .24s; }
.delay-3 { transition-delay: .36s; }
.delay-4 { transition-delay: .48s; }
.delay-5 { transition-delay: .60s; }

/* -------- Fallback: if JS fails, force-show after 1s -------- */
@media (prefers-reduced-motion: no-preference) {
  body.no-js .reveal,
  body.no-js .reveal-left,
  body.no-js .reveal-right,
  body.no-js .scale-in {
    opacity: 1;
    transform: none;
  }
}

/* -------- Reduced motion: disable all entrance animations -------- */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal-left,
  .reveal-right,
  .scale-in {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .stat-card {
    background: var(--color-primary) !important;
    color: var(--color-white) !important;
    transition: none !important;
  }
  .stat-card .arc-draw {
    stroke-dashoffset: 0 !important;
    transition: none !important;
  }
  .scroll-indicator { animation: none !important; }
}
