/*
 * Globals — minimal modern reset + base body, scroll, focus.
 */

*, *::before, *::after { box-sizing: border-box; }

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-behavior: smooth;
	scrollbar-gutter: stable;
}

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

body {
	margin: 0;
	background: var(--liv-ink-800);
	color: var(--liv-paper);
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--base);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

img, svg, video, canvas, picture {
	display: block;
	max-width: 100%;
	height: auto;
}

button, input, select, textarea {
	font: inherit;
	color: inherit;
}

button { cursor: pointer; }

a {
	color: var(--liv-leaf-500);
	text-decoration: none;
	transition: color var(--liv-transition);
}
a:hover { color: var(--liv-leaf-300); }

:focus { outline: none; }
:focus-visible {
	outline: 2px solid var(--liv-leaf-500);
	outline-offset: 2px;
	border-radius: var(--r-sm);
}

::selection {
	background: var(--liv-leaf-500);
	color: var(--liv-paper);
}

/* Skip link, visually hidden until focused. */
.skip-link {
	position: absolute;
	left: -10000px;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
	z-index: var(--z-toast);
}
.skip-link:focus {
	left: var(--liv-gutter);
	top: var(--liv-gutter);
	width: auto;
	height: auto;
	padding: 0.75rem 1rem;
	background: var(--liv-leaf-700);
	color: var(--liv-paper);
	border-radius: var(--r-md);
	font-weight: 500;
}

/* When the mobile nav is open, lock body scroll. */
body.is-nav-open,
body.is-search-open {
	overflow: hidden;
	touch-action: none;
}

/* Container helpers. */
.liv-container {
	width: 100%;
	max-width: var(--liv-container);
	margin-inline: auto;
	padding-inline: var(--liv-gutter);
}
.liv-container--wide {
	max-width: var(--liv-container-wide);
}
.liv-container--bleed {
	max-width: none;
	padding-inline: var(--liv-gutter);
}

/* Visually hidden but accessible to screen readers. */
.sr-only {
	position: absolute;
	width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
