/* ==========================================================================
   Base — reset, elements, typography, utilities
   ========================================================================== */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
	margin: 0;
	min-height: 100vh;
	min-height: 100svh;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font-body);
	font-size: var(--step-0);
	line-height: 1.65;
	font-weight: 400;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
	overflow-x: hidden;
}

body.is-locked {
	overflow: hidden;
}

img,
svg,
video,
canvas {
	display: block;
	max-width: 100%;
	height: auto;
}

/* Display face (Oswald) is reserved for H1 and hero-scale type, matching the
   reference build. H2/H3 run in Inter 700 so body and headings stay one voice. */
h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0;
	font-family: var(--font-body);
	font-weight: 700;
	color: var(--text);
	text-wrap: balance;
}

h1,
.h1 {
	font-family: var(--font-display);
	font-size: var(--step-4);
	font-weight: 600;
	line-height: 0.95;
	letter-spacing: 0.005em;
	text-transform: uppercase;
}

h2,
.h2 {
	font-size: var(--step-3);
	line-height: 1.08;
	letter-spacing: -0.015em;
}

h3,
.h3 {
	font-size: var(--step-2);
	line-height: 1.2;
	letter-spacing: -0.02em;
}

h4,
.h4 {
	font-size: var(--step-1);
	line-height: 1.3;
	letter-spacing: -0.01em;
}

p,
ul,
ol,
dl,
figure,
blockquote,
pre {
	margin: 0;
}

p {
	text-wrap: pretty;
}

a {
	color: var(--gold-600);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
	transition: color 0.15s ease;
}

a:hover {
	color: var(--gold-700);
}

:focus-visible {
	outline: 2px solid var(--focus);
	outline-offset: 3px;
	border-radius: 3px;
}

::selection {
	background: var(--gold-500);
	color: var(--on-accent);
}

hr {
	border: 0;
	height: 1px;
	background: var(--border);
	margin: var(--space-xl) 0;
}

button,
input,
select,
textarea {
	font: inherit;
	color: inherit;
}

strong,
b {
	font-weight: 600;
}

/* ---- Scrollbar (dark) ---- */
* {
	scrollbar-color: var(--navy-600) transparent;
	scrollbar-width: thin;
}

/* --------------------------------------------------------------------------
   Layout primitives
   -------------------------------------------------------------------------- */

.container {
	width: 100%;
	max-width: var(--container);
	margin-inline: auto;
	padding-inline: clamp(1rem, 5vw, 3rem);
}

.container--narrow {
	max-width: var(--container-narrow);
}

.container--wide {
	max-width: var(--container-wide);
}

.section {
	padding-block: var(--section-pad);
	position: relative;
}

.section--tight {
	padding-block: clamp(2.5rem, 5vw, 4rem);
}

.section--surface {
	background: var(--surface);
}

.section--surface-2 {
	background: var(--surface-2);
}

.stack > * + * {
	margin-block-start: var(--flow, var(--space-s));
}

.prose {
	max-width: var(--measure);
	color: var(--text-muted);
}

.prose > * + * {
	margin-block-start: var(--space-s);
}

.prose h2,
.prose h3 {
	margin-block-start: var(--space-xl);
	color: var(--text);
}

.prose ul,
.prose ol {
	padding-inline-start: 1.35em;
}

.prose li + li {
	margin-block-start: 0.4em;
}

.prose a {
	text-decoration: underline;
}

.grid {
	display: grid;
	gap: var(--space-m);
}

.grid--auto {
	grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
}

.grid--3 {
	grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
}

.split {
	display: grid;
	gap: var(--space-2xl);
	align-items: center;
}

@media (min-width: 900px) {
	.split {
		grid-template-columns: 1.05fr 0.95fr;
	}

	.split--reverse > *:first-child {
		order: 2;
	}
}

/* --------------------------------------------------------------------------
   Text helpers
   -------------------------------------------------------------------------- */

.eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 0.6em;
	font-family: var(--font-body);
	font-size: 0.875rem; /* 14px */
	font-weight: 700;
	letter-spacing: 2.5px;
	text-transform: uppercase;
	color: var(--gold-600);
	margin: 0;
}

.eyebrow::before {
	content: "";
	width: 30px;
	height: 2px;
	background: var(--foil);
	flex: none;
}

.eyebrow--center::before {
	display: none;
}

/* Foil gold display type. Falls back to solid gold where background-clip is unsupported. */
.foil {
	color: var(--gold-500);
}

