/**
 * Base element styles.
 *
 * Layout, components, and utilities live in their dedicated stylesheets.
 */

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

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

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

body {
	min-height: 100vh;
	margin: 0;
	color: var(--dim-color-text);
	background: var(--dim-site-background);
	background-attachment: fixed;
	font-family: var(--dim-font-family-body);
	font-size: var(--dim-font-size-body);
	font-weight: var(--dim-font-weight-regular);
	line-height: var(--dim-line-height-body);
}

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

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

h1,
h2,
h3,
h4 {
	margin-block: 0 var(--dim-space-4);
	font-family: var(--dim-font-family-brand);
	font-weight: var(--dim-font-weight-semibold);
	line-height: var(--dim-line-height-heading);
	text-wrap: balance;
}

h1 {
	font-size: var(--dim-font-size-h1);
	line-height: var(--dim-line-height-tight);
}

h2 {
	font-size: var(--dim-font-size-h2);
}

h3 {
	font-size: var(--dim-font-size-h3);
}

h4 {
	font-size: var(--dim-font-size-h4);
}

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

small {
	font-size: var(--dim-font-size-small);
}

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
	outline: 0.1875rem solid var(--dim-color-focus);
	outline-offset: 0.1875rem;
}

.screen-reader-text,
.u-visually-hidden {
	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 {
	z-index: var(--dim-z-toast);
	top: var(--dim-space-4);
	left: var(--dim-space-4);
	width: auto;
	height: auto;
	padding: var(--dim-space-2) var(--dim-space-4);
	margin: 0;
	overflow: visible;
	clip: auto;
	white-space: normal;
	color: var(--dim-color-text);
	background: var(--dim-color-background);
}
