/* ==========================================================================
   Spretza — base: fonts, reset, typography, containers, utilities.
   All values come from CSS custom properties generated by the Customizer
   (see inc/customizer/output.php). Do not hard-code colours or sizes here.
   ========================================================================== */

/* Fonts (self-hosted, swap, latin subset) */
@font-face {
	font-family: 'Spretza Inter';
	src: url('../fonts/inter-latin-wght-normal.woff2') format('woff2');
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: 'Spretza Cormorant';
	src: url('../fonts/cormorant-garamond-latin-400-normal.woff2') format('woff2');
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: 'Spretza Cormorant';
	src: url('../fonts/cormorant-garamond-latin-500-normal.woff2') format('woff2');
	font-weight: 500;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: 'Spretza Cormorant';
	src: url('../fonts/cormorant-garamond-latin-600-normal.woff2') format('woff2');
	font-weight: 600;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: 'Spretza Cormorant';
	src: url('../fonts/cormorant-garamond-latin-400-italic.woff2') format('woff2');
	font-weight: 400;
	font-style: italic;
	font-display: swap;
}

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}
@media (prefers-reduced-motion: no-preference) {
	html { scroll-behavior: smooth; }
}

body {
	margin: 0;
	background: var(--sp-bg);
	color: var(--sp-text);
	font-family: var(--sp-font-body);
	font-weight: var(--sp-weight-body);
	font-size: var(--sp-fs-base);
	line-height: var(--sp-lh-body);
	letter-spacing: var(--sp-ls-body);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
	overflow-x: hidden;
}
body.sp-lock { overflow: hidden; }

img, svg, video { max-width: 100%; height: auto; display: block; }
svg { height: auto; }
.sp-icon { display: inline-block; flex: none; height: auto; }
figure { margin: 0; }
ul, ol { padding-left: 1.2em; }
hr { border: 0; border-top: 1px solid var(--sp-border); margin: 2em 0; }
address { font-style: normal; }
button, input, select, textarea { font: inherit; color: inherit; }

/* Headings */
h1, h2, h3, h4, h5, h6 {
	font-family: var(--sp-font-heading);
	font-weight: var(--sp-weight-heading);
	line-height: var(--sp-lh-heading);
	letter-spacing: var(--sp-ls-heading);
	margin: 0 0 .5em;
	color: inherit;
	text-wrap: balance;
}
h1 { font-size: var(--sp-h1); }
h2 { font-size: var(--sp-h2); }
h3 { font-size: var(--sp-h3); }
h4 { font-size: var(--sp-h4); }
h5, h6 { font-size: calc(var(--sp-h4) * .85); }
p { margin: 0 0 1.1em; text-wrap: pretty; }

a {
	color: var(--sp-accent-text);
	text-decoration-thickness: 1px;
	text-underline-offset: .22em;
	transition: color .2s ease;
}
a:hover { color: var(--sp-text); }

/* Accessible focus — visible on every interactive element */
:focus-visible {
	outline: 2px solid var(--sp-focus);
	outline-offset: 3px;
	border-radius: 2px;
}
:focus:not(:focus-visible) { outline: none; }

/* Small uppercase label */
.sp-eyebrow {
	display: block;
	margin: 0 0 .9em;
	font-family: var(--sp-font-body);
	font-size: 11.5px;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: var(--sp-ls-caps);
	text-transform: uppercase;
	color: var(--sp-accent-text);
}
.sp-lead { font-size: calc(var(--sp-fs-base) * 1.2); line-height: 1.6; color: var(--sp-muted); }
.sp-small { font-size: .875em; color: var(--sp-muted); }
.sp-center { text-align: center; }

/* Layout containers */
.sp-container {
	width: 100%;
	max-width: var(--sp-container);
	margin-inline: auto;
	padding-inline: var(--sp-gutter);
}
.sp-container--narrow { max-width: calc(var(--sp-content) + var(--sp-gutter) * 2); }

/* Visually hidden (accessible) */
.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	margin: -1px; padding: 0; border: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	white-space: nowrap;
}
.skip-link:focus {
	position: fixed !important;
	top: 12px; left: 12px;
	width: auto; height: auto;
	clip: auto; clip-path: none;
	z-index: 1000;
	padding: 12px 18px;
	background: var(--sp-text);
	color: #fff;
	border-radius: var(--sp-btn-radius);
}
[hidden] { display: none !important; }
.sp-anchor { display: block; position: relative; top: calc(var(--sp-header-h) * -1 - 20px); visibility: hidden; height: 0; }

@media (max-width: 767px) {
	.sp-hide-mobile { display: none !important; }
}

/* Rich text */
.sp-prose { max-width: var(--sp-content); }
.sp-prose > *:first-child { margin-top: 0; }
.sp-prose h2 { font-size: calc(var(--sp-h2) * .75); margin-top: 1.6em; }
.sp-prose h3 { font-size: calc(var(--sp-h3) * .9); margin-top: 1.4em; }
.sp-prose a { text-decoration: underline; }
.sp-prose img { border-radius: var(--sp-radius); }
.sp-prose ul, .sp-prose ol { margin: 0 0 1.2em; }
.sp-prose li { margin-bottom: .4em; }
.sp-prose blockquote {
	margin: 1.6em 0; padding: .2em 0 .2em 1.4em;
	border-left: 2px solid var(--sp-accent);
	font-family: var(--sp-font-heading); font-size: 1.5em; line-height: 1.35; color: var(--sp-text);
}
.sp-prose table { width: 100%; border-collapse: collapse; }
.sp-prose th, .sp-prose td { border-bottom: 1px solid var(--sp-border); padding: .7em .5em; text-align: left; }

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