/**
 * VICH — design tokens, reset, typography, buttons, forms.
 *
 * Mobile-first. Breakpoints: 640 (phablet), 900 (tablet), 1200 (desktop).
 */

/* ==========================================================================
   1. Tokens
   ========================================================================== */

:root {
	/* Brand */
	--ink: #101820;
	--navy: #1b3050;
	--navy-700: #16273f;
	--navy-900: #0d1a2b;
	--gold: #c2984f;
	--gold-600: #a87f3b;
	--gold-300: #d8bd85;
	--gold-200: #e8d5ac;
	--gold-100: #f2e7cf;
	--cream: #f6f1e7;
	--cream-50: #fbf8f2;
	--cream-200: #f0e9dc;
	--cream-300: #e8dfcd;

	/* Faint paper grain, baked at low opacity, tiled. Keeps the cream from
	   reading as a flat fill without becoming a visible pattern. Inline SVG so
	   it stays self-contained (no external request). */
	--grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='150'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
	--white: #fff;

	/* Text */
	--text: #3f3a33;
	--text-strong: var(--navy);
	--text-muted: #7b7365;
	--text-on-dark: #ece5d8;
	--text-on-dark-muted: #a9b3c2;

	/* Lines & surfaces */
	--line: #e2d8c5;
	--line-soft: rgba(27, 48, 80, 0.1);
	--line-strong: rgba(27, 48, 80, 0.22);
	--surface: var(--white);
	--surface-alt: var(--cream-50);

	/* State */
	--success: #2f7a5a;
	--danger: #b0402f;
	--warning: #a97a1f;
	--info: var(--navy);

	/* Type */
	--font-display: "Cormorant Garamond", "Times New Roman", Georgia, serif;
	--font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

	--fs-display: clamp(2.9rem, 1.4rem + 5.4vw, 5.75rem);
	--fs-h1: clamp(2.35rem, 1.35rem + 3.6vw, 4.15rem);
	--fs-h2: clamp(1.95rem, 1.25rem + 2.5vw, 3.1rem);
	--fs-h3: clamp(1.5rem, 1.15rem + 1.35vw, 2.15rem);
	--fs-h4: clamp(1.25rem, 1.1rem + 0.6vw, 1.55rem);
	--fs-h5: clamp(1.08rem, 1rem + 0.35vw, 1.25rem);
	--fs-lead: clamp(1.05rem, 1rem + 0.32vw, 1.22rem);
	--fs-body: 1rem;
	--fs-sm: 0.9375rem;
	--fs-xs: 0.8125rem;
	--fs-eyebrow: 0.72rem;

	--lh-tight: 1.06;
	--lh-heading: 1.14;
	--lh-body: 1.75;

	/* Space */
	--gutter: clamp(1.15rem, 4vw, 3rem);
	--container: 1280px;
	--container-wide: 1480px;
	--container-narrow: 780px;
	--section-y: clamp(3.75rem, 7vw, 7.5rem);
	--section-y-sm: clamp(2.5rem, 5vw, 4.5rem);

	/* Shape */
	--radius-xs: 2px;
	--radius-sm: 4px;
	--radius: 8px;
	--radius-lg: 18px;
	--radius-pill: 999px;

	--shadow-sm: 0 1px 2px rgba(16, 24, 32, 0.05);
	--shadow: 0 8px 24px -12px rgba(16, 24, 32, 0.18);
	--shadow-lg: 0 28px 60px -32px rgba(16, 24, 32, 0.32);
	--shadow-drawer: -18px 0 60px -24px rgba(13, 26, 43, 0.4);

	/* Motion */
	--ease: cubic-bezier(0.22, 0.61, 0.36, 1);
	--dur: 0.28s;
	--dur-slow: 0.55s;

	--header-h: 68px;
	--z-header: 100;
	--z-drawer: 300;
	--z-overlay: 290;
	--z-toast: 400;
}

