/* Reset and default element styles */

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

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

body {
	margin: 0;
	background: var(--color-cream);
	color: var(--color-text);
	font-family: var(--font-body);
	font-size: var(--text-base);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

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

/* Sprite icons (<svg viewBox="0 0 24 24"><use href="#i-…"/></svg>): default size */
svg:has(> use) {
	width: 1.25rem;
}

/* Keep anchor targets clear of the sticky header */
[id] {
	scroll-margin-block-start: 6.5rem;
}

[hidden] {
	display: none !important;
}

h1,
h2,
h3,
h4 {
	margin: 0;
	color: var(--color-ink);
	font-family: var(--font-heading);
	font-weight: var(--weight-bold);
	line-height: 1.08;
	letter-spacing: -0.03em;
}

p,
ul,
ol,
figure,
blockquote {
	margin: 0;
}

ul[role="list"] {
	padding: 0;
	list-style: none;
}

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

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

button {
	cursor: pointer;
}

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

::selection {
	background: var(--color-lavender);
	color: var(--color-ink);
}

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