/* =========================================================================
   PERE Models design tokens (Fusion kit, approved November 2026).

   Type: Newsreader (display), Inter Tight (body / UI), Geist Mono (kickers,
   figures, labels). All three are SIL Open Font License faces, self-hosted in fonts/.

   Lime (#C8F23B) is the one accent. Never use lime as text on a light
   background. On paper, lime is a highlight fill with ink text on it
   (--pere-em-light). On ink, lime is text or fill (--pere-em-dark).

   MultiFamilyBooks is a sub-brand. Do not apply these --pere-* tokens to
   multifamilybooks.com, and do not restyle MFB pages to match this kit.
   See the MFB note at the bottom of this file.
   ========================================================================= */

/* --- Fonts ---------------------------------------------------------------
   Self-hosted latin faces (SIL Open Font License 1.1). Files and OFL
   texts live in fonts/. Do not load type from a third-party host.
   ---------------------------------------------------------------------- */
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/newsreader-latin-400-normal.woff2") format("woff2"),
       url("fonts/newsreader-latin-400-normal.woff") format("woff");
}
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/newsreader-latin-500-normal.woff2") format("woff2"),
       url("fonts/newsreader-latin-500-normal.woff") format("woff");
}
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/newsreader-latin-600-normal.woff2") format("woff2"),
       url("fonts/newsreader-latin-600-normal.woff") format("woff");
}
@font-face {
  font-family: "Newsreader";
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/newsreader-latin-500-italic.woff2") format("woff2"),
       url("fonts/newsreader-latin-500-italic.woff") format("woff");
}
@font-face {
  font-family: "Newsreader";
  font-style: italic;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/newsreader-latin-600-italic.woff2") format("woff2"),
       url("fonts/newsreader-latin-600-italic.woff") format("woff");
}
@font-face {
  font-family: "Inter Tight";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/inter-tight-latin-400-normal.woff2") format("woff2"),
       url("fonts/inter-tight-latin-400-normal.woff") format("woff");
}
@font-face {
  font-family: "Inter Tight";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/inter-tight-latin-500-normal.woff2") format("woff2"),
       url("fonts/inter-tight-latin-500-normal.woff") format("woff");
}
@font-face {
  font-family: "Inter Tight";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/inter-tight-latin-600-normal.woff2") format("woff2"),
       url("fonts/inter-tight-latin-600-normal.woff") format("woff");
}
@font-face {
  font-family: "Inter Tight";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/inter-tight-latin-700-normal.woff2") format("woff2"),
       url("fonts/inter-tight-latin-700-normal.woff") format("woff");
}
@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/geist-mono-latin-400-normal.woff2") format("woff2"),
       url("fonts/geist-mono-latin-400-normal.woff") format("woff");
}
@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/geist-mono-latin-500-normal.woff2") format("woff2"),
       url("fonts/geist-mono-latin-500-normal.woff") format("woff");
}

