/**
 * Design tokens.
 *
 * The five brand colours are sampled from the live stylesheet; paper and linen
 * are the two additions agreed in the concept decks. Nothing else is invented.
 *
 * Single visual world by design — this is a brand surface, not a themeable app,
 * so every colour is painted explicitly and the page does not follow the
 * viewer's OS colour scheme.
 */
:root{
  color-scheme: light;

  /* brand */
  --eg-teal:#008090;
  --eg-teal-ink:#00636F;      /* teal at text contrast on paper */
  --eg-teal-deep:#044E58;
  --eg-mist:#B2D2D6;
  --eg-ink:#161619;
  --eg-linen:#E3DCCE;

  /* grounds and neutrals — biased warm-cool toward the accent, not pure grey */
  --eg-paper:#F7F5EF;
  --eg-card:#FCFBF6;
  --eg-white:#FFFFFF;
  --eg-ink-2:#4C5450;
  /* ink-3 was #8A8F87, which measured 3.03:1 on paper and 3.19:1 on card —
     both short of the 4.5:1 body text needs, across all 37 places it is used.
     None of them is large text; the scale there is 10.9px and 13.1px. Same
     hue, same saturation, dropped in value until it passes: 4.60 and 4.84. */
  --eg-ink-3:#6B7168;
  --eg-rule:#DED8C8;
  --eg-rule-2:#CFC6AF;
  /* rule-2 is a decorative hairline and is right to be faint. The boundary of
     a control is not decoration — WCAG 1.4.11 asks 3:1 for it, and rule-2
     manages 1.70:1 against a white field. Interactive borders use this
     instead, so the rules stay delicate and the controls stay visible. */
  --eg-field-line:#999281;

  /* state */
  --eg-ok:#1D7A52;
  --eg-warn:#8F4A1E;
  --eg-warn-bg:rgba(176,88,40,.08);

  /* type */
  --eg-serif:"EB Garamond", "Times New Roman", serif;
  --eg-display:"Italiana", "EB Garamond", serif;
  --eg-ui:"Alexandria", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --eg-mono:"IBM Plex Mono", ui-monospace, monospace;

  /* modular scale, 1.414 — a wider interval reads as more editorial than 1.333,
     which keeps display and body too close together */
  --eg-s--2:0.68rem;
  --eg-s--1:0.82rem;
  --eg-s-0:1rem;
  --eg-s-1:1.41rem;
  --eg-s-2:2rem;
  --eg-s-3:2.83rem;
  --eg-s-4:4rem;
  --eg-s-5:5.65rem;

  /* motion — slow and eased. Nothing snaps. */
  --eg-ease:cubic-bezier(.22,.61,.36,1);
  --eg-ease-out:cubic-bezier(.16,1,.3,1);
  --eg-t-fast:220ms;
  --eg-t:420ms;
  --eg-t-slow:900ms;

  /* hairline used for every rule and underline */
  --eg-hair:1px;

  /* How far the sticky header reaches, plus air. Used for scroll-padding so
     focus and in-page links never land underneath it. Measured rather than
     guessed, because the header is not one height: 68px at 1440, 84px on a
     phone, and 107px around 1024 where the nav wraps to two lines. This
     covers the tallest — over-reserving only seats the target lower on the
     screen, while under-reserving hides it, which is the actual failure. */
  --eg-header-clear:120px;

  /* spacing */
  --eg-space-1:4px;
  --eg-space-2:8px;
  --eg-space-3:14px;
  --eg-space-4:22px;
  --eg-space-5:34px;
  --eg-space-6:54px;
  --eg-space-7:86px;
  --eg-space-8:132px;

  /* The footer's own floor. The concierge pill is anchored to the viewport,
     not the page, so at the very bottom it covers the last 78px — which is
     where the legal links sit. This keeps them clear of it on both sides,
     since the pill flips with the writing direction. */
  --eg-footer-pad-end:98px;

  --eg-measure:66ch;
  --eg-wrap:1220px;
  --eg-shadow:0 1px 2px rgba(22,22,25,.05), 0 14px 34px -22px rgba(4,78,88,.4);
}

/* Arabic prefers a slightly larger optical size at the same nominal size. */
:root:lang(ar),
[dir="rtl"]{
  --eg-serif:"Alexandria", ui-sans-serif, sans-serif;
  --eg-display:"Alexandria", ui-sans-serif, sans-serif;
}
