/* ============================================================
   WOXANT.ai — animaciones
   Sistema replicado de paleta.md §11:
   scroll-reveal 800ms ease-out · stagger 100/200/300/400ms
   curvas .15s / .3s / .7s cubic-bezier(.4,0,.2,1)
   marquee 15s lineal · pulse 2s/4s/6s · ping 1s
   ============================================================ */

/* ---- @keyframes propios ------------------------------------ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

@keyframes fadeInScale {
  from { opacity: 0; transform: scale(.8); }
  to   { opacity: 1; transform: scale(1); }
}

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

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

/* Glow con el cian de Woxant (reemplaza el violeta de la referencia) */
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 20px rgba(90, 228, 255, .3); }
  50%      { box-shadow: 0 0 40px rgba(90, 228, 255, .6); }
}

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

@keyframes woxPulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: .5; }
}

@keyframes woxPing {
  75%, 100% { transform: scale(2); opacity: 0; }
}

/* Órbita de los nodos del hero */
@keyframes orbit {
  from { transform: rotate(0deg)   translateX(var(--orbit-r)) rotate(0deg); }
  to   { transform: rotate(360deg) translateX(var(--orbit-r)) rotate(-360deg); }
}

/* Trazo de las líneas que unen los nodos */
@keyframes dashFlow {
  to { stroke-dashoffset: -32; }
}

/* Puntitos "escribiendo" del mockup de chat */
@keyframes typing {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

/* ---- Scroll reveal ------------------------------------------
   Estado inicial: invisible y desplazado.
   JS agrega .is-visible al entrar en viewport (IntersectionObserver). */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity var(--wox-t-reveal) ease-out,
              transform var(--wox-t-reveal) ease-out;
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger por retardo (mismos valores que la referencia) */
.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }

/* ---- Utilidades de animación en loop ----------------------- */
.animate-pulse-2 { animation: woxPulse 2s var(--wox-ease) infinite; }
.animate-pulse-4 { animation: woxPulse 4s var(--wox-ease) infinite; }
.animate-pulse-6 { animation: woxPulse 6s var(--wox-ease) infinite; }
.animate-ping    { animation: woxPing 1s var(--wox-ease) infinite; }
.animate-float   { animation: float 6s ease-in-out infinite; }
.animate-glow    { animation: pulseGlow 3s ease-in-out infinite; }

/* ============================================================
   OBLIGATORIO — respeto por prefers-reduced-motion
   Se apagan TODAS las animaciones en loop y los reveals quedan
   en su estado final visible (nada queda invisible por accidente).
   ============================================================ */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }

  /* los reveals arrancan ya visibles: nunca contenido oculto */
  .reveal,
  .reveal.is-visible {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  /* animaciones en loop: apagadas del todo */
  .animate-pulse-2,
  .animate-pulse-4,
  .animate-pulse-6,
  .animate-ping,
  .animate-float,
  .animate-glow,
  .hero-node,
  .hero-node__in,
  .hero-core,
  .typing-dot {
    animation: none !important;
  }

  /* el marquee se detiene y queda legible */
  .marquee__track {
    animation: none !important;
    transform: none !important;
  }
  .marquee { overflow-x: auto; }

  .hero-link { animation: none !important; stroke-dashoffset: 0 !important; }
}
