/*
 * Pip Reader tokens (docs/product/Visual_Design.md). The only file in the app
 * that names a color, a font or a radius; everything else reads these.
 * Gate: scripts/web/check_style.mjs.
 */

/* Andika 400 and 700, self-hosted (SIL OFL, /fonts/OFL.txt): no request
   leaves the app for a font, and it works offline. */
@font-face {
  font-family: "Andika";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/andika-latin-400-normal.woff2") format("woff2");
  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: "Andika";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/andika-latin-700-normal.woff2") format("woff2");
  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;
}
/* Accented names (Zoë, José) pull the extended set only when they appear. */
@font-face {
  font-family: "Andika";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/andika-latin-ext-400-normal.woff2") format("woff2");
  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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Andika";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/andika-latin-ext-700-normal.woff2") format("woff2");
  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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light;

  /* Brand */
  --reader-night: #20375a; /* icon and website bands; never app chrome */
  --pip-gold: #fcb82b; /* the bird only */
  --pip-ember: #fc7419; /* beak and feet only */
  --pip-ink: #2a241d;
  --pip-cream: #f6f4ef;

  /* Neutrals */
  --neutral-0: #ffffff;
  --neutral-50: #f6f4ef;
  --neutral-100: #efeadf;
  --neutral-150: #f2efe6;
  --neutral-200: #e8e3d6;
  --neutral-300: #d8d4c8;
  --neutral-400: #cfc9bb;
  --neutral-500: #a39c8a;
  --neutral-600: #5b5348;
  --neutral-700: #3a352c;
  --neutral-800: #2a241d;
  --neutral-900: #1a1a1a;

  /* Roles */
  --surface-page: var(--pip-cream);
  --surface-card: var(--neutral-0);
  --surface-pressed: var(--neutral-150);
  --surface-sunk: var(--neutral-200); /* placeholders, empty progress */
  --word-highlight: var(--neutral-200);
  --text-body: var(--neutral-900);
  --text-ink: var(--pip-ink);
  --text-muted: var(--neutral-700);
  --text-quiet: var(--neutral-600); /* grown-up lines, hints */
  --border-subtle: var(--neutral-300);
  --action-primary-bg: var(--pip-ink);
  --action-primary-fg: var(--pip-cream);
  --shadow-book: 0 6px 18px color-mix(in srgb, var(--pip-ink) 14%, transparent);

  /* Type */
  --font: "Andika", ui-rounded, system-ui, sans-serif;
  --line-young: 40px; /* one line per page, younger shelf */
  --line-older: 32px; /* 3–6 lines per page, older shelf */

  /* Shape */
  --radius-tile: 10px;
  --radius-button: 12px;
  --radius-card: 20px;
  --radius-cover: 8px;
  --button-height: 56px;
  --touch-min: 44px;
  --gutter: clamp(16px, 4vw, 64px);
}
