/* =========================================================
   CotizadorIsapres — Animaciones y microinteracciones
   ========================================================= */

/* ---- Reveal on scroll ---- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1);
  will-change: opacity, transform;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Stagger automático dentro de grids */
.cards-4 .reveal.visible:nth-child(2) { transition-delay: .08s; }
.cards-4 .reveal.visible:nth-child(3) { transition-delay: .16s; }
.cards-4 .reveal.visible:nth-child(4) { transition-delay: .24s; }
.cards-3 .reveal.visible:nth-child(2) { transition-delay: .08s; }
.cards-3 .reveal.visible:nth-child(3) { transition-delay: .16s; }

/* ---- Entrada del Hero ---- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- Spinner del botón ---- */
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Pulso WhatsApp ---- */
@keyframes pulse-ws {
  0%   { box-shadow: 0 10px 28px rgba(37,211,102,.5), 0 0 0 0 rgba(37,211,102,.45); }
  70%  { box-shadow: 0 10px 28px rgba(37,211,102,.5), 0 0 0 16px rgba(37,211,102,0); }
  100% { box-shadow: 0 10px 28px rgba(37,211,102,.5), 0 0 0 0 rgba(37,211,102,0); }
}

/* ---- Respeta accesibilidad ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}
