/* =============================================
   GREEN DRAIN - ANIMATIONS
   Scroll-triggered reveals & transitions
   ============================================= */

/* ----- Scroll Reveal Base ----- */
.animate-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered delays */
.animate-delay-1 { transition-delay: 0.15s; }
.animate-delay-2 { transition-delay: 0.3s; }
.animate-delay-3 { transition-delay: 0.45s; }

/* ----- Letter Reveal (How It Works section) ----- */
.reveal-letter {
  opacity: 0;
  transition: opacity 0.4s ease-out;
}

.howitworks-header.visible .reveal-letter {
  opacity: 1;
}

/* Generate staggered delays for each letter */
.howitworks-header.visible .reveal-letter:nth-child(1) { transition-delay: 0.05s; }
.howitworks-header.visible .reveal-letter:nth-child(2) { transition-delay: 0.08s; }
.howitworks-header.visible .reveal-letter:nth-child(3) { transition-delay: 0.11s; }
.howitworks-header.visible .reveal-letter:nth-child(4) { transition-delay: 0.14s; }
.howitworks-header.visible .reveal-letter:nth-child(5) { transition-delay: 0.17s; }
.howitworks-header.visible .reveal-letter:nth-child(6) { transition-delay: 0.20s; }
.howitworks-header.visible .reveal-letter:nth-child(7) { transition-delay: 0.23s; }
.howitworks-header.visible .reveal-letter:nth-child(8) { transition-delay: 0.26s; }
.howitworks-header.visible .reveal-letter:nth-child(9) { transition-delay: 0.29s; }
.howitworks-header.visible .reveal-letter:nth-child(10) { transition-delay: 0.32s; }
.howitworks-header.visible .reveal-letter:nth-child(11) { transition-delay: 0.35s; }
.howitworks-header.visible .reveal-letter:nth-child(12) { transition-delay: 0.38s; }
.howitworks-header.visible .reveal-letter:nth-child(13) { transition-delay: 0.41s; }
.howitworks-header.visible .reveal-letter:nth-child(14) { transition-delay: 0.44s; }
.howitworks-header.visible .reveal-letter:nth-child(15) { transition-delay: 0.47s; }
.howitworks-header.visible .reveal-letter:nth-child(16) { transition-delay: 0.50s; }
.howitworks-header.visible .reveal-letter:nth-child(17) { transition-delay: 0.53s; }
.howitworks-header.visible .reveal-letter:nth-child(18) { transition-delay: 0.56s; }
.howitworks-header.visible .reveal-letter:nth-child(19) { transition-delay: 0.59s; }
.howitworks-header.visible .reveal-letter:nth-child(20) { transition-delay: 0.62s; }
.howitworks-header.visible .reveal-letter:nth-child(21) { transition-delay: 0.65s; }
.howitworks-header.visible .reveal-letter:nth-child(22) { transition-delay: 0.68s; }
.howitworks-header.visible .reveal-letter:nth-child(23) { transition-delay: 0.71s; }
.howitworks-header.visible .reveal-letter:nth-child(24) { transition-delay: 0.74s; }
.howitworks-header.visible .reveal-letter:nth-child(25) { transition-delay: 0.77s; }
.howitworks-header.visible .reveal-letter:nth-child(26) { transition-delay: 0.80s; }
.howitworks-header.visible .reveal-letter:nth-child(27) { transition-delay: 0.83s; }
.howitworks-header.visible .reveal-letter:nth-child(28) { transition-delay: 0.86s; }
.howitworks-header.visible .reveal-letter:nth-child(29) { transition-delay: 0.89s; }
.howitworks-header.visible .reveal-letter:nth-child(30) { transition-delay: 0.92s; }
.howitworks-header.visible .reveal-letter:nth-child(31) { transition-delay: 0.95s; }
.howitworks-header.visible .reveal-letter:nth-child(32) { transition-delay: 0.98s; }
.howitworks-header.visible .reveal-letter:nth-child(33) { transition-delay: 1.01s; }
.howitworks-header.visible .reveal-letter:nth-child(34) { transition-delay: 1.04s; }
.howitworks-header.visible .reveal-letter:nth-child(35) { transition-delay: 1.07s; }
.howitworks-header.visible .reveal-letter:nth-child(36) { transition-delay: 1.10s; }
.howitworks-header.visible .reveal-letter:nth-child(37) { transition-delay: 1.13s; }
.howitworks-header.visible .reveal-letter:nth-child(38) { transition-delay: 1.16s; }
.howitworks-header.visible .reveal-letter:nth-child(39) { transition-delay: 1.19s; }
.howitworks-header.visible .reveal-letter:nth-child(40) { transition-delay: 1.22s; }
.howitworks-header.visible .reveal-letter:nth-child(41) { transition-delay: 1.25s; }
.howitworks-header.visible .reveal-letter:nth-child(42) { transition-delay: 1.28s; }
.howitworks-header.visible .reveal-letter:nth-child(43) { transition-delay: 1.31s; }
.howitworks-header.visible .reveal-letter:nth-child(44) { transition-delay: 1.34s; }
.howitworks-header.visible .reveal-letter:nth-child(45) { transition-delay: 1.37s; }
.howitworks-header.visible .reveal-letter:nth-child(46) { transition-delay: 1.40s; }
.howitworks-header.visible .reveal-letter:nth-child(47) { transition-delay: 1.43s; }
.howitworks-header.visible .reveal-letter:nth-child(48) { transition-delay: 1.46s; }
.howitworks-header.visible .reveal-letter:nth-child(49) { transition-delay: 1.49s; }
.howitworks-header.visible .reveal-letter:nth-child(50) { transition-delay: 1.52s; }
.howitworks-header.visible .reveal-letter:nth-child(51) { transition-delay: 1.55s; }
.howitworks-header.visible .reveal-letter:nth-child(52) { transition-delay: 1.58s; }
.howitworks-header.visible .reveal-letter:nth-child(53) { transition-delay: 1.61s; }
.howitworks-header.visible .reveal-letter:nth-child(54) { transition-delay: 1.64s; }
.howitworks-header.visible .reveal-letter:nth-child(55) { transition-delay: 1.67s; }
.howitworks-header.visible .reveal-letter:nth-child(56) { transition-delay: 1.70s; }
.howitworks-header.visible .reveal-letter:nth-child(57) { transition-delay: 1.73s; }
.howitworks-header.visible .reveal-letter:nth-child(58) { transition-delay: 1.76s; }
.howitworks-header.visible .reveal-letter:nth-child(59) { transition-delay: 1.79s; }
.howitworks-header.visible .reveal-letter:nth-child(60) { transition-delay: 1.82s; }

/* ----- Stat Counter Animation ----- */
.howitworks-stat {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out 0.4s, transform 0.6s ease-out 0.4s;
}

.howitworks-stat.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ----- Card Hover Effects ----- */
@media (hover: hover) {
  .product-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }

  .product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  }

  .industry-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }

  .industry-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(26, 60, 26, 0.1);
  }

  .testimonial-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }

  .testimonial-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(26, 60, 26, 0.06);
  }

  .research-study {
    transition: background 0.3s ease, border-color 0.3s ease;
  }

  .research-study:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
  }
}

/* ----- Reduced Motion ----- */
@media (prefers-reduced-motion: reduce) {
  .animate-in {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .reveal-letter {
    opacity: 1;
    transition: none;
  }

  .howitworks-stat {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
