/* ==========================================================================
   Base: reset, typography, links, focus, utilities.
   Fonts (@font-face) are declared in theme.json and printed by WordPress.
   ========================================================================== */
*,
*::before,
*::after { box-sizing: border-box; }

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-padding-block-start: calc(var(--header-h) + 16px);
}

body {
	margin: 0;
	min-width: 320px;
	background: var(--c-white);
	color: var(--c-ink);
	font-family: var(--font-text);
	font-size: var(--fs-body);
	font-weight: 400;
	line-height: var(--lh-text);
	font-feature-settings: "kern";
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4, h5, h6 {
	margin: 0;
	font-family: var(--font-display);
	font-weight: 500;
	line-height: var(--lh-heading);
	letter-spacing: -0.005em;
	font-variant-numeric: lining-nums proportional-nums;
	text-wrap: balance;
}
h1 { font-size: var(--fs-h1); line-height: 1.04; letter-spacing: -0.015em; }
h2 { font-size: var(--fs-h2); letter-spacing: -0.01em; }
h3 { font-size: var(--fs-h3); font-weight: 600; line-height: 1.15; }
h4 { font-size: var(--fs-h4); font-weight: 600; line-height: 1.2; }

p, ul, ol, dl, figure, blockquote { margin: 0; }
p { text-wrap: pretty; }
ul[class], ol[class] { list-style: none; padding: 0; }

a {
	color: inherit;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
}
a:not([class]) { text-decoration-color: var(--c-gold-deep); }
a:not([class]):hover { text-decoration-thickness: 2px; }

button,
input,
select,
textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a, button, [role="button"], label[for], select { touch-action: manipulation; }

address { font-style: normal; }
strong, b { font-weight: 600; }
hr { border: 0; border-block-start: 1px solid var(--line-light); margin: 0; }

::selection { background: var(--c-gold-light); color: var(--c-ink); }

/* Focus: always visible for keyboard users, tone-aware colour. */
:focus-visible {
	outline: 2px solid var(--focus);
	outline-offset: 3px;
	border-radius: 1px;
}
:focus:not(:focus-visible) { outline: none; }

/* Screen-reader text & skip link */
.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}
.skip-link {
	position: fixed;
	inset-block-start: 8px;
	inset-inline-start: 8px;
	z-index: 1000;
	padding: 12px 20px;
	background: var(--c-gold);
	color: var(--c-midnight);
	font-weight: 600;
	text-decoration: none;
	transform: translateY(-160%);
	transition: transform var(--dur) var(--ease-out);
}
.skip-link:focus { transform: none; outline-color: var(--c-white); }

/* Icons */
.icon {
	width: 1.25em;
	height: 1.25em;
	flex: none;
	stroke-width: 1.5;
}

/* Tones: set text colour, focus colour and background in one place. */
.tone-dark {
	--focus: var(--c-gold-light);
	background-color: var(--c-midnight);
	color: var(--c-porcelain);
}
.tone-dark h1,
.tone-dark h2,
.tone-dark h3,
.tone-dark h4 { color: var(--c-white); }
.tone-light { --focus: var(--c-gold-deep); background-color: var(--c-porcelain); color: var(--c-ink); }
.tone-white { --focus: var(--c-gold-deep); background-color: var(--c-white); color: var(--c-ink); }

/* Muted text per tone */
.text-muted { color: var(--c-slate); }
.tone-dark .text-muted { color: var(--c-mist); }

/* Rich text from WYSIWYG fields */
.prose > * + * { margin-block-start: 1em; }
.prose ul,
.prose ol { padding-inline-start: 1.25em; }
.prose li + li { margin-block-start: 0.4em; }

/* Reduced motion: no transitions or animations at all. */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		animation-delay: 0ms !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}
