/* Fonts are loaded via <link> in app.html (preconnect + non-blocking stylesheet). */

:root {
	/* Intro palette — forest, fog, amber warmth */
	--bg: #f2f3ef;
	--ink: #2d4a3e;
	--amber: #c9a84c;
	--pencil: #cccecc;
	--secondary: #737f78;
	--border: #d1d4cc;
	--border-light: rgba(45, 74, 62, 0.08);
	--white: #ffffff;

	/* Amber divider — shared by every 32×1px accent line across the site.
	   Tune here; every page picks it up. Baked color (not opacity) so it
	   survives the `.reveal.in-view > *` opacity override. */
	--divider: color-mix(in srgb, var(--amber) 70%, transparent);

	/* Typography */
	--serif: 'Cormorant Garamond', 'Georgia', serif;
	--serif-sc: 'Vollkorn SC', 'Georgia', serif;

	/* Spacing */
	--space-xs: 4px;
	--space-sm: 8px;
	--space-md: 16px;
	--space-lg: 24px;
	--space-xl: 40px;
	--space-2xl: 64px;
	--space-3xl: 96px;
	--space-4xl: 140px;

	/* Layout */
	--max-width: 1100px;
	--reading-width: 680px;
}

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

/* Honeypot: visually & positionally hidden from humans, but still in the DOM
   and focusable-to-bots (kept out of the tab order). Bots auto-fill every
   field; the server silently drops any submission with a non-empty value. */
.hp-field {
	position: absolute !important;
	left: -10000px !important;
	top: auto !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
	opacity: 0 !important;
}

/* Signup submit button: label ↔ checkmark morph.
   The button keeps its pill shape; the label fades out, the checkmark
   scales in and its SVG path draws itself from invisible → complete via
   stroke-dashoffset. No DOM swap, no layout shift. */
.signup__btn {
	position: relative;
	overflow: hidden;
}

.signup__btn-text {
	display: inline-block;
	transition: opacity 0.2s ease;
}

