/* Shared by every page: tokens, fonts, reset, buttons, header, footer, reveal-on-scroll. */

@font-face {
	font-family: "Bricolage Grotesque";
	src: url("../fonts/bricolage-grotesque.woff2") format("woff2");
	font-weight: 400 800;
	font-display: swap;
}
@font-face {
	font-family: "Young Serif";
	src: url("../fonts/young-serif.woff2") format("woff2");
	font-weight: 400;
	font-display: swap;
}

:root {
	/* Light surfaces */
	--bg: #f6f2e7;
	--card: #fbf9f2;
	--sand: #ede7d6;
	--line: #e2d9bf;
	--line-strong: #cfc6ae;
	/* Ink */
	--ink: #181a11;
	--ink-deep: #1f1a0e;
	--ink-2: #3a3528;
	--muted: #5f5a48;
	--muted-2: #6b6553;
	/* Brand */
	--olive: #556b2f;
	--olive-deep: #3b4a1f;
	--leaf: #a9c46c;
	--amber: #d8962f;
	--amber-deep: #7a4f0c;
	--amber-soft: #f2e7c6;
	--teal: #2e6a55;
	--wrong: #8c2f39;
	/* Dark surfaces */
	--night: #121410;
	--night-2: #1b1e17;
	--night-3: #1f231a;
	--night-line: #2b2e24;
	--night-ink: #f0f2e3;
	--night-muted: #a0a492;
	--brown: #1f1a0e;
	--brown-2: #2e2717;
	--brown-muted: #cfc6ae;

	--serif: "Young Serif", Georgia, serif;
	--sans: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
	--ease: cubic-bezier(0.2, 0.7, 0.2, 1);
	--max: 1200px;
	--gutter: clamp(20px, 5vw, 40px);
	--radius-xl: clamp(22px, 3vw, 40px);
}

* {
	box-sizing: border-box;
}
html {
	scroll-behavior: smooth;
	-webkit-text-size-adjust: 100%;
}
/* Stop sideways scrolling from wide decorations (marquee, glows). Set on html too, or mobile Safari
   still scrolls sideways; clip (where supported) does this without creating a scroll container. */
html,
body {
	overflow-x: hidden;
	overflow-x: clip;
}
body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font: 400 18px/1.55 var(--sans);
	-webkit-font-smoothing: antialiased;
}
img,
svg {
	display: block;
	max-width: 100%;
}
a {
	color: var(--olive-deep);
}
a:hover {
	color: var(--ink);
}
button {
	font: inherit;
	color: inherit;
}
::selection {
	background: var(--olive-deep);
	color: var(--bg);
}
:focus-visible {
	outline: 3px solid var(--olive);
	outline-offset: 3px;
	border-radius: 8px;
}

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}
.skip {
	position: absolute;
	left: 16px;
	top: -100px;
	z-index: 100;
	background: var(--ink);
	color: var(--bg);
	padding: 10px 16px;
	border-radius: 12px;
	text-decoration: none;
}
.skip:focus {
	top: 12px;
	color: var(--bg);
}

.container {
	max-width: var(--max);
	margin: 0 auto;
	padding: 0 var(--gutter);
}
.serif {
	font-family: var(--serif);
	font-weight: 400;
}
.olive {
	color: var(--olive);
}
.title-xl {
	margin: 0;
	font-family: var(--serif);
	font-weight: 400;
	font-size: clamp(38px, 5.6vw, 76px);
	line-height: 1;
	letter-spacing: -0.03em;
	color: var(--ink-deep);
	text-wrap: balance;
}
.eyebrow {
	margin: 0;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--amber);
}

/* ---------- Buttons: a dark wave fills up from below on hover ---------- */
.btn {
	--fill: var(--ink);
	--fill-ink: var(--bg);
	--arrow-h: var(--amber);
	position: relative;
	overflow: hidden;
	isolation: isolate;
	display: inline-flex;
	align-items: center;
	gap: 12px;
	border: 0;
	border-radius: 999px;
	cursor: pointer;
	text-decoration: none;
	font-weight: 700;
	font-size: 18px;
	line-height: 1.2;
	transition:
		color 0.4s ease,
		transform 0.25s var(--ease),
		box-shadow 0.3s;
}
.btn::before {
	content: "";
	position: absolute;
	left: -10%;
	right: -10%;
	top: 0;
	height: 100%;
	z-index: -1;
	background: var(--fill);
	border-radius: 50% 50% 0 0 / 60% 60% 0 0;
	transform: translateY(102%);
	transition:
		transform 0.55s cubic-bezier(0.7, 0, 0.2, 1),
		border-radius 0.55s cubic-bezier(0.7, 0, 0.2, 1);
}
.btn:hover::before {
	transform: translateY(0);
	border-radius: 0;
}
.btn:hover {
	color: var(--fill-ink);
	transform: translateY(-2px);
}
.btn:active {
	transform: scale(0.96);
}
.btn:focus-visible {
	outline: 3px solid var(--ink);
	outline-offset: 3px;
	border-radius: 999px;
}
.btn[disabled] {
	opacity: 0.7;
	cursor: progress;
}

