/* Base: reset, typography and layout primitives. Colours and sizes come only from tokens.css. */

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

html {
	-webkit-text-size-adjust: 100%;
	scroll-padding-top: calc(var(--header-h, 4.5rem) + var(--sp-4));
}

body {
	margin: 0;
	background: var(--c-bg);
	color: var(--c-text);
	font: var(--fw-regular) var(--fs-base) / var(--lh-body) var(--f-body);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	overflow-wrap: break-word;
}

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

h1, h2, h3, h4 {
	margin: 0;
	color: var(--c-heading);
	font-family: var(--f-display);
	font-weight: var(--fw-semibold);
	line-height: var(--lh-heading);
	letter-spacing: var(--ls-display);
	text-wrap: balance;
	overflow-wrap: anywhere;
}

h1 {
	font-size: var(--fs-4xl);
	line-height: var(--lh-tight);
}

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

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

h4 {
	font-size: var(--fs-lg);
}

p,
ul,
ol,
dl,
dd,
figure,
blockquote {
	margin: 0;
}

p {
	max-width: var(--w-content);
	overflow-wrap: break-word;
}

a {
	color: var(--c-link);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.22em;
	transition: color var(--dur) var(--ease);
}

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

:focus-visible {
	outline: none;
	box-shadow: var(--focus-ring);
}

::selection {
	background: var(--c-accent-soft);
	color: var(--c-heading);
}

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

.skip-link {
	position: absolute;
	left: var(--sp-4);
	top: -10rem;
	z-index: 1000;
	padding: var(--sp-3) var(--sp-5);
	background: var(--c-surface);
	color: var(--c-heading);
	font-weight: var(--fw-medium);
	text-decoration: none;
}

.skip-link:focus {
	top: var(--sp-4);
}

.site-main:focus {
	outline: none;
}

.container {
	width: 100%;
	max-width: calc(var(--w-wide) + 2 * var(--gutter));
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.container--narrow {
	max-width: calc(var(--w-content) + 2 * var(--gutter));
}

.section {
	padding-block: var(--sp-section);
}

.section--alt {
	background: var(--c-surface-alt);
}

.section--tight {
	padding-block: var(--sp-7);
}

.section__head {
	display: grid;
	gap: var(--sp-3);
	margin-bottom: var(--sp-6);
}

.section__head p {
	color: var(--c-text-muted);
}

.eyebrow {
	color: var(--c-accent-text);
	font-size: var(--fs-sm);
	font-weight: var(--fw-medium);
	letter-spacing: var(--ls-label);
}

.stack {
	display: grid;
	gap: var(--stack-gap, var(--sp-5));
	align-content: start;
}

.prose > * + * {
	margin-top: var(--sp-4);
}

.prose h2 {
	margin-top: var(--sp-7);
	font-size: var(--fs-2xl);
}

.prose h3 {
	margin-top: var(--sp-6);
}

.prose ul,
.prose ol {
	padding-left: 1.25em;
}

.prose li + li {
	margin-top: var(--sp-2);
}

/* Underline so links are not identified by colour alone (Elementor's CSS removes it);
   :not(.button) keeps button colours intact. */
.prose a:not(.button) {
	color: var(--c-accent-text);
	text-decoration: underline;
}

.muted {
	color: var(--c-text-muted);
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		transition-duration: 0ms !important;
		animation-duration: 0ms !important;
		scroll-behavior: auto !important;
	}
}