.signup__btn-check {
	position: absolute;
	inset: 0;
	margin: auto;
	width: 22px;
	height: 22px;
	opacity: 0;
	transform: scale(0.3);
	pointer-events: none;
	transition: opacity 0.25s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.signup__btn-check path {
	fill: none;
	stroke: currentColor;
	stroke-width: 2.4;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-dasharray: 30;
	stroke-dashoffset: 30;
	transition: stroke-dashoffset 0.5s cubic-bezier(0.65, 0, 0.35, 1) 0.15s;
}

/* Transient "sending" state — button stays pressed-looking, label shows
   "Sending…". No checkmark yet. */
.signup__btn.is-sending {
	cursor: progress;
	opacity: 0.85;
}

/* Final success state — label out, checkmark in + drawn. */
.signup__btn.is-done {
	cursor: default;
	/* Tint the pill subtly on success: amber on the default ink-bg button,
	   forest green on the path-page--ink variant's amber button. */
}

.signup__btn.is-done .signup__btn-text {
	opacity: 0;
}

.signup__btn.is-done .signup__btn-check {
	opacity: 1;
	transform: scale(1);
}

.signup__btn.is-done .signup__btn-check path {
	stroke-dashoffset: 0;
}

/* Failure state — same morph machinery as the checkmark, with a red X
   instead. Stays put (no auto-reset); the friendly fallback message
   directs the user to email. */
.signup__btn-fail {
	position: absolute;
	inset: 0;
	margin: auto;
	width: 22px;
	height: 22px;
	opacity: 0;
	transform: scale(0.3);
	pointer-events: none;
	transition: opacity 0.25s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.signup__btn-fail path {
	fill: none;
	stroke: currentColor;
	stroke-width: 2.4;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-dasharray: 36;
	stroke-dashoffset: 36;
	transition: stroke-dashoffset 0.5s cubic-bezier(0.65, 0, 0.35, 1) 0.15s;
}

.signup__btn.is-failed {
	cursor: default;
}

.signup__btn.is-failed .signup__btn-text {
	opacity: 0;
}

.signup__btn.is-failed .signup__btn-check {
	opacity: 0;
}

.signup__btn.is-failed .signup__btn-fail {
	opacity: 1;
	transform: scale(1);
}

.signup__btn.is-failed .signup__btn-fail path {
	stroke-dashoffset: 0;
}

/* The signup form is a horizontal flex row (input + button); allow it to
   wrap so the error message can drop below instead of squishing into the
   row alongside the input. No effect on the happy path — input + button
   fit on one line either way. */
[data-signup-form] {
	flex-wrap: wrap;
}

/* Friendly fail state — the message is long-form prose so we set a real
   reading measure, italic serif voice, and a soft amber accent on the
   mailto link rather than the alarming red of a typical error. */
.signup__error {
	font-family: var(--serif);
	font-size: 0.95rem;
	font-style: italic;
	line-height: 1.55;
	color: var(--secondary);
	max-width: 48ch;
	margin: var(--space-md) auto 0;
	text-align: center;
	flex-basis: 100%;
}

.signup__error-link {
	color: var(--amber);
	font-weight: 500;
	text-decoration: none;
	font-style: normal;
	transition: color 0.2s ease;
}

.signup__error-link:hover {
	color: #a88a35;
}

/* On the forest-green path-page variant, lighten the body for contrast. */
.path-page--ink .signup__error {
	color: rgba(242, 243, 239, 0.85);
}

html {
	font-size: 18px;
	scroll-behavior: auto;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: hidden;
	background: var(--bg);
	/* Prevent iOS rubber-band revealing a mismatched color around safe-area */
	overscroll-behavior-y: none;
}

/* While `preload` is set, disable CSS transitions site-wide. JS removes
   this class after two animation frames so the initial style settling
   (nav scroll state, etc.) doesn't animate on first paint. */
html.preload *,
html.preload *::before,
html.preload *::after {
	transition: none !important;
	animation-duration: 0s !important;
	animation-delay: 0s !important;
}

body {
	font-family: var(--serif);
	font-weight: 400;
	color: var(--ink);
	background: var(--bg);
	line-height: 1.7;
	overscroll-behavior-y: none;
}

/* #5 — Paper grain texture overlay */
body::before {
	content: '';
	position: fixed;
	inset: 0;
	pointer-events: none;
	z-index: 100;
	opacity: 0.04;
	mix-blend-mode: multiply;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/></filter><rect width='200' height='200' filter='url(%23n)'/></svg>");
}

::selection {
	background: var(--ink);
	color: var(--bg);
}

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

/* Ensure main always fills at least the viewport so the footer
   doesn't ride up during client-side navigation transitions */
main {
	min-height: 100svh;
	min-height: 100svh;
}


a {
	color: var(--ink);
	text-decoration: none;
	transition: color 0.2s ease;
}

a:hover {
	color: var(--amber);
}

/* Typography */

h1, h2, h3, h4, h5, h6 {
	font-family: var(--serif);
	font-weight: 400;
	line-height: 1.15;
	letter-spacing: -0.02em;
	color: var(--ink);
}

h1 {
	font-size: 3.4rem;
	font-weight: 300;
	line-height: 1.08;
	letter-spacing: -0.03em;
}

h2 {
	font-size: 2.4rem;
	font-weight: 300;
}

h3 {
	font-size: 1.4rem;
	font-weight: 500;
}

h4 {
	font-size: 1.1rem;
	font-weight: 600;
}

p {
	margin-bottom: 1.5em;
}

p:last-child {
	margin-bottom: 0;
}

/* Label / small caps — amber is the book default */
.label {
	font-family: var(--serif-sc);
	font-size: 0.6rem;
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--amber);
}

.label--secondary {
	color: var(--secondary);
}

.label--amber {
	color: var(--amber);
}

.label--ink {
	color: var(--ink);
	opacity: 0.5;
}

/* ═══════════════════════════════════════
   BOOK PAGE CHROME — shared helpers
   Usable on any section with position:relative.
   ═══════════════════════════════════════ */
.page-num {
	position: absolute;
	bottom: var(--space-lg);
	right: var(--space-xl);
	font-family: var(--serif);
	font-size: 0.7rem;
	font-style: italic;
	color: var(--ink);
	opacity: 0.15;
	letter-spacing: 0.05em;
	pointer-events: none;
	user-select: none;
}

.page-ornament {
	position: absolute;
	bottom: var(--space-xl);
	left: 50%;
	transform: translateX(-50%);
	width: 160px;
	opacity: 0.05;
	pointer-events: none;
	user-select: none;
}

.page-divider {
	display: block;
	margin: 0 auto var(--space-xl);
	width: 240px;
	opacity: 0.7;
	pointer-events: none;
	user-select: none;
}

.label-ornament {
	display: block;
	margin: 0 auto var(--space-lg);
	width: 48px;
	opacity: 0.7;
	pointer-events: none;
	user-select: none;
}

.page--alt {
	background: var(--white);
}

@media (max-width: 768px) {
	.page-ornament { width: 110px; }
	.page-divider { width: 160px; }
}

/* Accent text */
em.accent {
	font-style: italic;
	color: var(--amber);
}

/* Layout */
section {
	padding: var(--space-3xl) var(--space-lg);
}

.container {
	max-width: var(--max-width);
	margin: 0 auto;
}

.reading {
	max-width: var(--reading-width);
	margin: 0 auto;
}

/* Buttons */
.btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-family: var(--serif);
	font-size: 0.85rem;
	font-weight: 500;
	padding: 14px 36px;
	border: none;
	border-radius: 100px;
	cursor: pointer;
	transition: all 0.3s ease;
	text-decoration: none;
	letter-spacing: 0.02em;
}

