/* Poko design tokens for the web.
   Mirrored by hand from ios/design-system/foundations/*.md (the source of truth),
   the same way ios/design-system/claude-design/styles.css mirrors them.
   Change the foundation table first, then this file, in the same diff. */

@font-face {
  font-family: "Figtree";
  src: url("/fonts/Figtree-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("/fonts/Figtree-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("/fonts/Figtree-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("/fonts/Figtree-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;

  /* Surfaces & ink */
  --bg-primary: #fffaec;
  --bg-secondary: #f1ecd9;
  --bg-elevated: #fffdf5;
  --ink-primary: #303a2c;
  --ink-secondary: #56614a;
  --ink-tertiary: #626b55;
  --border-hairline: #dfddc9;
  --border-strong: #959a7c;

  /* Brand */
  --brand-primary: #59662e;
  --brand-primary-pressed: #465223;
  --brand-on-primary: #fffaec;
  --brand-tint: #ece7bc;
  --brand-secondary: #8a563b;
  --brand-secondary-tint: #f6dec9;
  --expression-coral: #e8a17e;
  --expression-coral-tint: #f8e0cf;

  /* Score bands: always tint background + deep text */
  --score-alltimer-bg: #ddf2ef;
  --score-alltimer-fg: #086b68;
  --score-great-bg: #e5f3e9;
  --score-great-fg: #24714d;
  --score-fine-bg: #f6eecf;
  --score-fine-fg: #806200;
  --score-skip-bg: #f7e5e3;
  --score-skip-fg: #a54543;
  --taste-match-high: #24714d;

  /* Cartography (foundations/color.md → Map styling) */
  --map-land: #f4f0e9;
  --map-forest: #8ec69b;
  --map-park: #a7d6ae;
  --map-water: #7cc4eb;
  --map-building: #ded8cb;
  --map-casing: #d0c7b8;
  --map-road: #ffffff;

  /* Mascot */
  --poko-paper: #fffaea;
  --poko-ink: #59662e;
  --poko-blush: #eeae91;

  /* Type */
  --font: "Figtree", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;

  /* Space (4px base) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 999px;

  /* Elevation: forest-ink shadows, never pure black */
  --elevation-1: 0 2px 8px rgba(48, 58, 44, 0.07);
  --elevation-2: 0 4px 16px rgba(48, 58, 44, 0.11);
  --elevation-3: 0 8px 24px rgba(48, 58, 44, 0.15);

  /* Motion */
  --motion-quick: 0.14s ease-out;
  --motion-standard: 0.26s cubic-bezier(0.32, 0.72, 0, 1);
  --motion-gentle: 0.4s cubic-bezier(0.32, 0.72, 0, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary: #191d16;
    --bg-secondary: #23291e;
    --bg-elevated: #2b3124;
    --ink-primary: #f7f3e7;
    --ink-secondary: #d1d7c2;
    --ink-tertiary: #b2bba1;
    --border-hairline: #424a35;
    --border-strong: #748063;

    --brand-primary: #cad697;
    --brand-primary-pressed: #b3c17c;
    --brand-on-primary: #1d2414;
    --brand-tint: #323c20;
    --brand-secondary: #e8b494;
    --brand-secondary-tint: #453022;
    --expression-coral: #f2bc9f;
    --expression-coral-tint: #422e22;

    --score-alltimer-bg: #173532;
    --score-alltimer-fg: #79d4ca;
    --score-great-bg: #1c3328;
    --score-great-fg: #83cda4;
    --score-fine-bg: #362f1d;
    --score-fine-fg: #e5bf68;
    --score-skip-bg: #3b2629;
    --score-skip-fg: #f09391;
    --taste-match-high: #83cda4;

    --map-land: #20283d;
    --map-forest: #254c40;
    --map-park: #315c4e;
    --map-water: #235873;
    --map-building: #354159;
    --map-casing: #20283d;
    --map-road: #56657e;

    --poko-paper: #fffaea;
    --poko-ink: #59662e;

    --elevation-1: 0 2px 8px rgba(0, 0, 0, 0.3);
    --elevation-2: 0 4px 16px rgba(0, 0, 0, 0.4);
    --elevation-3: 0 8px 24px rgba(0, 0, 0, 0.5);
  }
}
