/* Breeze Scroll Engine — front-end.

   Deliberately tiny. The engine animates with GSAP, so this file only needs to
   handle the reduced-motion escape hatch and a couple of opt-in helpers.

   Nothing here imposes layout on a section. The engine reads the page the
   theme built; it does not restyle it. */

/* Smooth scrolling is deliberately NOT done with `scroll-behavior: smooth` on
   the scroll root.

   That property makes the browser animate every programmatic scroll, including
   the ones ScrollTrigger performs to snap — so the browser and GSAP end up
   animating the same scroll position at once and snapping silently does
   nothing. ScrollTrigger even tries to defend itself by writing
   `scroll-behavior: auto` onto the scroller, which is the fingerprint of this
   exact conflict.

   Anchor links are smoothed in JavaScript instead, per click, where nothing
   else is competing for the scroll position. See initSmoothLinks().

   Native snap mode follows the same rule, for a related reason: ScrollTrigger
   writes a smooth scroll-behavior back onto the scroller after every refresh
   when its CSS asks for one, which stalls any script that scrolls the
   container frame by frame. See breeze_scroll_native_css(). */

/* GSAP writes transforms on animation targets; promoting them for the duration
   of the entrance avoids a repaint of the whole section on lower-end mobile. */
html.breeze-scroll-active .breeze-scroll-section--ready {
	will-change: auto;
}

/* Opt-in helper: a full-height section that behaves on mobile browsers whose
   toolbars resize the viewport. Sites are free to ignore it and use their own
   sizing — the engine measures whatever is rendered either way. */
.breeze-scroll-viewport {
	min-height: 100vh;
	/* dvh follows the visible area as browser chrome shows and hides, which is
	   what 100vh was always assumed to do and never did on iOS. */
	min-height: 100dvh;
}

/* Everything the engine does is decoration, so reduced motion switches all of
   it off rather than merely shortening it. The runtime makes the same call in
   JavaScript; this is the belt to that pair of braces, covering the window
   before the runtime executes. */
@media (prefers-reduced-motion: reduce) {
	html.breeze-scroll-prehide,
	html.breeze-scroll-prehide body {
		opacity: 1 !important;
	}

	.breeze-scroll-section--ready,
	.breeze-scroll-section--ready * {
		animation: none !important;
		transition: none !important;
	}
}