@supports (-webkit-background-clip: text) or (background-clip: text) {
	.foil {
		background: var(--foil);
		-webkit-background-clip: text;
		background-clip: text;
		color: transparent;
		-webkit-text-fill-color: transparent;
	}
}

.foil-rule {
	height: 2px;
	width: 72px;
	background: var(--foil);
	border: 0;
	margin: 0;
	border-radius: 2px;
}

.section-head {
	display: grid;
	gap: var(--space-xs);
	max-width: 46ch;
	margin-block-end: var(--space-xl);
}

.section-head--center {
	margin-inline: auto;
	text-align: center;
	justify-items: center;
	max-width: 60ch;
}

/* Heading stays tight so it breaks deliberately; the intro gets the full
   measure instead of being squeezed into a narrow column. */
.section-head--center h2 {
	max-width: 22ch;
	margin-inline: auto;
}

.section-head--center p:not(.eyebrow) {
	max-width: 54ch;
	margin-inline: auto;
}

.section-head p:not(.eyebrow) {
	color: var(--text-muted);
	font-size: var(--step-1);
	line-height: 1.55;
}

.lede {
	font-size: var(--step-1);
	line-height: 1.55;
	color: var(--text-muted);
	max-width: 52ch;
}

.muted {
	color: var(--text-muted);
}

.small {
	font-size: var(--step--1);
	line-height: 1.5;
}

.tabular {
	font-variant-numeric: tabular-nums;
}

.center {
	text-align: center;
}

.screen-reader-text,
.sr-only {
	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: -9999px;
	z-index: 999;
}

.skip-link:focus {
	left: 16px;
	top: 16px;
	padding: 12px 20px;
	background: var(--gold-500);
	color: var(--on-accent);
	border-radius: var(--radius-s);
	font-weight: 600;
	text-decoration: none;
}

/* --------------------------------------------------------------------------
   Decorative background treatments
   -------------------------------------------------------------------------- */

.glow {
	position: absolute;
	inset: 0;
	overflow: hidden;
	pointer-events: none;
	z-index: 0;
}

.glow::before {
	content: "";
	position: absolute;
	top: -35%;
	left: 45%;
	width: min(1100px, 130%);
	aspect-ratio: 1;
	transform: translateX(-50%);
	background: radial-gradient(circle, rgb(133 111 78 / 0.1) 0%, rgb(133 111 78 / 0) 62%);
}

.glow--gold::after {
	content: "";
	position: absolute;
	bottom: -40%;
	right: -10%;
	width: min(720px, 90%);
	aspect-ratio: 1;
	background: radial-gradient(circle, rgb(133 111 78 / 0.12) 0%, rgb(133 111 78 / 0) 65%);
}

.grid-lines {
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: 0;
	background-image: linear-gradient(rgb(12 20 38 / 0.035) 1px, transparent 1px),
		linear-gradient(90deg, rgb(12 20 38 / 0.035) 1px, transparent 1px);
	background-size: 64px 64px;
	mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 20%, transparent 75%);
	-webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 20%, transparent 75%);
}

/* Dark inverted band (footer, CTA) — tokens flip inside it. */
.on-dark {
	--text: var(--text-on-dark);
	--text-muted: var(--text-muted-on-dark);
	--text-subtle: #7d8ba3;
	--surface: rgb(255 255 255 / 0.04);
	--surface-2: rgb(255 255 255 / 0.05);
	--surface-3: rgb(255 255 255 / 0.07);
	--border: rgb(255 255 255 / 0.12);
	--border-strong: rgb(255 255 255 / 0.24);
	--focus: var(--gold-300);
	background: var(--ink);
	color: var(--text-on-dark);
}

.on-dark h1,
.on-dark h2,
.on-dark h3,
.on-dark h4 {
	color: var(--text-on-dark);
}

.on-dark .eyebrow {
	color: var(--gold-300);
}

.on-dark a {
	color: var(--gold-200);
}

.section > .container {
	position: relative;
	z-index: 1;
}

/* --------------------------------------------------------------------------
   Scroll reveal (paired with assets/js/animations.js)
   -------------------------------------------------------------------------- */

.reveal {
	opacity: 1;
}

/* animations.js sets .has-motion on <html>. Without JS — or if the module
   fails to load — reveal targets simply stay visible. */
.has-motion .reveal:not(.is-visible) {
	opacity: 0;
}

.no-js .reveal,
.reveal.is-visible {
	opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
	.reveal {
		opacity: 1;
	}

	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}
