/* ============================================================
   LI●T.CL — Motion layer (Lenis + GSAP/ScrollTrigger)
   Framework-agnostic: shared by index.html and the subpages.
   Everything is gated by html.js so crawlers / no-JS see content.
   ============================================================ */

/* ---------- Lenis (official recommended CSS) ---------- */
html.lenis,
html.lenis body {
    height: auto;
}
.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}
.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}
.lenis.lenis-stopped {
    overflow: hidden;
}
.lenis.lenis-smooth iframe {
    pointer-events: none;
}

/* ---------- Scroll progress bar ---------- */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, #a3e635, #39b8fd);
    z-index: 100;
    border-radius: 0 2px 2px 0;
    box-shadow: 0 0 12px rgba(163, 230, 53, 0.6);
}

/* ---------- Navigation hide / reveal ---------- */
.glass-nav,
.topnav {
    transition: background-color 0.4s ease, box-shadow 0.4s ease,
        transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}
.glass-nav.nav-hidden,
.topnav.nav-hidden {
    transform: translateY(-104%);
}

/* ---------- Media zoom wrapper ---------- */
.zoom-media {
    overflow: hidden;
    isolation: isolate;
}
.zoom-media > img,
.zoom-media > .zoom-target {
    will-change: transform;
}

/* ---------- Mask reveal (clip-path) ---------- */
html.js .reveal-mask:not(.revealed) {
    clip-path: inset(0 0 100% 0);
    -webkit-clip-path: inset(0 0 100% 0);
}
.reveal-mask {
    transition: clip-path 1.1s cubic-bezier(0.22, 1, 0.36, 1),
        -webkit-clip-path 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Pre-state while JS boots (no flash, JS-gated) ---------- */
html.js [data-reveal],
html.js [data-hero] {
    opacity: 0;
}
html.js [data-reveal].revealed,
html.js [data-hero].revealed {
    opacity: 1;
}

/* ---------- Hero intro (pre-state while JS boots) ---------- */
html.js [data-hero] {
    will-change: opacity, transform;
}

/* GSAP drives these inline; disable the CSS transition to avoid double motion */
html.motion-ready [data-reveal] {
    transition: none !important;
}

/* ---------- Skip link ---------- */
.skip-link {
    position: fixed;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 200;
    transform: translateY(-160%);
    background: #a3e635;
    color: #0f172a;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.7rem 1.1rem;
    border-radius: 0.7rem;
    box-shadow: 0 12px 32px -10px rgba(15, 23, 42, 0.55);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.skip-link:focus {
    transform: translateY(0);
    outline: 2px solid #0f172a;
    outline-offset: 2px;
}

/* ---------- Reduced motion: kill everything ---------- */
@media (prefers-reduced-motion: reduce) {
    .glass-nav,
    .topnav,
    .skip-link {
        transition: none;
    }
    .glass-nav.nav-hidden,
    .topnav.nav-hidden {
        transform: none;
    }
    html.js .reveal-mask:not(.revealed),
    .reveal-mask {
        clip-path: none !important;
        -webkit-clip-path: none !important;
        transition: none;
    }
    .zoom-media > img,
    .zoom-target,
    [data-hero] {
        transform: none !important;
        will-change: auto;
    }
}
