/* ==============================================================
   06 · MOVIMIENTO
   --------------------------------------------------------------
   El movimiento acompaña la lectura, no compite con ella: todo
   entra una sola vez, hacia arriba, en menos de un segundo.
   Todo se apaga si el visitante pidió reducir movimiento.
   ============================================================== */

@keyframes aparecer { from { opacity: 0; transform: translateY(1.25rem); } to { opacity: 1; transform: none; } }
@keyframes aparecer-suave { from { opacity: 0; } to { opacity: 1; } }
@keyframes descubrir { from { clip-path: inset(100% 0 0 0); transform: scale(1.08); } to { clip-path: inset(0); transform: none; } }
@keyframes desplegar { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes bajar { from { transform: translateY(-100%); } to { transform: translateY(300%); } }
@keyframes trazar { to { stroke-dashoffset: 0; } }

/* Entrada al cargar la página (portada y cabeceras) */
.aparecer { animation: aparecer 0.9s var(--curva) both; }

/* Aparición al hacer scroll. principal.js agrega .visible al entrar
   en pantalla. Solo se activa si <html> tiene la clase .js, así que
   sin JavaScript el contenido se ve normal. */
.js .revelar {
  opacity: 0; transform: translateY(2rem);
  transition: opacity 0.8s var(--curva), transform 0.8s var(--curva);
  transition-delay: var(--retraso, 0ms);
}
.js .revelar[data-desde='izquierda'] { transform: translateX(-2rem); }
.js .revelar[data-desde='derecha'] { transform: translateX(2rem); }
.js .revelar[data-desde='escala'] { transform: scale(0.96); }
.js .revelar.visible { opacity: 1; transform: none; }

/* Filete que se dibuja de izquierda a derecha */
.js .filete-animado { transform: scaleX(0); transform-origin: left; transition: transform 0.7s var(--curva) 0.1s; }
.js .filete-animado.visible { transform: scaleX(1); }
.titulo-seccion--centro .filete-animado { transform-origin: center; }

/* Tarjetas que entran al cambiar el filtro del portafolio */
.entrando { animation: aparecer 0.55s var(--curva) both; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important; animation-delay: 0ms !important;
    transition-duration: 0.01ms !important; transition-delay: 0ms !important;
  }
  html { scroll-behavior: auto; }
  .js .revelar, .js .filete-animado { opacity: 1; transform: none; }
}