.btn--primary {
	background: var(--ink);
	color: var(--bg);
}

.btn--primary:hover {
	background: #1e3a30;
	color: var(--bg);
	transform: translateY(-1px);
	box-shadow: 0 8px 32px rgba(45, 74, 62, 0.2);
}

.btn--ghost {
	background: transparent;
	color: var(--ink);
	border: 1px solid var(--pencil);
}

.btn--ghost:hover {
	border-color: var(--ink);
	color: var(--ink);
}

.btn--amber {
	background: var(--amber);
	color: var(--white);
}

.btn--amber:hover {
	background: #b89840;
	color: var(--white);
	transform: translateY(-1px);
}

.btn--lg {
	padding: 18px 48px;
	font-size: 0.95rem;
}

.btn--glass {
	background: rgba(242, 243, 239, 0.12);
	color: var(--bg);
	border: 1px solid rgba(242, 243, 239, 0.2);
	backdrop-filter: blur(12px);
}

.btn--glass:hover {
	background: rgba(242, 243, 239, 0.2);
	color: var(--bg);
	transform: translateY(-1px);
}

/* Divider */
.divider {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 20px;
	padding: var(--space-xl) 0;
}

.divider::before,
.divider::after {
	content: '';
	height: 1px;
	width: 32px;
	background: var(--divider);
}

.divider span {
	font-size: 0.75rem;
	color: var(--amber);
	opacity: 0.5;
}

/* Dark section */
.section--ink {
	background: var(--ink);
	color: var(--bg);
}

.section--ink .label {
	color: var(--amber);
	opacity: 0.6;
}

.section--ink h2,
.section--ink h3,
.section--ink h4 {
	color: var(--bg);
}

.section--ink p {
	color: rgba(242, 243, 239, 0.65);
}

.section--white {
	background: var(--white);
}

/* ═══════════════════════════════════════
   GLOBAL ANIMATIONS
   ═══════════════════════════════════════ */

