/* Design tokens. Same token names as the main site (public/css/main.css) so the two
   stay mentally one system, but a warmer palette: fire-service red for the accent and
   a brass gold for honors. Components reference tokens only; never hardcode colors
   below this block. Dark overrides live at the bottom under .darkmode. */
:root {
	color-scheme: light;
	--bg: #f6f2ec;
	--surface: #fffdf9;
	--text-primary: #1b1715;
	--text-secondary: #6a615b;
	--border: #e2d9cf;
	--accent: #b4231c;
	--accent-soft: rgba(180, 35, 28, 0.08);
	--gold: #a8781a;
	--gold-soft: rgba(168, 120, 26, 0.12);
	--hero-bg: #141010;
	--hero-text: #f3ece4;
	--hero-muted: #b9aea4;
	--font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
	--font-body: -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Helvetica, Arial, sans-serif;
	--font-mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Code", Menlo, Consolas, monospace;
	--radius: 10px;
	--shadow: 0 1px 2px rgba(27, 23, 21, 0.06), 0 8px 24px rgba(27, 23, 21, 0.06);
}

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

html { scroll-behavior: smooth; }

body {
	background: var(--bg);
	color: var(--text-primary);
	font-family: var(--font-body);
	font-size: 1.05rem;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent); color: #fff; }

img { display: block; max-width: 100%; height: auto; }

a { color: var(--accent); }

h1, h2, h3 {
	font-family: var(--font-display);
	font-weight: 600;
	letter-spacing: -0.015em;
	line-height: 1.15;
}

h2 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); }

.wrap {
	max-width: 1040px;
	margin: 0 auto;
	padding: 0 20px;
}

/* Small-caps label used above every section title and on cards */
.eyebrow {
	font-family: var(--font-mono);
	font-size: 0.72rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--accent);
}

.section {
	padding: 88px 0;
}

.section-head {
	max-width: 640px;
	margin-bottom: 44px;
}

.section-head p {
	color: var(--text-secondary);
	margin-top: 12px;
}

.skip-link {
	position: absolute;
	left: 12px;
	top: -60px;
	background: var(--surface);
	color: var(--text-primary);
	padding: 8px 14px;
	border: 1px solid var(--border);
	border-radius: 6px;
	z-index: 30;
}
.skip-link:focus { top: 12px; }

/* ---------- Theme toggle (same markup as the main site) ---------- */
#theme-toggle {
	position: fixed;
	top: 12px;
	right: 12px;
	z-index: 20;
	background: rgba(0, 0, 0, 0.25);
	border: 1px solid transparent;
	border-radius: 6px;
	padding: 7px;
	cursor: pointer;
	color: var(--hero-text);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
#theme-toggle.scrolled {
	background: var(--surface);
	border-color: var(--border);
	color: var(--text-secondary);
}
#theme-toggle:hover, #theme-toggle:focus-visible { color: var(--accent); border-color: var(--border); }
#theme-toggle svg { width: 20px; height: 20px; display: block; pointer-events: none; }
#theme-toggle .icon-sun { display: none; }
.darkmode #theme-toggle .icon-sun { display: block; }
.darkmode #theme-toggle .icon-moon { display: none; }

/* ---------- Hero ---------- */
.hero {
	position: relative;
	background: var(--hero-bg);
	color: var(--hero-text);
	overflow: hidden;
	min-height: 92vh;
	display: flex;
	align-items: center;
	padding: 100px 0 70px;
}

/* Deep red glow in one corner and a faint Maltese cross watermark */
.hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background:
		radial-gradient(ellipse 60% 55% at 85% 20%, rgba(180, 35, 28, 0.42), transparent 70%),
		radial-gradient(ellipse 50% 45% at 10% 95%, rgba(168, 120, 26, 0.18), transparent 70%);
	pointer-events: none;
}

.hero-cross {
	position: absolute;
	right: -6%;
	bottom: -14%;
	width: min(62vw, 620px);
	opacity: 0.06;
	pointer-events: none;
}

.hero .wrap {
	position: relative;
	display: grid;
	grid-template-columns: 1.15fr 0.85fr;
	gap: 48px;
	align-items: center;
	width: 100%;
}

.hero .eyebrow { color: var(--gold); }

.hero h1 {
	font-size: clamp(2.8rem, 7vw, 5.4rem);
	font-weight: 500;
	margin: 14px 0 10px;
	letter-spacing: -0.03em;
}

.hero .role {
	font-size: clamp(1.1rem, 2vw, 1.4rem);
	color: var(--hero-muted);
	font-family: var(--font-display);
	font-style: italic;
}

.hero .lede {
	margin-top: 26px;
	max-width: 520px;
	color: var(--hero-text);
	font-size: 1.1rem;
	line-height: 1.7;
}

.hero .years {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 30px;
}

.hero .years span {
	font-family: var(--font-mono);
	font-size: 0.78rem;
	letter-spacing: 0.06em;
	border: 1px solid rgba(243, 236, 228, 0.22);
	border-radius: 999px;
	padding: 6px 14px;
	color: var(--hero-muted);
}

.portrait {
	position: relative;
	aspect-ratio: 3 / 4;
	border-radius: var(--radius);
	overflow: hidden;
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
	outline: 1px solid rgba(243, 236, 228, 0.12);
	transform: rotate(1.5deg);
}
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.portrait::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	box-shadow: inset 0 0 0 1px rgba(243, 236, 228, 0.08);
	pointer-events: none;
}

/* ---------- Stats ---------- */
.stats {
	position: relative;
	z-index: 1;
	margin-top: -56px;
}

.stats .wrap {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 14px;
}

.stat {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 24px 22px 20px;
	box-shadow: var(--shadow);
}

.stat .num {
	font-family: var(--font-display);
	font-size: clamp(2.2rem, 4vw, 3rem);
	font-weight: 600;
	letter-spacing: -0.03em;
	line-height: 1;
	color: var(--accent);
	font-variant-numeric: tabular-nums;
}

