/**
 * Design tokens. Source of truth: docs/design-system.md (Tokens table).
 * Never hard-code these values anywhere else.
 */

:root {
	/* Colors */
	--color-forest: #172903;
	--color-ivory: #f4f5f0;
	--color-sage: #e5eae3;
	--color-accent: #f77f3f;
	--color-text: #5b5c57;
	--color-border: #dadbd6;
	--color-error: #a63a1e; /* form error text and the underline of an invalid field */
	--color-white: #fff;
	--color-line-on-dark: rgba(255, 255, 255, 0.2);
	--color-backdrop: rgba(0, 0, 0, 0.5);
	--color-overlay: rgba(23, 41, 3, 0.35); /* forest at 35% */
	--color-glass: rgba(23, 41, 3, 0.45); /* forest at 45%, dropdowns over a hero */

	/* Shape */
	--radius: 0;

	/* Layout */
	--container: 1140px;
	--section-y: clamp(56px, 9vw, 120px);
	--gap: clamp(24px, 3vw, 40px);
	--header-height: 84px;
	--blur-glass: 12px;

	/* Fonts */
	--font-heading: "Cormorant Garamond", Georgia, "Times New Roman", serif;
	--font-body: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;

	/* Type scale: mobile minimum at 375px, desktop size at 1200px */
	--text-h1: clamp(32px, 1.3rem + 2.9vw, 56px);
	--text-display: clamp(96px, 3.05rem + 12.61vw, 200px); /* the numeral on the 404 page: 96px at 375, 200px at 1200 */
	--text-hero: clamp(22px, 7vw, 56px); /* home hero title: longest fallback line = 11.72 x font size; fits from 320px, 56px from 800px */
	--text-h2: clamp(28px, 1.4rem + 1.45vw, 40px);
	--text-h2-content: clamp(24px, 1.33rem + 0.73vw, 30px); /* h2 inside post content */
	--text-h3: clamp(20px, 1.19rem + 0.24vw, 22px);
	--text-h4: 18px;
	--text-h5: 16px;
	--text-link: clamp(17px, 1.03rem + 0.12vw, 18px);
	--text-body: clamp(16px, 0.97rem + 0.12vw, 17px);
	--text-small: 12px;
	--text-logo: clamp(22px, 1.26rem + 0.48vw, 26px);
	--text-menu: 13px;

	/* Focus: set to var(--color-white) inside dark surfaces */
	--focus-color: var(--color-forest);

	/*
	 * Surface: the background of the current surface. Dark surfaces set
	 * --surface-color: var(--color-forest) together with --focus-color.
	 * Buttons use the pair: --focus-color is their ink, --surface-color
	 * the text on a filled button.
	 */
	--surface-color: var(--color-ivory);

	/* Motion: see "Motion" in docs/design-system.md */
	--motion-ease: cubic-bezier(0.22, 1, 0.36, 1); /* every reveal and the card zoom */
	--motion-fast: 200ms; /* color and opacity on hover and focus */
	--motion-reveal: 2100ms; /* reveals and the hairline draw */
	--motion-distance: 48px; /* how far a revealed block rises */
	--motion-stagger: 260ms; /* delay between items of a group */
	--motion-start: 30%; /* reveal when a block's top passes this far above the viewport bottom (read by reveal.js) */
	--motion-hover: 800ms; /* post card image zoom on hover and focus */
}

/* Below the mobile menu breakpoint (see inc/header.php) */
@media (max-width: 1023px) {

	:root {
		--header-height: 64px;
	}
}
