/* Movimiento: una sola entrada en portada (texto, consola y trazo de ruta) y la cabecera al hacer scroll */

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

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

@keyframes routeTrace {
  from { stroke-dashoffset: 420; }
  to { stroke-dashoffset: 0; }
}

.hero-copy > * {
  animation: heroUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.hero-copy > *:nth-child(2) { animation-delay: 0.06s; }
.hero-copy > *:nth-child(3) { animation-delay: 0.12s; }
.hero-copy > *:nth-child(n+4) { animation-delay: 0.18s; }

.telemetry-deck,
.gallery {
  animation: deckIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

.telemetry-route-active {
  stroke-dasharray: 420;
  stroke-dashoffset: 0;
  animation: routeTrace 1.6s cubic-bezier(0.45, 0, 0.2, 1) 0.35s both;
}

/* Cabecera al hacer scroll */
.header {
  transition: background-color 200ms ease, border-color 200ms ease;
}
.header.scrolled {
  background: rgba(5, 11, 20, 0.96);
  border-bottom-color: var(--line2);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
