/**
 * Base: reset, typography, layout helpers, accessibility.
 */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--bg-page);
	color: var(--text-primary);
	font-family: var(--font-body);
	font-size: var(--body-m-size);
	font-weight: 400;
	line-height: var(--body-m-line);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* Footer stays at the bottom of short pages */
body {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

.site-main {
	flex: 1 0 auto;
}

body.is-menu-open {
	overflow: hidden;
}

img,
svg,
video {
	display: block;
	max-width: 100%;
	height: auto;
}

a {
	color: inherit;
}

h1,
h2,
h3,
h4 {
	margin: 0;
	font-family: var(--font-heading);
	text-transform: uppercase;
}

h1 {
	font-size: var(--h1-size);
	font-weight: var(--h1-weight);
	line-height: var(--h1-line);
}

h2 {
	font-size: var(--h2-size);
	font-weight: var(--h2-weight);
	line-height: var(--h2-line);
}

h3 {
	font-size: var(--h3-size);
	font-weight: var(--h3-weight);
	line-height: var(--h3-line);
	text-transform: none;
}

h4 {
	font-size: var(--h4-size);
	font-weight: var(--h4-weight);
	line-height: var(--h4-line);
	text-transform: none;
}

ul,
ol {
	margin: 0;
	padding: 0;
	list-style: none;
}

address {
	font-style: normal;
}

button {
	font: inherit;
	color: inherit;
}

[hidden] {
	display: none !important;
}

/* Anchors (e.g. #contact) land below the sticky header */
[id] {
	scroll-margin-top: var(--header-height);
}

/* Layout */
.container {
	width: 100%;
	max-width: calc(var(--container) + 2 * var(--gutter));
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.site-main {
	padding-block: var(--space-64);
}

/* Accessibility */
:focus-visible {
	outline: 2px solid var(--red-500);
	outline-offset: 3px;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.skip-link:focus {
	top: var(--space-8);
	left: var(--space-8);
	z-index: 1000;
	width: auto;
	height: auto;
	margin: 0;
	padding: var(--space-12) var(--space-16);
	clip-path: none;
	background: var(--bg-page);
	color: var(--text-primary);
	font-weight: 600;
}

/* Animations for every visitor, unless the ATEQ option "respect reduce
   motion" is ticked AND the visitor asked for it (html.reduce-motion,
   set in <head> by inc/motion.php). */
html:not(.reduce-motion) {
	scroll-behavior: smooth;
}

.reduce-motion *,
.reduce-motion *::before,
.reduce-motion *::after {
	transition-duration: 0.01ms !important;
	transition-delay: 0s !important;
	animation-duration: 0.01ms !important;
	animation-iteration-count: 1 !important;
}

/* Pages built with ATEQ blocks: no extra padding */
.site-main--blocks {
	padding: 0;
}
