/* ============================================
   CertificadosRD — Animations
   ============================================ */

/* ---- Scroll Reveal ---- */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delays for children */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ---- Hero Entrance ---- */
@keyframes heroFadeUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-animate > * {
  opacity: 0;
  animation: heroFadeUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero-animate > :nth-child(1) { animation-delay: 0.1s; }
.hero-animate > :nth-child(2) { animation-delay: 0.25s; }
.hero-animate > :nth-child(3) { animation-delay: 0.4s; }
.hero-animate > :nth-child(4) { animation-delay: 0.55s; }

/* ---- WhatsApp Pulse ---- */
@keyframes whatsappPulse {
  0%, 100% { box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35); }
  50% { box-shadow: 0 4px 28px rgba(37, 211, 102, 0.55); }
}

/* ---- Stat Counter Fade ---- */
@keyframes countFade {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}

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

  .hero-animate > * {
    opacity: 1;
    animation: none;
  }
}
