/* Intare — motion and scroll-transition styles. Loaded after style.css.
 *
 * Scope note: this file holds only what CSS must own — the Lenis contract, a
 * couple of overscan rules that let a parallax move without exposing an edge,
 * and the reduced-motion kill switch. It never hides content. All reveal
 * "from" states are created and cleared at runtime by assets/js/animations.js,
 * so a page with no working JavaScript is a page with nothing to reveal.
 */

/* =====================================================================
   1. LENIS (smooth wheel scroll, site-wide)
   Lenis runs in its default window-scrolling mode — it does NOT transform a
   wrapper element. That is load-bearing: a transformed wrapper would kill the
   packages filter rail's position:sticky, and would break ScrollTrigger's
   fixed-position pinning on #cta-zoom. Do not pass `wrapper`/`content`.
   ===================================================================== */
html.lenis,
html.lenis body{height:auto}

.lenis.lenis-smooth{scroll-behavior:auto!important}
/* Panels that scroll on their own (the mobile drawer) opt out of Lenis via
   data-lenis-prevent, added in ui.js. Contain their overscroll so a flick
   inside them never chains to the page behind. */
.lenis.lenis-smooth [data-lenis-prevent]{overscroll-behavior:contain}
.lenis.lenis-stopped{overflow:hidden}

/* =====================================================================
   2. PARALLAX OVERSCAN
   A layer that drifts must be taller than its frame, or the drift reveals the
   background at one edge. These rules only add bleed — they change nothing
   about layout or stacking, and are harmless if the parallax never runs.
   ===================================================================== */
@media (min-width:1024px){
  html.has-anim .split-why .sw-bg{top:-7%;bottom:-7%}
  html.has-anim .vhero .vh-bgs{top:-7%;bottom:-7%}
}

/* GPU hints, kept narrow. Applied to the handful of layers that are actually
   scrubbed, never to the reveal targets (those are short-lived and GSAP adds
   its own will-change for the duration of the tween). */
@media (min-width:1024px){
  html.has-anim .split-why .sw-bg,
  html.has-anim .atlas .stage{will-change:transform}
}

/* =====================================================================
   3. REDUCED MOTION
   animations.js bails out entirely, and has-anim.js never sets the class, so
   this is the third line of defence rather than the first.
   ===================================================================== */
@media (prefers-reduced-motion: reduce){
  html.lenis,
  html.lenis body{height:auto}
  .lenis.lenis-smooth{scroll-behavior:auto!important}
  html.has-anim .split-why .sw-bg,
  html.has-anim .vhero .vh-bgs{top:0;bottom:0;will-change:auto}
  html.has-anim .atlas .stage{will-change:auto}
}
