/**
 * Serti — stylesheet.
 *
 * THE LAYOUT ARCHETYPE: "hallmark rail + true scale".
 *
 * Two structural ideas carry the whole site, and both come from the trade
 * rather than from web fashion.
 *
 * 1. THE HALLMARK RAIL. Inside the shank of a real ring is a row of tiny
 *    punched marks: the metal standard, the assay office, the date letter, the
 *    maker. Every section here carries the same thing — a narrow left rail of
 *    small tracked-out label/value pairs. It gives the page a persistent
 *    vertical spine to align to, it is the opposite of the centred-and-stacked
 *    template look, and it means even a plain text section has something
 *    specific in it.
 *
 * 2. TRUE SCALE. Jewellery is small, and every jewellery site on the web shows
 *    a 3mm stone at 600 pixels. The single biggest question a buyer has is "how
 *    big is it really", and the web systematically lies about it. So pieces are
 *    sized in real millimetres via --serti-ppmm (pixels per millimetre), which
 *    the visitor can calibrate once against a bank card. Until they do, the
 *    CSS default is the 96dpi assumption; after, it is their actual screen.
 *
 * COLOUR: warm ivory, near-black ink, and ONE metal. No second accent. High
 * jewellery reads as expensive because of restraint, not because of decoration.
 */

/* ------------------------------------------------------------------ tokens */

:root {
	/* Ink. */
	--ink:        #14120E;
	--ink-soft:   #3B342A;
	--muted:      #6E675C;

	/* Ground. */
	--ground:     #F4F1EA;
	--paper:      #FBF9F5;
	--rule:       #DDD6C7;
	--rule-soft:  #E9E3D7;

	/**
	 * The one metal, in two weights.
	 *
	 * --gold is the decorative one: hairlines, borders, focus rings, and
	 * display type at 24px and above, where WCAG's threshold is 3:1 and it
	 * measures 3.51:1 on the ivory ground.
	 *
	 * --gold-ink is the one for TEXT. The decorative gold fails AA badly for
	 * anything small — 3.51:1 against a 4.5:1 requirement — and it was being
	 * used for the eyebrow label on every single section and for every link in
	 * running copy. The darker value measures 4.75:1 on --ground and 5.09:1 on
	 * --paper. Never set small text in --gold.
	 */
	--gold:       #9A7B48;
	--gold-ink:   #836637;
	--gold-lo:    #C6AC7C;
	--gold-wash:  rgba(154, 123, 72, 0.09);

	/* The dark stage: used for the stone bands and the closing CTA only. */
	--stage:      #131110;
	--stage-2:    #1F1B16;
	--on-stage:   #EDE7DA;
	--on-stage-2: #9E9584;

	/* Type. One base, one ratio (1.28), seven steps. Nothing outside this set. */
	--t-0: 0.78rem;
	--t-1: 1rem;
	--t-2: 1.28rem;
	--t-3: 1.64rem;
	--t-4: 2.1rem;
	--t-5: 2.69rem;
	--t-6: 3.44rem;
	--t-7: 4.41rem;

	--display: 'Bodoni Moda', 'Didot', 'Times New Roman', serif;
	--ui: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;

	/* Space. Everything is a multiple of 8. */
	--s-1: 8px;
	--s-2: 16px;
	--s-3: 24px;
	--s-4: 32px;
	--s-5: 48px;
	--s-6: 64px;
	--s-7: 96px;
	--s-8: 128px;

	--shell: 1360px;
	--rail: 172px;
	--gutter: clamp( 20px, 5vw, 64px );
	--section-y: clamp( 72px, 11vw, 160px );

	/**
	 * Pixels per millimetre. 96 CSS px per inch / 25.4 mm per inch = 3.7795,
	 * which is the correct value for a display at exactly 1 CSS px per device
	 * px at 96dpi — true for a lot of desktop screens and wrong for most
	 * laptops and every phone. The calibration control overwrites this on
	 * :root from localStorage, which is the only way to be honest about size.
	 */
	--serti-ppmm: 3.7795;

	--ease: cubic-bezier( 0.22, 0.61, 0.36, 1 );
	--ease-out: cubic-bezier( 0.16, 1, 0.3, 1 );
}

/* ------------------------------------------------------------------- reset */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

@media ( prefers-reduced-motion: reduce ) {
	html { scroll-behavior: auto; }
}

