/* Mejora progresiva: los elementos siempre son visibles, incluso si falla el script. */

@keyframes landing-enter {
    from { opacity: 0.6; translate: var(--landing-enter-x, 0) var(--landing-enter-y, 12px); }
    to { opacity: 1; translate: none; }
}

@keyframes landing-modal-enter {
    from { opacity: 0.6; transform: translateY(6px) scale(0.99); }
    to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: no-preference) {
    .landing-page [data-landing-reveal].is-entering {
        animation: landing-enter 1.2s cubic-bezier(0.25, 0.1, 0.25, 1);
        animation-delay: var(--landing-enter-delay, 0ms);
    }

    .landing-page [data-landing-reveal="left"] {
        --landing-enter-x: -16px;
        --landing-enter-y: 0;
    }

    .landing-page [data-landing-reveal="right"] {
        --landing-enter-x: 16px;
        --landing-enter-y: 0;
    }

    .landing-objectives-grid [data-landing-reveal]:nth-child(2) {
        --landing-enter-delay: 160ms;
    }

    .landing-objectives-grid [data-landing-reveal]:nth-child(3) {
        --landing-enter-delay: 320ms;
    }

    .landing-objectives-grid [data-landing-reveal]:nth-child(4) {
        --landing-enter-delay: 480ms;
    }

    .landing-page [data-landing-reveal]:focus-within {
        animation: none;
    }

    .landing-medical-modal[open] {
        animation: landing-modal-enter 0.35s ease-out;
    }

    .landing-faq details[open] .landing-faq-answer {
        animation: landing-enter 0.45s ease-out;
    }

    .landing-cta,
    .landing-admin-link,
    .landing-modal-close,
    .landing-faq summary {
        transition: color 0.22s ease, background-color 0.22s ease,
            border-color 0.22s ease, box-shadow 0.22s ease, translate 0.22s ease;
    }

    .landing-cta:hover,
    .landing-admin-link:hover {
        translate: 0 -1px;
    }
}

@media print {
    .landing-page [data-landing-reveal],
    .landing-medical-modal[open],
    .landing-faq details[open] .landing-faq-answer {
        animation: none !important;
        opacity: 1 !important;
        translate: none !important;
        transform: none !important;
    }
}