/* Reveal — pure opacity fade, no movement, deliberate */
.reveal > * {
	opacity: 0.3;
	transition: opacity 1.6s ease-out;
}

.reveal.in-view > * {
	opacity: 1;
}

/* Program cards — no reveal fade, just pinned at opacity: 1. NO transition
   override here: the `.reveal > *` rule above sets transition-property to
   `opacity`, which would erase .card's `transition: transform, box-shadow`
   via [0,2,0] specificity — that's what was making the hover lift feel
   instant on home/programs. Opacity never changes anyway, so no transition
   is needed. */
.programs__grid.reveal > *,
.programs__grid.reveal.in-view > * {
	opacity: 1;
}

/* Amber lines draw themselves when revealed */
.reveal .text-page__line,
.reveal .about__line,
.reveal .path__line,
.reveal .stat-page__line,
.reveal .cta__line,
.reveal .hero__bottom-line {
	width: 0 !important;
	transition: width 1.2s cubic-bezier(0.23, 1, 0.32, 1) 0.4s,
		opacity 0.9s cubic-bezier(0.23, 1, 0.32, 1);
}

.reveal.in-view .text-page__line,
.reveal.in-view .about__line,
.reveal.in-view .path__line,
.reveal.in-view .stat-page__line,
.reveal.in-view .cta__line,
.reveal.in-view .hero__bottom-line {
	width: 32px !important;
}

.image-page img {
	will-change: transform;
	transform: scale(1.1);
	backface-visibility: hidden;
	-webkit-backface-visibility: hidden;
	pointer-events: none;
	user-select: none;
	-webkit-user-select: none;
	-webkit-user-drag: none;
	-webkit-touch-callout: none;
}


/* ═══════════════════════════════════════
   SCROLL-LINKED ANIMATIONS — Apple/Lenis-style
   Content continuously morphs as it passes through the viewport,
   creating "sweet spots" where elements peak in visibility.
   ═══════════════════════════════════════ */