:root {
  /* Palette */
  --pere-ink: #0B2227;            /* dark field; text on light */
  --pere-ink-2: #112D33;          /* raised panel on ink */
  --pere-ink-3: #0E282D;          /* recessed panel on ink */
  --pere-slate: #41565A;          /* secondary text on paper (6.9:1) */
  --pere-mist: #A9BBBC;           /* secondary text on ink (8.3:1) */
  --pere-faint: #9AA8A8;          /* muted marks on paper */
  --pere-faint-on-ink: #587074;   /* muted marks on ink */
  --pere-paper: #F3F1EA;          /* light field */
  --pere-panel: #FBFAF6;          /* raised panel on paper */
  --pere-stone: #E8E6DC;          /* recessed panel / bar fill on paper */
  --pere-hairline: #D2D0C5;       /* rules on paper */
  --pere-hairline-on-ink: #25454B;/* rules on ink */
  --pere-lime: #C8F23B;           /* the one accent */
  --pere-error: #B3382E;          /* error / "before" only, on paper */
  --pere-error-on-ink: #FF8F82;

  /* Contrast, for reference:
     ink on paper 14.6:1 · slate on paper 6.9:1 · mist on ink 8.3:1
     lime on ink 12.7:1 · ink on lime 12.7:1. */

  /* Semantic aliases — default (light / paper page) */
  --pere-bg: var(--pere-paper);
  --pere-fg: var(--pere-ink);
  --pere-fg-muted: var(--pere-slate);
  --pere-border: var(--pere-hairline);
  --pere-surface: var(--pere-panel);
  --pere-surface-2: var(--pere-stone);
  --pere-accent: var(--pere-lime);
  --pere-accent-fg: var(--pere-ink); /* text/icons drawn on a lime fill */
  --pere-kicker: var(--pere-slate);

  /* Type */
  --pere-font-display: "Newsreader", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --pere-font-body: "Inter Tight", ui-sans-serif, system-ui, sans-serif;
  --pere-font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --pere-display-weight: 500;
  --pere-display-tracking: -0.018em;
  --pere-display-leading: 1.03;
  --pere-kicker-tracking: 0.14em;
  --pere-kicker-weight: 500;

  /* Aliases for peremodel.com (site/assets/tokens.css loads first; these override it).
     --accent is ink, not lime: lime is never text on paper, and links/buttons use --accent. */
  --bg: var(--pere-paper);
  --surface: var(--pere-panel);
  --text: var(--pere-ink);
  --muted: var(--pere-slate);
  --rule: var(--pere-hairline);
  --accent: var(--pere-ink);
  --accent-text: var(--pere-paper);
  --font-body: var(--pere-font-body);
  --font-display: var(--pere-font-display);
  --radius: 2px;
}

/* Dark band (hero, footer, cover): set on a wrapper, not on :root, so the
   rest of a paper page stays light. */
.pere-dark,
[data-pere-theme="dark"] {
  --pere-bg: var(--pere-ink);
  --pere-fg: var(--pere-paper);
  --pere-fg-muted: var(--pere-mist);
  --pere-border: var(--pere-hairline-on-ink);
  --pere-surface: var(--pere-ink-2);
  --pere-surface-2: var(--pere-ink-3);
  --pere-accent: var(--pere-lime);
  --pere-accent-fg: var(--pere-ink);
  --pere-kicker: var(--pere-lime);
}

/* Optional page-level dark. Prefer .pere-dark on a section instead. */
html[data-pere-theme="dark"] {
  --pere-bg: var(--pere-ink);
  --pere-fg: var(--pere-paper);
  --pere-fg-muted: var(--pere-mist);
  --pere-border: var(--pere-hairline-on-ink);
  --pere-surface: var(--pere-ink-2);
  --pere-surface-2: var(--pere-ink-3);
  --pere-kicker: var(--pere-lime);
}

/* Accent word helpers. Use <em> inside a display headline. */
.pere-em-light {
  font-style: italic;
  background: var(--pere-lime);
  color: var(--pere-ink);
  padding: 0 0.1em;
  margin: 0 -0.03em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.pere-em-dark {
  font-style: italic;
  color: var(--pere-lime);
  background: none;
  padding: 0;
}

/* =========================================================================
   MultiFamilyBooks (sub-brand) — pointer only, not a restyle.

   MFB keeps its own site, type, and palette. Do not apply --pere-* to
   multifamilybooks.com. Do not recast MFB pages in Newsreader / lime /
   ink-teal. On the PERE hub, refer to the line as "MultiFamilyBooks, a
   PERE Models product," using PERE type on PERE-hub pages only.

   The values below are copied from the live MFB tokens so the two systems
   stay distinct. Full file: multifamilybooks repo, site/_design/tokens.css.
   ========================================================================= */
:root {
  --mfb-ink: #13261F;
  --mfb-paper: #F7F5EE;
  --mfb-green-700: #1C5D48;     /* MFB primary, not PERE lime */
  --mfb-brick-600: #B4492F;     /* MFB's one accent */
  --mfb-font-display: "Bricolage Grotesque", "Hanken Grotesk", system-ui, sans-serif;
  --mfb-font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mfb-font-figures: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
}
