/* ==========================================================================
   animations.css — Animaciones y revelado al hacer scroll
   ========================================================================== */

/* Revelado: el JS añade .is-visible con IntersectionObserver.
   Si JS está desactivado, el contenido se ve igualmente (.js-ready la gestiona). */
.js-ready .reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: var(--delay, 0ms);
  will-change: opacity, transform;
}
.js-ready .reveal--left { transform: translateX(-28px); }
.js-ready .reveal--scale { transform: scale(0.96); }
.js-ready .reveal.is-visible { opacity: 1; transform: none; }

@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.55); }
  70% { box-shadow: 0 0 0 10px rgba(var(--accent-rgb), 0); }
  100% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0); }
}

/* Entrada escalonada del hero (sin esperar al scroll) */
.js-ready .hero [data-hero] { opacity: 0; transform: translateY(22px); animation: heroIn 0.9s var(--ease) forwards; animation-delay: var(--delay, 0ms); }
@keyframes heroIn { to { opacity: 1; transform: none; } }

/* Accesibilidad: respeta "reducir movimiento" */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .js-ready .reveal, .js-ready .hero [data-hero] { opacity: 1; transform: none; }
  .terminal { animation: none; }
}
