/* ==========================================================================
   Wild Field — design tokens
   Ported verbatim from design-system/tokens/{colors,typography,spacing,base}.css.
   Values are authoritative: reach for a token before a literal.
   ========================================================================== */

:root {
  /* --- Colour: base palette ---------------------------------------------- */
  --wf-ink: #15171B;
  --wf-ink-2: #3F3E3B;
  --wf-ink-muted: #676660;   /* 4.94:1 on paper, 4.55:1 on the alt band — #6B6A66 measured only 4.27 on alt */
  --wf-ink-faint: #A9A59C;
  --wf-paper: #F2EDE4;
  --wf-paper-2: #E9E4DA;
  --wf-paper-3: #E1DCD1;
  --wf-white: #FFFFFF;
  --wf-green: #3D8B5F;
  --wf-blue: #3A6FC4;
  --wf-green-deep: #2F6E4A;   /* accent text on paper — 5.3:1 */
  --wf-blue-deep: #2C579C;    /* accent text on paper — 6.3:1 */
  --wf-green-light: #6FB98A;  /* accent text on ink — 7.7:1 */
  --wf-blue-light: #7FA9E8;   /* accent text on ink — 7.5:1 */

  /* --- Colour: semantic --------------------------------------------------- */
  --surface-page: var(--wf-paper);
  --surface-alt: var(--wf-paper-2);
  --surface-inverse: var(--wf-ink);
  --text-body: var(--wf-ink);
  --text-secondary: var(--wf-ink-2);
  --text-muted: var(--wf-ink-muted);
  --text-inverse: var(--wf-paper);
  --text-inverse-muted: var(--wf-ink-faint);
  /* Fills: flat blocks, squares, logo, isolines — never small text */
  --accent-primary: var(--wf-green);
  --accent-secondary: var(--wf-blue);
  /* Text: use these whenever an accent carries words */
  --text-accent: var(--wf-green-deep);
  --text-accent-2: var(--wf-blue-deep);
  --text-accent-inverse: var(--wf-green-light);
  --text-accent-2-inverse: var(--wf-blue-light);
  --focus-ring: var(--wf-blue-deep);
  --border-subtle: rgba(21, 23, 27, 0.18);
  --border-strong: var(--wf-ink);
  --border-inverse: rgba(242, 237, 228, 0.2);
  --link: var(--wf-ink);
  --link-hover: var(--wf-blue-deep);
  --pattern-ink: rgba(21, 23, 27, 0.13);
  --pattern-paper: rgba(242, 237, 228, 0.16);

  /* --- Typography --------------------------------------------------------- */
  --font-display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --font-body: 'Space Grotesk', Helvetica, Arial, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;

  --weight-display: 600;
  --weight-display-light: 500;
  --weight-body: 400;
  --weight-body-medium: 500;

  --text-hero: clamp(56px, 9vw, 140px);
  --text-h1: clamp(40px, 5vw, 72px);
  --text-h2: clamp(32px, 4vw, 60px);
  --text-h3: clamp(26px, 2.4vw, 34px);   /* was fixed 34px: names and card heads did not scale */
  --text-h4: clamp(24px, 2.1vw, 30px);   /* was fixed 30px */
  --text-stat: clamp(40px, 4vw, 64px);
  --text-lead: clamp(17px, 1.4vw, 20px);
  --text-body-size: 17px;
  --text-body-sm: 16px;
  --text-ui: 15px;
  --text-caption: 14px;
  --text-label: 13px;
  --text-micro: 12px;

  --leading-display: 0.92;
  --leading-heading: 1;
  --leading-tight: 1.05;
  --leading-body: 1.5;
  --leading-relaxed: 1.55;

  --tracking-display: 0.005em;
  --tracking-wordmark: 0.18em;
  --tracking-label: 0.14em;
  --tracking-label-sm: 0.12em;

  /* --- Spacing, radii, borders -------------------------------------------- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 40px;
  --space-9: 48px;
  --space-10: 64px;
  --space-11: 96px;
  --space-12: 140px;

  --page-x: clamp(24px, 5vw, 72px);
  --section-y: clamp(64px, 9vw, 140px);
  --header-y: clamp(20px, 3vw, 36px);

  --radius-none: 0;
  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 8px;

  --border-w: 1px;
  --border-w-strong: 1.5px;
  --border-w-rule: 2px;

  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.15);

  --accent-square: 10px;
  --accent-square-sm: 8px;
}

/* ==========================================================================
   Base
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--surface-page);
  color: var(--text-body);
  font-family: var(--font-body);
  font-size: var(--text-body-size);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); }

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

/* Keyboard focus: a square ink/blue ring, never a browser default halo */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}
::selection { background: var(--wf-ink); color: var(--wf-paper); }

/* The brand is static; honour reduced motion regardless */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

@media print {
  body { background: #fff; }
  a { color: inherit; }
  .topo { display: none; }
}
