/* ==========================================================================
   Base — reset, elements, layout primitives, utilities
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html {
	-webkit-text-size-adjust: 100%;
	/* No overflow-x here: clipping the root makes it a scroll container and
	   silently kills position: sticky in every descendant (the shop filter
	   rail). Overflow is prevented at source instead — see motion.css, where
	   sideways reveals become vertical below the two-column breakpoint. */
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--header-h) + var(--space-m));
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after {
		animation-duration: 1ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 1ms !important;
		scroll-behavior: auto !important;
	}
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--text-muted);
	font-family: var(--font-body);
	font-size: var(--step-0);
	line-height: var(--lh-body);
	font-weight: 400;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }
img { border-radius: inherit; }

input, button, textarea, select { font: inherit; color: inherit; }

h1, h2, h3, h4, h5, h6 {
	margin: 0 0 var(--space-s);
	font-family: var(--font-display);
	color: var(--text);
	font-weight: 600;
	line-height: var(--lh-heading);
	letter-spacing: var(--tracking-heading);
	text-wrap: balance;
}

h1, .h1 { font-size: var(--step-4); line-height: var(--lh-tight); letter-spacing: var(--tracking-tight); }
h2, .h2 { font-size: var(--step-3); }
h3, .h3 { font-size: var(--step-2); line-height: 1.25; letter-spacing: -0.01em; }
h4, .h4 { font-size: var(--step-1); line-height: var(--lh-snug); letter-spacing: 0; }
h5, .h5 { font-size: var(--step-0); letter-spacing: 0; }

.display { color: var(--text); font-size: var(--step-5); line-height: var(--lh-tight); letter-spacing: var(--tracking-tight); }

p { margin: 0 0 var(--space-m); text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

.lead { font-size: var(--step-1); line-height: var(--lh-snug); color: var(--text-muted); }
.small, small { font-size: var(--step--1); line-height: 1.5; }
.tabular { font-variant-numeric: tabular-nums; }

a { color: var(--accent-text); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--accent-text-hover); }

/* UI links read as controls, so they carry no underline. Declared first: the
   body-copy rule below has to win where the two overlap (a note inside a card). */
.nav-link, .btn, .card a, .footer a { text-decoration: none; }

/* Body-copy links stay underlined — colour alone is not a distinguisher
   (WCAG 1.4.1). */
.prose a,
.form-note a,
.legal-meta a,
.rou-note a,
.site-footer__disclaimer a { text-decoration: underline; }

ul, ol { margin: 0 0 var(--space-m); padding-left: 1.25em; }
li + li { margin-top: var(--space-2xs); }

hr { height: 1px; margin: var(--space-xl) 0; border: 0; background: var(--border); }

blockquote {
	margin: var(--space-l) 0;
	padding: var(--space-m) var(--space-l);
	border-left: 3px solid var(--accent-text);
	background: var(--surface);
	border-radius: 0 var(--radius-m) var(--radius-m) 0;
	color: var(--text);
}

code, kbd, samp { font-family: ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, monospace; font-size: 0.9em; }

::selection { background: var(--accent-soft-strong); color: var(--text); }

/* ---------- Focus ---------------------------------------------------------- */

:focus { outline: none; }
:focus-visible {
	outline: 3px solid var(--focus);
	outline-offset: 2px;
	border-radius: var(--radius-s);
}
.on-ink :focus-visible { outline-color: var(--accent-lift); }

.skip-link {
	position: absolute;
	left: var(--space-s);
	top: -100px;
	z-index: var(--z-toast);
	padding: var(--space-xs) var(--space-m);
	background: var(--ink);
	color: var(--white);
	border-radius: var(--radius-m);
	font-weight: 600;
	transition: top var(--dur-fast) var(--ease-out);
}
.skip-link:focus-visible { top: var(--space-s); color: var(--white); }

.screen-reader-text, .sr-only {
	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;
}

/* ---------- Layout --------------------------------------------------------- */

.container {
	width: 100%;
	max-width: calc(var(--container) + var(--gutter) * 2);
	margin-inline: auto;
	padding-inline: var(--gutter);
}
.container--narrow { max-width: calc(var(--container-narrow) + var(--gutter) * 2); }

.section { padding-block: var(--section-y); }
.section--lg { padding-block: var(--section-y-lg); }
.section--tight { padding-block: var(--section-y-tight); }
.section--surface { background: var(--surface); }

.stack > * + * { margin-top: var(--space-m); }
.stack-s > * + * { margin-top: var(--space-s); }
.stack-l > * + * { margin-top: var(--space-l); }

.grid { display: grid; gap: var(--space-m); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.grid--gap-l { gap: var(--space-l); }

.cluster { display: flex; flex-wrap: wrap; gap: var(--space-s); align-items: center; }
.cluster--between { justify-content: space-between; }

.split {
	display: grid;
	gap: clamp(var(--space-l), 5vw, var(--space-3xl));
	align-items: center;
	grid-template-columns: 1fr;
}
@media (min-width: 900px) {
	.split { grid-template-columns: 1fr 1fr; }
	.split--wide-first { grid-template-columns: 1.15fr 0.85fr; }
	.split--wide-last { grid-template-columns: 0.85fr 1.15fr; }
}

.prose { max-width: var(--measure); }
.prose h2 { margin-top: var(--space-xl); }
.prose h3 { margin-top: var(--space-l); }
.prose > :first-child { margin-top: 0; }

.center { text-align: center; }
.center .section-head { margin-inline: auto; }

/* ---------- Section heading block ------------------------------------------ */

.section-head { max-width: 62ch; margin-bottom: var(--space-xl); }
.section-head > p { color: var(--text-muted); }
.section-head h2 { max-width: var(--measure-heading); }
.center .section-head h2 { margin-inline: auto; }

.eyebrow {
	display: inline-flex;
	align-items: center;
	gap: var(--space-2xs);
	margin-bottom: var(--space-s);
	font-family: var(--font-body);
	font-size: var(--step--1);
	font-weight: 600;
	letter-spacing: var(--tracking-eyebrow);
	text-transform: uppercase;
	color: var(--accent-text);
}
.eyebrow::before {
	content: "";
	width: 22px; height: 2px;
	background: currentColor;
	border-radius: var(--radius-full);
}

/* ---------- Utilities ------------------------------------------------------ */

/* Spacing utilities exist so templates never carry inline styles; every value
   is a step on the scale. */
.mt-s  { margin-top: var(--space-s); }
.mt-m  { margin-top: var(--space-m); }
.mt-l  { margin-top: var(--space-l); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }
.mt-3xl { margin-top: var(--space-3xl); }
.mb-xl { margin-bottom: var(--space-xl); }
.mt-0  { margin-top: 0; }
.mb-0  { margin-bottom: 0; }
.m-0   { margin: 0; }
.measure-form { max-width: 520px; margin-inline: auto; }
.cluster--center { justify-content: center; }

.text-muted { color: var(--text-muted); }
.text-subtle { color: var(--text-subtle); }
.text-strong { color: var(--text); }
.bg-surface { background: var(--surface); }
.rounded { border-radius: var(--radius-l); }
.hide { display: none !important; }
@media (max-width: 767px) { .hide-mobile { display: none !important; } }
@media (min-width: 768px) { .hide-desktop { display: none !important; } }
