/**
 * Site-wide smooth scrolling.
 *
 * This file is the baseline: it works with JavaScript off and covers every
 * scroll the browser starts itself - a link to an #anchor, the address bar's
 * hash on load, scrollIntoView() from support.js, Home/End/PageDown, and
 * WooCommerce jumping to a checkout error.
 *
 * assets/js/smooth-scroll.js adds the second layer, easing the mouse wheel.
 */

:root {
	/* Breathing room above whatever an anchor lands on. The header is not
	   sticky, so this only has to keep a heading off the very top edge;
	   raise it here if the header is ever pinned. */
	--sa-scroll-offset: 24px;
}

html {
	scroll-behavior: smooth;
	scroll-padding-top: var(--sa-scroll-offset);
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}
