/* ==========================================================
   animations.css — movimiento
   Todo se desactiva si el usuario pide "reducir movimiento".
   ========================================================== */

/* Cursor del logo */
.cursor {
  display: inline-block;
  width: 0.5em;
  height: 1.05em;
  margin-left: 2px;
  vertical-align: -0.17em;
  border-radius: 1px;
  background: var(--a1);
  animation: blink 1.1s steps(1) infinite;
}

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

/* Punto de "disponible" */
.status__dot {
  animation: ping 2.2s var(--ease) infinite;
}

@keyframes ping {
  0%   { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.55); }
  70%  { box-shadow: 0 0 0 8px rgba(22, 163, 74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); }
}

/* Manchas del fondo: deriva lenta pero visible, con recorrido irregular */
.blob {
  will-change: transform;
}

.blob--1 { animation: drift-1 16s ease-in-out infinite alternate; }
.blob--2 { animation: drift-2 19s ease-in-out infinite alternate; }
.blob--3 { animation: drift-3 23s ease-in-out infinite alternate; }

@keyframes drift-1 {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(-140px, 90px) scale(1.12); }
  66%  { transform: translate(-60px, 180px) scale(0.92); }
  100% { transform: translate(-200px, 40px) scale(1.05); }
}

@keyframes drift-2 {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(160px, -80px) scale(1.1); }
  66%  { transform: translate(260px, 60px) scale(0.9); }
  100% { transform: translate(100px, 140px) scale(1); }
}

@keyframes drift-3 {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(-120px, -100px) scale(1.15); }
  66%  { transform: translate(80px, -160px) scale(0.95); }
  100% { transform: translate(-60px, 40px) scale(1.08); }
}

/* Entrada del hero: una sola secuencia al cargar */
.hero > .container > * {
  animation: rise 0.9s var(--ease) both;
}

.hero > .container > :nth-child(1) { animation-delay: 0.05s; }
.hero > .container > :nth-child(2) { animation-delay: 0.15s; }
.hero > .container > :nth-child(3) { animation-delay: 0.25s; }
.hero > .container > :nth-child(4) { animation-delay: 0.35s; }
.hero > .container > :nth-child(5) { animation-delay: 0.45s; }
.hero > .container > :nth-child(6) { animation-delay: 0.55s; }

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}

/* Aparición al hacer scroll (solo si JS está activo) */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: calc(var(--i, 0) * 80ms);
}

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

/* Movimiento reducido */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }

  .cursor {
    animation: none;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}
