/* ============================================================================
   Base — reset, typography, links, forms
   ============================================================================ */

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

html {
	-webkit-text-size-adjust: 100%;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--color-bg);
	color: var(--color-text);
	font-family: var(--font-body);
	font-size: var(--fs-base);
	font-weight: var(--fw-regular);
	line-height: var(--lh-base);
	text-rendering: optimizeLegibility;
}

/* Typography ---------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-display);
	font-weight: var(--fw-bold);
	color: var(--color-heading);
	margin: 0 0 var(--space-4);
	line-height: var(--lh-tight);
	letter-spacing: -0.01em;
}

h1 { font-size: clamp(var(--fs-2xl), 5.5vw, var(--fs-4xl)); line-height: 1.05; }
h2 { font-size: clamp(var(--fs-xl), 3.5vw, var(--fs-2xl)); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }
h5 { font-size: var(--fs-md); }
h6 { font-size: var(--fs-base); }

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

p:last-child {
	margin-bottom: 0;
}

a {
	color: var(--color-link);
	text-decoration: none;
	background-image: linear-gradient(currentColor, currentColor);
	background-size: 0 1.5px;
	background-repeat: no-repeat;
	background-position: 0 100%;
	transition: background-size var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out);
}

a:hover,
a:focus-visible {
	color: var(--color-link-hover);
	background-size: 100% 1.5px;
}

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

strong, b { font-weight: var(--fw-bold); }
em, i    { font-style: italic; }

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

li + li {
	margin-top: var(--space-1);
}

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

figure { margin: 0; }

/* Forms (light reset, real components.css does the rest) ------------------- */
input, textarea, select, button {
	font: inherit;
	color: inherit;
}

button {
	cursor: pointer;
	border: 0;
	background: none;
	padding: 0;
}

/* Selection ----------------------------------------------------------------- */
::selection {
	background: var(--color-sun);
	color: var(--color-deep);
}

/* Skip link ----------------------------------------------------------------- */
.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	background: var(--color-deep);
	color: var(--color-paper);
	padding: var(--space-3) var(--space-4);
	z-index: var(--z-overlay);
}

.skip-link:focus {
	left: var(--space-3);
	top: var(--space-3);
}

/* Container ----------------------------------------------------------------- */
.container {
	width: 100%;
	max-width: var(--container-max);
	margin-inline: auto;
	padding-inline: var(--container-pad);
}

.container--narrow {
	max-width: var(--container-narrow);
}

/* Visually hidden ----------------------------------------------------------- */
.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;
}
