/* Shared motion primitives (static/js/ui_motion.js).
   [data-reveal]    – fades and lifts into view once; content stays visible without JS.
   [data-spotlight] – soft glow that follows the pointer on devices with a mouse.
   Everything is switched off under prefers-reduced-motion. */

:root {
    --ui-ease: cubic-bezier(.22, 1, .36, 1);
}

.js-reveal [data-reveal] {
    opacity: 0;
}

.js-reveal [data-reveal].is-visible {
    opacity: 1;
    animation: ui-reveal .8s var(--ui-ease) calc(var(--reveal-i, 0) * 90ms) backwards;
}

@keyframes ui-reveal {
    from {
        opacity: 0;
        transform: translateY(26px);
    }
}

[data-spotlight] {
    position: relative;
}

[data-spotlight]::before {
    position: absolute;
    z-index: 1;
    inset: 0;
    border-radius: inherit;
    content: "";
    opacity: 0;
    pointer-events: none;
    background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), var(--spot, rgba(255, 122, 61, .16)), transparent 62%);
    transition: opacity .35s ease;
}

[data-spotlight]:hover::before {
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    .js-reveal [data-reveal] {
        opacity: 1;
    }

    .js-reveal [data-reveal].is-visible {
        animation: none;
    }

    [data-spotlight]::before {
        display: none;
    }
}
