/* Reset and element defaults. */

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

body {
	margin: 0;
	min-height: 100vh;
	background: var(--ae-surface-page);
	color: var(--ae-text-primary);
	font-family: var(--ae-font);
	font-size: 16px;
	font-weight: 400;
	line-height: 24px;
	text-wrap: pretty;
	overflow-x: clip;
}

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

ul[class],
ol[class] {
	padding: 0;
	list-style: none;
}

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

img {
	height: auto;
}

/* <picture> only adds a WebP source: the <img> keeps its place in the slot's layout. */
picture {
	display: contents;
}

/* Otherwise <source> takes its own cell in grid slots and pushes the image to the next row. */
picture > source {
	display: none;
}

a {
	color: inherit;
	text-decoration: none;
	transition: color var(--ae-duration-base) var(--ae-ease);
}

a:hover {
	color: var(--ae-signal);
}

button,
input,
select,
textarea {
	font: inherit;
	color: inherit;
	border-radius: 0;
}

button {
	cursor: pointer;
}

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

:focus-visible {
	outline: 2px solid var(--ae-signal);
	outline-offset: 2px;
}

/* Accessibility helpers */

.screen-reader-text,
.ae-visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.ae-skip-link {
	position: absolute;
	top: 8px;
	left: 8px;
	z-index: 1000;
	padding: 12px 16px;
	background: var(--ae-signal);
	color: var(--ae-ink);
	font-weight: 500;
	text-transform: uppercase;
	transform: translateY(-200%);
}

.ae-skip-link:focus {
	transform: none;
	color: var(--ae-ink);
}

html.ae-scroll-locked,
html.ae-scroll-locked body {
	overflow: hidden;
}

@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;
	}
}