@media (min-width: 900px) {
	:root {
		--header-h: 86px;
	}
}

/* ==========================================================================
   2. Reset
   ========================================================================== */

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

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--header-h) + 1.5rem);
	/* Deliberately no overflow here: any value other than visible on the root
	   turns it into a clip context and kills `position: sticky` on the header.
	   Horizontal overflow is contained by body instead — its overflow
	   propagates to the viewport, so it clips without that side effect. */
}

body {
	margin: 0;
	background-color: var(--cream);
	/* Soft warm glow top-right, cool glow bottom-left, plus the paper grain.
	   Fixed so the wash stays put while the page scrolls. */
	background-image:
		radial-gradient(120% 80% at 100% -6%, rgba(194, 152, 79, 0.12), transparent 58%),
		radial-gradient(110% 75% at -8% 108%, rgba(27, 48, 80, 0.07), transparent 60%),
		radial-gradient(70% 50% at 50% 42%, rgba(194, 152, 79, 0.05), transparent 65%),
		var(--grain);
	background-repeat: no-repeat, no-repeat, no-repeat, repeat;
	background-attachment: fixed, fixed, fixed, fixed;
	color: var(--text);
	font-family: var(--font-body);
	font-size: var(--fs-body);
	line-height: var(--lh-body);
	font-weight: 400;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: hidden;
}

body.is-locked {
	overflow: hidden;
}

h1, h2, h3, h4, h5, h6 {
	margin: 0 0 0.6em;
	font-family: var(--font-display);
	font-weight: 500;
	line-height: var(--lh-heading);
	color: var(--text-strong);
	letter-spacing: -0.005em;
}

