/*
 * Ranch Child — design tokens.
 *
 * Tokens only. No selectors other than :root, no component CSS. Every
 * value here is a decision recorded in docs/BUILD-LOG.md (2026-09-29):
 *
 *   - Type stack from the landing page in design/ (Playfair Display, Lora,
 *     Kaushan Script). Alex Brush dropped — one word did not justify a
 *     font download, and its thin stroke fails contrast on cream.
 *   - Colours and layout from design/mockups/. The mockups' 40-odd values
 *     were collapsed to 18 colour tokens; the merge list (which value won,
 *     what it absorbed) is in the build log.
 *   - Names are semantic (by role), not by appearance. If the cream is
 *     later judged too yellow, --trh-color-surface changes in one place and
 *     nothing has to be renamed.
 *
 * This file is enqueued before main.css (see functions.php), so any
 * stylesheet in the theme can use var(--trh-…). Do not put values that only
 * one component uses in here — that is what main.css is for.
 *
 * Fonts: these are the stacks only. Loading the Google Fonts files is a
 * separate enqueue decision (self-host vs. CDN) not made yet.
 */

/*
 * Root font size anchor. Every size token below is in rem and was derived
 * from the mockups at 16px. Astra's dynamic CSS sets `html { font-size:
 * 91.2% }` inside its tablet and phone media queries (its own "body font
 * size on mobile" Customizer setting), which would silently scale every
 * token down ~9% on small screens — the 44px menu toggle measured 40px.
 * This is the one element-level rule in the theme's CSS, and it exists
 * to keep the token scale meaning what it says at every width. Loaded
 * after Astra's inline CSS, so it wins at equal specificity.
 */
html {
	font-size: 100%;
}