.stat .num small {
	font-size: 0.5em;
	vertical-align: super;
	margin-left: 2px;
}

.stat .label {
	margin-top: 10px;
	font-size: 0.9rem;
	color: var(--text-secondary);
	line-height: 1.4;
}

/* ---------- Timeline ---------- */
.timeline {
	list-style: none;
	position: relative;
	padding-left: 36px;
}

.timeline::before {
	content: "";
	position: absolute;
	left: 9px;
	top: 6px;
	bottom: 6px;
	width: 2px;
	background: linear-gradient(var(--border), var(--accent) 30%, var(--gold) 70%, var(--border));
}

.event {
	position: relative;
	margin-bottom: 36px;
}

.event::before {
	content: "";
	position: absolute;
	left: -34px;
	top: 10px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: var(--bg);
	border: 3px solid var(--accent);
	box-shadow: 0 0 0 4px var(--bg);
}

.event.honor::before { border-color: var(--gold); }

.event .when {
	font-family: var(--font-mono);
	font-size: 0.78rem;
	letter-spacing: 0.08em;
	color: var(--text-secondary);
	text-transform: uppercase;
}

.event h3 {
	font-size: 1.45rem;
	margin: 6px 0 10px;
}

.event p {
	color: var(--text-secondary);
	max-width: 640px;
}

.event .src {
	display: inline-block;
	margin: 10px 14px 0 0;
	font-family: var(--font-mono);
	font-size: 0.75rem;
	color: var(--text-secondary);
	text-decoration: none;
	border-bottom: 1px solid var(--border);
}
a.src:hover { color: var(--accent); border-color: var(--accent); }
.event .src.src { font-style: normal; }

.event.feature {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 28px;
	box-shadow: var(--shadow);
}
.event.feature::before { left: -62px; top: 38px; }
.event.feature p { max-width: none; }

/* ---------- Chapter: August 2011 ---------- */
.chapter {
	background: var(--hero-bg);
	color: var(--hero-text);
	position: relative;
	overflow: hidden;
}

.chapter::before {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(ellipse 55% 60% at 100% 100%, rgba(180, 35, 28, 0.35), transparent 70%);
	pointer-events: none;
}

.chapter .wrap { position: relative; }
.chapter .eyebrow { color: var(--gold); }
.chapter .section-head p { color: var(--hero-muted); }

.chapter-grid {
	display: grid;
	grid-template-columns: 1.1fr 0.9fr;
	gap: 48px;
	align-items: start;
}

.chapter-text p {
	color: var(--hero-text);
	margin-bottom: 18px;
	font-size: 1.08rem;
	line-height: 1.75;
}

.chapter-text p:last-child { margin-bottom: 0; }

.chapter .press {
	border-color: rgba(243, 236, 228, 0.14);
	background: rgba(255, 255, 255, 0.04);
	box-shadow: none;
}
.chapter .press .meta { color: var(--hero-muted); }
.chapter .press h3 { color: var(--hero-text); }
.chapter .press p { color: var(--hero-muted); }
.chapter .press a.read { color: var(--gold); }

.pull {
	font-family: var(--font-display);
	font-size: clamp(1.6rem, 3vw, 2.2rem);
	line-height: 1.3;
	font-weight: 500;
	margin: 0 0 14px;
	color: var(--hero-text);
}

.pull::before { content: "\201C"; color: var(--gold); }
.pull::after { content: "\201D"; color: var(--gold); }

.attrib {
	font-family: var(--font-mono);
	font-size: 0.75rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--hero-muted);
	margin-bottom: 34px;
}

/* ---------- Honors ---------- */
.honors {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 14px;
}

.honor {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 24px 22px;
	box-shadow: var(--shadow);
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.honor .badge {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--gold-soft);
	color: var(--gold);
	display: grid;
	place-items: center;
}
.honor .badge svg { width: 22px; height: 22px; }

.honor h3 { font-size: 1.15rem; }
.honor p { font-size: 0.92rem; color: var(--text-secondary); }

.honor .count {
	font-family: var(--font-display);
	font-size: 2rem;
	color: var(--gold);
	line-height: 1;
}

/* ---------- Press cards ---------- */
.press-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 14px;
}

.press {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 22px;
	box-shadow: var(--shadow);
}

.press .meta {
	font-family: var(--font-mono);
	font-size: 0.72rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--text-secondary);
	display: flex;
	justify-content: space-between;
	gap: 8px;
	flex-wrap: wrap;
}

.press h3 { font-size: 1.15rem; margin: 10px 0 8px; }
.press p { font-size: 0.95rem; color: var(--text-secondary); }

.press a.read {
	display: inline-block;
	margin-top: 12px;
	font-family: var(--font-mono);
	font-size: 0.78rem;
	text-decoration: none;
}
.press a.read::after { content: " \2192"; }
.press a.read:hover { text-decoration: underline; }

/* ---------- Voices ---------- */
.voices {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 14px;
}

.voice {
	background: var(--surface);
	border: 1px solid var(--border);
	border-left: 4px solid var(--accent);
	border-radius: var(--radius);
	padding: 26px 24px;
	box-shadow: var(--shadow);
}

.voice blockquote {
	font-family: var(--font-display);
	font-size: 1.35rem;
	line-height: 1.4;
}

.voice figcaption {
	margin-top: 14px;
	font-family: var(--font-mono);
	font-size: 0.74rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--text-secondary);
}

.voice.wide { grid-column: 1 / -1; }

/* ---------- Gallery ---------- */
.gallery {
	columns: 3 260px;
	column-gap: 14px;
}

.gallery figure {
	break-inside: avoid;
	margin: 0 0 14px;
	border-radius: var(--radius);
	overflow: hidden;
	border: 1px solid var(--border);
	background: var(--surface);
	position: relative;
}