h1 { font-size: var(--fs-h1); line-height: var(--lh-tight); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }
h5 { font-size: var(--fs-h5); }
h6 {
	font-family: var(--font-body);
	font-size: var(--fs-xs);
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

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

a {
	color: var(--navy);
	text-decoration-color: rgba(194, 152, 79, 0.45);
	text-underline-offset: 0.22em;
	transition: color var(--dur) var(--ease), text-decoration-color var(--dur) var(--ease);
}

a:hover { color: var(--gold-600); text-decoration-color: currentColor; }

img, svg, video, canvas {
	max-width: 100%;
	height: auto;
	display: block;
}

figure { margin: 0; }

ul, ol { margin: 0 0 1.15em; padding-left: 1.25em; }
li { margin-bottom: 0.35em; }

blockquote {
	margin: 2rem 0;
	padding-left: 1.5rem;
	border-left: 2px solid var(--gold);
	font-family: var(--font-display);
	font-size: var(--fs-h4);
	font-style: italic;
	color: var(--navy);
	line-height: 1.5;
}

hr {
	border: 0;
	height: 1px;
	background: var(--line);
	margin: var(--section-y-sm) 0;
}

table { border-collapse: collapse; width: 100%; }

code, kbd, pre, samp {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 0.9em;
}

pre {
	overflow-x: auto;
	padding: 1.25rem;
	background: var(--navy-900);
	color: var(--text-on-dark);
	border-radius: var(--radius-sm);
}

::selection {
	background: var(--navy);
	color: var(--cream);
}

:focus-visible {
	outline: 2px solid var(--gold);
	outline-offset: 3px;
	border-radius: var(--radius-xs);
}

:where(a, button, input, select, textarea):focus:not(:focus-visible) {
	outline: none;
}

.screen-reader-text,
.sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.skip-link {
	position: absolute;
	top: -100px;
	left: 1rem;
	z-index: 999;
	padding: 0.85rem 1.4rem;
	background: var(--navy);
	color: var(--cream);
	font-size: var(--fs-xs);
	letter-spacing: 0.12em;
	text-transform: uppercase;
	text-decoration: none;
	transition: top var(--dur) var(--ease);
}

.skip-link:focus { top: 1rem; color: var(--cream); }

/* ==========================================================================
   3. Layout primitives
   ========================================================================== */

.container {
	width: 100%;
	max-width: calc(var(--container) + var(--gutter) * 2);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.container--wide { max-width: calc(var(--container-wide) + var(--gutter) * 2); }
.container--narrow { max-width: calc(var(--container-narrow) + var(--gutter) * 2); }

.section {
	padding-block: var(--section-y);
	position: relative;
}

.section--sm { padding-block: var(--section-y-sm); }
.section--tight-top { padding-top: var(--section-y-sm); }
/* Solid-fill sections carry the grain plus a faint warm glow at the top edge
   so they gain a little depth instead of reading as flat blocks. */
.section--cream {
	background-color: var(--cream);
	background-image: var(--grain);
}
.section--paper {
	background-color: var(--cream-50);
	background-image:
		radial-gradient(85% 55% at 85% -20%, rgba(232, 213, 172, 0.22), transparent 60%),
		radial-gradient(80% 55% at 10% 120%, rgba(194, 152, 79, 0.07), transparent 62%),
		var(--grain);
	background-repeat: no-repeat, no-repeat, repeat;
}
.section--alt {
	background-color: var(--cream-200);
	background-image:
		radial-gradient(80% 60% at 100% 0%, rgba(194, 152, 79, 0.08), transparent 60%),
		var(--grain);
	background-repeat: no-repeat, repeat;
}
.section--white { background: var(--white); }

.section--navy {
	background: var(--navy);
	color: var(--text-on-dark);
}

.section--navy :is(h1, h2, h3, h4, h5) { color: var(--cream); }
.section--navy .section-head__lead { color: var(--text-on-dark-muted); }
.section--navy .eyebrow { color: var(--gold-200); }

.stack > * + * { margin-top: var(--stack-gap, 1rem); }

.grid { display: grid; gap: var(--grid-gap, 1.5rem); }

@media (min-width: 640px) {
	.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 900px) {
	.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ==========================================================================
   4. Typography helpers
   ========================================================================== */

.eyebrow {
	margin: 0 0 1rem;
	font-family: var(--font-body);
	font-size: var(--fs-eyebrow);
	font-weight: 600;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--gold-600);
}

.lead {
	font-size: var(--fs-lead);
	line-height: 1.7;
	color: var(--text);
}

.display {
	font-family: var(--font-display);
	font-size: var(--fs-display);
	line-height: var(--lh-tight);
	font-weight: 500;
	letter-spacing: -0.012em;
}

.text-muted { color: var(--text-muted); }
.text-gold { color: var(--gold-600); }
.text-navy { color: var(--navy); }
.text-center { text-align: center; }
.serif { font-family: var(--font-display); }

.section-head {
	max-width: 62ch;
	margin-bottom: clamp(2rem, 4vw, 3.5rem);
}

.section-head--center {
	margin-inline: auto;
	text-align: center;
}

.section-head__title {
	margin-bottom: 0;
	font-size: var(--fs-h2);
}

.section-head__title em {
	font-style: italic;
	color: var(--gold-600);
}

.section-head__lead {
	margin-top: 1rem;
	font-size: var(--fs-lead);
	color: var(--text-muted);
	line-height: 1.7;
}

.section-head--center .section-head__lead { margin-inline: auto; }

/* Sparkle rule */
.rule-sparkle {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.85rem;
	color: var(--gold);
	margin-block: 1.5rem;
}

.rule-sparkle__line {
	height: 1px;
	width: clamp(48px, 12vw, 120px);
	background: linear-gradient(90deg, transparent, var(--gold));
}

.rule-sparkle__line:last-child {
	background: linear-gradient(270deg, transparent, var(--gold));
}

/* ==========================================================================
   5. Buttons
   ========================================================================== */

/* Note: no element-qualified selector here (e.g. `button.btn`). It would
   outrank every single-class `.btn--*` modifier and silently break them. */
.btn,
.button {
	--btn-bg: var(--navy);
	--btn-fg: var(--cream);
	--btn-border: var(--navy);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.6rem;
	min-height: 52px;
	padding: 0.9rem 1.85rem;
	background: var(--btn-bg);
	color: var(--btn-fg);
	border: 1px solid var(--btn-border);
	border-radius: var(--radius-xs);
	font-family: var(--font-body);
	font-size: var(--fs-xs);
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	text-decoration: none;
	text-align: center;
	cursor: pointer;
	transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
		border-color var(--dur) var(--ease), transform var(--dur) var(--ease),
		box-shadow var(--dur) var(--ease);
	-webkit-appearance: none;
	appearance: none;
}

.btn:hover,
.button:hover {
	--btn-bg: var(--navy-700);
	--btn-border: var(--navy-700);
	color: var(--cream);
	transform: translateY(-1px);
	box-shadow: var(--shadow);
}

.btn:active { transform: translateY(0); }

.btn[disabled],
.btn.is-disabled,
.button[disabled] {
	opacity: 0.45;
	pointer-events: none;
}

.btn--gold {
	--btn-bg: var(--gold);
	--btn-border: var(--gold);
	--btn-fg: var(--navy-900);
}

.btn--gold:hover {
	--btn-bg: var(--gold-600);
	--btn-border: var(--gold-600);
	color: var(--white);
}

.btn--outline {
	--btn-bg: transparent;
	--btn-fg: var(--navy);
	--btn-border: var(--line-strong);
}

.btn--outline:hover {
	--btn-bg: var(--navy);
	--btn-border: var(--navy);
	--btn-fg: var(--cream);
}

.btn--light {
	--btn-bg: transparent;
	--btn-fg: var(--cream);
	--btn-border: rgba(236, 229, 216, 0.4);
}

.btn--light:hover {
	--btn-bg: var(--cream);
	--btn-fg: var(--navy);
	--btn-border: var(--cream);
}

.btn--ghost {
	--btn-bg: transparent;
	--btn-border: transparent;
	--btn-fg: var(--navy);
	min-height: 0;
	padding: 0.4rem 0;
}

.btn--ghost:hover {
	--btn-bg: transparent;
	--btn-border: transparent;
	color: var(--gold-600);
	transform: none;
	box-shadow: none;
}

.btn--block { display: flex; width: 100%; }
.btn--sm { min-height: 42px; padding: 0.6rem 1.15rem; font-size: 0.72rem; }
.btn--lg { min-height: 60px; padding: 1.1rem 2.4rem; }

.btn .vich-icon { flex: none; }

.btn--ghost.link-arrow .vich-icon {
	transition: transform var(--dur) var(--ease);
}

.link-arrow:hover .vich-icon { transform: translateX(4px); }

/* Text link with an animated underline */
.link-underline {
	position: relative;
	text-decoration: none;
	font-weight: 500;
}

.link-underline::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -2px;
	width: 100%;
	height: 1px;
	background: currentColor;
	transform: scaleX(0);
	transform-origin: right;
	transition: transform var(--dur) var(--ease);
}

.link-underline:hover::after { transform: scaleX(1); transform-origin: left; }

/* ==========================================================================
   6. Forms
   ========================================================================== */

label { display: block; }

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="date"],
select,
textarea,
.input {
	width: 100%;
	min-height: 52px;
	padding: 0.85rem 1rem;
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: var(--radius-xs);
	color: var(--text);
	font-family: var(--font-body);
	font-size: var(--fs-body);
	line-height: 1.5;
	transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
	-webkit-appearance: none;
	appearance: none;
}

