/* motion.css — styling contract for motion.js.
   Loaded on every public page. Skipped on admin/intake (data-no-public-nav). */

/* ── Scroll reveal ───────────────────────────────────────── */
.reveal,
[data-reveal] {
    opacity: 0;
    transform: translateY(10px);
    will-change: opacity, transform;
    transition: opacity .4s ease-out, transform .4s ease-out;
}

.reveal.is-visible,
[data-reveal].is-visible {
    opacity: 1;
    transform: none;
}

.reveal-stagger>* {
    opacity: 0;
    transform: translateY(10px);
    will-change: opacity, transform;
    transition: opacity .4s ease-out, transform .4s ease-out;
}

.reveal-stagger>.is-visible {
    opacity: 1;
    transform: none;
}

[data-reveal-on-load] {
    opacity: 0;
    transform: translateY(10px);
    will-change: opacity, transform;
    transition: opacity .5s ease-out, transform .5s ease-out;
}

[data-reveal-on-load].is-visible {
    opacity: 1;
    transform: none;
}

/* ── Hero WebGL layer ────────────────────────────────────── */
.hero-fx {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.45;
    z-index: 0;
    overflow: hidden;
    /* CSS gradient fallback if WebGL/three never load */
    background: radial-gradient(ellipse at 70% 30%, rgba(0, 196, 216, .14), transparent 60%);
}

.hero-fx-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* Make sure hero copy stays above the FX layer. */
.hero {
    position: relative;
}

.hero>.page,
.hero>.hero-inner,
.hero>.hero-grid {
    position: relative;
    z-index: 1;
}

/* ── Lottie mounts ───────────────────────────────────────── */
.lottie-mount {
    width: 100%;
    max-width: 360px;
    aspect-ratio: 1 / 1;
    display: block;
}

.lottie-mount svg {
    display: block;
    width: 100%;
    height: 100%;
}

/* ── Page transition fader ───────────────────────────────── */
.page-fader {
    position: fixed;
    inset: 0;
    background: #000;
    opacity: 0;
    pointer-events: none;
    z-index: 9999;
    transition: opacity .2s ease-out;
}

.page-fader.is-fading {
    opacity: 1;
    pointer-events: auto;
}

/* ── Reduced motion: non-negotiable a11y guarantee ───────── */
@media (prefers-reduced-motion: reduce) {

    .reveal,
    [data-reveal],
    .reveal-stagger>*,
    [data-reveal-on-load] {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .hero-fx {
        display: none !important;
    }

    .page-fader {
        transition: none !important;
        opacity: 0 !important;
    }
}