@supports (animation-timeline: view()) {
	@keyframes scroll-fade {
		0%, 100% { opacity: 0.55; }
		40%, 60% { opacity: 1; }
	}

	.about__text {
		animation: scroll-fade linear both;
		animation-timeline: view();
		animation-range: entry 30% exit 70%;
	}

	.about__line,
	.about__actions {
		animation: scroll-fade linear both;
		animation-timeline: view();
		animation-range: entry 35% exit 65%;
	}

	/* Disable the IntersectionObserver reveal on these so animations dont conflict */
	.about__inner.reveal > * {
		opacity: 1;
		transform: none;
		filter: none;
		transition: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.reveal > *,
	.reveal .text-page__line,
	.reveal .about__line,
	.reveal .path__line,
	.reveal .stat-page__line,
	.reveal .cta__line,
	.reveal .hero__bottom-line {
		transition: none !important;
		animation: none !important;
	}

	.image-page img {
		animation: none !important;
	}
}

/* Responsive */
@media (max-width: 768px) {
	html {
		font-size: 16px;
	}

	h1 {
		font-size: 2.4rem;
	}

	h2 {
		font-size: 1.8rem;
	}

	section {
		padding: var(--space-2xl) var(--space-md);
	}

	.btn {
		padding: 12px 28px;
		font-size: 0.82rem;
	}

	.btn--lg {
		padding: 14px 36px;
		font-size: 0.88rem;
	}
}

/* ═══════════════════════════════════════
   NAV (ported from Nav.svelte)
   ═══════════════════════════════════════ */
.nav {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 100;
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 20px 36px;
	transition: padding 0.3s ease;
}

.nav.scrolled {
	padding: 12px 36px;
}

/* Back button — hidden by default, shown on sub-pages.
   Uses .pill.nav__back to outrank the base .pill rule defined later. */
.pill.nav__back {
	display: none;
	cursor: pointer;
	color: var(--secondary);
	padding: 0;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	position: absolute;
	left: 36px;
	/* Background + border inherit from the base .pill rule so the back
	   button matches the opacity/brightness of the other nav pills. */
}

.pill.nav__back:hover {
	color: var(--secondary);
}

.page-subpath .pill.nav__back {
	display: inline-flex;
}

/* Subpath nav shows the full pill set (Manifesto, Statistics, About,
   Get in touch) just like the home page — the only additional chrome
   is the back pill on the far left. Nudge the left group over to make
   room for the back pill so they don't overlap. */
.page-subpath .nav__left {
	margin-left: 44px;
}

.page-subpath .nav__center--brand {
	opacity: 1;
	pointer-events: all;
}

.nav__left,
.nav__right {
	display: flex;
	align-items: center;
	gap: 6px;
}

.nav__center {
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.25s ease;
}

.nav__center--visible {
	opacity: 1;
	pointer-events: all;
}

.pill.nav__center--up {
	cursor: pointer;
	color: var(--secondary);
	padding: 0;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: rgba(242, 243, 239, 0.85);
	border: 1px solid rgba(45, 74, 62, 0.1);
}

.pill.nav__center--up:hover {
	background: rgba(242, 243, 239, 0.95);
}

.pill {
	display: inline-flex;
	align-items: center;
	font-family: var(--serif);
	font-size: 0.8rem;
	font-weight: 400;
	color: var(--secondary);
	text-decoration: none;
	padding: 7px 18px;
	border-radius: 100px;
	background: rgba(242, 243, 239, 0.5);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border: 1px solid rgba(45, 74, 62, 0.06);
	transition: all 0.25s ease;
	cursor: pointer;
}

.pill:hover {
	color: var(--ink);
	background: rgba(242, 243, 239, 0.8);
}

.pill--accent {
	color: var(--amber);
	border-color: rgba(201, 168, 76, 0.15);
}

.pill--accent:hover {
	color: var(--amber);
	background: rgba(201, 168, 76, 0.1);
	border-color: rgba(201, 168, 76, 0.25);
}

.pill--active {
	color: var(--ink);
	background: rgba(242, 243, 239, 0.75);
	border-color: rgba(45, 74, 62, 0.1);
}

.pill.nav__center--mobile {
	display: none;
}

/* Rotate-to-portrait prompt — shown only on actual touch devices in
   landscape with short height. `pointer: coarse` gates this to real
   phones/tablets so a desktop user resizing their window narrow
   doesn't trigger it. */
.rotate-prompt {
	display: none;
}

@media (orientation: landscape) and (max-height: 500px) and (pointer: coarse) {
	.rotate-prompt {
		display: flex;
		position: fixed;
		inset: 0;
		z-index: 10000;
		align-items: center;
		justify-content: center;
		background: var(--ink);
		color: var(--bg);
		text-align: center;
		padding: var(--space-xl);
	}
	.rotate-prompt__inner {
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: var(--space-md);
		max-width: 320px;
	}
	.rotate-prompt__inner svg {
		opacity: 0.7;
		animation: rotate-nudge 3s ease-in-out infinite;
	}
	.rotate-prompt__inner p {
		font-family: var(--serif);
		font-size: 1.2rem;
		font-weight: 300;
		line-height: 1.4;
		opacity: 0.9;
		margin: 0;
	}
	@keyframes rotate-nudge {
		0%, 40%, 100% { transform: rotate(0deg); }
		60% { transform: rotate(90deg); }
	}
	/* Prevent the body from scrolling behind the overlay */
	body { overflow: hidden; }
}


.nav.scrolled .pill {
	background: rgba(242, 243, 239, 0.75);
	border-color: rgba(45, 74, 62, 0.08);
}

.nav.scrolled .pill:hover {
	background: rgba(242, 243, 239, 0.9);
}

.nav__toggle {
	display: none;
	cursor: pointer;
	color: var(--ink);
	width: 36px;
	height: 36px;
	border-radius: 50%;
	align-items: center;
	justify-content: center;
	background: rgba(242, 243, 239, 0.85);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border: 1px solid rgba(45, 74, 62, 0.1);
	transition: all 0.25s ease;
	opacity: 0.7;
	padding: 0;
}

.nav__toggle:hover {
	background: rgba(242, 243, 239, 0.95);
	opacity: 1;
}

.nav__mobile-logo {
	display: none;
	font-family: var(--serif);
	font-size: 0.8rem;
	color: var(--secondary);
	text-decoration: none;
	padding: 7px 18px;
	border-radius: 100px;
	background: rgba(242, 243, 239, 0.85);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border: 1px solid rgba(45, 74, 62, 0.1);
	transition: all 0.25s ease;
}

.nav__mobile-logo:hover {
	background: rgba(242, 243, 239, 0.95);
	color: var(--ink);
}

.mobile-overlay {
	position: fixed;
	inset: 0;
	background: rgba(242, 243, 239, 0.96);
	backdrop-filter: blur(24px);
	-webkit-backdrop-filter: blur(24px);
	z-index: 200;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.mobile-overlay.mobile-overlay--visible {
	opacity: 1;
	pointer-events: all;
}

.mobile-menu {
	position: fixed;
	inset: 0;
	z-index: 201;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: var(--space-3xl) var(--space-xl);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.mobile-menu.mobile-menu--open {
	opacity: 1;
	pointer-events: all;
}

.mobile-menu__close {
	position: absolute;
	top: 24px;
	right: 24px;
	background: none;
	border: none;
	color: var(--ink);
	cursor: pointer;
	padding: 12px;
	opacity: 0.5;
	transition: opacity 0.2s;
}

.mobile-menu__close:hover {
	opacity: 1;
}

.mobile-menu__links {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--space-md);
}

.mobile-link {
	font-family: var(--serif);
	font-size: 2.2rem;
	font-weight: 300;
	color: var(--ink);
	text-decoration: none;
	letter-spacing: -0.02em;
	opacity: 0;
	transform: translateY(20px);
	transition: opacity 0.5s cubic-bezier(0.23, 1, 0.32, 1),
		transform 0.5s cubic-bezier(0.23, 1, 0.32, 1),
		color 0.2s;
}

.mobile-menu--open .mobile-link {
	opacity: 0.85;
	transform: translateY(0);
}

.mobile-menu--open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu--open .mobile-link:nth-child(2) { transition-delay: 0.16s; }
.mobile-menu--open .mobile-link:nth-child(3) { transition-delay: 0.22s; }
.mobile-menu--open .mobile-link:nth-child(4) { transition-delay: 0.28s; }
.mobile-menu--open .mobile-link:nth-child(5) { transition-delay: 0.34s; }

.mobile-link:hover {
	color: var(--amber);
	opacity: 1;
}

.mobile-menu__divider {
	width: 32px;
	height: 1px;
	background: var(--divider);
	margin: var(--space-2xl) 0;
	transform: scaleX(0);
	transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1) 0.4s;
}

.mobile-menu--open .mobile-menu__divider {
	transform: scaleX(1);
}

.mobile-menu__cta {
	font-family: var(--serif);
	font-size: 1.1rem;
	color: var(--amber);
	text-decoration: none;
	opacity: 0;
	transform: translateY(20px);
	transition: opacity 0.5s cubic-bezier(0.23, 1, 0.32, 1) 0.45s,
		transform 0.5s cubic-bezier(0.23, 1, 0.32, 1) 0.45s,
		color 0.2s;
}

.mobile-menu--open .mobile-menu__cta {
	opacity: 1;
	transform: translateY(0);
}

.mobile-menu__cta:hover {
	color: var(--amber);
	opacity: 0.7;
}

@media (max-width: 768px) {
	.nav {
		padding: 14px 16px;
		padding-top: calc(14px + env(safe-area-inset-top));
		background: transparent;
	}

	.nav.scrolled {
		padding: 12px 16px;
		padding-top: calc(12px + env(safe-area-inset-top));
	}

	.nav__left,
	.nav__right,
	.pill.nav__center--desktop {
		display: none;
	}

	.page-subpath .pill.nav__center--brand {
		display: inline-flex;
		opacity: 1;
		pointer-events: all;
	}

	.page-subpath .nav__mobile-logo {
		display: none;
	}

	.pill.nav__center--mobile {
		display: inline-flex;
	}

	/* Subpath mobile layout: back (left) · Camino pill (center) ·
	   hamburger (right). Hide the scroll-to-top center pill here so it
	   doesn't fight the brand pill for the middle slot. The hamburger
	   is the only flex-flow item left, so push it to the right edge. */
	.page-subpath .pill.nav__center--mobile {
		display: none;
	}

	.page-subpath .nav__toggle {
		margin-left: auto;
	}

	.pill.nav__back {
		left: 16px;
	}

	.nav__toggle {
		display: inline-flex;
		align-items: center;
	}

	.nav__mobile-logo {
		display: inline-flex;
		align-items: center;
	}
}

/* ═══════════════════════════════════════
   FOOTER (ported from Footer.svelte)
   ═══════════════════════════════════════ */
.footer {
	padding: var(--space-xl) var(--space-lg) calc(var(--space-xl) + env(safe-area-inset-bottom));
	background: var(--bg);
	border-top: 1px solid var(--border);
}

.footer__inner {
	max-width: 720px;
	margin: 0 auto;
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--space-md);
}

