/* ═══════════════════════════════════════════════════════════════
   SUPERFLY — SMOOTH SCROLL (Lenis)

   Lenis takes the wheel/trackpad input and eases the page to where
   it is going instead of jumping there. It still drives the REAL
   window scroll, so everything that reads `scrollY` or a
   `getBoundingClientRect()` keeps working untouched — the navbar's
   `is-scrolled`, the teardown sequence, every ScrollTrigger.

   Movement: assets/js/smooth-scroll.js
   Loaded on every page by superfly_smooth_scroll_assets().

   ── why these rules are here and not from the CDN ──
   Lenis ships a stylesheet, but lenis@1.1.5 has no `dist/lenis.css`
   (checked: 404). It is five rules, so they live here rather than
   costing a second request to a path that may or may not exist in
   the next version.

   Nothing in this file styles anything Superfly-specific. The pink
   scrollbar is assets/css/scrollbar.css and is unaffected: Lenis
   moves the native scroll, so the native bar still tracks it.
   ═══════════════════════════════════════════════════════════════ */


/* Lenis measures the document itself; a locked height hides the
   bottom of long pages from it. */
html.lenis,
html.lenis body {
	height: auto;
}

/* `scroll-behavior: smooth` and Lenis are two eases fighting over
   the same scroll position, which reads as a stutter on every
   anchor jump. Lenis wins while it is running.

   Scoped to `.lenis`, NOT to Lenis's own `.lenis-smooth`. That
   second class is only on the page while a smooth scroll is
   actually in flight — measured, not assumed: at rest the class
   list is just `lenis`, and `lenis.isSmooth` reads false. Both of
   these rules have to hold the whole time, so they hang off the
   class that is always there. */
html.lenis {
	scroll-behavior: auto !important;
}

/* Panels that scroll on their own — the cart drawer, the menu
   drawer — are marked `data-lenis-prevent` by smooth-scroll.js.
   This stops a flick inside them from carrying on into the page
   once they hit their own end. */
html.lenis [data-lenis-prevent] {
	overscroll-behavior: contain;
}

/* smooth-scroll.js stops Lenis while a drawer is open */
.lenis.lenis-stopped {
	overflow: hidden;
}

/* An iframe swallows the wheel event mid-scroll and the page stops
   dead under the cursor. Ignore pointers on them while moving. */
.lenis.lenis-scrolling iframe {
	pointer-events: none;
}


/* ───────────────────────────────────────────────────────────────
   REDUCE MOTION
   smooth-scroll.js never starts Lenis when the browser asks for
   less motion, so `html` keeps no `lenis` class and none of the
   rules above apply. Nothing to undo here — this note is only so
   the next person does not go looking for the switch.
   ─────────────────────────────────────────────────────────────── */