.gallery button {
	display: block;
	width: 100%;
	padding: 0;
	border: 0;
	background: none;
	cursor: zoom-in;
}

.gallery img {
	width: 100%;
	transition: transform 0.4s ease;
}

.gallery button:hover img, .gallery button:focus-visible img { transform: scale(1.03); }
.gallery button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

.gallery figcaption {
	padding: 10px 14px;
	font-size: 0.82rem;
	color: var(--text-secondary);
}

.gallery-note {
	margin-top: 18px;
	font-size: 0.9rem;
	color: var(--text-secondary);
}

/* ---------- Lightbox ---------- */
#lightbox {
	position: fixed;
	inset: 0;
	background: rgba(10, 8, 7, 0.92);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	z-index: 40;
}
#lightbox[hidden] { display: none; }

#lightbox figure {
	max-width: min(1200px, 100%);
	max-height: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
}

#lightbox img {
	max-width: 100%;
	max-height: calc(100vh - 110px);
	object-fit: contain;
	border-radius: 6px;
}

#lightbox figcaption {
	color: var(--hero-text);
	font-size: 0.9rem;
	text-align: center;
	background: rgba(10, 8, 7, 0.7);
	padding: 8px 14px;
	border-radius: 6px;
}

#lightbox button {
	position: absolute;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.18);
	color: var(--hero-text);
	border-radius: 999px;
	width: 44px;
	height: 44px;
	cursor: pointer;
	font-size: 1.3rem;
	line-height: 1;
	display: grid;
	place-items: center;
}
#lightbox button:hover, #lightbox button:focus-visible { background: rgba(255, 255, 255, 0.18); outline: none; border-color: var(--gold); }
#lb-close { top: 16px; right: 16px; }
#lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
#lb-next { right: 16px; top: 50%; transform: translateY(-50%); }

/* ---------- Footer ---------- */
footer {
	border-top: 1px solid var(--border);
	padding: 40px 0 48px;
	color: var(--text-secondary);
	font-size: 0.9rem;
}

footer .wrap {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 12px;
}

