/* Design tokens: colours, type, spacing and motion shared by every component. */

@font-face {
  font-family: "TeX Gyre Schola";
  src: url("../assets/fonts/texgyreschola-regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "TeX Gyre Schola";
  src: url("../assets/fonts/texgyreschola-bold.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}

/* Host Grotesk (SIL OFL), self-hosted: one variable file covers 400 to 600. Subsets and ranges as Google Fonts serves them. */
@font-face {
  font-family: "Host Grotesk";
  src: url("../assets/fonts/host-grotesk-latin.woff2") format("woff2");
  font-weight: 400 600; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Host Grotesk";
  src: url("../assets/fonts/host-grotesk-latin-ext.woff2") format("woff2");
  font-weight: 400 600; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* brand */
  --brand: #18a83a;          /* A · logo green, accents on dark only */
  --brand-hi: #4fcf6c;       /* readable brand tint for small text on forest */
  --forest: #1b7a4a;         /* B · text, links and buttons on light */
  --forest-hover: #156139;
  --forest-deep: #0e3b26;    /* C · dark chapters */
  --forest-deeper: #0a2c1c;
  --forest-mid: #154d33;

  /* neutrals */
  --ink: #0b0f0d;
  --text: #13201a;
  --muted: #4c5a52;
  --paper: #f4f5f2;
  --paper-2: #e8ebe6;
  --white: #ffffff;
  --silver: #b4b4b4;
  --on-dark: #eef2ee;
  --on-dark-muted: #b8d4c2;   /* a tint of the forest, not grey: 7.9:1 on forest-deep */
  --line: rgba(19, 32, 26, .14);
  --line-strong: rgba(19, 32, 26, .32);
  --line-dark: rgba(238, 242, 238, .16);
  --line-dark-strong: rgba(238, 242, 238, .34);
  --foam: #e3c66a;           /* rigid foam in the traditional sandwich */

  /* chrome: the silver slash of the logo */
  --chrome: linear-gradient(100deg, #8e9499 0%, #e9ecee 38%, #a9aeb2 56%, #f6f7f8 76%, #9ca1a5 100%);

  /* type */
  --serif: "TeX Gyre Schola", "Century Schoolbook", "Century Schoolbook L", Georgia, serif;
  --sans: "Host Grotesk", "Helvetica Neue", Arial, sans-serif;
  --fs-body: 1.0625rem;
  --fs-small: .875rem;
  --fs-eyebrow: .78rem;
  --fs-h4: clamp(1.2rem, 1.5vw, 1.4rem);
  --fs-h3: clamp(1.7rem, 2.6vw, 2.4rem);
  --fs-h2: clamp(2.3rem, 4.6vw, 4.2rem);
  --fs-display-2: clamp(2.6rem, 6vw, 5.6rem);
  --fs-display: clamp(2.5rem, 5.6vw, 5.8rem);

  /* space and shape */
  --gut: clamp(16px, 2.4vw, 36px);
  --max: 1480px;
  --sec: clamp(88px, 10vw, 168px);
  --r: 10px;
  --r-sm: 6px;

  /* motion */
  --ease: cubic-bezier(.65, .05, 0, 1);
  --ease-out: cubic-bezier(.19, 1, .22, 1);
  --dur: .7s;

  /* theme slots, flipped by .dark */
  --bg: var(--paper);
  --fg: var(--text);
  --fg-muted: var(--muted);
  --accent: var(--forest);
  --accent-hover: var(--forest-hover);
  --on-accent: var(--white);
  --accent-text: var(--forest);
  --rule: var(--line);
  --rule-strong: var(--line-strong);
  --surface: var(--white);

  color-scheme: light;
}

.dark {
  --bg: var(--forest-deep);
  --fg: var(--on-dark);
  --fg-muted: var(--on-dark-muted);
  --accent: var(--brand);
  --accent-hover: var(--brand-hi);
  --on-accent: var(--ink);
  --accent-text: var(--brand-hi);
  --rule: var(--line-dark);
  --rule-strong: var(--line-dark-strong);
  --surface: var(--forest-deeper);
  color-scheme: dark;
}
