:root {
	--color-background: #ffffff;
	--color-surface: #f4f4f2;
	--color-text: #181818;
	--color-muted: #686868;
	--color-border: #d9d9d6;
	--color-accent: #555555;

	--space-2xs: 0.35rem;
	--space-xs: 0.55rem;
	--space-s: 0.8rem;
	--space-m: 1.25rem;
	--space-l: 2rem;
	--space-xl: 3.25rem;
	--space-2xl: 5rem;
	--space-3xl: 7.5rem;

	--container: 72rem;
	--container-wide: 80rem;
	--content-reading: 47.5rem;

	--text-xs: 0.78rem;
	--text-s: 0.9rem;
	--text-base: 1rem;
	--text-l: 1.22rem;
	--text-xl: 1.65rem;
	--text-2xl: clamp(2rem, 4vw, 3.5rem);
	--text-3xl: clamp(2.6rem, 6vw, 5.5rem);

	--line-reading: 1.72;
}

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

html {
	scroll-behavior: smooth;
}

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

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

body {
	margin: 0;
	background: var(--color-background);
	color: var(--color-text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
}

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

a {
	text-underline-offset: 0.16em;
}

a:hover {
	text-decoration: underline;
}

:where(a, button, input, textarea, select, summary):focus-visible {
	outline: 3px solid var(--color-accent);
	outline-offset: 3px;
}

::selection {
	background: var(--color-text);
	color: var(--color-background);
}