textarea { min-height: 140px; resize: vertical; }

input::placeholder,
textarea::placeholder { color: #a9a094; }

input:focus,
select:focus,
textarea:focus {
	border-color: var(--gold);
	box-shadow: 0 0 0 3px rgba(194, 152, 79, 0.16);
	outline: none;
}

select {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%231b3050' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 1rem center;
	padding-right: 2.6rem;
}

input[type="checkbox"],
input[type="radio"] {
	width: 20px;
	height: 20px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 1px solid var(--line-strong);
	background: var(--white);
	accent-color: var(--navy);
	cursor: pointer;
	flex: none;
}

input[type="radio"] { border-radius: 50%; }

fieldset {
	margin: 0;
	padding: 0;
	border: 0;
}

.form-row { margin-bottom: 1.15rem; }

.form-row label,
.field__label {
	margin-bottom: 0.45rem;
	font-size: var(--fs-xs);
	font-weight: 600;
	letter-spacing: 0.06em;
	color: var(--navy);
}

.required { color: var(--danger); }

/* ==========================================================================
   7. Small components
   ========================================================================== */

.badge {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.35rem 0.75rem;
	background: var(--navy);
	color: var(--cream);
	font-size: 0.68rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	border-radius: var(--radius-xs);
	line-height: 1;
}

.badge--gold { background: var(--gold); color: var(--navy-900); }
.badge--outline {
	background: transparent;
	color: var(--gold-600);
	border: 1px solid var(--gold);
}

.pill {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	padding: 0.5rem 1rem;
	border: 1px solid var(--line);
	border-radius: var(--radius-pill);
	background: var(--white);
	font-size: var(--fs-xs);
	color: var(--navy);
}

.card {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
		transform var(--dur) var(--ease);
}

.card:hover {
	border-color: var(--gold-200);
	box-shadow: var(--shadow);
}

.stars {
	display: inline-flex;
	gap: 2px;
	color: var(--gold);
}

.stars .vich-icon { fill: currentColor; stroke: currentColor; }
.stars .is-empty { fill: none; opacity: 0.35; }

/* Scroll reveal lives in motion.css. */

.is-flipped { transform: scaleX(-1); }

/* ==========================================================================
   8. Prose (editor content)
   ========================================================================== */

.prose {
	font-size: var(--fs-lead);
	line-height: 1.8;
}

.prose > * + * { margin-top: 1.4em; }
.prose h2 { margin-top: 1.8em; }
.prose h3 { margin-top: 1.6em; }
.prose img { border-radius: var(--radius-sm); }
.prose a { font-weight: 500; }

.prose ul li::marker { color: var(--gold); }
.prose ol li::marker { color: var(--gold); font-weight: 600; }

.prose table {
	font-size: var(--fs-sm);
}

/* Editor tables (the ingredient list, for one) cannot shrink past their
   columns, so let them scroll on their own instead of stretching the page. */
@media (max-width: 700px) {
	.prose table {
		display: block;
		max-width: 100%;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}
}

.prose th,
.prose td {
	padding: 0.8rem 1rem;
	border-bottom: 1px solid var(--line);
	text-align: left;
}

.prose th {
	font-family: var(--font-body);
	font-size: var(--fs-xs);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--navy);
}

.wp-caption-text,
figcaption {
	margin-top: 0.6rem;
	font-size: var(--fs-xs);
	color: var(--text-muted);
	text-align: center;
}

.alignwide { width: 100%; }
.alignfull { width: 100vw; margin-left: calc(50% - 50vw); max-width: none; }
.alignleft { float: left; margin: 0.4rem 1.6rem 1rem 0; }
.alignright { float: right; margin: 0.4rem 0 1rem 1.6rem; }
.aligncenter { margin-inline: auto; }

/* ==========================================================================
   9. Utilities
   ========================================================================== */

.u-hide { display: none !important; }

@media (max-width: 639px) {
	.u-hide-mobile { display: none !important; }
}

@media (min-width: 900px) {
	.u-hide-desktop { display: none !important; }
}

@media (max-width: 899px) {
	.u-only-desktop { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }

	*,
	*::before,
	*::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
		scroll-behavior: auto !important;
	}
}
