/* Base: reset, focus, reduced motion. Tokens come from theme.json (--wp--preset--*, --wp--custom--*). */

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

html {
	scroll-behavior: smooth; /* in-page links (Home "Book Now"); off under reduced motion below */
}

body {
	margin: 0;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

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

/* Long client copy wraps instead of overflowing (RISK C1). */
h1,
h2,
h3,
h4,
p,
li {
	overflow-wrap: break-word;
}

:focus-visible {
	outline: 2px solid var(--wp--preset--color--forest);
	outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* Placeholders: Figma's #AAAAAA; opacity 1 stops browsers fading them further */
::placeholder {
	color: var(--wp--custom--color--placeholder);
	opacity: 1;
}

/*
 * Tablet (no Figma frame): under 1200 the phone layout grows to 768px wide (sections.css), and text grows with
 * that column — up to 12.5% at 768 — instead of with the screen. Values: settings.custom.tablet in theme.json.
 */
@media (max-width: 1199px) {
	body {
		--wp--preset--font-size--hero: var(--wp--custom--tablet--font-size--hero);
		--wp--preset--font-size--display: var(--wp--custom--tablet--font-size--display);
		--wp--preset--font-size--heading-1: var(--wp--custom--tablet--font-size--heading-1);
		--wp--preset--font-size--heading-2: var(--wp--custom--tablet--font-size--heading-2);
		--wp--preset--font-size--heading-3: var(--wp--custom--tablet--font-size--heading-3);
		--wp--preset--font-size--statement: var(--wp--custom--tablet--font-size--statement);
		--wp--preset--font-size--stat: var(--wp--custom--tablet--font-size--stat);
		--wp--preset--font-size--stat-word: var(--wp--custom--tablet--font-size--stat-word);
		--wp--preset--font-size--price: var(--wp--custom--tablet--font-size--price);
		--wp--preset--font-size--story: var(--wp--custom--tablet--font-size--story);
		--wp--preset--font-size--lead: var(--wp--custom--tablet--font-size--lead);
		--wp--preset--font-size--detail: var(--wp--custom--tablet--font-size--detail);
		--wp--preset--font-size--note: var(--wp--custom--tablet--font-size--note);
		--wp--preset--font-size--copy: var(--wp--custom--tablet--font-size--copy);
		--wp--preset--font-size--intro: var(--wp--custom--tablet--font-size--intro);
		--wp--preset--font-size--large: var(--wp--custom--tablet--font-size--large);
		--wp--preset--font-size--regular: var(--wp--custom--tablet--font-size--regular);
		--wp--preset--font-size--small: var(--wp--custom--tablet--font-size--small);
		--wp--custom--line-height--hero: var(--wp--custom--tablet--line-height--hero);
		--wp--custom--line-height--heading-1: var(--wp--custom--tablet--line-height--heading-1);
		--wp--custom--line-height--heading-2: var(--wp--custom--tablet--line-height--heading-2);
		--wp--custom--line-height--heading-3: var(--wp--custom--tablet--line-height--heading-3);
		--wp--custom--line-height--statement: var(--wp--custom--tablet--line-height--statement);
		--wp--custom--line-height--stat: var(--wp--custom--tablet--line-height--stat);
		--wp--custom--line-height--stat-word: var(--wp--custom--tablet--line-height--stat-word);
		--wp--custom--line-height--price: var(--wp--custom--tablet--line-height--price);
		--wp--custom--line-height--lead: var(--wp--custom--tablet--line-height--lead);
		--wp--custom--line-height--detail: var(--wp--custom--tablet--line-height--detail);
		--wp--custom--line-height--copy: var(--wp--custom--tablet--line-height--copy);
		--wp--custom--line-height--intro: var(--wp--custom--tablet--line-height--intro);
		--wp--custom--line-height--large: var(--wp--custom--tablet--line-height--large);
		--wp--custom--line-height--regular: var(--wp--custom--tablet--line-height--regular);
		--wp--custom--line-height--small: var(--wp--custom--tablet--line-height--small);
		--wp--custom--line-height--display: var(--wp--custom--tablet--line-height--display);
		--wp--custom--line-height--note: var(--wp--custom--tablet--line-height--note);
		--wp--custom--line-height--story: var(--wp--custom--tablet--line-height--story);
		--wp--custom--line-height--heading-2-tight: var(--wp--custom--tablet--line-height--heading-2-tight);
	}
}

/*
 * Type follows the layout (Habib 2026-11-12, "text size … matched Figma … responsively"). theme.json's sizes blend in
 * a straight line from the 440 frame to the 1728 frame, but the layout scales in proportion (--s), so between
 * 1200 and 1728 text was relatively larger than its box and wrapped sooner than Figma ("free 15 / minute" at 1440,
 * headings a line longer). From 1200 up, headings, intros and body copy scale with the page like the boxes, so lines
 * break as in Figma at every desktop width; each stops at its smallest readable size (the 440 value; body ≥ 16).
 * Below 440 the headings do the same against the 440 frame; body text keeps its size. At 1728 and 440 every value
 * is Figma's, unchanged. scripts/type-check.py --wrap checks it.
 */
@media (min-width: 1200px) {
	html:root {
		--wp--preset--font-size--hero: max(48px, calc(72 * min(100vw, 1728px) / 1728));
		--wp--preset--font-size--display: max(36px, calc(72 * min(100vw, 1728px) / 1728));
		--wp--preset--font-size--heading-1: max(36px, calc(56 * min(100vw, 1728px) / 1728));
		--wp--preset--font-size--heading-2: max(26px, calc(40 * min(100vw, 1728px) / 1728));
		--wp--preset--font-size--heading-3: max(26px, calc(32 * min(100vw, 1728px) / 1728));
		--wp--preset--font-size--statement: max(26px, calc(56 * min(100vw, 1728px) / 1728));
		--wp--preset--font-size--price: max(147.46px, calc(200 * min(100vw, 1728px) / 1728));
		--wp--preset--font-size--story: max(18px, calc(24 * min(100vw, 1728px) / 1728));
		--wp--preset--font-size--lead: max(16px, calc(22 * min(100vw, 1728px) / 1728));
		--wp--preset--font-size--detail: max(18px, calc(22 * min(100vw, 1728px) / 1728));
		--wp--preset--font-size--note: max(16px, calc(18 * min(100vw, 1728px) / 1728));
		--wp--preset--font-size--copy: max(14px, calc(16 * min(100vw, 1728px) / 1728));
		--wp--preset--font-size--intro: max(16px, calc(22 * min(100vw, 1728px) / 1728));
		--wp--preset--font-size--large: max(16px, calc(18 * min(100vw, 1728px) / 1728));
		--wp--custom--line-height--hero: max(54px, calc(80 * min(100vw, 1728px) / 1728));
		--wp--custom--line-height--display: max(42px, calc(80 * min(100vw, 1728px) / 1728));
		--wp--custom--line-height--heading-1: max(42px, calc(68 * min(100vw, 1728px) / 1728));
		--wp--custom--line-height--heading-2: max(34px, calc(50 * min(100vw, 1728px) / 1728));
		--wp--custom--line-height--heading-2-tight: max(34px, calc(44 * min(100vw, 1728px) / 1728));
		--wp--custom--line-height--heading-3: max(34px, calc(40 * min(100vw, 1728px) / 1728));
		--wp--custom--line-height--statement: max(34px, calc(68 * min(100vw, 1728px) / 1728));
		--wp--custom--line-height--price: max(155px, calc(210 * min(100vw, 1728px) / 1728));
		--wp--custom--line-height--story: max(28px, calc(34 * min(100vw, 1728px) / 1728));
		--wp--custom--line-height--lead: max(24px, calc(30 * min(100vw, 1728px) / 1728));
		--wp--custom--line-height--detail: max(28px, calc(30 * min(100vw, 1728px) / 1728));
		--wp--custom--line-height--note: max(24px, calc(28 * min(100vw, 1728px) / 1728));
		--wp--custom--line-height--copy: max(20px, calc(24 * min(100vw, 1728px) / 1728));
		--wp--custom--line-height--intro: max(24px, calc(30 * min(100vw, 1728px) / 1728));
		--wp--custom--line-height--large: max(24px, calc(28 * min(100vw, 1728px) / 1728));
	}
}

@media (max-width: 439.98px) {
	body { /* body, like the tablet block above, which it follows */
		--wp--preset--font-size--hero: calc(48 * 100vw / 440);
		--wp--preset--font-size--display: calc(36 * 100vw / 440);
		--wp--preset--font-size--heading-1: calc(36 * 100vw / 440);
		--wp--preset--font-size--heading-2: calc(26 * 100vw / 440);
		--wp--preset--font-size--heading-3: calc(26 * 100vw / 440);
		--wp--preset--font-size--statement: calc(26 * 100vw / 440);
		--wp--custom--line-height--hero: calc(54 * 100vw / 440);
		--wp--custom--line-height--display: calc(42 * 100vw / 440);
		--wp--custom--line-height--heading-1: calc(42 * 100vw / 440);
		--wp--custom--line-height--heading-2: calc(34 * 100vw / 440);
		--wp--custom--line-height--heading-2-tight: calc(34 * 100vw / 440);
		--wp--custom--line-height--heading-3: calc(34 * 100vw / 440);
		--wp--custom--line-height--statement: calc(34 * 100vw / 440);
	}
}