footer a { color: var(--text-primary); text-decoration: none; border-bottom: 1px solid var(--border); }
footer a:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- Motion ---------- */
.reveal {
	opacity: 0;
	transform: translateY(18px);
	transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.reveal { opacity: 1; transform: none; transition: none; }
	.gallery img { transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
	.stats .wrap { grid-template-columns: repeat(2, 1fr); }
	.honors { grid-template-columns: repeat(2, 1fr); }
	.chapter-grid { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 720px) {
	.section { padding: 64px 0; }
	.hero { min-height: auto; padding: 90px 0 60px; }
	.hero .wrap { grid-template-columns: 1fr; gap: 36px; }
	.portrait { max-width: 320px; margin: 0 auto; transform: none; }
	.hero-cross { width: 80vw; right: -20%; bottom: -8%; }
	.stats { margin-top: -30px; }
	.press-grid, .voices { grid-template-columns: 1fr; }
	.event.feature { padding: 20px; }
	.event.feature::before { left: -54px; top: 30px; }
}

@media (max-width: 480px) {
	.stats .wrap { grid-template-columns: 1fr 1fr; gap: 10px; }
	.stat { padding: 18px 16px 16px; }
	.honors { grid-template-columns: 1fr; }
	.timeline { padding-left: 28px; }
	.event::before { left: -26px; }
	.event.feature::before { left: -46px; }
}

/* ---------- Dark theme ---------- */
.darkmode {
	color-scheme: dark;
	--bg: #0e0c0b;
	--surface: #181412;
	--text-primary: #efe9e2;
	--text-secondary: #a39a91;
	--border: #2b2521;
	--accent: #ff6b5f;
	--accent-soft: rgba(255, 107, 95, 0.1);
	--gold: #e2b64a;
	--gold-soft: rgba(226, 182, 74, 0.12);
	--hero-bg: #0a0807;
	--shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 30px rgba(0, 0, 0, 0.35);
}

.darkmode ::selection { background: var(--gold); color: #0e0c0b; }

/* ---------- Lesson page (digital-intubation.html) ---------- */
.lesson { padding: 90px 0 60px; }
.lesson .wrap { max-width: 900px; }
.lesson .crumbs { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 28px; }
.lesson .crumbs a { color: var(--text-secondary); text-decoration: none; }
.lesson .crumbs a:hover { color: var(--accent); }
.lesson .crumbs span { padding: 0 8px; }
.lesson h1 { font-size: clamp(2.4rem, 6vw, 4rem); margin: 10px 0 18px; }
.lesson .lede { font-size: 1.12rem; line-height: 1.75; max-width: 680px; }
.lesson .note {
	margin-top: 22px;
	padding: 12px 16px;
	border-left: 3px solid var(--gold);
	background: var(--gold-soft);
	font-size: 0.9rem;
	color: var(--text-secondary);
	border-radius: 0 6px 6px 0;
}
.lesson-section { margin-top: 64px; }
.lesson-section h2 { margin-bottom: 14px; }
.lesson-section > p { color: var(--text-secondary); max-width: 680px; }
.lesson-page #theme-toggle { color: var(--text-secondary); background: var(--surface); border-color: var(--border); }

.diagram {
	margin: 24px 0 0;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 16px;
	box-shadow: var(--shadow);
}
.diagram svg { width: 100%; height: auto; display: block; }
.diagram figcaption { margin-top: 12px; font-size: 0.88rem; color: var(--text-secondary); }

/* Anatomy fills. Muted, printable, tokens only. No .diagram prefix: these elements are
   cloned through <use> from the hidden defs svg and keep that context for selectors. */
.skin { fill: var(--anat-skin); stroke: var(--anat-line); stroke-width: 1.5; }
.cavity { fill: var(--anat-cavity); stroke: var(--anat-line); stroke-width: 1; }
.bone { fill: var(--anat-bone); stroke: var(--anat-line); stroke-width: 1; }
.tissue { fill: var(--anat-tissue); stroke: var(--anat-line); stroke-width: 1; }
.tongue { fill: var(--anat-tongue); stroke: var(--anat-line); stroke-width: 1.5; }
.epiglottis { fill: var(--anat-cartilage); stroke: var(--anat-line); stroke-width: 1.5; }
.airway { fill: var(--anat-cavity); stroke: var(--anat-line); stroke-width: 1.5; }
.cords { fill: none; stroke: var(--anat-line); stroke-width: 2; stroke-linecap: round; }
.rings { fill: none; stroke: var(--anat-line); stroke-width: 1; opacity: 0.6; }
.glove { fill: var(--anat-glove); stroke: var(--anat-glove-line); stroke-width: 1.5; }
.tube { fill: none; stroke: var(--anat-tube); stroke-width: 11; stroke-linecap: round; opacity: 0.92; }
.tube-stylet { fill: none; stroke: var(--text-primary); stroke-width: 1.5; stroke-dasharray: 4 4; opacity: 0.6; }
.tube-cuff { fill: var(--anat-tube); opacity: 0.45; }
.bite-block { fill: var(--anat-bone); stroke: var(--anat-line); }
.diagram .labels text { font-family: var(--font-mono); font-size: 13px; fill: var(--text-primary); }
.diagram .labels line, .diagram .labels .arrow { stroke: var(--accent); stroke-width: 1.5; fill: none; }
.diagram .labels .arrow { marker-end: none; stroke-width: 2.5; }
.diagram .capno rect { fill: var(--hero-bg); stroke: var(--border); }
.diagram .capno path { fill: none; stroke: #4ade80; stroke-width: 2.5; stroke-linejoin: round; }
.diagram .capno text { font-family: var(--font-mono); font-size: 12px; fill: #b9aea4; }

:root {
	--anat-skin: #f3dccb;
	--anat-cavity: #faf3ea;
	--anat-bone: #ece2cf;
	--anat-tissue: #e2a596;
	--anat-tongue: #d97f7a;
	--anat-cartilage: #c9b88a;
	--anat-line: #5b4a42;
	--anat-glove: #8fb7d9;
	--anat-glove-line: #3f6a8e;
	--anat-tube: #2f6f9f;
}
.darkmode {
	--anat-skin: #4a3a33;
	--anat-cavity: #1e1816;
	--anat-bone: #5a5043;
	--anat-tissue: #9a5a50;
	--anat-tongue: #a85a56;
	--anat-cartilage: #8a7a52;
	--anat-line: #d8c9bd;
	--anat-glove: #5d8fb8;
	--anat-glove-line: #a9d0ee;
	--anat-tube: #7fb6e0;
}

.lesson-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 14px;
	margin-top: 20px;
}
.lesson-card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 20px;
	box-shadow: var(--shadow);
}
.lesson-card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.lesson-card p { font-size: 0.95rem; color: var(--text-secondary); }

.steps { list-style: none; margin-top: 10px; }
.step {
	display: grid;
	grid-template-columns: 1.1fr 0.9fr;
	gap: 24px;
	align-items: center;
	padding: 28px 0;
	border-bottom: 1px solid var(--border);
}
.step:last-child { border-bottom: 0; }
.step .diagram { margin: 0; }
.step-num {
	font-family: var(--font-display);
	font-size: 2.6rem;
	line-height: 1;
	color: var(--accent);
}
.step-text h3 { font-size: 1.4rem; margin: 6px 0 10px; }
.step-text p { color: var(--text-secondary); }
.lesson-foot { margin-top: 22px; font-size: 0.9rem; color: var(--text-secondary); }
.back { margin-top: 48px; font-family: var(--font-mono); font-size: 0.85rem; }
.back a { text-decoration: none; }
.back a::before { content: "\2190 "; }

@media (max-width: 720px) {
	.step { grid-template-columns: 1fr; gap: 14px; }
	.lesson-grid { grid-template-columns: 1fr; }
	.lesson { padding-top: 70px; }
}
.defs-only { position: absolute; }

/* ---------- Clippings page ---------- */
.clips { columns: 2 320px; column-gap: 16px; }
.clips .clip figcaption { padding: 16px 18px 18px; }
.clips .clip .when { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.clips .clip h3 { font-size: 1.35rem; margin: 4px 0 6px; }
.clips .clip .sub { font-family: var(--font-display); font-style: italic; color: var(--text-primary); font-size: 0.98rem; }
.clips .clip .note { margin-top: 8px; font-size: 0.88rem; }
.clips .clip .byline { margin-top: 8px; font-size: 0.78rem; font-family: var(--font-mono); }
.clips .clip .byline a { color: var(--accent); text-decoration: none; }
.clips .clip .byline a:hover { text-decoration: underline; }
.clips img { background: #fff; }
.page-index { list-style: none; margin-top: 20px; columns: 3 220px; column-gap: 24px; }
.page-index .year { break-inside: avoid; margin-bottom: 18px; }
.page-index .y { font-family: var(--font-display); font-size: 1.3rem; color: var(--accent); display: block; margin-bottom: 4px; }
.page-index ul { list-style: none; }
.page-index li li { font-size: 0.86rem; line-height: 1.7; padding-left: 14px; position: relative; }
.page-index li li a { color: var(--text-secondary); text-decoration: none; border-bottom: 1px solid var(--border); }
.page-index li li a:hover { color: var(--accent); border-color: var(--accent); }
.page-index li.has-clip::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.page-index li.has-clip a { color: var(--text-primary); }

/* ---------- Page grid on the clippings page ---------- */
.page-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px 16px; margin-top: 18px; }
.page-grid li { min-width: 0; }
.page-grid button { display: block; width: 100%; padding: 0; border: 1px solid var(--border); border-radius: 6px; background: #fff; cursor: zoom-in; overflow: hidden; box-shadow: var(--shadow); }
.page-grid button img { width: 100%; display: block; transition: transform 0.3s ease; }
.page-grid button:hover img, .page-grid button:focus-visible img { transform: scale(1.03); }
.page-grid button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.page-grid .cap { margin-top: 8px; font-size: 0.78rem; line-height: 1.45; color: var(--text-secondary); }
.page-grid .cap b { display: block; color: var(--text-primary); font-weight: 600; margin-bottom: 2px; }
.page-grid .cap a { color: var(--text-secondary); text-decoration: none; border-bottom: 1px solid var(--border); }
.page-grid .cap a:hover { color: var(--accent); border-color: var(--accent); }
.page-grid li.pending .ph { aspect-ratio: 11 / 17; border: 1px dashed var(--border); border-radius: 6px; display: grid; place-items: center; font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-secondary); text-align: center; padding: 10px; }
.page-grid li.has-clip .cap b::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); margin-right: 6px; vertical-align: middle; }
.year-head { font-family: var(--font-display); font-size: 1.6rem; color: var(--accent); margin: 36px 0 0; }
#lightbox figcaption a { color: var(--gold); text-decoration: none; margin: 0 8px; }
#lightbox figcaption a:hover { text-decoration: underline; }

/* ---------- Scroll story: a sticky desk with the real pages ---------- */
.story { position: relative; }
.story .wrap { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 40px; align-items: start; }
.story-stage {
	position: sticky;
	top: 0;
	z-index: 2;
	height: 100vh;
	display: block;
	overflow: hidden;
	background: var(--desk);
	border-radius: 0 0 var(--radius) var(--radius);
	perspective: 1600px;
}
/* a warm pool of light on the desk and the grain of old newsprint */
.story-stage::before {
	content: "";
	position: absolute;
	inset: 0;
	background:
		radial-gradient(ellipse 70% 60% at 50% 40%, rgba(255, 236, 200, 0.18), transparent 70%),
		radial-gradient(ellipse 50% 40% at 85% 95%, rgba(180, 35, 28, 0.16), transparent 70%);
	pointer-events: none;
	z-index: 0;
}
.sheet {
	position: absolute;
	inset: 0;
	transform-origin: left center;
	transform-style: preserve-3d;
	z-index: 1;
	opacity: 0;
	transition: opacity 0.5s ease;
}
.sheet.front { opacity: 1; z-index: 2; }
.sheet.behind { opacity: 0; z-index: 1; }
.sheet img {
	position: absolute;
	left: 0;
	top: 0;
	transform-origin: 0 0;
	will-change: transform;
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 2px 6px rgba(0, 0, 0, 0.4);
	background: #f4efe6;
	max-width: none;
}
@keyframes page-turn {
	0% { transform: rotateY(-75deg); opacity: 0; }
	40% { opacity: 1; }
	100% { transform: rotateY(0deg); opacity: 1; }
}
.sheet.turn { animation: page-turn 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.stage-card {
	position: absolute;
	inset: 0;
	z-index: 3;
	display: grid;
	place-items: center;
	text-align: center;
	padding: 40px;
	color: var(--hero-text);
	background: radial-gradient(ellipse 70% 60% at 50% 50%, rgba(10, 8, 7, 0.92), rgba(10, 8, 7, 0.75));
	opacity: 0;
	transition: opacity 0.5s ease;
	pointer-events: none;
}
.stage-card.on { opacity: 1; }
.stage-card-text {
	font-family: var(--font-display);
	font-size: clamp(4rem, 14vw, 11rem);
	line-height: 0.95;
	letter-spacing: -0.04em;
	color: var(--hero-text);
	text-shadow: 0 2px 24px rgba(0, 0, 0, 0.6);
}
.stage-card-sub {
	margin-top: 18px;
	font-family: var(--font-mono);
	font-size: 0.8rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--gold);
}
.beats { list-style: none; padding: 20vh 0 30vh; position: relative; z-index: 1; }
.beat {
	min-height: 84vh;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 28px 0;
	opacity: 0.62;
	transition: opacity 0.4s ease;
}
.beat.active { opacity: 1; }
.beat .when {
	font-family: var(--font-mono);
	font-size: 0.78rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--accent);
}
.beat h3 { font-size: clamp(1.7rem, 3vw, 2.4rem); margin: 8px 0 14px; }
.beat p { color: var(--text-secondary); font-size: 1.05rem; line-height: 1.75; }
.beat .src { display: inline-block; margin: 12px 14px 0 0; font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-secondary); text-decoration: none; border-bottom: 1px solid var(--border); }
.beat a.src:hover { color: var(--accent); border-color: var(--accent); }
.beat.is-honor .when { color: var(--gold); }
.story-note { font-size: 0.85rem; color: var(--text-secondary); font-family: var(--font-mono); margin-top: -10vh; padding-bottom: 40px; }

