/* Design tokens: the one place to change colour, type and spacing.
   Taken from a printed book page: warm white paper, black text, one crimson for
   titles, numerals, drop caps and ornaments. All text colours pass WCAG AA (most AAA)
   against --paper; the defaults are deliberately large. */

@font-face {
  font-family: "EB Garamond";
  src: url("../fonts/EBGaramond.woff2") format("woff2");
  font-weight: 400 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "EB Garamond";
  src: url("../fonts/EBGaramond-Italic.woff2") format("woff2");
  font-weight: 400 800; font-style: italic; font-display: swap;
}
/* GFS Porson with the ano teleia (U+00B7) mapped; see fonts/OFL-GFSPorson.txt. */
@font-face {
  font-family: "Stobaeus Porson";
  src: url("../fonts/StobaeusPorson.woff2") format("woff2");
  font-display: swap;
}

:root {
  --paper: #FFFDF8;
  --paper-2: #F7F2E8;      /* figures, cards */
  --ink: #1A1714;          /* 17.6:1 */
  --ink-2: #5C544B;        /* secondary text, 7.3:1 */
  --rubric: #A3202A;       /* crimson, 7.4:1 */
  --rule: #E4D9C8;

  --serif: "EB Garamond", "Garamond", "Iowan Old Style", Georgia, serif;
  --greek: "Stobaeus Porson", "GFS Porson", "Gentium Plus", "EB Garamond", serif;

  /* Compact, dashboard-like scale: 1rem = 16px; Garamond body at 18px reads like
     a 16px sans because of its small x-height. */
  --text: 1.125rem;
  --text-small: .9375rem;
  --h1: clamp(1.9rem, 5vw, 2.6rem);
  --h2: clamp(1.3rem, 3.4vw, 1.7rem);
  --numeral: 1.2rem;
  --leading: 1.5;

  --measure: 38em;         /* reading column */
  --gutter: 1rem;          /* 16px+ side margin at phone width */
  --space-1: .5rem;
  --space-2: 1rem;
  --space-3: 1.75rem;
  --space-4: 3rem;
  --radius: 4px;
  --focus: 3px solid var(--rubric);

  color-scheme: light;
}

@media (max-width: 30em) {
  :root { --text: 1.0625rem; --leading: 1.5; }
}
