/* ==========================================================================
   ANIMACIONES
   Keyframes y clases de revelado al hacer scroll (activadas por main.js
   mediante IntersectionObserver). Respeta prefers-reduced-motion (reset.css).
   ========================================================================== */

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

@keyframes pulseGlow {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(1.06); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ---- Revelado al hacer scroll ----
   main.js agrega [data-reveal] a elementos y alterna .is-revealed
   cuando entran en el viewport. */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

[data-reveal].is-revealed {
  opacity: 1;
  transform: translateY(0);
}

[data-reveal="fade"] {
  transform: none;
}

/* Retrasos escalonados para grupos de tarjetas */
[data-reveal-group] > *:nth-child(1) { transition-delay: 0.05s; }
[data-reveal-group] > *:nth-child(2) { transition-delay: 0.15s; }
[data-reveal-group] > *:nth-child(3) { transition-delay: 0.25s; }
[data-reveal-group] > *:nth-child(4) { transition-delay: 0.35s; }
[data-reveal-group] > *:nth-child(5) { transition-delay: 0.45s; }

.animate-float {
  animation: float 6s ease-in-out infinite;
}

.animate-glow {
  animation: pulseGlow 4s ease-in-out infinite;
}

.animate-spin-slow {
  animation: spinSlow 18s linear infinite;
}
