/* =========================================================
   SCI NUTRICIÓN INSTITUCIONAL — ANIMACIONES
   ========================================================= */

/* ---------- Scroll Reveal (controlado por Intersection Observer) ---------- */
[data-reveal] {
  opacity: 0;
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  will-change: transform, opacity;
}
[data-reveal="fade-up"] { transform: translateY(36px); }
[data-reveal="fade-in"] { transform: none; }
[data-reveal="zoom-in"] { transform: scale(0.92); }
[data-reveal="slide-left"] { transform: translateX(-40px); }
[data-reveal="slide-right"] { transform: translateX(40px); }

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

/* Retrasos escalonados para grupos (grids de tarjetas) */
[data-reveal-group] > *:nth-child(1) { transition-delay: 0.05s; }
[data-reveal-group] > *:nth-child(2) { transition-delay: 0.18s; }
[data-reveal-group] > *:nth-child(3) { transition-delay: 0.31s; }
[data-reveal-group] > *:nth-child(4) { transition-delay: 0.44s; }

/* ---------- Hero ---------- */
@keyframes hero-fade-up {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-content .eyebrow { animation: hero-fade-up 0.8s var(--ease) 0.1s both; }
.hero-content h1 { animation: hero-fade-up 0.9s var(--ease) 0.25s both; }
.hero-content p { animation: hero-fade-up 0.9s var(--ease) 0.4s both; }
.hero-actions { animation: hero-fade-up 0.9s var(--ease) 0.55s both; }

@keyframes hero-zoom {
  from { transform: scale(1.15); }
  to { transform: scale(1.02); }
}
.hero-media img { animation: hero-zoom 6s var(--ease) forwards; }

@keyframes scroll-dot {
  0% { opacity: 0; top: 6px; }
  30% { opacity: 1; }
  70% { opacity: 1; }
  100% { opacity: 0; top: 20px; }
}

/* ---------- Ripple en botones ---------- */
@keyframes ripple-anim {
  to { transform: scale(2.6); opacity: 0; }
}

/* ---------- Header ---------- */
.site-header { animation: header-drop 0.6s var(--ease) both; }
@keyframes header-drop {
  from { opacity: 0; transform: translateY(-14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Back to top / WhatsApp aparición ---------- */
@keyframes float-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37,211,102,0.4); }
  50% { box-shadow: 0 0 0 10px rgba(37,211,102,0); }
}
.whatsapp-float { animation: float-pulse 2.6s infinite; }

/* ---------- Contadores (leve pop al animar) ---------- */
@keyframes counter-pop {
  from { transform: scale(0.9); opacity: 0.6; }
  to { transform: scale(1); opacity: 1; }
}
.counter-number.is-counting { animation: counter-pop 0.4s var(--ease); }