:root { --desk: #1a1411; }
.darkmode { --desk: #0d0a09; }

@media (max-width: 900px) {
	.story .wrap { grid-template-columns: 1fr; gap: 0; }
	.story-stage { height: 50vh; border-radius: 0 0 var(--radius) var(--radius); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35); }
	.beats { padding: 4vh 0 16vh; background: var(--bg); }
	.beat { min-height: 56vh; padding: 22px 0; opacity: 0.75; }
	.beat p { font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
	.sheet.turn { animation: none; }
	.beat { opacity: 1; }
}

/* ---------- Hero, second pass: a full-height opener on a wall of his pages ---------- */
.hero {
	min-height: 100vh;
	padding: 0;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	animation: none;
}
.hero::before { display: none; }
.hero-wall {
	position: absolute;
	inset: -12% -8%;
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 18px;
	transform: rotate(-6deg);
	opacity: 0.16;
	filter: grayscale(1) contrast(1.1);
	pointer-events: none;
	animation: wall-drift 60s linear infinite alternate;
}
.hero-wall img { width: 100%; height: auto; border-radius: 3px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6); }
@keyframes wall-drift { from { transform: rotate(-6deg) translateY(0); } to { transform: rotate(-6deg) translateY(-6%); } }
.hero-shade {
	position: absolute;
	inset: 0;
	background:
		radial-gradient(ellipse 55% 50% at 78% 28%, rgba(180, 35, 28, 0.42), transparent 70%),
		linear-gradient(180deg, rgba(20, 16, 16, 0.55) 0%, rgba(20, 16, 16, 0.86) 45%, rgba(20, 16, 16, 0.97) 100%);
	pointer-events: none;
}
.hero-grid {
	position: relative;
	display: grid;
	grid-template-columns: 1.2fr 0.8fr;
	gap: 56px;
	align-items: center;
	flex: 1;
	padding-top: 96px;
	padding-bottom: 48px;
	width: 100%;
}
.hero .dateline {
	font-family: var(--font-mono);
	font-size: 0.78rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--gold);
}
.hero .dateline span { margin: 0 8px; opacity: 0.6; }
.hero h1 { font-size: clamp(3.2rem, 8.4vw, 6.4rem); margin: 10px 0 8px; }
.hero .lede { max-width: 560px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.btn {
	display: inline-block;
	padding: 13px 22px;
	border-radius: 6px;
	background: var(--accent);
	color: #fff;
	text-decoration: none;
	font-weight: 600;
	font-size: 0.95rem;
	border: 1px solid transparent;
	transition: transform 0.15s ease, background 0.2s ease;
}
.btn:hover { background: #c9372e; transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--hero-text); border-color: rgba(243, 236, 228, 0.35); }
.btn.ghost:hover { border-color: var(--gold); color: var(--gold); background: transparent; }
.portrait { transform: rotate(1.2deg); }
.portrait figcaption {
	position: absolute;
	left: 0; right: 0; bottom: 0;
	padding: 36px 16px 14px;
	font-size: 0.78rem;
	line-height: 1.45;
	color: var(--hero-muted);
	background: linear-gradient(180deg, transparent, rgba(10, 8, 7, 0.9));
	text-align: left;
}
.portrait figcaption b { color: var(--hero-text); font-weight: 600; }
.masthead {
	position: relative;
	border-top: 1px solid rgba(243, 236, 228, 0.18);
	background: rgba(10, 8, 7, 0.55);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
}
.masthead .wrap {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding-top: 18px;
	padding-bottom: 18px;
	flex-wrap: wrap;
}
.m-stats { display: flex; gap: 36px; flex-wrap: wrap; margin: 0; }
.m-stats div { display: flex; align-items: baseline; gap: 10px; }
.m-stats dt {
	font-family: var(--font-display);
	font-size: 1.9rem;
	line-height: 1;
	color: var(--gold);
	font-variant-numeric: tabular-nums;
}
.m-stats dd { margin: 0; font-size: 0.8rem; color: var(--hero-muted); max-width: 120px; line-height: 1.3; }
.m-nav { display: flex; gap: 18px; flex-wrap: wrap; }
.m-nav a {
	font-family: var(--font-mono);
	font-size: 0.74rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--hero-text);
	text-decoration: none;
	border-bottom: 1px solid transparent;
	padding-bottom: 2px;
}
.m-nav a:hover { color: var(--gold); border-color: var(--gold); }
.story { padding-top: 40px; }
@media (max-width: 900px) {
	.hero { min-height: auto; }
	.hero-grid { grid-template-columns: 1fr; gap: 32px; padding-top: 84px; }
	.hero-wall { grid-template-columns: repeat(4, 1fr); inset: -10% -20%; }
	.portrait { max-width: 360px; margin: 0; transform: none; }
	.masthead .wrap { flex-direction: column; align-items: flex-start; gap: 16px; }
	.m-stats { gap: 18px 28px; }
	.m-stats dt { font-size: 1.6rem; }
}
@media (prefers-reduced-motion: reduce) { .hero-wall { animation: none; } .btn:hover { transform: none; } }

/* ---------- Experience pass ----------
   One card system: every card on the site takes its padding, radius and gap from
   these three tokens, so honors, voices, press, lesson and clipping cards line up. */
:root {
	--card-pad: clamp(20px, 2.2vw, 28px);
	--card-radius: 12px;
	--card-gap: clamp(14px, 1.6vw, 20px);
	--grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* Section rhythm */
.section { padding-block: clamp(72px, 9vw, 112px); }
.story { padding-top: 24px; }
.section-head { margin-bottom: clamp(30px, 4vw, 48px); }
.section-head h2 { margin-top: 8px; text-wrap: balance; }
.section-head p { max-width: 58ch; line-height: 1.7; }

/* Cards */
.honors, .voices, .press-grid, .lesson-grid { gap: var(--card-gap); }
.honor, .voice, .press, .lesson-card {
	padding: var(--card-pad);
	border-radius: var(--card-radius);
	border: 1px solid var(--border);
	background: var(--surface);
	box-shadow: var(--shadow);
}
.honor { gap: 12px; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.honor:hover { transform: translateY(-2px); }
.honor .badge { margin-bottom: 4px; }
.honor h3 { font-size: 1.2rem; line-height: 1.25; text-wrap: balance; }
.honor p { line-height: 1.6; }
.honor a { color: var(--accent); }
.voice {
	position: relative;
	border-left: 1px solid var(--border);
	padding-top: calc(var(--card-pad) + 22px);
}
.voice::before {
	content: "\201C";
	position: absolute;
	top: 8px;
	left: calc(var(--card-pad) - 4px);
	font-family: var(--font-display);
	font-size: 3.6rem;
	line-height: 1;
	color: var(--gold);
	opacity: 0.7;
}
.voice blockquote { font-size: clamp(1.2rem, 1.8vw, 1.45rem); line-height: 1.4; text-wrap: balance; }
.voice figcaption { margin-top: 16px; line-height: 1.55; }
.voice.wide blockquote { font-size: clamp(1.35rem, 2.2vw, 1.75rem); max-width: 40ch; }
.lesson-card h3 { margin-bottom: 10px; }

/* Gallery and clippings */
.gallery { column-gap: var(--card-gap); }
.gallery figure { margin-bottom: var(--card-gap); border-radius: var(--card-radius); }
.gallery figcaption { padding: 12px var(--card-pad) 14px; line-height: 1.5; }
.gallery-note { margin-top: 24px; line-height: 1.7; }
.clips .clip figcaption { padding: var(--card-pad); }
.clips .clip { border-radius: var(--card-radius); }
.page-grid button { border-radius: 8px; }

/* Newsprint grain on the dark opener */
.hero::after {
	content: "";
	position: absolute;
	inset: 0;
	background-image: var(--grain);
	opacity: 0.06;
	pointer-events: none;
	z-index: 0;
}
.hero-grid, .masthead { z-index: 1; }

/* Quote band between the story and the honors */
.quote-band {
	position: relative;
	overflow: hidden;
	background: var(--hero-bg);
	color: var(--hero-text);
	padding-block: clamp(84px, 11vw, 140px);
	text-align: center;
}
.quote-band::before {
	content: "";
	position: absolute;
	inset: -10%;
	background: url("/images/pages/2008-09-15-p3.webp") center 15% / cover no-repeat;
	opacity: 0.08;
	filter: grayscale(1);
	transform: rotate(-3deg);
	pointer-events: none;
}
.quote-band::after {
	content: "";
	position: absolute;
	inset: 0;
	background-image: var(--grain);
	opacity: 0.06;
	pointer-events: none;
}
.quote-band .wrap { position: relative; z-index: 1; }
.quote-band blockquote {
	font-family: var(--font-display);
	font-size: clamp(2rem, 4.6vw, 3.5rem);
	font-weight: 500;
	line-height: 1.15;
	letter-spacing: -0.02em;
	max-width: 22ch;
	margin: 0 auto;
	text-wrap: balance;
}
.quote-band blockquote::before { content: "\201C"; color: var(--gold); }
.quote-band blockquote::after { content: "\201D"; color: var(--gold); }
.quote-band .attrib {
	margin-top: 24px;
	font-family: var(--font-mono);
	font-size: 0.78rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--gold);
}

/* Seven cups */
.cups {
	margin-bottom: clamp(28px, 4vw, 44px);
	padding: var(--card-pad);
	border: 1px solid var(--border);
	border-radius: var(--card-radius);
	background: var(--surface);
	box-shadow: var(--shadow);
}
.cups ol { list-style: none; display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin: 0; padding: 0; }
.cups li { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; min-width: 0; }
.cups svg {
	width: clamp(28px, 5vw, 52px);
	height: auto;
	fill: currentColor;
	stroke: currentColor;
	color: var(--border);
	transition: color 0.5s ease, transform 0.5s ease;
}
.cups.in svg { color: var(--gold); transform: translateY(-2px); }
.cups.in li:nth-child(2) svg { transition-delay: 0.12s; }
.cups.in li:nth-child(3) svg { transition-delay: 0.24s; }
.cups.in li:nth-child(4) svg { transition-delay: 0.36s; }
.cups.in li:nth-child(5) svg { transition-delay: 0.48s; }
.cups.in li:nth-child(6) svg { transition-delay: 0.60s; }
.cups.in li:nth-child(7) svg { transition-delay: 0.72s; }
.cups .ord { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; color: var(--text-secondary); }
.cups .yr { font-family: var(--font-display); font-size: clamp(0.85rem, 1.6vw, 1.05rem); color: var(--text-primary); min-height: 1.3em; font-variant-numeric: tabular-nums; }
.cups-note { margin: 18px auto 0; max-width: 62ch; text-align: center; font-size: 0.92rem; line-height: 1.65; color: var(--text-secondary); }

/* Story stage HUD: where we are in time, and how far along */
.stage-date {
	position: absolute;
	top: 16px;
	left: 26px;
	z-index: 5;
	font-family: var(--font-mono);
	font-size: 0.72rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #f3ece4;
	background: rgba(10, 8, 7, 0.82);
	border: 1px solid rgba(243, 236, 228, 0.16);
	padding: 7px 12px;
	border-radius: 999px;
	pointer-events: none;
}
.stage-date:empty { display: none; }
.stage-progress {
	position: absolute;
	top: 16px;
	bottom: 16px;
	left: 12px;
	width: 3px;
	border-radius: 3px;
	background: rgba(243, 236, 228, 0.16);
	z-index: 5;
	pointer-events: none;
}
.stage-progress i {
	display: block;
	height: 100%;
	border-radius: inherit;
	background: var(--gold);
	transform-origin: top;
	transform: scaleY(0);
	transition: transform 0.15s linear;
}

@media (max-width: 900px) {
	.cups ol { gap: 4px; }
	.voice.wide { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) {
	.cups svg, .honor { transition: none; }
	.honor:hover { transform: none; }
	.stage-progress i { transition: none; }
}

/* ---------- Motion and density pass ----------
   Everything below animates from a visible resting state: the .js class is set by
   the pre-paint script, so without scripts nothing stays hidden. */
:root { --ease: cubic-bezier(0.2, 0.7, 0.2, 1); }

/* Tighter rhythm: less dead air between sections and story steps */
.section { padding-block: clamp(64px, 7vw, 96px); }
.story { padding-top: 16px; }
.beats { padding: 12vh 0 18vh; }
.beat { min-height: 70vh; padding: 24px 0; }
.story-note { margin-top: -6vh; }

/* Fact chips under each story step */
.beat .facts {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 18px 0 4px;
	padding: 0;
}
.beat .facts li {
	font-family: var(--font-mono);
	font-size: 0.72rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	padding: 7px 12px;
	border: 1px solid var(--border);
	border-radius: 999px;
	background: var(--surface);
	color: var(--text-primary);
}
.beat.is-honor .facts li { border-color: var(--gold); }
.beat .facts li { transition: transform 0.5s var(--ease), opacity 0.5s var(--ease); }
.beat:not(.active) .facts li { transform: translateY(6px); opacity: 0.8; }

/* Reveal: rise and sharpen */
.reveal {
	opacity: 1;
	transform: none;
	filter: none;
	transition: opacity 0.9s var(--ease), transform 0.9s var(--ease), filter 0.9s var(--ease);
}
.js .reveal:not(.in) { opacity: 0; transform: translateY(28px); filter: blur(4px); }
.honors .honor:nth-child(3n+2) { transition-delay: 0.08s; }
.honors .honor:nth-child(3n+3) { transition-delay: 0.16s; }
.voices .voice:nth-child(2n) { transition-delay: 0.08s; }
.honors .honor:hover:nth-child(n), .voices .voice:hover:nth-child(n) { transition-delay: 0s; }

/* Image reveal: a wipe open with a slow zoom settle */
.img-reveal {
	clip-path: inset(0 round var(--card-radius));
	transition: clip-path 1.1s var(--ease), opacity 0.9s var(--ease);
}
.js .img-reveal:not(.in) {
	clip-path: inset(14% 10% 14% 10% round var(--card-radius));
	opacity: 0;
	transform: none;
	filter: none;
}
.img-reveal img { transform: scale(1); transition: transform 1.5s var(--ease); }
.js .img-reveal:not(.in) img { transform: scale(1.14); }

/* Hero assembles on load */
@keyframes rise-in {
	from { opacity: 0; transform: translateY(26px); filter: blur(6px); }
	to { opacity: 1; transform: none; filter: none; }
}
@keyframes portrait-in {
	from { clip-path: inset(100% 0 0 0 round 10px); transform: translateY(30px); }
	to { clip-path: inset(0 round 10px); transform: none; }
}
@keyframes wall-in { from { opacity: 0; } to { opacity: 0.16; } }
.hero-copy > * { animation: rise-in 0.9s var(--ease) both; }
.hero-copy > :nth-child(2) { animation-delay: 0.1s; }
.hero-copy > :nth-child(3) { animation-delay: 0.2s; }
.hero-copy > :nth-child(4) { animation-delay: 0.3s; }
.hero-copy > :nth-child(5) { animation-delay: 0.42s; }
.portrait { transform: none; rotate: 1.2deg; animation: portrait-in 1.3s var(--ease) 0.25s both; }
.masthead { animation: rise-in 0.9s var(--ease) 0.6s both; }
.hero-wall { animation: wall-in 1.8s ease both, wall-drift 60s linear 1.8s infinite alternate; }

/* Story stage: pages slide up into place instead of flipping */
@keyframes sheet-in {
	0% { opacity: 0; transform: translateY(54px) rotate(1.4deg) scale(0.96); filter: blur(6px); }
	55% { opacity: 1; }
	100% { opacity: 1; transform: none; filter: none; }
}
.sheet.turn { animation: sheet-in 0.85s var(--ease) both; }
.sheet.behind { transform: translateY(-26px) scale(0.97); transition: opacity 0.55s ease, transform 0.7s var(--ease); }
@keyframes num-in {
	from { opacity: 0; transform: translateY(22px) scale(0.92); }
	to { opacity: 1; transform: none; }
}
.stage-card.on .stage-card-text { animation: num-in 0.8s var(--ease) both; }
.stage-card.on .stage-card-sub { animation: rise-in 0.8s var(--ease) 0.15s both; }

/* Gallery: a bento grid with captions over the photos */
.gallery.bento {
	columns: auto;
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	grid-auto-rows: clamp(150px, 16vw, 230px);
	gap: var(--card-gap);
}
.gallery.bento figure {
	position: relative;
	margin: 0;
	overflow: hidden;
	border: 0;
	border-radius: var(--card-radius);
	background: var(--hero-bg);
	box-shadow: var(--shadow);
}
.gallery.bento figure:nth-child(1) { grid-column: 1 / 4; grid-row: span 2; }
.gallery.bento figure:nth-child(2),
.gallery.bento figure:nth-child(3),
.gallery.bento figure:nth-child(5) { grid-column: 4 / 7; }
.gallery.bento figure:nth-child(4) { grid-column: 1 / 4; }
.gallery.bento button { width: 100%; height: 100%; }
.gallery.bento img { width: 100%; height: 100%; object-fit: cover; }
.gallery.bento figcaption {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 44px var(--card-pad) 14px;
	background: linear-gradient(180deg, transparent, rgba(10, 8, 7, 0.9));
	color: #f3ece4;
	font-size: 0.82rem;
	line-height: 1.45;
	pointer-events: none;
}
.gallery.bento button:focus-visible { outline: 3px solid var(--gold); outline-offset: -3px; }

@media (max-width: 720px) {
	.beat { min-height: 52vh; }
	.portrait { rotate: 0deg; }
	.gallery.bento { grid-template-columns: 1fr; grid-auto-rows: 240px; }
	.gallery.bento figure:nth-child(n) { grid-column: auto; grid-row: auto; }
	.gallery.bento figure:nth-child(1) { grid-row: span 1; }
}

@media (prefers-reduced-motion: reduce) {
	.hero-copy > *, .portrait, .masthead, .hero-wall,
	.sheet.turn, .stage-card.on .stage-card-text, .stage-card.on .stage-card-sub { animation: none; }
	.hero-wall { opacity: 0.16; }
	.js .reveal:not(.in), .js .img-reveal:not(.in) { opacity: 1; transform: none; filter: none; clip-path: none; }
	.js .img-reveal:not(.in) img { transform: none; }
	.reveal, .img-reveal, .img-reveal img, .sheet.behind, .beat .facts li { transition: none; }
}
