/**
 * ProHarvest design tokens — the single source of truth for the theme.
 *
 * Brand palette is locked to five colours (cream, forest, deep green, gold, ivory). Tints are made only with opacity:
 *   rgb(var(--ph-deep-rgb) / 0.12)
 *
 * Breakpoints (media queries cannot read custom properties, so they are listed here):
 *   40rem  (640px)  – tablet: header call to action appears
 *   64rem  (1024px) – hero switches to the split composition
 *   68rem  (1088px) – desktop navigation replaces the menu toggle
 *   90rem  (1440px) – wide gutter
 */

:root {
	/* Colour — brand */
	--ph-cream: #f7f4e9;
	--ph-forest: #315e3e;
	--ph-deep: #1e3027;
	--ph-gold: #d6ab48;
	--ph-ivory: #fffdf8; /* fifth colour: lighter alternate section background, used next to cream */

	--ph-cream-rgb: 247 244 233;
	--ph-forest-rgb: 49 94 62;
	--ph-deep-rgb: 30 48 39;
	--ph-gold-rgb: 214 171 72;

	/* Colour — roles */
	--ph-color-bg: var(--ph-cream);
	--ph-color-text: var(--ph-deep);
	--ph-color-primary: var(--ph-forest);
	--ph-color-accent: var(--ph-gold);
	--ph-color-hairline: rgb(var(--ph-deep-rgb) / 0.12);

	/* Typography */
	--ph-font-heading: "Outfit", Arial, sans-serif;
	--ph-font-body: "DM Sans", Arial, sans-serif;
	--ph-fw-display: 400; /* Outfit at display sizes: hero, section titles, panel menu */
	--ph-fw-heading: 500; /* Outfit at small sizes: entry names, facts, numerals */

	--ph-fs-display: clamp(2.75rem, min(0.9rem + 6.6vw, 14.5svh), 6.5rem);
	--ph-fs-lead: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
	--ph-fs-body: 1rem;
	--ph-fs-h2: clamp(2rem, 1.45rem + 2vw, 3.25rem); /* every section title, one line on desktop */
	--ph-fs-h3: clamp(1.25rem, 1.15rem + 0.4vw, 1.5rem); /* entry names */
	--ph-fs-text: clamp(1rem, 0.97rem + 0.15vw, 1.0625rem); /* descriptions under entry names */
	--ph-fs-nav: 0.9375rem;
	--ph-fs-panel-nav: clamp(1.75rem, 1.15rem + 2.8vw, 2.5rem);

	--ph-lh-display: 0.98;
	--ph-lh-body: 1.6;
	--ph-tracking-display: -0.03em;

	/* Space — one compact scale (8px base). Use these, never one-off values.
	 * Element:  3xs 4 · 2xs 8 · xs 12 · s 16 · m 24 · l 40 · xl 64 · 2xl 96
	 * Rhythm:   stack 16 (heading to intro) < block 32→48 (between parts of a
	 *           section) < section 48→88 (between sections). */
	--ph-space-3xs: 0.25rem;
	--ph-space-2xs: 0.5rem;
	--ph-space-xs: 0.75rem;
	--ph-space-s: 1rem;
	--ph-space-m: 1.5rem;
	--ph-space-l: 2.5rem;
	--ph-space-xl: 4rem;
	--ph-space-2xl: 6rem;
	--ph-stack-space: var(--ph-space-s);
	--ph-block-space: clamp(2rem, 1.5rem + 2vw, 3rem);
	--ph-section-space: clamp(3rem, 2rem + 4vw, 5.5rem);

	/* Layout — content width; .ph-container adds the gutters on each side */
	--ph-container: 82.5rem;
	--ph-gutter: 1.25rem;

	/* Header */
	--ph-header-h: 4.5rem;
	--ph-header-h-compact: 4rem;
	--ph-logo-w: 8.25rem;
	--ph-logo-scale-compact: 0.9;
	--ph-tab-pad-l: var(--ph-gutter); /* flush with the screen edge on small screens */
	--ph-tab-pad-r: 1.125rem;
	--ph-tab-radius-l: 0rem;
	--ph-tab-radius-r: 1rem;

	/* Shape */
	--ph-radius-pill: 999px;
	--ph-tap: 2.75rem; /* 44px minimum touch target */

	/* Motion */
	--ph-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
	--ph-ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
	--ph-ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
	--ph-dur-fast: 0.25s;
	--ph-dur-base: 0.45s;
	--ph-dur-slow: 0.8s;

	/* Layers */
	--ph-z-header: 100;
	--ph-z-skip: 100000;
}

@media (min-width: 40rem) {
	:root {
		--ph-gutter: 2rem;
		--ph-header-h: 5rem;
		--ph-header-h-compact: 4.25rem;
		--ph-logo-w: 9.25rem;
	}
}

@media (min-width: 68rem) {
	:root {
		--ph-gutter: 3rem;
		--ph-header-h: 6rem;
		--ph-header-h-compact: 4.75rem;
		--ph-logo-w: 10.25rem;
		--ph-logo-scale-compact: 0.86;
		--ph-tab-pad-l: 1.375rem;
		--ph-tab-pad-r: 1.375rem;
		--ph-tab-radius-l: 1rem;
	}
}

@media (min-width: 90rem) {
	:root {
		--ph-gutter: 3.5rem;
	}
}
