/* Reset and element defaults. Tokens only; raw values live in tokens.css. */
*,
*::before,
*::after {
	box-sizing: border-box;
}

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

body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
ul,
ol,
figure {
	margin: 0;
}

ul,
ol {
	padding: 0;
}

body {
	min-height: 100vh;
	background: var(--rz-color-bg);
	color: var(--rz-color-text);
	font-family: var(--rz-font-sans);
	font-size: var(--rz-font-size-md);
	font-weight: var(--rz-font-weight-regular);
	line-height: var(--rz-line-height-normal);
	-webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
	color: var(--rz-color-heading);
	font-family: var(--rz-font-display);
	font-weight: var(--rz-font-weight-regular);
	line-height: var(--rz-line-height-tight);
	letter-spacing: var(--rz-letter-spacing-tight);
}

h1 {
	font-size: var(--rz-font-size-4xl);
}

h2 {
	font-size: var(--rz-font-size-3xl);
}

h3 {
	font-size: var(--rz-font-size-2xl);
}

h4 {
	font-size: var(--rz-font-size-xl);
}

a {
	color: var(--rz-color-link);
	text-underline-offset: 0.3em;
	transition: color var(--rz-duration-fast) var(--rz-ease-standard);
}

a:hover {
	color: var(--rz-color-link-hover);
}

:focus-visible {
	outline: var(--rz-focus-ring-width) solid var(--rz-color-focus);
	outline-offset: var(--rz-focus-ring-offset);
}

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

::selection {
	background: var(--rz-color-accent);
	color: var(--rz-color-on-accent);
}

/* The reduced-motion reset must beat any component rule, so !important is deliberate here. */
/* stylelint-disable declaration-no-important */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}
/* stylelint-enable declaration-no-important */

.rz-visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	/* stylelint-disable-next-line scale-unlimited/declaration-strict-value -- visually-hidden clip technique needs -1px */
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.rz-visually-hidden--focusable:focus,
.rz-visually-hidden--focusable:focus-visible {
	position: static;
	width: auto;
	height: auto;
	margin: 0;
	overflow: visible;
	clip: auto;
	clip-path: none;
	white-space: normal;
}