body {
	margin: 0;
	background: var( --ground );
	color: var( --ink );
	font-family: var( --ui );
	font-size: var( --t-1 );
	line-height: 1.62;
	font-synthesis-weight: none;
	-webkit-font-smoothing: antialiased;
	/* A collapsed mobile menu positioned off-canvas widened the document on an
	   earlier theme in this catalogue and produced a phantom horizontal
	   scrollbar site-wide. Belt and braces. */
	overflow-x: hidden;
}

img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }

a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: from-font; }

button, input, select, textarea { font: inherit; color: inherit; }

:where( a, button, input, select, textarea, summary, [tabindex] ):focus-visible {
	outline: 2px solid var( --gold );
	outline-offset: 3px;
	border-radius: 1px;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden; clip-path: inset( 50% );
	white-space: nowrap;
}

.skip-link {
	position: absolute;
	left: var( --s-2 ); top: -100px;
	z-index: 999;
	background: var( --ink );
	color: var( --ground );
	padding: var( --s-1 ) var( --s-3 );
}
.skip-link:focus { top: var( --s-2 ); }

/* -------------------------------------------------------------- typography */

h1, h2, h3, h4, .display {
	font-family: var( --display );
	font-weight: 400;
	line-height: 1.06;
	/* Didone letterforms already carry enormous internal contrast; at display
	   size they need the tracking pulled in or the thin strokes drift apart. */
	letter-spacing: -0.014em;
	text-wrap: balance;
	margin: 0 0 var( --s-3 );
}

h1 { font-size: clamp( var( --t-5 ), 6.2vw, var( --t-7 ) ); }
h2 { font-size: clamp( var( --t-4 ), 4.4vw, var( --t-6 ) ); }
h3 { font-size: clamp( var( --t-3 ), 2.6vw, var( --t-4 ) ); }
h4 { font-size: var( --t-3 ); letter-spacing: 0; }

p { margin: 0 0 var( --s-3 ); }

.lede {
	font-family: var( --display );
	font-size: clamp( var( --t-2 ), 2vw, var( --t-3 ) );
	line-height: 1.42;
	letter-spacing: -0.004em;
	color: var( --ink-soft );
	max-width: 34ch;
}

.prose { max-width: 68ch; }
.prose > * + * { margin-top: var( --s-3 ); }
.prose a { color: var( --gold-ink ); }

/* The tracked-out small caps used for every label on the site. Open tracking
   is only ever applied here — never to running text. */
.eyebrow,
.hallmark__k,
.meta,
.btn {
	font-family: var( --ui );
	font-size: var( --t-0 );
	font-weight: 500;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	line-height: 1.5;
}

.eyebrow { color: var( --gold-ink ); display: block; margin-bottom: var( --s-2 ); }
.meta { color: var( --muted ); }

/* ---------------------------------------------------------------- buttons */

.btn {
	display: inline-flex;
	align-items: center;
	gap: 0.7em;
	padding: 0.95em 1.7em;
	border: 1px solid var( --ink );
	background: var( --ink );
	color: var( --ground );
	text-decoration: none;
	cursor: pointer;
	transition: background 0.28s var( --ease ), color 0.28s var( --ease ), border-color 0.28s var( --ease );
}
.btn:hover { background: transparent; color: var( --ink ); }

.btn--ghost { background: transparent; color: var( --ink ); border-color: var( --rule ); }
.btn--ghost:hover { border-color: var( --ink ); background: var( --ink ); color: var( --ground ); }

.btn--on-stage { background: var( --on-stage ); border-color: var( --on-stage ); color: var( --stage ); }
.btn--on-stage:hover { background: transparent; color: var( --on-stage ); }

/* A hairline that draws itself under a text link on hover. Used sparingly. */
.tlink {
	text-decoration: none;
	background-image: linear-gradient( var( --gold ), var( --gold ) );
	background-size: 0 1px;
	background-position: 0 100%;
	background-repeat: no-repeat;
	transition: background-size 0.4s var( --ease-out );
	padding-bottom: 2px;
}
.tlink:hover { background-size: 100% 1px; }

/* -------------------------------------------------------- layout primitives */

.shell {
	max-width: var( --shell );
	margin-inline: auto;
	padding-inline: var( --gutter );
}

.section { padding-block: var( --section-y ); }

/**
 * The rail. Two columns: a narrow spine of punched-hallmark metadata, and the
 * content. Below 900px the rail lies down and becomes a horizontal strip, which
 * keeps the metadata visible instead of hiding it — it is content, not chrome.
 */
