/* NOUS — movimiento. Estado por defecto visible si JS no corre; las clases .rv/.words las pone Alpine. */

@keyframes marquee {
  to {
    transform: translateX(-100%);
  }
}

@keyframes vmarquee {
  to {
    transform: translateY(calc(-50% - 9px));
  }
}

@keyframes spin {
  to {
    rotate: 360deg;
  }
}

@keyframes float {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -14px;
  }
}

@keyframes blink {
  50% {
    opacity: 0.35;
  }
}

@keyframes typing {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.5;
  }
  30% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

@keyframes msgIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.96);
  }
}

@keyframes dash {
  to {
    stroke-dashoffset: -20;
  }
}

@keyframes breathe {
  50% {
    box-shadow: 0 0 0 20px rgba(255, 255, 255, 0.16), 0 0 0 42px rgba(255, 255, 255, 0.05), var(--shadow);
  }
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes pop {
  from {
    transform: scale(0);
  }
}

@keyframes wordIn {
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes viewIn {
  from {
    opacity: 0;
    filter: blur(8px);
    transform: translateY(16px);
  }
}

/* Revelado genérico */
.rv {
  opacity: 0;
  transform: translateY(28px);
  filter: blur(6px);
  transition: opacity 0.85s var(--ease), transform 0.95s var(--ease), filter 0.85s var(--ease);
  transition-delay: var(--d, 0ms);
}

.rv.in {
  opacity: 1;
  transform: none;
  filter: none;
}

.rv.scale {
  transform: scale(0.94) translateY(20px);
}

/* Titulares palabra por palabra con desenfoque */
.words .w {
  display: inline-block;
  opacity: 0;
  filter: blur(12px);
  transform: translateY(0.4em);
  transition: opacity 0.8s var(--ease), filter 0.8s var(--ease), transform 0.9s var(--ease);
  transition-delay: calc(var(--d, 0ms) + var(--i) * 45ms);
}

.words.in .w {
  opacity: 1;
  filter: none;
  transform: none;
}

/* Palabras que se iluminan con el scroll */
.scrub .w {
  color: rgba(185, 169, 255, 0.22);
  transition: color 0.45s var(--ease);
}

.scrub .w.lit {
  color: var(--text);
}

.scrub .tone .w.lit {
  color: var(--lav);
}

/* Vistas de ruta */
.view {
  animation: viewIn 0.8s var(--ease) both;
}

/* Foco de luz bajo el cursor */
.spot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), rgba(185, 169, 255, 0.12), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s;
  z-index: 0;
}

.spot:hover::after {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .marquee-track,
  .vcol,
  .orbit-ring,
  .orbit-ring .sat {
    animation: none !important;
  }
}
