/* Design tokens. Custom properties only; no component rules live here.
   Values are fixed by sections 2, 3, 4 and 7 of the design contract. */

:root {
  /* Palette */
  --ivory: #F4F0E6;        /* page ground */
  --ivory-2: #EDE7D9;      /* paper cards, product-frame chrome */
  --ivory-3: #E4DCCB;      /* deeper paper, hover, inset */
  --soil: #172018;         /* ink; contact/footer ground */
  --ink-2: rgba(23,32,24,.72);   /* secondary text on ivory */
  --ink-3: rgba(23,32,24,.52);   /* large or decorative text only, never body */
  --rule: rgba(23,32,24,.14);    /* hairline */
  --rule-strong: rgba(23,32,24,.30);
  --crop: #557446;         /* structural accent, eyebrows, active states, links */
  --crop-soft: #7E9A6B;    /* accent on dark panels */
  --crop-wash: rgba(85,116,70,.12);
  --forest: #203A2A;       /* institutional dark section */
  --forest-deep: #16291E;  /* deepest panel inside forest */
  --harvest: #D5A94F;      /* decisions and the single moving marker */
  --harvest-soft: rgba(213,169,79,.22);
  --sky: #9BBBD1;          /* atmosphere washes only, never UI fills */
  --sky-wash: rgba(155,187,209,.18);
  --state-missing: #8F5E14;
  --state-missing-wash: rgba(183,121,31,.14);
  --state-alert: #A63D12;
  --on-dark: #F4F0E6;
  --on-dark-2: rgba(244,240,230,.72);
  --rule-on-dark: rgba(244,240,230,.14);
  --paper-shadow: 0 1px 0 rgba(23,32,24,.06), 0 14px 34px -14px rgba(23,32,24,.30);
  --frame-shadow: 0 1px 0 rgba(23,32,24,.08), 0 34px 70px -34px rgba(23,32,24,.45);

  /* Contextual: light grounds by default; dark grounds override these. */
  --ink-secondary: var(--ink-2);
  --hairline: var(--rule);
  --accent: var(--crop);
  --focus-ring: var(--crop);
  --button-bg: var(--soil);
  --button-fg: var(--ivory);

  /* Typography */
  --font-sans: "Schibsted Grotesk", "Helvetica Neue", Arial, system-ui, sans-serif;
  --font-serif: "Newsreader", "Iowan Old Style", Charter, Georgia, serif;

  --text-display: clamp(2.75rem, 1.5rem + 4.8vw, 5.75rem);
  --text-h2: clamp(2rem, 1.3rem + 2.4vw, 3.25rem);
  --text-h3: clamp(1.25rem, 1.1rem + .6vw, 1.5rem);
  --text-lede: clamp(1.125rem, 1rem + .5vw, 1.375rem);
  --text-body: 1.0625rem;
  --text-small: .9375rem;
  --text-label: .75rem;
  --text-figure: .9375rem;

  --measure: 62ch;
  --measure-lede: 36ch;
  --measure-display: 13ch;

  /* Layout */
  --container: 1240px;
  --gutter: clamp(20px, 4vw, 48px);
  --grid-gap: clamp(16px, 2.5vw, 32px);
  --section-pad: clamp(64px, 7.5vw, 104px);        /* chapter start */
  --section-pad-bottom: clamp(56px, 6vw, 92px);    /* chapter end */
  --beat-pad: clamp(48px, 5.5vw, 76px);            /* a beat inside a chapter, under a hairline */
  --nav-height: 72px;
  --nav-compact-height: 56px;
  --hero-overlap: 120px;

  --radius-chip: 4px;
  --radius-button: 6px;
  --radius-paper: 4px;
  --radius-frame: 10px;

  /* Motion */
  --ease-field: cubic-bezier(.22,.61,.21,1);   /* paper with weight */
  --ease-snap: cubic-bezier(.3,0,.1,1);        /* values, states */
  --dur-paper: 900ms;
  --dur-stage: 600ms;
  --dur-value: 240ms;
  --dur-hairline: 400ms;
  --dur-hover: 160ms;
}