.rail {
	display: grid;
	grid-template-columns: var( --rail ) minmax( 0, 1fr );
	gap: clamp( 24px, 4vw, 72px );
	align-items: start;
}

.hallmark {
	list-style: none;
	margin: 0;
	padding: 0;
	border-top: 1px solid var( --ink );
	padding-top: var( --s-2 );
	position: sticky;
	top: calc( var( --s-6 ) + 24px );
}

.hallmark li {
	display: grid;
	gap: 2px;
	padding-block: var( --s-1 ) var( --s-2 );
	border-bottom: 1px solid var( --rule-soft );
}
.hallmark li:last-child { border-bottom: 0; }

.hallmark__k { color: var( --muted ); font-size: 0.68rem; }
.hallmark__v { font-size: var( --t-1 ); font-family: var( --display ); line-height: 1.25; }

@media ( max-width: 900px ) {
	.rail { grid-template-columns: minmax( 0, 1fr ); }
	.hallmark {
		position: static;
		display: flex;
		flex-wrap: wrap;
		gap: var( --s-1 ) var( --s-4 );
		margin-bottom: var( --s-4 );
	}
	.hallmark li { border-bottom: 0; padding-block: 0; }
}

/* Dark bands. Only two on the page: the stone stage and the closing CTA. */
.stage {
	background: var( --stage );
	color: var( --on-stage );
}
.stage h1, .stage h2, .stage h3 { color: var( --on-stage ); }
.stage .lede, .stage p { color: var( --on-stage-2 ); }
.stage .hallmark { border-top-color: var( --on-stage-2 ); }
.stage .hallmark li { border-bottom-color: rgba( 237, 231, 218, 0.14 ); }
.stage .hallmark__k { color: var( --on-stage-2 ); }
.stage .hallmark__v { color: var( --on-stage ); }
.stage .eyebrow { color: var( --gold-lo ); }

/* ---------------------------------------------------------------- true scale */

/**
 * Anything with a --mm is drawn at that many real millimetres. This is the
 * whole point of the theme's layout: a 6.5mm stone occupies 6.5 millimetres of
 * the visitor's actual screen, not "however many pixels looked good".
 */
.tscale {
	width: calc( var( --mm, 10 ) * var( --serti-ppmm ) * 1px );
	aspect-ratio: 1;
	flex: none;
}

.gauge {
	display: flex;
	align-items: flex-end;
	gap: var( --s-4 );
	flex-wrap: wrap;
	padding: var( --s-4 );
	border: 1px solid var( --rule );
	background: var( --paper );
}