.footer__brand {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
}

.footer__wordmark {
	font-family: var(--serif);
	font-size: 1.3rem;
	font-weight: 300;
	letter-spacing: -0.02em;
	color: var(--ink);
	text-decoration: none;
	transition: opacity 0.2s;
}

.footer__wordmark:hover {
	opacity: 0.7;
	color: var(--ink);
}

.footer__tagline {
	font-size: 0.85rem;
	font-style: italic;
	color: var(--secondary);
	opacity: 0.75;
}

.footer__links {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	justify-content: center;
}

.footer__links a {
	font-size: 0.78rem;
	color: var(--secondary);
	text-decoration: none;
	transition: color 0.2s;
}

.footer__links a:hover {
	color: var(--ink);
}

.footer__dot,
.footer__bottom-dot {
	width: 3px;
	height: 3px;
	border-radius: 50%;
	background: var(--pencil);
}

.footer__bottom {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	justify-content: center;
}

.footer__email {
	font-size: 0.75rem;
	color: var(--ink);
	text-decoration: none;
	opacity: 0.6;
	transition: opacity 0.2s;
}

.footer__email:hover {
	opacity: 1;
	color: var(--amber);
}

.footer__copy {
	font-size: 0.7rem;
	color: var(--secondary);
	opacity: 0.5;
}

/* ═══════════════════════════════════════
   <progressive-image> custom element
   ═══════════════════════════════════════ */
progressive-image {
	position: relative;
	display: block;
	width: 100%;
	height: 100%;
	overflow: hidden;
	/* Pre-load placeholder color — matches the page cream so the image looks
	   like it's expanding INTO its surroundings, not popping over a dark slab. */
	background: var(--bg);
}

progressive-image img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: var(--object-fit, cover);
	object-position: var(--object-position, center center);
	opacity: 0;
	transition: opacity 0.4s ease;
}

progressive-image img.loaded {
	opacity: 1;
}

/* Cache hits: skip the fade so the image shows on the very first paint —
   no class-toggle latency, no flash. The hydrating class is added
   synchronously when the top-tier URL is already in loadedUrls, then
   removed after two rAF ticks once paint has settled. */
progressive-image.hydrating img {
	transition: none;
	opacity: 1;
}