/* Round arrow badge inside a button; the arrow slides out and a fresh one slides in on hover. */
.btn-arrow {
	position: relative;
	overflow: hidden;
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	transition: background 0.4s ease;
}
.btn-arrow svg {
	transition: transform 0.5s cubic-bezier(0.7, 0, 0.2, 1);
}
.btn-arrow svg + svg {
	position: absolute;
	transform: translate(-180%, 180%);
}
.btn-arrow.is-x svg + svg {
	transform: translateX(-220%);
}
.btn:hover .btn-arrow {
	background: var(--arrow-h) !important;
}
.btn:hover .btn-arrow svg:first-child {
	transform: translate(180%, -180%);
}
.btn:hover .btn-arrow.is-x svg:first-child {
	transform: translateX(220%);
}
.btn:hover .btn-arrow svg + svg {
	transform: none;
}

.btn-amber {
	background: var(--amber);
	color: var(--ink);
}
.btn-dark {
	background: var(--ink);
	color: var(--bg);
}
.btn-outline {
	background: var(--card);
	color: var(--ink);
	border: 1.5px solid var(--ink);
}
.btn-amber .btn-arrow,
.btn-outline .btn-arrow {
	background: var(--ink);
}
.btn-dark .btn-arrow {
	background: var(--amber);
}

/* ---------- Header: floating pill ---------- */
.site-header {
	position: fixed;
	top: 14px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 50;
	width: min(1100px, calc(100% - 20px));
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 8px 8px 8px 18px;
	border-radius: 999px;
	background: rgba(251, 249, 242, 0.78);
	-webkit-backdrop-filter: saturate(1.6) blur(18px);
	backdrop-filter: saturate(1.6) blur(18px);
	border: 1px solid rgba(24, 26, 17, 0.08);
	transition: box-shadow 0.3s;
}
.site-header.is-scrolled {
	box-shadow: 0 18px 40px -18px rgba(31, 26, 14, 0.35);
}
.brand {
	display: flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	color: var(--ink);
	font-family: var(--serif);
	font-size: 23px;
	letter-spacing: -0.01em;
	border-radius: 12px;
}
.brand:hover {
	color: var(--ink);
}
.brand img {
	width: 34px;
	height: 34px;
	border-radius: 10px;
}
.site-nav {
	display: flex;
	align-items: center;
	gap: 2px;
}
.site-nav a {
	color: var(--ink);
	text-decoration: none;
	font-size: 16px;
	font-weight: 500;
	padding: 9px 14px;
	border-radius: 999px;
	transition: background 0.2s;
}
.site-nav a:hover {
	background: rgba(24, 26, 17, 0.06);
	color: var(--ink);
}
.site-nav a[aria-current="page"] {
	background: rgba(24, 26, 17, 0.07);
}
.header-actions {
	display: flex;
	align-items: center;
	gap: 6px;
}
.header-cta {
	--fill: var(--amber);
	--fill-ink: var(--ink);
	--arrow-h: var(--ink);
	font-weight: 600;
	font-size: 16px;
	padding: 6px 6px 6px 18px;
}
.header-cta .btn-arrow {
	width: 34px;
	height: 34px;
}
.menu-btn {
	display: none;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 1px solid rgba(24, 26, 17, 0.12);
	background: var(--card);
	cursor: pointer;
	align-items: center;
	justify-content: center;
}
.menu-btn span,
.menu-btn span::before,
.menu-btn span::after {
	display: block;
	width: 16px;
	height: 2px;
	border-radius: 2px;
	background: var(--ink);
	position: relative;
	transition:
		transform 0.3s var(--ease),
		background 0.2s;
}
.menu-btn span::before,
.menu-btn span::after {
	content: "";
	position: absolute;
	left: 0;
}
.menu-btn span::before {
	top: -5px;
}
.menu-btn span::after {
	top: 5px;
}
.menu-btn[aria-expanded="true"] span {
	background: transparent;
}
.menu-btn[aria-expanded="true"] span::before {
	transform: translateY(5px) rotate(45deg);
}
.menu-btn[aria-expanded="true"] span::after {
	transform: translateY(-5px) rotate(-45deg);
}

@media (max-width: 720px) {
	.menu-btn {
		display: inline-flex;
	}
	.site-nav {
		position: absolute;
		top: calc(100% + 8px);
		left: 0;
		right: 0;
		flex-direction: column;
		align-items: stretch;
		gap: 2px;
		padding: 8px;
		background: var(--card);
		border: 1px solid rgba(24, 26, 17, 0.08);
		border-radius: 24px;
		box-shadow: 0 24px 50px -20px rgba(31, 26, 14, 0.4);
		opacity: 0;
		visibility: hidden;
		transform: translateY(-6px);
		transition:
			opacity 0.25s,
			transform 0.25s var(--ease),
			visibility 0s 0.25s;
	}
	.site-nav.is-open {
		opacity: 1;
		visibility: visible;
		transform: none;
		transition:
			opacity 0.25s,
			transform 0.25s var(--ease);
	}
	.site-nav a {
		padding: 14px 16px;
		font-size: 17px;
	}
	.header-cta {
		padding-left: 14px;
		font-size: 15px;
	}
}

