/* -----------------------------------------------------------
   Global resets and a11y utilities
   Loaded site-wide; component files depend on this.
   ----------------------------------------------------------- */

/* Predictable sizing: padding and border count toward the declared width. */
*,
*::before,
*::after {
	box-sizing: border-box;
}

/* In-page anchor links (e.g. a hero button jumping to a section lower on the
   page) must land *below* the sticky header rather than under it.
   --site-header-height is defined in header.css. The extra rem is breathing
   room above the target. */
html {
	scroll-padding-top: calc(var(--site-header-height, 72px) + 1rem);
}

/* Logged-in users see the WP admin bar pushing everything down; add its
   height so anchored sections still clear the header for them too. */
html:has(body.admin-bar) {
	scroll-padding-top: calc(var(--site-header-height, 72px) + 32px + 1rem);
}

/* Smooth-scroll to anchors, unless the visitor prefers reduced motion. */
@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
}

/* WP's theme.json sets body typography, but not margin. */
body {
	margin: 0;
}

/* Form controls inherit typography by default in only some browsers. */
button,
input,
select,
textarea {
	font: inherit;
	color: inherit;
}

/* Media never overflows its container. */
img,
svg,
video {
	max-width: 100%;
	height: auto;
}

/* WP screen-reader-only utility */
.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Skip-to-content link, visible on focus */
.skip-link:focus {
	position: absolute;
	top: var(--wp--preset--spacing--30);
	inset-inline-start: var(--wp--preset--spacing--30);
	z-index: 10000;
	width: auto;
	height: auto;
	padding: var(--wp--preset--spacing--20) var(--wp--preset--spacing--30);
	clip: auto;
	background: var(--wp--preset--color--dark);
	color: var(--wp--preset--color--white);
	border-radius: var(--wp--custom--radius--base);
	text-decoration: none;
}
