/* ============================================================
   Animations — Keyframes, AOS classes, Scroll effects
   ============================================================ */

/* ========== KEYFRAMES ========== */

/* Hero background shimmer */
@keyframes heroShimmer {
  0% {
    opacity: 0.6;
  }
  100% {
    opacity: 1;
  }
}

/* Scroll indicator bounce */
@keyframes bounceDown {
  0%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(8px);
  }
}

/* Fade up (primary entrance) */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Fade in only */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Scale in */
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.85);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Slide in from left */
@keyframes slideLeft {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Slide in from right */
@keyframes slideRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}


/* ========== AOS (Animate On Scroll) BASE STATES ========== */

/* Default: hidden before scroll */
[data-aos] {
  opacity: 0;
  transition: none; /* replaced by animation when visible */
}

/* Animation will be applied via JS-triggered class */

/* Fade Up */
[data-aos="fade-up"].aos--visible {
  animation: fadeUp 0.7s ease-out forwards;
}

/* Fade In */
[data-aos="fade-in"].aos--visible {
  animation: fadeIn 0.7s ease-out forwards;
}

/* Scale In */
[data-aos="scale-in"].aos--visible {
  animation: scaleIn 0.6s ease-out forwards;
}

/* Slide Left */
[data-aos="slide-left"].aos--visible {
  animation: slideLeft 0.7s ease-out forwards;
}

/* Slide Right */
[data-aos="slide-right"].aos--visible {
  animation: slideRight 0.7s ease-out forwards;
}


/* ========== STAGGER DELAYS (for grid children) ========== */

/* nth-child stagger delays — applied via JS to parent, then CSS handles children */

/* Advantages: 6 cards (3x2 grid) */
.advantages__grid.aos--visible .advantage-card:nth-child(1) { animation-delay: 0.05s; }
.advantages__grid.aos--visible .advantage-card:nth-child(2) { animation-delay: 0.12s; }
.advantages__grid.aos--visible .advantage-card:nth-child(3) { animation-delay: 0.19s; }
.advantages__grid.aos--visible .advantage-card:nth-child(4) { animation-delay: 0.26s; }
.advantages__grid.aos--visible .advantage-card:nth-child(5) { animation-delay: 0.33s; }
.advantages__grid.aos--visible .advantage-card:nth-child(6) { animation-delay: 0.40s; }

/* Features: 9 items (3x3 grid) */
.features__grid.aos--visible .feature-item:nth-child(1) { animation-delay: 0.05s; }
.features__grid.aos--visible .feature-item:nth-child(2) { animation-delay: 0.10s; }
.features__grid.aos--visible .feature-item:nth-child(3) { animation-delay: 0.15s; }
.features__grid.aos--visible .feature-item:nth-child(4) { animation-delay: 0.20s; }
.features__grid.aos--visible .feature-item:nth-child(5) { animation-delay: 0.25s; }
.features__grid.aos--visible .feature-item:nth-child(6) { animation-delay: 0.30s; }
.features__grid.aos--visible .feature-item:nth-child(7) { animation-delay: 0.35s; }
.features__grid.aos--visible .feature-item:nth-child(8) { animation-delay: 0.40s; }
.features__grid.aos--visible .feature-item:nth-child(9) { animation-delay: 0.45s; }

/* Cases: 4 items */
.cases__grid.aos--visible .case-card:nth-child(1) { animation-delay: 0.05s; }
.cases__grid.aos--visible .case-card:nth-child(2) { animation-delay: 0.15s; }
.cases__grid.aos--visible .case-card:nth-child(3) { animation-delay: 0.25s; }
.cases__grid.aos--visible .case-card:nth-child(4) { animation-delay: 0.35s; }

/* Pain-solution rows: 5 items (skip header) */
.pain-solution.aos--visible .pain-solution__row:nth-child(2) { animation-delay: 0.05s; }
.pain-solution.aos--visible .pain-solution__row:nth-child(3) { animation-delay: 0.12s; }
.pain-solution.aos--visible .pain-solution__row:nth-child(4) { animation-delay: 0.19s; }
.pain-solution.aos--visible .pain-solution__row:nth-child(5) { animation-delay: 0.26s; }
.pain-solution.aos--visible .pain-solution__row:nth-child(6) { animation-delay: 0.33s; }

/* Steps: 7 items + connectors */
.steps-flow.aos--visible .step:nth-child(1)  { animation-delay: 0.05s; }
.steps-flow.aos--visible .step:nth-child(3)  { animation-delay: 0.12s; }
.steps-flow.aos--visible .step:nth-child(5)  { animation-delay: 0.19s; }
.steps-flow.aos--visible .step:nth-child(7)  { animation-delay: 0.26s; }
.steps-flow.aos--visible .step:nth-child(9)  { animation-delay: 0.33s; }
.steps-flow.aos--visible .step:nth-child(11) { animation-delay: 0.40s; }
.steps-flow.aos--visible .step:nth-child(13) { animation-delay: 0.47s; }