/* ---------- Footer ---------- */
.site-footer {
	position: relative;
	overflow: hidden;
	background: var(--night);
	color: var(--night-ink);
	border-radius: clamp(28px, 4vw, 56px) clamp(28px, 4vw, 56px) 0 0;
}
.footer-grid {
	/* Sits above the wordmark: its glyphs reach well above their own box and would swallow clicks. */
	position: relative;
	z-index: 1;
	max-width: var(--max);
	margin: 0 auto;
	padding: clamp(48px, 7vw, 88px) var(--gutter) 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
	gap: 32px 40px;
	font-size: 16px;
	line-height: 1.6;
}
.footer-tagline {
	margin: 0;
	font-family: var(--serif);
	font-size: 30px;
	line-height: 1.1;
	max-width: 10ch;
}
.footer-head {
	margin: 0 0 10px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--amber);
}
.footer-links {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 6px;
}
.site-footer a {
	color: var(--night-ink);
	text-decoration: none;
}
.site-footer a:hover {
	color: var(--amber);
}
.site-footer a.underline {
	text-decoration: underline;
	text-underline-offset: 3px;
}
/* Zero specificity, so class rules such as .footer-wordmark and .footer-note can set their own margins. */
.site-footer :where(p) {
	margin: 0;
}
.footer-muted {
	color: #c9ccb8;
}
.footer-wordmark {
	position: relative;
	z-index: 0;
	margin: clamp(40px, 6vw, 72px) 0 0;
	text-align: center;
	user-select: none;
	font-family: var(--serif);
	font-size: clamp(110px, 27vw, 400px);
	line-height: 0.95;
	padding-bottom: 0.08em;
	letter-spacing: -0.05em;
	color: transparent;
	-webkit-text-stroke: 1.5px #3a3f2e;
	transition:
		color 0.6s,
		-webkit-text-stroke-color 0.6s;
}
.footer-wordmark:hover {
	color: var(--amber);
	-webkit-text-stroke-color: var(--amber);
}
.footer-bottom {
	max-width: var(--max);
	margin: 0 auto;
	padding: 20px var(--gutter) 28px;
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 8px 24px;
	font-size: 14px;
	color: var(--night-muted);
	border-top: 1px solid var(--night-line);
}
.site-footer :focus-visible {
	outline-color: var(--amber);
}

/* ---------- Reveal on scroll (site.js adds .rv-ready to <html>) ---------- */
.rv-ready [data-rv] {
	opacity: 0;
	transform: translateY(34px);
	transition:
		opacity 0.9s var(--ease),
		transform 0.9s var(--ease);
}
.rv-ready [data-rv].is-in {
	opacity: 1;
	transform: none;
}

/* ---------- Shared keyframes ---------- */
@keyframes rise {
	from {
		opacity: 0;
		transform: translateY(26px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}
@keyframes bob {
	from {
		transform: translateY(-9px) rotate(var(--r, 0deg));
	}
	to {
		transform: translateY(9px) rotate(calc(var(--r, 0deg) + 7deg));
	}
}
@keyframes drift {
	0% {
		transform: translate(0, 0) scale(1);
	}
	50% {
		transform: translate(8vw, -4vw) scale(1.15);
	}
	100% {
		transform: translate(-6vw, 5vw) scale(0.92);
	}
}
@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

@media print {
	[data-rv] {
		opacity: 1 !important;
		transform: none !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
	*,
	*::before,
	*::after {
		animation: none !important;
		transition: none !important;
	}
	.rv-ready [data-rv] {
		opacity: 1;
		transform: none;
	}
}

.footer-note {
	margin-top: 14px;
	max-width: 24em;
	font-size: 14px;
	line-height: 1.5;
	color: var(--night-muted);
}

/* ---------- Phone spacing scale (used by home.css and legal.css phone blocks) ---------- */
@media (max-width: 720px) {
	:root {
		--gutter: 24px;
		--m-section: 112px;
		--m-card: 28px 24px;
		--m-stack: 16px;
	}
}

/* ---------- Phones ---------- */
@media (max-width: 520px) {
	.site-header {
		top: 10px;
		padding: 6px 6px 6px 14px;
	}
	.brand {
		font-size: 21px;
	}
	.brand img {
		width: 30px;
		height: 30px;
	}
	.header-cta {
		padding: 5px 5px 5px 14px;
		gap: 8px;
		font-size: 15px;
	}
	.header-cta .cta-more {
		display: none;
	}

	.footer-grid {
		grid-template-columns: 1fr 1fr;
		gap: 36px 24px;
		padding-top: 56px;
	}
	.footer-grid > :first-child,
	.footer-grid > :last-child {
		grid-column: 1 / -1;
	}
	.footer-tagline {
		font-size: 28px;
		max-width: 12ch;
	}
	.footer-links {
		gap: 10px;
	}
	.footer-wordmark {
		margin-top: 64px;
		font-size: 27vw;
	}
	.footer-bottom {
		flex-direction: column;
		gap: 4px;
		padding-bottom: 32px;
	}
}
