/* ================================
   ANIMACIONES
   Todas las animaciones y transiciones
   de entrada. Se activan con JS
   añadiendo clases al hacer scroll.
================================ */

/* Estado inicial — invisible antes de animar */
.fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in {
  opacity: 0;
  transition: opacity 1s ease;
}

.slide-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

/* Estado visible — cuando JS añade .visible */
.fade-up.visible,
.fade-in.visible,
.slide-left.visible {
  opacity: 1;
  transform: translate(0, 0);
}

/* Delays escalonados para grupos de elementos */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }

/* Animación de texto hero (se aplica con JS) */
@keyframes reveal-text {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0% 0 0);   }
}

.text-reveal {
  animation: reveal-text 1.2s cubic-bezier(0.77, 0, 0.18, 1) forwards;
}

/* Línea decorativa que crece */
@keyframes line-grow {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

.line-grow {
  transform-origin: left center;
  animation: line-grow 1s ease forwards;
}

/* Respeta preferencias de accesibilidad */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}