/* VANTAGE & VELLUM tokens: the single source of truth. Re-skin here first. */

@font-face {
  font-family: "Spectral";
  src: url("../fonts/spectral-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Spectral";
  src: url("../fonts/spectral-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Spectral";
  src: url("../fonts/spectral-500-italic.woff2") format("woff2");
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Commissioner";
  src: url("../fonts/commissioner-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* primitives: vellum sheet, iron-gall ink, raw-ochre route ink.
     Some steps are deliberately unused on the demo pages; the scale
     leaves room for re-skins to move. */
  --vellum: #f5efe2;
  --vellum-2: #ede4d0;
  --vellum-3: #e3d7bd;
  --ink: #2b2620;
  --ink-2: #38322a;
  --ink-3: #4a4236;
  --white: #fffdf8;
  --drab: #7d7466;
  --drab-2: #a49a88;
  /* raw-ochre route ink, two strengths. A true yellow-orange earth, well
     yellow of any terracotta or amaro: L62 C45 h74 bright, L33 C39 h72
     deep (CIE LCh). Measured: bright on --ink 5.06:1, deep on --vellum
     7.31:1. Both AA at label sizes on the ground each one is for. Bright
     on vellum is 2.59:1, so bright is never lettering on the sheet: on
     ink surfaces it carries ink lettering instead (see .seal under
     [data-theme="ink"]). */
  --ochre: #c08c48;      /* bright: lettering + marks on ink surfaces */
  --ochre-deep: #6d450e; /* deep: lettering + marks on the vellum sheet */

  /* semantic (vellum sheet is the default) */
  --bg: var(--vellum);
  --bg-2: var(--vellum-2);
  --fg: var(--ink);
  --muted: #635a4c;
  --line: rgba(43, 38, 32, 0.18);
  --line-strong: rgba(43, 38, 32, 0.55);
  --accent: var(--ochre-deep);
  --accent-raw: var(--ochre);
  --focus: #1c4d8f;

  /* type */
  --font-display: "Spectral", "Iowan Old Style", Georgia, serif;
  --font-body: "Commissioner", "Avenir Next", "Segoe UI", sans-serif;
  --t-display: clamp(2.4rem, 8.5vw, 7.5rem);
  --t-h1: clamp(2.3rem, 6vw, 5.25rem);
  --t-h2: clamp(1.9rem, 4.2vw, 3.4rem);
  --t-h3: clamp(1.3rem, 2.3vw, 1.85rem);
  --t-lead: clamp(1.12rem, 1.7vw, 1.42rem);
  --t-body: 1.0625rem;
  --t-small: 0.875rem;
  --t-label: 0.72rem;
  --lh-tight: 1.02;
  --lh-heading: 1.12;
  --lh-body: 1.58;
  --track-label: 0.16em;

  /* space */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4rem;
  --s-9: 6rem;
  --s-10: 9rem;
  --section-pad: clamp(5rem, 12vh, 9rem);
  --gutter: clamp(1rem, 2.5vw, 1.5rem);
  --edge: clamp(1.25rem, 4vw, 4rem);
  --measure: 40rem;
  --max-w: 84rem;

  /* shape + depth */
  --r-1: 3px;
  --r-2: 8px;
  --r-plate: 2px;
  --rule-double: 3px double var(--line-strong);
  --shadow-plate: 0 1px 2px rgba(43, 38, 32, 0.08), 0 12px 32px rgba(43, 38, 32, 0.1);

  /* motion */
  --dur-1: 140ms;
  --dur-2: 300ms;
  --dur-3: 620ms;
  --dur-4: 1100ms;
  --ease-out: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-inout: cubic-bezier(0.83, 0, 0.17, 1);

  /* layers */
  --z-chrome: 40;
  --z-folio: 50;
  --z-skip: 60;
}

/* ink theme: any element with data-theme="ink" flips the semantic set */
[data-theme="ink"] {
  --bg: var(--ink);
  --bg-2: var(--ink-2);
  --fg: var(--vellum);
  --muted: #b3a992;
  --line: rgba(245, 239, 226, 0.2);
  --line-strong: rgba(245, 239, 226, 0.62);
  --accent: var(--ochre);
  --focus: #9dbdf2;
}
