/**
 * base.css  reset, typography defaults, accessibility primitives.
 */

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	overflow-x: clip;
	max-width: 100%;
}

body {
	margin: 0;
	font-family: var(--font-sans);
	font-size: 16px;
	line-height: 1.6;
	color: var(--fg);
	background: var(--surface);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
	overflow-x: clip;
	max-width: 100%;
}

/* Front page and any dark-topped page: avoid a light flash above the locked hero. */
body.home,
body.avt-dark-top {
	background: var(--hero-bg);
}

h1,
h2,
h3,
h4 {
	font-weight: 600;
	letter-spacing: -0.025em;
	line-height: 1.1;
	margin: 0 0 0.5em;
}
h1 {
	letter-spacing: -0.03em;
}

p {
	margin: 0 0 1em;
}

a {
	color: inherit;
	text-decoration: none;
}
a:hover {
	text-decoration: none;
}

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

ul,
ol {
	margin: 0 0 1em;
	padding-left: 1.25em;
}

button {
	font: inherit;
}

.avt-mono {
	font-family: var(--font-mono);
	letter-spacing: 0.12em;
}

.avt-case-upper {
	text-transform: uppercase;
}

.avt-mono.avt-case-upper {
	text-transform: uppercase;
}

/* Skip link */
.avt-skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 1000;
	background: var(--fg);
	color: var(--surface);
	padding: 12px 18px;
	border-radius: 0 0 8px 0;
	font-size: 14px;
}
.avt-skip-link:focus {
	left: 0;
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

/* Visually-hidden utility (for a11y labels) */
.avt-sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Global focus ring (native controls; chrome overrides with its own token) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
	outline: 2px solid var(--focus);
	outline-offset: 3px;
}

/* Lock scroll when the mobile drawer is open */
html.avt-menu-open,
html.avt-menu-open body {
	overflow: hidden;
}
