/* Base styles — reset, typography, a11y primitives. */

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

html {
	scroll-behavior: smooth;
}

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

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}

body {
	margin: 0;
	font-family: var(--font-sans);
	font-size: var(--font-size-md);
	font-weight: var(--font-weight-regular);
	line-height: var(--line-height-normal);
	color: var(--color-text);
	background-color: var(--color-bg);
	-webkit-font-smoothing: antialiased;
}

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

a {
	color: inherit;
	text-decoration-thickness: 0.08em;
	text-underline-offset: 0.15em;
}

a:hover {
	text-decoration: none;
}

:focus {
	outline: none;
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0 0 var(--space-4);
	font-family: var(--font-display);
	font-weight: var(--font-weight-bold);
	line-height: var(--line-height-tight);
}

h1 { font-size: var(--font-size-4xl); }
h2 { font-size: var(--font-size-3xl); }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }
h5 { font-size: var(--font-size-lg); }
h6 { font-size: var(--font-size-md); }

p {
	margin: 0 0 var(--space-4);
}

ul,
ol {
	margin: 0 0 var(--space-4);
	padding-left: var(--space-5);
}

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

/* Screen-reader / skip link */
.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;
}

.screen-reader-text:focus,
.skip-link:focus {
	position: fixed;
	top: var(--space-4);
	left: var(--space-4);
	z-index: 100000;
	width: auto;
	height: auto;
	padding: var(--space-3) var(--space-4);
	margin: 0;
	overflow: visible;
	clip: auto;
	white-space: normal;
	color: var(--color-primary-contrast);
	background: var(--color-primary);
	border-radius: var(--radius-sm);
	text-decoration: none;
	box-shadow: var(--shadow-md);
}

.site-main:focus {
	outline: none;
}

.site-main:focus-visible {
	outline: none;
}
