/* ==========================================================================
   SkipBoard v2 — tokens
   Themes: paper (default) · forest (night yard) · sunlight (max contrast)
   Everything on screen must use these variables. See docs/v2/DESIGN.md.
   ========================================================================== */

/* --- Brand + UI fonts (self-hosted OFL, no network) ---------------------- */
@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('../vendor/fonts/bricolage-grotesque.woff2') format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../vendor/fonts/inter.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Caveat';
  src: url('../vendor/fonts/caveat.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

/* Handwriting faces used by the ink renderer (names must match ink.js) */
@font-face { font-family: 'Patrick Hand'; src: url('../vendor/PatrickHand-Regular.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'Architects Daughter'; src: url('../vendor/fonts/architects-daughter-latin-400-normal.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Dancing Script'; src: url('../vendor/fonts/dancing-script-latin-400-normal.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Gochi Hand'; src: url('../vendor/fonts/gochi-hand-latin-400-normal.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Homemade Apple'; src: url('../vendor/fonts/homemade-apple-latin-400-normal.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Indie Flower'; src: url('../vendor/fonts/indie-flower-latin-400-normal.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Kalam'; src: url('../vendor/fonts/kalam-latin-400-normal.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Nothing You Could Do'; src: url('../vendor/fonts/nothing-you-could-do-latin-400-normal.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Reenie Beanie'; src: url('../vendor/fonts/reenie-beanie-latin-400-normal.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Shadows Into Light'; src: url('../vendor/fonts/shadows-into-light-latin-400-normal.woff2') format('woff2'); font-display: swap; }

:root {
  /* Detection view (box check): same in every theme, drawn over the scanned page */
  --dbg-baseline: #00ff66;
  --dbg-reject: #ff2244;
  --dbg-partition: #00e5ff;
  --dbg-badge-bg: #ffd60a;
  --dbg-badge-text: #1a1a1a;
  /* Type */
  --font-display: 'Bricolage Grotesque', 'Trebuchet MS', sans-serif;
  --font-body: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-hand: 'Caveat', 'Segoe Script', cursive;
  --t-11: 11px;
  --t-13: 13px;
  --t-15: 15px;
  --t-16: 16px;
  --t-20: 20px;
  --t-24: 24px;
  --t-28: 28px;
  --t-34: 34px;
  --t-44: 44px;

  /* Spacing (4-base) */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-8: 32px;
  --s-10: 40px;
  --s-12: 48px;
  --s-16: 64px;
  --gutter: 20px;

  /* Shape */
  --r-field: 12px;
  --r-sm: 10px;
  --r-card: 20px;
  --r-sheet: 28px;
  --r-pill: 999px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-1: 120ms;
  --dur-2: 200ms;
  --dur-3: 320ms;

  /* Layering */
  --z-nav: 20;
  --z-sheet: 60;
  --z-toast: 80;

  /* Field chrome */
  --tap: 56px;
  --nav-h: calc(64px + env(safe-area-inset-bottom));
  --foot-h: calc(76px + env(safe-area-inset-bottom));
  --content-max: 560px;
}

/* ------------------------------- Paper ---------------------------------- */
:root,
:root[data-theme='paper'] {
  --bg: #fbfaf5;
  --bg-deep: #f2eee3;
  --surface: #ffffff;
  --surface-2: #f4f1e8;
  --surface-3: #ece8dc;
  --line: #dfdacb;
  --line-soft: #ece7da;
  --text: #141b18;
  --muted: #5a665f;
  --faint: #7b857e;
  --accent: #0b6b4f;
  --accent-strong: #08553e;
  --accent-soft: #dff5eb;
  --accent-line: #a7d9c6;
  --on-accent: #ffffff;
  --warn: #8a5a00;
  --toast-ok: #6ee7b7;
  --toast-warn: #fbbf24;
  --warn-bg: #fff4d6;
  --warn-line: #e9c46a;
  --danger: #a3261b;
  --danger-bg: #fdecea;
  --danger-line: #e4b4ac;
  --info: #1e3a8a;
  --info-bg: #e9eef9;
  --ink-blue: #1e3a8a;
  --scrim: rgba(13, 21, 18, 0.42);
  --e-1: 0 1px 2px rgba(20, 27, 24, 0.06);
  --e-2: 0 10px 30px rgba(20, 27, 24, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.7);
  --e-sheet: 0 -18px 60px rgba(20, 27, 24, 0.18);
  --grid-line: rgba(20, 27, 24, 0.045);
  --paper-glow: radial-gradient(120% 80% at 50% 0%, rgba(16, 185, 129, 0.08), transparent 70%);
  color-scheme: light;
}

/* ------------------------------- Forest --------------------------------- */
:root[data-theme='forest'] {
  --bg: #0e1513;
  --bg-deep: #080d0b;
  --surface: #17211e;
  --surface-2: #1f2b27;
  --surface-3: #26332d;
  --line: #2a3833;
  --line-soft: #22302b;
  --text: #f2f5f3;
  --muted: #a3b1ab;
  --faint: #7d8b84;
  --accent: #34d399;
  --accent-strong: #6ee7b7;
  --accent-soft: #1f3a30;
  --accent-line: #2f6b55;
  --on-accent: #04110c;
  --warn: #fbbf24;
  --toast-ok: #08553e;
  --toast-warn: #8a5a00;
  --warn-bg: #2a2312;
  --warn-line: #7c5e10;
  --danger: #fca5a5;
  --danger-bg: #3a1515;
  --danger-line: #7f1d1d;
  --info: #93c5fd;
  --info-bg: #15223f;
  --ink-blue: #93c5fd;
  --scrim: rgba(0, 0, 0, 0.62);
  --e-1: 0 1px 2px rgba(0, 0, 0, 0.35);
  --e-2: 0 12px 34px rgba(0, 0, 0, 0.42);
  --e-sheet: 0 -18px 60px rgba(0, 0, 0, 0.55);
  --grid-line: rgba(242, 245, 243, 0.05);
  --paper-glow: radial-gradient(120% 80% at 50% 0%, rgba(16, 185, 129, 0.16), transparent 68%);
  color-scheme: dark;
}

/* ------------------------------ Sunlight -------------------------------- */
:root[data-theme='sunlight'] {
  --bg: #ffffff;
  --bg-deep: #ffffff;
  --surface: #ffffff;
  --surface-2: #f3f3ef;
  --surface-3: #e9e9e3;
  --line: #7c877f;
  --line-soft: #b9c1ba;
  --text: #0b1310;
  --muted: #3a453f;
  --faint: #4e5a53;
  --accent: #0b5c43;
  --accent-strong: #084433;
  --accent-soft: #e4f4ec;
  --accent-line: #0b5c43;
  --on-accent: #ffffff;
  --warn: #7a4e00;
  --toast-ok: #6ee7b7;
  --toast-warn: #fbbf24;
  --warn-bg: #fff7dc;
  --warn-line: #b58a18;
  --danger: #9b1c12;
  --danger-bg: #fdecea;
  --danger-line: #c25043;
  --info: #1e3a8a;
  --info-bg: #e9eef9;
  --ink-blue: #1e3a8a;
  --scrim: rgba(13, 21, 18, 0.5);
  --e-1: none;
  --e-2: none;
  --e-sheet: none;
  --grid-line: rgba(11, 19, 16, 0.05);
  --paper-glow: none;
  color-scheme: light;
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --dur-1: 0ms;
    --dur-2: 0ms;
    --dur-3: 0ms;
  }
}
