/*
 * Propshaft links every file in this folder in alphabetical order. The layer order below decides the
 * cascade instead, so a later file never wins by accident. This file sorts first; keep the statement here.
 */
@layer reset, tokens, base, components, game, pages;

@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-latin-600-normal-3c9b1a99.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@layer tokens {
  :root {
    --laken: #1f5e46;
    --laken-deep: #123d2e;
    --laken-light: #2a7154;
    --laken-night: #0c2a1f;
    --eiken: #5a3a22;
    --eiken-dark: #3b2414;
    --eiken-light: #7a5233;
    --messing: #c9a24a;
    --messing-light: #f2d27a;
    --messing-dark: #7a5c14;
    --creme: #f4ead5;
    --creme-muted: #d9cbae;
    --schuim: #fff8ec;
    --card-face: #fffdf8;
    --rood: #c8102e;
    --inkt: #1b1b1b;

    --suit-red: #c8102e;
    --suit-black: #1b1b1b;
    --suit-blue: #1f6fd1;
    --suit-green: #1a7a37;

    --font-display: "Fraunces", ui-serif, Georgia, "Times New Roman", serif;
    --font-ui: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

    /* Lobby and forms. Text pairs are checked at 4.5:1 and control borders at 3:1 in both schemes. */
    --page-bg: #f4ead5;
    --surface: #fff8ec;
    --surface-sunk: #efe3c9;
    --text: #1b1b1b;
    --text-muted: #5e5546;
    --border: #dccdaf;
    --border-strong: #7d6c4c;
    --accent: #1f5e46;
    --accent-hover: #174a37;
    --accent-text: #fff8ec;
    --link: #1f5e46;
    --focus: #7a5c14;
    --danger: #a30d25;
    --danger-surface: #fbe3e1;
    --notice-surface: #e1efe6;

    /* The table is always dark felt, whatever the colour scheme. */
    --felt-text: #f4ead5;
    --felt-muted: #d9cbae;
    --felt-panel: #123d2e;
    --felt-focus: #f2d27a;

    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 22px;
    --shadow-1: 0 1px 2px rgb(59 36 20 / 0.12), 0 2px 8px rgb(59 36 20 / 0.08);
    --shadow-2: 0 4px 10px rgb(0 0 0 / 0.18), 0 14px 32px rgb(0 0 0 / 0.22);
    --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
    --ease-overshoot: cubic-bezier(0.34, 1.4, 0.64, 1);

    --felt-texture: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");

    color-scheme: light dark;
  }

  @media (prefers-color-scheme: dark) {
    :root {
      --page-bg: #0e1512;
      --surface: #16201c;
      --surface-sunk: #1c2a24;
      --text: #ede6d6;
      --text-muted: #b8ae9a;
      --border: #2c3d35;
      --border-strong: #7a8f84;
      --accent: #c9a24a;
      --accent-hover: #e2c277;
      --accent-text: #1b1b1b;
      --link: #e2c277;
      --focus: #f2d27a;
      --danger: #ff8a8a;
      --danger-surface: #3a1518;
      --notice-surface: #15302a;
      --shadow-1: 0 1px 2px rgb(0 0 0 / 0.4), 0 2px 10px rgb(0 0 0 / 0.3);
    }
  }
}
