/**
 * Base reset & typography.
 */

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

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

@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(--twp-font-body);
	font-size: var(--twp-text-base);
	line-height: 1.6;
	color: var(--twp-color-fg);
	background-color: var(--twp-color-bg);
	min-height: 100vh;
	overflow-x: clip;
	max-width: 100%;
}

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

a {
	color: var(--twp-color-primary);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
	transition: color var(--twp-duration) var(--twp-ease);
}

a:hover {
	color: var(--twp-color-accent);
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--twp-font-display);
	font-weight: 600;
	line-height: 1.2;
	margin: 0 0 var(--twp-space-sm);
	color: var(--twp-color-fg);
}

h1 { font-size: var(--twp-text-3xl); }
h2 { font-size: var(--twp-text-2xl); }
h3 { font-size: var(--twp-text-xl); }

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

ul, ol {
	margin: 0 0 var(--twp-space-sm);
	padding-left: 1.25rem;
}

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

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

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	background: var(--twp-color-surface);
	clip: auto !important;
	clip-path: none;
	display: block;
	font-size: var(--twp-text-sm);
	height: auto;
	left: var(--twp-space-sm);
	line-height: normal;
	padding: var(--twp-space-xs) var(--twp-space-sm);
	top: var(--twp-space-sm);
	width: auto;
	z-index: 100000;
}
