/**
 * Design tokens.
 *
 * The single source of truth for colour, type, spacing, radii and shadow. Every
 * other stylesheet reads from these custom properties rather than hard-coding a
 * value, so a palette change happens in one place.
 *
 * The colour values mirror the palette declared in theme.json, which is what
 * feeds the editor colour pickers.
 */

:root {
	/* ---- Brand -------------------------------------------------------
	 *
	 * green-500 is the official Forestry Commission green, sampled directly
	 * from the supplied logo artwork (41,446 pixels of #157E3F, by a wide
	 * margin the dominant colour in the mark). Every other green is derived
	 * from it by holding hue 144 and moving saturation and lightness, so the
	 * whole scale stays on-brand rather than approximated.
	 */
	--fcx-green-950: #05170c; /* footer, deepest overlays */
	--fcx-green-900: #092213; /* deep bands */
	--fcx-green-800: #0d2e1a; /* raised surfaces on dark */
	--fcx-green-700: #114325; /* mid-dark panels */
	--fcx-green-600: #145f32; /* hover and pressed states */
	--fcx-green-500: #157e3f; /* OFFICIAL PRIMARY */
	--fcx-green-400: #249b54; /* light accent on dark */
	--fcx-green-300: #39c671;

	/* The bright editorial accent from the reference: italic headings, small
	 * indicators, pill CTAs and link arrows. Never used for body text. */
	--fcx-lime: #d8f27b;
	--fcx-lime-dim: #b9d95c;

	/* ---- Neutrals ---- */
	--fcx-black:  #0b0f0a; /* near-black, navigation and headings */
	--fcx-ink:    #10160f; /* body headings */
	--fcx-body:   #3f4a42; /* body copy */
	--fcx-muted:  #5d6a61; /* metadata, captions */
	--fcx-white:  #ffffff;
	--fcx-paper:  #fbfaf5; /* warm off-white, main surface */
	--fcx-cream:  #f4f1e8; /* secondary warm surface */

	/* Text on the dark green bands. */
	--fcx-on-dark:       #f4f6f0;
	--fcx-on-dark-body:  rgba(244, 246, 240, 0.80);
	--fcx-on-dark-muted: rgba(244, 246, 240, 0.60);

	/* Hairlines. The design leans on rules rather than shadow. */
	--fcx-rule:           rgba(16, 22, 15, 0.12);
	--fcx-rule-strong:    rgba(16, 22, 15, 0.24);
	--fcx-rule-dark:      rgba(244, 246, 240, 0.22);
	--fcx-rule-dark-soft: rgba(244, 246, 240, 0.13);

	/* ---- Type --------------------------------------------------------
	 *
	 * Newsreader is the editorial serif carrying the display headings, and
	 * its italic is a load-bearing part of the design: the second line of
	 * most headings is set in italic lime. Inter does the navigation, body
	 * copy, labels and controls.
	 */
	--fcx-font-display: Newsreader, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
	--fcx-font-sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

	--fcx-text-micro:   0.6875rem;
	--fcx-text-eyebrow: 0.75rem;
	--fcx-text-sm:      0.8125rem;
	--fcx-text-base:    0.9375rem;
	--fcx-text-lg:      1.0625rem;
	--fcx-text-xl:      clamp(1.15rem, 1.5vw, 1.3rem);
	--fcx-text-2xl:     clamp(1.4rem, 2.2vw, 1.85rem);
	--fcx-text-3xl:     clamp(2rem, 4.2vw, 3.4rem);
	--fcx-text-4xl:     clamp(2.4rem, 5.2vw, 4rem);
	--fcx-text-hero:    clamp(2.6rem, 6.6vw, 5.6rem);
	--fcx-text-stat:    clamp(1.9rem, 3.2vw, 2.75rem);

	--fcx-leading-tight: 1.06;
	--fcx-leading-snug:  1.22;
	--fcx-leading-body:  1.7;

	--fcx-tracking-eyebrow: 0.16em;

	/* ---- Space ---- */
	--fcx-gutter: clamp(1.25rem, 4vw, 3rem);
	--fcx-container: 1240px;

	--fcx-space-1: 0.5rem;
	--fcx-space-2: 1rem;
	--fcx-space-3: 1.75rem;
	--fcx-space-4: 3rem;
	--fcx-section: clamp(3.75rem, 7.5vw, 7rem);

	/* ---- Shape -------------------------------------------------------
	 * Restrained. The reference uses near-square corners and hairlines, not
	 * rounded cards, which is a large part of its institutional character.
	 */
	--fcx-r-sm:   2px;
	--fcx-r-md:   4px;
	--fcx-r-lg:   8px;
	--fcx-r-pill: 999px;

	/* ---- Shadow. Used very sparingly. ---- */
	--fcx-shadow-sm: 0 1px 2px rgba(5, 23, 12, 0.06);
	--fcx-shadow-md: 0 12px 34px rgba(5, 23, 12, 0.12);
	--fcx-shadow-lg: 0 28px 70px rgba(5, 23, 12, 0.24);

	/* ---- Motion ------------------------------------------------------
	 * Shared by the scroll-reveal system so duration and easing can be
	 * retuned in one place.
	 */
	--fcx-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
	--fcx-duration: 240ms;
	--fcx-reveal-duration: 720ms;
	--fcx-reveal-distance: 22px;
	--fcx-reveal-stagger: 90ms;

	/* ---- Chrome ---- */
	--fcx-header-height: 74px;
	--fcx-utility-height: 34px;
}

/*
 * Reduced motion is honoured globally rather than per component. Every
 * transition in this theme is decorative; none of them carry meaning.
 */
@media (prefers-reduced-motion: reduce) {
	:root {
		--fcx-duration: 0ms;
		--fcx-reveal-duration: 0ms;
		--fcx-reveal-distance: 0px;
		--fcx-reveal-stagger: 0ms;
	}

	html {
		scroll-behavior: auto !important;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}
