/* =========================================================
   Design tokens
   The single source of truth for colour, type and space.
   Maps 1:1 to theme.json when the design moves into the
   WordPress child theme (palette, fontFamilies, fontSizes,
   spacingSizes, custom).
   ========================================================= */

:root {
	/* ---------- Colour ---------- */
	--ground:       #FBFAF7; /* page background, warm off-white */
	--paper:        #F3F0E9; /* quiet panels, drawing sheets */
	--paper-deep:   #EAE5DA;
	--ink:          #161616; /* text, rules, dark bands */
	--ink-soft:     #2B2926;
	--muted:        #5E5B55; /* secondary text, 6.4:1 on ground */
	--stone:        #8C877F; /* data graphics only, never body text */
	--rule:         #E2DED6; /* hairlines */
	--rule-strong:  #C9C3B8;
	--placeholder:  #E6E1D7;

	--corten:       #A8461F; /* the one accent */
	--corten-deep:  #8A3816;
	--corten-light: #E3A27F; /* accent text on ink */

	--on-ink:        #F3F0EA;
	--on-ink-muted:  #ABA59A; /* 7.6:1 on ink */
	--rule-on-ink:   #34312D;

	/* ---------- Typefaces ----------
	   One display face for every heading, one body face for
	   everything else (paragraphs, navigation, labels, buttons, data). */
	--font-display: "Newsreader", "Iowan Old Style", Georgia, serif;
	--font-body:    "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;

	/* ---------- Type scale ----------
	   Fluid between 375px and 1440px viewports. Each step is used
	   for exactly one role across the whole site. */
	--fs-display: clamp(3.4rem, 1.65rem + 7.4vw, 8.75rem); /* H1, hero only */
	--fs-h2:      clamp(2.25rem, 1.72rem + 2.25vw, 3.75rem); /* section titles */
	--fs-h3:      clamp(1.625rem, 1.38rem + 1.05vw, 2.375rem); /* featured titles */
	--fs-h4:      clamp(1.25rem, 1.17rem + 0.35vw, 1.5rem);  /* card titles */
	--fs-lead:    clamp(1.0625rem, 1rem + 0.27vw, 1.25rem);
	--fs-body:    1rem;
	--fs-small:   0.875rem;
	--fs-label:   0.75rem;
	--fs-nav:     0.8125rem;

	--lh-display: 0.94;
	--lh-h2:      1.05;
	--lh-h3:      1.12;
	--lh-h4:      1.3;
	--lh-lead:    1.55;
	--lh-body:    1.6;
	--lh-small:   1.5;

	--ls-display: -0.035em;
	--ls-h2:      -0.025em;
	--ls-h3:      -0.018em;
	--ls-h4:      -0.008em;
	--ls-label:   0.14em;
	--ls-nav:     0.12em;

	--fw-display: 400;
	--fw-body:    400;
	--fw-medium:  500;
	--fw-strong:  600;

	/* ---------- Space ----------
	   A fixed scale, plus a handful of semantic tokens that
	   every section uses in the same way. */
	--space-3xs: 4px;
	--space-2xs: 8px;
	--space-xs:  12px;
	--space-sm:  16px;
	--space-md:  24px;
	--space-lg:  32px;
	--space-xl:  48px;
	--space-2xl: 64px;
	--space-3xl: 96px;

	--gutter:        clamp(20px, 0.8rem + 3.2vw, 64px);  /* container side padding */
	--section-space: clamp(72px, 3.6rem + 5.2vw, 144px); /* between sections */
	--head-space:    clamp(32px, 1.6rem + 1.9vw, 56px);  /* section head → content */
	--title-gap:     var(--space-sm);                    /* heading → description */
	--label-gap:     var(--space-xs);                    /* label → heading */
	--media-gap:     var(--space-sm);                    /* image → card text */
	--text-gap:      var(--space-2xs);                   /* lines inside a card */
	--grid-gap:      clamp(16px, 0.75rem + 1.2vw, 32px);
	--grid-gap-wide: clamp(32px, 1rem + 3.4vw, 80px);
	--control-gap:   var(--space-xs);                    /* between buttons */

	/* ---------- Layout ---------- */
	--max:      1360px;
	--measure:  62ch;
	--nav-h:    56px;
	--bar-h:    64px;  /* mobile header */

	/* ---------- Article layout ----------
	   Every article width comes from here (article.css). Each is the
	   width of the content itself; the side gutter is added outside it. */
	--article-max:     1240px; /* article container, hero, related */
	--article-head:    900px;  /* title, standfirst, byline */
	--article-read:    740px;  /* the reading column */
	--article-wide:    1040px; /* tables, charts, wide images */
	--article-related: 1240px;

	--article-fs:      clamp(1.0625rem, 1.02rem + 0.18vw, 1.125rem); /* 17px → 18px */
	--article-lh:      1.7;
	--article-flow:    1.15em; /* paragraph to paragraph */
	--article-title:   clamp(2.25rem, 1.55rem + 2.9vw, 4rem);

	--hero-ratio:      4 / 3;  /* phones; 3:2 tablets, 16:10 desktop */
	--card-ratio:      3 / 2;

	/* ---------- Motion ---------- */
	--ease:      cubic-bezier(0.22, 1, 0.36, 1);
	--ease-io:   cubic-bezier(0.65, 0, 0.35, 1);
	--dur-fast:  180ms;
	--dur:       450ms;
	--dur-slow:  900ms;
}
