/* ==========================================================================
   ANZOLAHERRERA — Animaciones
   Todas se desactivan si el usuario prefiere movimiento reducido.
   ========================================================================== */

/* --- Aparición al hacer scroll (activada por main.js) --- */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* --- Entrada del héroe --- */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

.hero__content > *,
.page-hero .container > * {
  animation: fade-up 0.8s var(--ease) both;
}

.hero__content > :nth-child(2),
.page-hero .container > :nth-child(2) { animation-delay: 80ms; }
.hero__content > :nth-child(3),
.page-hero .container > :nth-child(3) { animation-delay: 160ms; }
.hero__content > :nth-child(4),
.page-hero .container > :nth-child(4) { animation-delay: 240ms; }
.hero__content > :nth-child(5),
.page-hero .container > :nth-child(5) { animation-delay: 320ms; }

/* --- Panel de estado: filas que se "verifican" en secuencia --- */
@keyframes row-in {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: none; }
}

@keyframes badge-in {
  0% { opacity: 0; transform: scale(0.8); }
  60% { opacity: 1; transform: scale(1.06); }
  100% { opacity: 1; transform: scale(1); }
}

.status-panel {
  animation: fade-up 1s var(--ease) 0.2s both;
}

.status-list li {
  animation: row-in 0.6s var(--ease) both;
}

.status-list li .status-badge {
  animation: badge-in 0.5s var(--ease) both;
}

.status-list li:nth-child(1), .status-list li:nth-child(1) .status-badge { animation-delay: 0.6s; }
.status-list li:nth-child(2), .status-list li:nth-child(2) .status-badge { animation-delay: 0.85s; }
.status-list li:nth-child(3), .status-list li:nth-child(3) .status-badge { animation-delay: 1.1s; }
.status-list li:nth-child(4), .status-list li:nth-child(4) .status-badge { animation-delay: 1.35s; }
.status-list li:nth-child(5), .status-list li:nth-child(5) .status-badge { animation-delay: 1.6s; }
.status-list li:nth-child(6), .status-list li:nth-child(6) .status-badge { animation-delay: 1.85s; }

/* Línea de escaneo sobre el panel */
@keyframes scan {
  0% { transform: translateY(-100%); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(520%); opacity: 0; }
}

.status-panel::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 18%;
  background: linear-gradient(180deg, transparent, rgba(242, 145, 2, 0.08), transparent);
  border-radius: var(--radius-lg);
  pointer-events: none;
  animation: scan 4.5s linear 2.2s infinite;
}

/* Punto de "en vivo" */
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(95, 211, 163, 0.6); }
  70% { box-shadow: 0 0 0 8px rgba(95, 211, 163, 0); }
  100% { box-shadow: 0 0 0 0 rgba(95, 211, 163, 0); }
}

.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  background: #5fd3a3;
  animation: pulse 2s infinite;
}

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

  .js .reveal { opacity: 1; transform: none; }
  .status-panel::after { display: none; }
}
