/* ===========================================================================
   cl-physio — base.css
   Design tokens, @font-face, reset, base typography and utilities.
   Loaded on every page (first), ahead of chrome.css and any per-page partial.
   =========================================================================== */

:root {
	/* Brand */
	--c-indigo: #2e2a5e;
	--c-indigo-700: #3b3675;
	--c-indigo-900: #211d44;

	/* Section bands */
	--c-white: #ffffff;
	--c-mist: #f3f5f8;
	--c-mist-50: #f5f6fb;
	--c-cream: #efede8;
	--c-cream-50: #f3f0ea;

	/* Text & lines */
	--c-ink: #2a2a33;
	--c-stone: #5e5e6b;
	--c-line: #dbd9e4;

	/* Footer */
	--c-footer: #c8c4cf;
	--c-footer-ink: #2a2740;
	--c-footer-bar: var(--c-indigo);

	/* Accent — Administration (privileged users only) */
	--c-admin: #a8423e;

	/* Type. The woff2 files arrive in Block 6; until then the fallback
	   stacks render, so nothing looks broken in the meantime. */
	--font-serif: "ClPhysio Serif", Georgia, Cambria, "Times New Roman", serif;
	--font-sans: "ClPhysio Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
		Roboto, Helvetica, Arial, sans-serif;

	/* Metrics */
	--container: 1200px;
	--container-narrow: 940px;
	--radius: 14px;
	--radius-pill: 999px;
	--header-h: 84px;
	--shadow-sm: 0 1px 2px rgba(33, 29, 68, 0.06), 0 2px 10px rgba(33, 29, 68, 0.05);
	--shadow-md: 0 8px 28px rgba(33, 29, 68, 0.12);
	--ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* @font-face — internal family names so the chosen typeface can be swapped in
   Block 6 without touching this file. font-display: swap avoids invisible text. */
@font-face {
	font-family: "ClPhysio Serif";
	src: url("../fonts/serif.woff2") format("woff2");
	font-weight: 400 700;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "ClPhysio Sans";
	src: url("../fonts/sans.woff2") format("woff2");
	font-weight: 300 700;
	font-style: normal;
	font-display: swap;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
	box-sizing: border-box;
}
html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-behavior: smooth;
}
body {
	margin: 0;
	font-family: var(--font-sans);
	font-size: 1.0625rem;
	line-height: 1.65;
	color: var(--c-ink);
	background: var(--c-white);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, h5, h6, p, figure, blockquote, ul, ol {
	margin: 0;
}
ul[class], ol[class] {
	list-style: none;
	padding: 0;
}
img, svg, picture, video {
	display: block;
	max-width: 100%;
	height: auto;
}
button, input, select, textarea {
	font: inherit;
	color: inherit;
}
a {
	color: var(--c-indigo);
	text-decoration: underline;
	text-underline-offset: 0.15em;
	text-decoration-thickness: from-font;
}
a:hover {
	color: var(--c-indigo-700);
}
address {
	font-style: normal;
}
:focus-visible {
	outline: 3px solid var(--c-indigo);
	outline-offset: 2px;
}

/* ---------- Base typography ---------- */
h1, h2, h3, h4 {
	font-family: var(--font-serif);
	color: var(--c-indigo);
	font-weight: 600;
	line-height: 1.15;
	text-wrap: balance;
}
h1 { font-size: clamp(2rem, 1.3rem + 3.2vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 1.15rem + 2vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 1rem + 0.9vw, 1.5rem); }
p { margin-block: 0 1rem; }
p:last-child { margin-bottom: 0; }

/* ---------- Layout utilities ---------- */
.container {
	width: min(100% - 2.5rem, var(--container));
	margin-inline: auto;
}
.container--narrow {
	width: min(100% - 2.5rem, var(--container-narrow));
	margin-inline: auto;
}

/* Section bands (used by the page partials in Phase 2) */
.section {
	padding-block: clamp(3rem, 2rem + 4vw, 5.5rem);
}
.section--white { background: var(--c-white); }
.section--mist  { background: var(--c-mist); }
.section--cream { background: var(--c-cream); }

/* ---------- Accessibility helpers ---------- */
.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: 0.5rem;
	top: -3rem;
	z-index: 1000;
	padding: 0.6rem 1rem;
	background: var(--c-indigo);
	color: #fff;
	border-radius: 0 0 var(--radius) var(--radius);
	text-decoration: none;
	transition: top 0.2s var(--ease);
}
.skip-link:focus {
	top: 0;
	color: #fff;
}

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