/* ==========================================================================
   Abhimo shared smooth-scroll layer  (loaded on every public page)
   Works together with smooth.js (Lenis + GSAP ScrollTrigger).
   If the CDN libraries fail to load, none of this changes the page.
   ========================================================================== */

/* --- Lenis base ----------------------------------------------------------
   style.css sets `scroll-behavior: smooth` on everything. That fights Lenis,
   so it is switched off ONLY while Lenis is running (html.lenis).           */
html.lenis,
html.lenis body {
    height: auto;
}

html.lenis,
html.lenis body,
html.lenis * {
    scroll-behavior: auto !important;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

[data-lenis-prevent] {
    overscroll-behavior: contain;
}

/* let maps / embeds be dragged, but not while the page is scrolling past them */
.lenis.lenis-scrolling iframe {
    pointer-events: none;
}

/* --- Scroll progress bar -------------------------------------------------- */
#smProgress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #0099ff 0%, #005eff 100%);
    transform: scaleX(0);
    transform-origin: 0 50%;
    z-index: 100000;
    pointer-events: none;
    box-shadow: 0 0 10px rgba(0, 119, 255, 0.55);
}

/* --- Navbar: hides when scrolling down, returns when scrolling up -------- */
.custom-navbar.sm-nav-hidden {
    transform: translateY(-105%);
    box-shadow: none;
}

/* --- Magnetic buttons (uses the individual `translate` property so it
       never fights hover transforms) ------------------------------------- */
.sm-magnetic {
    translate: var(--sm-mx, 0px) var(--sm-my, 0px);
}