/* ============================================================================
   Archivo: css/animations.css
   Versión: 2.0.0
   Propósito: Efectos de entrada (fade / scroll) y transiciones visuales.
   Dependencias: css/main.css
   ============================================================================ */

.animar-texto {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards;
}

.animar-boton {
    opacity: 0;
    animation: fadeIn 1s ease forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }
.delay-4 { animation-delay: 0.8s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* El contenido animado permanece visible desde el inicio (solo se desplaza).
   Así el texto no queda oculto si el observador no llega a ejecutarse y
   Lighthouse/WCAG no detectan un contraste falso por opacidad. */
.animar-scroll {
    transform: translateY(40px);
    transition: transform 0.8s ease;
}

.animar-scroll.visible {
    transform: translateY(0);
}

/* Si el navegador no soporta IntersectionObserver o el usuario prefiere
   menos movimiento, el contenido debe verse igual. */
.no-js .animar-scroll,
.no-js .animar-texto,
.no-js .animar-boton {
    opacity: 1;
    transform: none;
    animation: none;
}

@media (prefers-reduced-motion: reduce) {
    .animar-texto,
    .animar-boton,
    .animar-scroll {
        opacity: 1;
        transform: none;
        animation: none;
        transition: none;
    }
}
