/*
 * Design tokens for the ISARCH V2 child theme (CSS custom properties).
 *
 * Brand source: docs/brand/isarch.md section 4; rules: docs/specs/isarch-v2.md
 * section 6. Tokens only: no element is styled here.
 *
 * Fixed colours (owner rule, 2026-10-08): --isarch-yellow #FFDD29 and
 * --isarch-black #000000 never change. Every other colour may be adjusted for
 * contrast and the dark stage design; record each change, with the old value
 * and the reason, in docs/brand/isarch.md section 4. The other values below
 * start from the V1 palette.
 *
 * Contrast (WCAG AA, measured in the spec): yellow text only on dark
 * backgrounds (13.1:1 on --isarch-ink, 1.3:1 on light backgrounds);
 * --isarch-stone text only on light backgrounds (5.8:1 on --isarch-paper,
 * 2.8:1 on dark backgrounds).
 */
:root {
	/* Brand colours: fixed. */
	--isarch-yellow: #FFDD29;
	--isarch-black: #000000;

	/* Palette: adjustable (V1 values). */
	--isarch-yellow-soft: #FFED5D;
	--isarch-ink: #1E1810;
	--isarch-stone: #62615C;
	--isarch-paper: #F8F7F3;
	--isarch-white: #FFFFFF;

	/*
	 * Palette additions for the V2 dark stage (2026-10-08, phase 4a). Measured
	 * contrast (WCAG 2): --isarch-mist is muted text on dark backgrounds
	 * (8.0:1 on --isarch-ink, 9.6:1 on black); --isarch-ink-raised is a raised
	 * dark surface (paper text 14.3:1 on it); the two line colours are
	 * decorative borders only, never the only boundary of a control.
	 */
	--isarch-mist: #B3AFA6;
	--isarch-ink-raised: #2B241A;
	--isarch-line-dark: #4A4236;
	--isarch-line-light: #D9D5CB;
	/*
	 * Second motion version (2026-10-08, motion spec section 7, approved by
	 * the owner). ESG green: accents, borders and ESG labels on dark grounds
	 * only (7.72:1 on --isarch-ink-raised), never body text; the deep green
	 * is for decoration on light grounds (4.76:1 on paper). Award labels:
	 * dark text on gold 12.62:1, silver 9.97:1, bronze 6.06:1.
	 */
	--isarch-green: #8FC4A0;
	--isarch-green-deep: #3E7A55;
	--isarch-rank-gold: #FFDD29;
	--isarch-rank-silver: #C9CDD3;
	--isarch-rank-bronze: #C8875A;
	--isarch-rank-esg: #8FC4A0;
	--isarch-rank-winner: #B3AFA6;
	/* The ground colour of the V1 logo file (an opaque PNG, kept as it is,
	 * owner rule 2026-10-08), used for the header and footer so the logo
	 * shows no box. */
	--isarch-logo-ground: #080404;

	/* Roles. Dark stage for most pages, light reading version for articles. */
	--isarch-color-accent: var(--isarch-yellow);
	--isarch-color-accent-soft: var(--isarch-yellow-soft);
	--isarch-color-on-accent: var(--isarch-ink);
	--isarch-color-stage-bg: var(--isarch-ink);
	--isarch-color-stage-text: var(--isarch-paper);
	--isarch-color-reading-bg: var(--isarch-paper);
	--isarch-color-reading-text: var(--isarch-ink);
	--isarch-color-reading-muted: var(--isarch-stone);
	--isarch-color-stage-muted: var(--isarch-mist);
	--isarch-color-chrome-bg: var(--isarch-logo-ground);
	/* Focus indicator: yellow on dark, ink on light (both at least 13:1). */
	--isarch-focus-on-dark: var(--isarch-yellow);
	--isarch-focus-on-light: var(--isarch-ink);

	/* Typography: self-hosted files in assets/fonts (see fonts.css). */
	--isarch-font-display: "Archivo", "Archivo Fallback", "Helvetica Neue", Arial, sans-serif;
	--isarch-font-body: "Inter", "Inter Fallback", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	--isarch-weight-light: 300;
	--isarch-weight-regular: 400;
	--isarch-weight-medium: 500;
	--isarch-weight-semibold: 600;
	--isarch-weight-bold: 700;
	--isarch-weight-extrabold: 800;
	--isarch-weight-black: 900;

	/* Spacing scale (rem, 16px root). */
	--isarch-space-1: 0.25rem;
	--isarch-space-2: 0.5rem;
	--isarch-space-3: 0.75rem;
	--isarch-space-4: 1rem;
	--isarch-space-5: 1.5rem;
	--isarch-space-6: 2rem;
	--isarch-space-7: 3rem;
	--isarch-space-8: 4rem;
	--isarch-space-9: 6rem;

	/* Layout. Content width as on V1 (1200px). */
	--isarch-content-width: 1200px;
	--isarch-gutter: clamp(1rem, 4vw, 2.5rem);
	--isarch-radius: 20px;
	--isarch-radius-pill: 999px;
	--isarch-reading-width: 46rem;
	/* Height of the sticky header; scroll-padding keeps focus and anchors clear of it. */
	--isarch-header-height: 4.5rem;
}

/* Compact header (menu button) below 80em, the same breakpoint as the
   navigation in site.css and navigation.js. */
@media (max-width: 79.999em) {
	:root {
		--isarch-header-height: 4rem;
	}
}