.gauge__stone {
	border-radius: 50%;
	background:
		radial-gradient( circle at 38% 30%, #fff 0 12%, rgba( 255, 255, 255, 0 ) 45% ),
		conic-gradient( from 200deg, #cfc9bd, #f6f3ec, #b9b2a4, #f2eee6, #cfc9bd );
	box-shadow: 0 1px 3px rgba( 20, 18, 14, 0.18 ), inset 0 0 0 1px rgba( 20, 18, 14, 0.1 );
}

.gauge__note { max-width: 42ch; font-size: 0.92rem; color: var( --muted ); }

/* The calibration card. Rendered at the ISO/IEC 7810 ID-1 size the visitor is
   holding, and dragged until the two match. */
.calib {
	--card-mm: 85.6;
	display: grid;
	gap: var( --s-3 );
}

.calib__card {
	width: calc( var( --card-mm ) * var( --serti-ppmm ) * 1px );
	aspect-ratio: 85.6 / 53.98;
	border: 1px solid var( --ink );
	border-radius: 3.18mm;
	background:
		linear-gradient( 118deg, rgba( 154, 123, 72, 0.16 ), rgba( 154, 123, 72, 0 ) 58% ),
		var( --paper );
	position: relative;
	max-width: 100%;
}
.calib__card::after {
	content: '';
	position: absolute;
	left: 8%; top: 54%;
	width: 22%; height: 16%;
	border-radius: 2px;
	background: repeating-linear-gradient( 90deg, var( --rule ) 0 3px, transparent 3px 6px );
}

.calib__row { display: flex; align-items: center; gap: var( --s-3 ); flex-wrap: wrap; }
.calib input[type="range"] { flex: 1 1 240px; accent-color: var( --gold ); }
.calib__value { font-family: var( --display ); font-size: var( --t-3 ); min-width: 5ch; }

/* -------------------------------------------------------------- the stone */

/**
 * The gem canvas. Deliberately given a fixed aspect ratio and an explicit
 * background so the layout never shifts when WebGL is absent, and so the panel
 * still looks composed at the Static tier.
 */
.stone {
	position: relative;
	aspect-ratio: 1 / 1;
	/**
	 * This has to match what the shader paints where the ray misses the stone,
	 * or the panel flashes one colour and then repaints as another the moment
	 * WebGL comes up. The tracer's sweep is the page's ivory, so this is too.
	 *
	 * Worth being clear about the two different darks in play: the stone is lit
	 * by a DARK room — that contrast is the only reason a diamond looks like
	 * anything — but it SITS on a light sweep, exactly as it would on a
	 * grader's bench. The lighting and the backdrop are separate things and
	 * conflating them is what makes rendered gems look like plastic beads.
	 */
	background: radial-gradient( ellipse at 50% 46%, #FBF9F5 0%, #EFEBE1 72% );
	overflow: hidden;
}
.stone canvas { width: 100%; height: 100%; }

.stone__fallback {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	padding: var( --s-4 );
	text-align: center;
	color: var( --muted );
	font-size: 0.92rem;
	max-width: 30ch;
	margin-inline: auto;
}
.stone.is-live .stone__fallback { display: none; }

.stone__readout {
	position: absolute;
	left: var( --s-3 ); bottom: var( --s-3 );
	display: grid;
	gap: 2px;
	color: var( --ink );
	background: rgba( 251, 249, 245, 0.78 );
	backdrop-filter: blur( 6px );
	padding: var( --s-2 ) var( --s-3 );
	border: 1px solid var( --rule );
}
.stone__readout .hallmark__k { color: var( --muted ); }
.stone__readout b { font-family: var( --display ); font-size: var( --t-3 ); font-weight: 400; }

/* The cut comparison: two stones and the numbers they actually measured. */
.cutlab { display: grid; gap: var( --s-4 ); grid-template-columns: repeat( 2, minmax( 0, 1fr ) ); }
@media ( max-width: 720px ) { .cutlab { grid-template-columns: minmax( 0, 1fr ); } }

.cutlab__controls {
	grid-column: 1 / -1;
	display: grid;
	gap: var( --s-3 );
	padding: var( --s-4 );
	border: 1px solid rgba( 237, 231, 218, 0.18 );
}
.cutlab__control { display: grid; grid-template-columns: 13ch 1fr 6ch; gap: var( --s-3 ); align-items: center; }
.cutlab__control input[type="range"] { accent-color: var( --gold-lo ); width: 100%; }
.cutlab__control output { font-family: var( --display ); font-size: var( --t-2 ); text-align: right; }
@media ( max-width: 560px ) {
	.cutlab__control { grid-template-columns: 1fr 5ch; }
	.cutlab__control label { grid-column: 1 / -1; }
}

/* ----------------------------------------------------------------- header */

.site-header {
	position: sticky;
	top: 0;
	z-index: 40;
	background: color-mix( in srgb, var( --ground ) 88%, transparent );
	backdrop-filter: blur( 12px );
	border-bottom: 1px solid var( --rule-soft );
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var( --s-4 );
	min-height: 76px;
}

.brand {
	font-family: var( --display );
	font-size: var( --t-3 );
	letter-spacing: 0.08em;
	text-decoration: none;
	text-transform: uppercase;
	white-space: nowrap;
}
.brand img { max-height: 40px; width: auto; }

.nav ul { list-style: none; display: flex; gap: var( --s-4 ); margin: 0; padding: 0; }
.nav a {
	text-decoration: none;
	font-size: 0.92rem;
	letter-spacing: 0.04em;
	padding-block: var( --s-1 );
	position: relative;
}
.nav a::after {
	content: '';
	position: absolute;
	left: 0; right: 0; bottom: 0;
	height: 1px;
	background: var( --gold );
	transform: scaleX( 0 );
	transform-origin: left;
	transition: transform 0.4s var( --ease-out );
}
.nav a:hover::after,
.nav .current-menu-item > a::after { transform: scaleX( 1 ); }

.nav ul ul {
	position: absolute;
	display: none;
	flex-direction: column;
	gap: 0;
	background: var( --paper );
	border: 1px solid var( --rule );
	padding: var( --s-2 ) 0;
	min-width: 220px;
	z-index: 5;
}
.nav li { position: relative; }
.nav li:hover > ul, .nav li:focus-within > ul { display: flex; }
.nav ul ul a { display: block; padding: var( --s-1 ) var( --s-3 ); }

.nav-toggle { display: none; background: none; border: 1px solid var( --rule ); padding: 0.7em 1.1em; cursor: pointer; }

@media ( max-width: 960px ) {
	.nav-toggle { display: inline-block; }
	/* One horizontal row that scrolls, not a stack that wraps to three lines
	   and not an off-canvas panel that needs JS and a focus trap. */
	.nav {
		position: absolute;
		left: 0; right: 0; top: 100%;
		background: var( --paper );
		border-bottom: 1px solid var( --rule );
		max-height: 0;
		overflow: hidden;
		transition: max-height 0.34s var( --ease );
	}
	.nav.is-open { max-height: 70vh; overflow-y: auto; }
	.nav ul { flex-direction: column; gap: 0; padding: var( --s-2 ) var( --gutter ); }
	.nav a { display: block; padding: 0.7em 0; border-bottom: 1px solid var( --rule-soft ); }
	.nav ul ul { position: static; display: flex; border: 0; padding: 0 0 0 var( --s-3 ); }
}

/* ------------------------------------------------------------------- hero */

.hero {
	position: relative;
	padding-block: clamp( 48px, 8vw, 112px ) var( --section-y );
}

.hero__grid {
	display: grid;
	grid-template-columns: minmax( 0, 1fr ) minmax( 0, 0.92fr );
	gap: clamp( 32px, 5vw, 80px );
	align-items: center;
}

.hero__title { margin-bottom: var( --s-4 ); }
.hero__title em { font-style: italic; color: var( --gold ); }

.hero__actions { display: flex; gap: var( --s-2 ); flex-wrap: wrap; margin-top: var( --s-5 ); }

.hero__stone { position: relative; }

@media ( max-width: 900px ) {
	.hero__grid { grid-template-columns: minmax( 0, 1fr ); }
	.hero__stone { order: -1; }
}

/* A single hairline band of house facts under the hero. */
.marque {
	border-block: 1px solid var( --rule );
	padding-block: var( --s-3 );
}
.marque ul {
	list-style: none;
	margin: 0; padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: var( --s-3 ) var( --s-6 );
	justify-content: space-between;
}
.marque li { display: grid; gap: 2px; }
.marque b { font-family: var( --display ); font-size: var( --t-3 ); font-weight: 400; }

/* ------------------------------------------------------------ piece cards */

.pieces {
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax( 260px, 1fr ) );
	gap: var( --s-5 ) var( --s-4 );
}

.piece { display: grid; gap: var( --s-2 ); text-decoration: none; }

.piece__media {
	position: relative;
	aspect-ratio: 1;
	overflow: hidden;
	background: var( --paper );
}
.piece__media img {
	width: 100%; height: 100%;
	object-fit: cover;
	transition: transform 1.1s var( --ease-out ), filter 0.6s var( --ease );
}
.piece:hover .piece__media img { transform: scale( 1.045 ); }

/* The true-scale ghost: a ring drawn at the piece's REAL diameter, sitting in
   the corner of every card. It is the fastest possible answer to "how big". */
.piece__scale {
	position: absolute;
	right: var( --s-2 ); bottom: var( --s-2 );
	width: calc( var( --mm, 18 ) * var( --serti-ppmm ) * 1px );
	aspect-ratio: 1;
	border: 1px solid rgba( 20, 18, 14, 0.5 );
	border-radius: 50%;
	background: rgba( 251, 249, 245, 0.42 );
	backdrop-filter: blur( 2px );
	pointer-events: none;
}

.piece__title { font-family: var( --display ); font-size: var( --t-2 ); margin: 0; }
.piece__meta { display: flex; gap: var( --s-2 ); flex-wrap: wrap; color: var( --muted ); font-size: 0.86rem; }

/* --------------------------------------------------------------- metals */

.metals { display: grid; grid-template-columns: repeat( auto-fit, minmax( 200px, 1fr ) ); gap: var( --s-4 ); }

.metal { display: grid; gap: var( --s-2 ); }
.metal__swatch {
	aspect-ratio: 3 / 2;
	background: radial-gradient( ellipse at 50% 46%, #FCFAF7 0%, #F2EEE6 74% );
	position: relative;
	overflow: hidden;
}
.metal__swatch canvas { width: 100%; height: 100%; }
.metal__curve { width: 100%; height: 88px; display: block; }

/* -------------------------------------------------------------- editorial */

.split {
	display: grid;
	grid-template-columns: repeat( 2, minmax( 0, 1fr ) );
	gap: clamp( 32px, 5vw, 80px );
	align-items: center;
}
@media ( max-width: 860px ) { .split { grid-template-columns: minmax( 0, 1fr ); } }

.figure { margin: 0; }
.figure img { width: 100%; }
.figure figcaption {
	margin-top: var( --s-2 );
	font-size: 0.86rem;
	color: var( --muted );
	border-left: 1px solid var( --gold );
	padding-left: var( --s-2 );
}

.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; gap: var( --s-4 ); }
.steps li {
	counter-increment: step;
	display: grid;
	grid-template-columns: 3.2rem minmax( 0, 1fr );
	gap: var( --s-3 );
	padding-bottom: var( --s-4 );
	border-bottom: 1px solid var( --rule-soft );
}
.steps li::before {
	content: counter( step, decimal-leading-zero );
	font-family: var( --display );
	font-size: var( --t-3 );
	color: var( --gold );
	line-height: 1;
}
.steps h3 { font-size: var( --t-2 ); margin-bottom: var( --s-1 ); }
.steps p { margin: 0; color: var( --muted ); }

.quote {
	margin: 0;
	font-family: var( --display );
	font-size: clamp( var( --t-3 ), 3vw, var( --t-5 ) );
	line-height: 1.24;
	max-width: 22ch;
}
.quote cite { display: block; font: 500 var( --t-0 ) / 1.5 var( --ui ); letter-spacing: 0.18em; text-transform: uppercase; color: var( --muted ); margin-top: var( --s-3 ); font-style: normal; }

/* ------------------------------------------------------------------ forms */

.form { display: grid; gap: var( --s-3 ); max-width: 46rem; }
.form__row { display: grid; gap: var( --s-3 ); grid-template-columns: repeat( 2, minmax( 0, 1fr ) ); }
@media ( max-width: 620px ) { .form__row { grid-template-columns: minmax( 0, 1fr ); } }

.field { display: grid; gap: var( --s-1 ); }
.field label { font-size: var( --t-0 ); letter-spacing: 0.18em; text-transform: uppercase; color: var( --muted ); }
.field input, .field textarea, .field select {
	background: transparent;
	border: 0;
	border-bottom: 1px solid var( --rule );
	padding: 0.7em 0;
	transition: border-color 0.3s var( --ease );
}
.field input:focus, .field textarea:focus { border-bottom-color: var( --gold ); outline: none; }
.stage .field input, .stage .field textarea, .stage .field select { border-bottom-color: rgba( 237, 231, 218, 0.3 ); color: var( --on-stage ); }
/**
 * The label colour has to change on the dark band, not just the input.
 * --muted (#6E675C) against --stage (#131110) measures about 3.1:1, which is
 * under AA for text this size — and the closing CTA on the front page puts a
 * whole form inside a .stage section, so this is a real failure rather than a
 * hypothetical one. --on-stage-2 measures about 6.6:1.
 */
.stage .field label { color: var( --on-stage-2 ); }
.stage .field input::placeholder, .stage .field textarea::placeholder { color: rgba( 158, 149, 132, 0.75 ); }
.stage .form__status[data-state="err"] { color: #E0917F; }

/**
 * The honeypot. Hidden from people, present for bots.
 *
 * Clipped rather than parked at left:-9999px. The old trick still contributes
 * to the document's scroll width in some engines, and this theme animates
 * elements in from translateX(34px), so the page already has a legitimate
 * transient overflow to contain — there is no reason to add a permanent one.
 */
.hp {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset( 50% );
	opacity: 0;
	pointer-events: none;
}

.form__status { min-height: 1.6em; font-size: 0.92rem; }
.form__status[data-state="ok"] { color: var( --gold-ink ); }
.form__status[data-state="err"] { color: #A2402E; }

/* --------------------------------------------------------- inner templates */

.page-head {
	padding-block: clamp( 56px, 8vw, 120px ) var( --s-6 );
	border-bottom: 1px solid var( --rule );
}
.page-head h1 { margin-bottom: var( --s-2 ); }

.crumbs { font-size: var( --t-0 ); letter-spacing: 0.16em; text-transform: uppercase; color: var( --muted ); margin-bottom: var( --s-3 ); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var( --gold-ink ); }
/* The trail is a real <ol> for the benefit of assistive tech and the
   BreadcrumbList markup, which means it arrives with list bullets and an
   indent that have to be taken back off. */
.crumbs__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: baseline; }
.crumbs__item + .crumbs__item::before { content: '/'; margin: 0 0.6em; color: var( --rule ); }
.crumbs__item--current { color: var( --ink-soft ); }

/* Byline, categories and tags under an article. */
.entry__footer {
	margin-top: var( --s-6 );
	padding-top: var( --s-3 );
	border-top: 1px solid var( --rule );
	display: flex;
	flex-wrap: wrap;
	gap: var( --s-2 ) var( --s-4 );
	font-size: var( --t-0 );
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var( --muted );
}
.entry__meta-item { display: inline-flex; gap: 0.5em; align-items: baseline; }
.entry__date, .entry__author, .entry__cats, .entry__tags { display: inline-flex; gap: 0.5em; flex-wrap: wrap; }
.entry__footer a { color: var( --ink ); text-decoration: none; border-bottom: 1px solid var( --rule ); }
.entry__footer a:hover { border-bottom-color: var( --gold ); }

.entry { padding-block: var( --section-y ); }
.entry__content > * + * { margin-top: var( --s-3 ); }
.entry__content h2 { margin-top: var( --s-6 ); }
.entry__content blockquote {
	margin: var( --s-5 ) 0;
	padding-left: var( --s-4 );
	border-left: 1px solid var( --gold );
	font-family: var( --display );
	font-size: var( --t-3 );
	line-height: 1.34;
}
.entry__content img { margin-block: var( --s-4 ); }
.entry__content ul, .entry__content ol { padding-left: 1.3em; }
.entry__content li + li { margin-top: var( --s-1 ); }
.entry__content figure { margin: var( --s-5 ) 0; }
.entry__content code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9em; background: var( --gold-wash ); padding: 0.15em 0.4em; }

.cards { display: grid; grid-template-columns: repeat( auto-fill, minmax( 280px, 1fr ) ); gap: var( --s-5 ) var( --s-4 ); }
.card { display: grid; gap: var( --s-2 ); text-decoration: none; }
.card h3 a { text-decoration: none; }
.card__media { aspect-ratio: 4 / 3; overflow: hidden; background: var( --paper ); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var( --ease-out ); }
.card:hover .card__media img { transform: scale( 1.04 ); }
.card h3 { font-size: var( --t-2 ); margin: 0; }
.card p { color: var( --muted ); margin: 0; font-size: 0.94rem; }

/* the_posts_pagination() emits <nav class="navigation pager"> — WordPress adds
   its own "navigation" class alongside whatever you pass, so both names have to
   be matched or the pagination renders completely unstyled. */
.pagination, .pager, .navigation {
	margin-top: var( --s-7 );
	border-top: 1px solid var( --rule );
	padding-top: var( --s-4 );
}
.pagination .nav-links, .pager .nav-links, .navigation .nav-links {
	display: flex;
	gap: var( --s-2 );
	flex-wrap: wrap;
	align-items: center;
}
.pagination a, .pagination .current,
.pager a, .pager .current,
.navigation .nav-links a, .navigation .nav-links .current {
	padding: 0.5em 0.9em;
	border: 1px solid var( --rule );
	text-decoration: none;
	font-size: 0.9rem;
	transition: border-color 0.25s var( --ease ), background 0.25s var( --ease ), color 0.25s var( --ease );
}
.pagination a:hover, .pager a:hover, .navigation .nav-links a:hover {
	border-color: var( --ink );
}
.pagination .current, .pager .current, .navigation .nav-links .current {
	background: var( --ink );
	color: var( --ground );
	border-color: var( --ink );
}
.pagination .dots, .pager .dots, .navigation .dots { border: 0; color: var( --muted ); }

.comments { padding-block: var( --section-y ); border-top: 1px solid var( --rule ); }
.comment-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var( --s-4 ); }
.comment-list ul.children { list-style: none; padding-left: var( --s-4 ); margin-top: var( --s-4 ); display: grid; gap: var( --s-4 ); }
.comment-body { border-bottom: 1px solid var( --rule-soft ); padding-bottom: var( --s-3 ); }

/* ------------------------------------------------------------------ footer */

.site-footer { background: var( --stage ); color: var( --on-stage-2 ); padding-block: var( --s-7 ) var( --s-5 ); }
.site-footer a { color: var( --on-stage ); text-decoration: none; }
.site-footer a:hover { color: var( --gold-lo ); }
.footer__grid { display: grid; grid-template-columns: 1.4fr repeat( 3, 1fr ); gap: var( --s-5 ) var( --s-4 ); }
@media ( max-width: 880px ) { .footer__grid { grid-template-columns: repeat( 2, minmax( 0, 1fr ) ); } }
@media ( max-width: 520px ) { .footer__grid { grid-template-columns: minmax( 0, 1fr ); } }
.footer__grid h2, .widget__title {
	font: 500 var( --t-0 ) / 1.5 var( --ui );
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var( --on-stage-2 );
	margin: 0 0 var( --s-2 );
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var( --s-1 ); }
.site-footer .brand { color: var( --on-stage ); font-size: var( --t-4 ); }
.colophon {
	margin-top: var( --s-6 );
	padding-top: var( --s-3 );
	border-top: 1px solid rgba( 237, 231, 218, 0.14 );
	display: flex;
	justify-content: space-between;
	gap: var( --s-3 );
	flex-wrap: wrap;
	font-size: 0.84rem;
}

/* ------------------------------------------------------------------ motion */

/**
 * Entrances are CSS scroll-driven animations, not IntersectionObserver.
 *
 * They live entirely inside @supports, which means the content's resting state
 * is FULLY VISIBLE for every browser that lacks the feature, for reduced-motion
 * users, and for crawlers. An earlier theme in this catalogue hid its content
 * behind an observer whose threshold could never be reached on a very tall
 * element and the article body rendered blank; this construction makes that
 * class of bug impossible, because nothing is hidden unless the thing that
 * un-hides it is known to exist.
 *
 * Direction is authored per element rather than applied uniformly: left-hand
 * columns arrive from the left, right-hand ones from the right, wide blocks
 * rise. A single fade-up on everything is the fingerprint of a template.
 */
@supports ( animation-timeline: view() ) {
	@media ( prefers-reduced-motion: no-preference ) {
		@keyframes serti-rise {
			from { opacity: 0; transform: translate3d( 0, 26px, 0 ); }
			to   { opacity: 1; transform: none; }
		}
		@keyframes serti-left {
			from { opacity: 0; transform: translate3d( -34px, 0, 0 ); }
			to   { opacity: 1; transform: none; }
		}
		@keyframes serti-right {
			from { opacity: 0; transform: translate3d( 34px, 0, 0 ); }
			to   { opacity: 1; transform: none; }
		}
		@keyframes serti-wipe {
			from { clip-path: inset( 0 0 100% 0 ); }
			to   { clip-path: inset( 0 0 0 0 ); }
		}

		[data-in] {
			animation: serti-rise linear both;
			animation-timeline: view();
			animation-range: entry 8% cover 34%;
		}
		[data-in="left"]  { animation-name: serti-left; }
		[data-in="right"] { animation-name: serti-right; }
		[data-in="wipe"]  { animation-name: serti-wipe; }

		/* Stagger inside a group, so a grid arrives as a sequence. */
		[data-stagger] > * { animation: serti-rise linear both; animation-timeline: view(); }
		[data-stagger] > *:nth-child( 3n+1 ) { animation-range: entry 6% cover 30%; }
		[data-stagger] > *:nth-child( 3n+2 ) { animation-range: entry 10% cover 34%; }
		[data-stagger] > *:nth-child( 3n+3 ) { animation-range: entry 14% cover 38%; }

		/* A rule that draws itself across as the section arrives. */
		.rule-draw {
			border-top: 1px solid var( --ink );
			animation: serti-grow linear both;
			animation-timeline: view();
			animation-range: entry 0% cover 26%;
		}
		@keyframes serti-grow { from { transform: scaleX( 0 ); } to { transform: scaleX( 1 ); } }
		.rule-draw { transform-origin: left; }
	}
}

/* ------------------------------------------------------------------- misc */

.alignwide { width: min( 100%, calc( var( --shell ) - 2 * var( --gutter ) ) ); }
.alignfull { width: 100vw; margin-inline: calc( 50% - 50vw ); }
.wp-caption-text, .wp-block-image figcaption { font-size: 0.86rem; color: var( --muted ); }
.sticky, .bypostauthor { }
.gallery { display: grid; grid-template-columns: repeat( auto-fit, minmax( 160px, 1fr ) ); gap: var( --s-2 ); }
