/**
 * Base — resets, elements, typography, accessibility primitives.
 */

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

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

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
		scroll-behavior: auto !important;
	}
}

body {
	margin: 0;
	background: var(--color-background);
	color: var(--color-text);
	font-family: var(--font-body);
	font-size: var(--fs-body);
	line-height: var(--lh-body);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

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

a {
	color: var(--section-link, var(--color-link));
	text-decoration-thickness: 1px;
	text-underline-offset: 0.15em;
}
a:hover { color: var(--color-link-hover); }

h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-display);
	color: var(--section-heading, var(--color-text));
	line-height: var(--lh-heading);
	letter-spacing: var(--ls-tight);
	font-weight: var(--fw-semibold);
	margin: 0 0 var(--space-4);
}

h1, .h1 { font-size: var(--fs-h1); line-height: var(--lh-tight); }
h2, .h2 { font-size: var(--fs-h2); }
h3, .h3 { font-size: var(--fs-h3); }
h4, .h4 { font-size: var(--fs-h4); }

.display {
	font-family: var(--font-display);
	font-size: var(--fs-display);
	line-height: var(--lh-tight);
	letter-spacing: var(--ls-tight);
	font-weight: var(--fw-semibold);
	margin: 0 0 var(--space-5);
}

p { margin: 0 0 var(--space-4); color: var(--section-text, var(--color-text)); }
p.lede, .body-lg { font-size: var(--fs-body-lg); color: var(--section-text-muted, var(--color-text-muted)); }

small, .text-small { font-size: var(--fs-small); }
label, .label {
	font-size: var(--fs-label);
	letter-spacing: var(--ls-label);
	text-transform: uppercase;
	font-weight: var(--fw-semibold);
}

ul, ol { padding-left: 1.25em; }
hr { border: none; border-top: var(--border-width) solid var(--section-border, var(--color-border)); margin: var(--space-8) 0; }

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

/* ---------------------------------------------------------- Accessibility. */

:focus-visible {
	outline: 2px solid var(--color-focus-ring);
	outline-offset: 2px;
	border-radius: 2px;
}

.skip-link {
	position: absolute;
	top: -100px;
	left: var(--space-4);
	z-index: var(--z-skip-link);
	background: var(--color-black);
	color: var(--color-white);
	padding: var(--space-3) var(--space-5);
	border-radius: var(--radius-sm);
	font-weight: var(--fw-semibold);
	transition: top var(--duration-base) var(--ease-out);
}
.skip-link:focus {
	top: var(--space-4);
}

.visually-hidden {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

::selection {
	background: var(--color-primary);
	color: var(--color-white);
}

.media-fallback {
	display: block;
	aspect-ratio: 4 / 3;
	background:
		linear-gradient(135deg, var(--color-charcoal) 0%, var(--color-black) 60%),
		repeating-linear-gradient(45deg, rgba(255,255,255,0.04) 0 2px, transparent 2px 8px);
	border-radius: var(--radius-md);
}