:root {
	/* ------------------------------------------------------------------
	 * Colour — surfaces
	 * ------------------------------------------------------------------ */
	--trh-color-surface:        #f7efe3; /* page ground; also header band and form inputs */
	--trh-color-surface-raised: #fbf5ec; /* cards, panels — sits a hair lighter than the ground */
	--trh-color-surface-tint:   #ece0c9; /* tinted bands, menu hover/current, text selection */

	/* Colour — borders */
	--trh-color-border:        #dcc8ab; /* cards, rules, dividers, hours separator */
	--trh-color-border-strong: #cfb888; /* inputs, mobile menu button, nav hover underline */

	/* Colour — gold accent (the "book now" colour) */
	--trh-color-accent:         #b0862e; /* primary buttons, icon circles, focus ring, script headings */
	--trh-color-accent-text:    #8a6420; /* gold as TEXT on cream (AA-safe) and hover for accent buttons.
	                                        Kept separate from --accent on purpose: #b0862e is 3.2:1 on
	                                        the ground, fine for large headings and button fills, not
	                                        for 14px nav links. */
	--trh-color-accent-on-dark: #c99b3f; /* gold text on the inverse surfaces (footer tagline) */

	/* Colour — green secondary (Learn More, Add to Cart, room Book Now).
	 * All three states kept: a button family needs rest/hover/active. */
	--trh-color-secondary:        #2c3a30;
	--trh-color-secondary-hover:  #3c4d41;
	--trh-color-secondary-active: #1f2a23;

	/* Colour — olive tertiary (eyebrows, feature titles, olive icon circles) */
	--trh-color-tertiary: #5f6a4c;

	/* Colour — text */
	--trh-color-heading:      #2f3d34; /* display and card headings, links at rest */
	--trh-color-text:         #3a3128; /* body, card text, input text */
	--trh-color-text-muted:   #8a7a5c; /* breadcrumbs, hints, placeholders */
	--trh-color-text-on-dark: #f2e9da; /* cream text on --inverse, on accent and secondary buttons,
	                                      and over photo overlays. NOTE: on --accent this is ~2.6:1,
	                                      as it was in the mockups (#fdf8ec). Button text must stay
	                                      large/bold or the fill must darken; flagged, not fixed here. */

	/* Colour — inverse (top bar, footer, photo overlays) */
	--trh-color-inverse: #1f1d19;

	/* Colour — feedback */
	--trh-color-error: #a4462b; /* invalid field border */

	/* ------------------------------------------------------------------
	 * Type — families
	 * ------------------------------------------------------------------ */
	--trh-font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif; /* headings, buttons, labels, nav */
	--trh-font-body:    'Lora', Georgia, 'Times New Roman', serif;             /* everything readable */
	--trh-font-script:  'Kaushan Script', 'Brush Script MT', cursive;          /* hero word, script headings, tagline */

	/* Type — scale. Six fluid steps, min at a 390px viewport, max at ~1200px.
	 * Derivation from the mockups' 24 sizes is in the build log; in short:
	 *   sm      13–15px   eyebrows, nav, small labels, breadcrumbs
	 *   base    16–18px   body, inputs, card text
	 *   lg      19–24px   leads, card titles, large buttons
	 *   xl      22–36px   form titles, signatures, hero kicker, footer tagline
	 *   2xl     30–52px   script section headings, wheat headings, room title
	 *   display 56–100px  the hero word only
	 */
	--trh-text-sm:      clamp(0.8125rem, 0.75rem + 0.25vw, 0.9375rem);
	--trh-text-base:    clamp(1rem,      0.94rem + 0.25vw, 1.125rem);
	--trh-text-lg:      clamp(1.1875rem, 1.04rem + 0.62vw, 1.5rem);
	--trh-text-xl:      clamp(1.375rem,  0.95rem + 1.73vw, 2.25rem);
	--trh-text-2xl:     clamp(1.875rem,  1.21rem + 2.72vw, 3.25rem);
	--trh-text-display: clamp(3.5rem,    2.18rem + 5.43vw, 6.25rem);

	/* Type — leading and tracking */
	--trh-leading-body:  1.6;   /* mockup body and most paragraphs (1.55–1.75 collapsed) */
	--trh-leading-tight: 1.1;   /* headings and the hero */
	--trh-tracking-caps: 0.1em; /* uppercase labels, nav and buttons (mockups: 1.5–3px; landing page: 0.08–0.1em) */

	/* ------------------------------------------------------------------
	 * Spacing — 4px base, roughly ×1.5 steps. The mockups' 22 distinct
	 * gaps/paddings map onto these (table in the build log).
	 * ------------------------------------------------------------------ */
	--trh-space-1:  0.25rem; /*  4px */
	--trh-space-2:  0.5rem;  /*  8px */
	--trh-space-3:  0.75rem; /* 12px */
	--trh-space-4:  1rem;    /* 16px */
	--trh-space-6:  1.5rem;  /* 24px */
	--trh-space-8:  2rem;    /* 32px */
	--trh-space-12: 3rem;    /* 48px */
	--trh-space-16: 4rem;    /* 64px */

	/* Spacing — fluid, for page-level rhythm only */
	--trh-gutter:        clamp(1rem, 4vw, 2.5rem);           /* 16–40px side gutter (mockup value kept) */
	--trh-space-section: clamp(2.5rem, 1.5rem + 4vw, 4rem);  /* 40–64px between sections */

	/* Layout widths (from the mockups; the theme's containers, not Astra's) */
	--trh-max-content: 1080px; /* default container */
	--trh-max-grid:    880px;  /* card grids: two columns of ~430px cards, as the mockups draw them.
	                              Added 2026-09-29 — at --max-content a third column would fit and
	                              the cards would shrink; at --max-narrow they would be smaller than
	                              the design. The products grid (960px in the mockups) should reuse
	                              this rather than add a fourth width. */
	--trh-max-narrow:  760px;  /* single-column text sections */

	/* ------------------------------------------------------------------
	 * Radii and shadows
	 * ------------------------------------------------------------------ */
	--trh-radius:      8px;     /* cards, images, panels */
	--trh-radius-sm:   4px;     /* buttons and inputs (mockups' 3/4/5px collapsed) */
	--trh-radius-pill: 9999px;  /* icon circles and anything fully round */

	--trh-shadow-sm: 0 2px 8px rgba(80, 60, 30, 0.08);  /* cards */
	--trh-shadow-md: 0 3px 10px rgba(90, 65, 20, 0.2);  /* large call-to-action buttons */
}
