/* ==========================================================================
   LUX&GO — Motion Primitives (on-load entrance + scroll reveal)
   ========================================================================== */

:root {
    --motion-duration: 650ms;
    --motion-distance: 20px;
    --motion-stagger: 80ms;
    --motion-easing: cubic-bezier(0.22, 0.61, 0.36, 1);
}


/*
   On-load entrance for above-the-fold content. Pure CSS, so it runs even before
   reveal.js executes — no flash of hidden content at the top of a page.
*/

[data-enter] {
    opacity: 0;
    animation: lux-enter var(--motion-duration) var(--motion-easing) both;
}

[data-enter-delay="1"] {
    animation-delay: calc(var(--motion-stagger) * 1);
}

[data-enter-delay="2"] {
    animation-delay: calc(var(--motion-stagger) * 2);
}

[data-enter-delay="3"] {
    animation-delay: calc(var(--motion-stagger) * 3);
}

[data-enter-delay="4"] {
    animation-delay: calc(var(--motion-stagger) * 4);
}

@keyframes lux-enter {
    from {
        opacity: 0;
        transform: translateY(var(--motion-distance));
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/*
   Reveal is opt-in through the .has-motion flag that reveal.js sets on <html>.
   If JavaScript never runs, the flag never lands and all content stays visible.
*/

.has-motion [data-reveal] {
    opacity: 0;
    transform: translateY(var(--motion-distance));
    transition: opacity var(--motion-duration) var(--motion-easing),
        transform var(--motion-duration) var(--motion-easing);
}

.has-motion [data-reveal].is-visible {
    opacity: 1;
    transform: none;
}

.has-motion [data-reveal-delay="1"] {
    transition-delay: calc(var(--motion-stagger) * 1);
}

.has-motion [data-reveal-delay="2"] {
    transition-delay: calc(var(--motion-stagger) * 2);
}

.has-motion [data-reveal-delay="3"] {
    transition-delay: calc(var(--motion-stagger) * 3);
}

.has-motion [data-reveal-delay="4"] {
    transition-delay: calc(var(--motion-stagger) * 4);
}

.has-motion [data-reveal-delay="5"] {
    transition-delay: calc(var(--motion-stagger) * 5);
}

@media (prefers-reduced-motion: reduce) {
    [data-enter] {
        animation: none;
        opacity: 1;
        transform: none;
    }

    .has-motion [data-reveal],
    .has-motion [data-reveal].is-visible {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .has-motion [data-reveal-delay] {
        transition-delay: 0ms;
    }
}
