/* Just Cards Mate design tokens. The single source of truth for colour, type, shape and motion.
   Components reference these; never hard-code hex values elsewhere. See CLAUDE.md §3–§5, §11. */

/* Breakpoints (CLAUDE.md §7). Native CSS can't use custom media yet, so these are the
   canonical values; styles.css and the JS matchMedia calls use exactly these numbers.
     phone   : max-width 599px
     tablet  : 600px – 1023px
     laptop  : 1024px – 1439px   (often only 700–800px tall)
     desktop : min-width 1440px                                                   */
@custom-media --phone (max-width: 599px);
@custom-media --tablet (min-width: 600px) and (max-width: 1023px);
@custom-media --laptop-up (min-width: 1024px);
@custom-media --desktop (min-width: 1440px);

:root {
  /* ---- colour */
  --felt: #0A3A30;             /* deep emerald: the main felt */
  --felt-deep: #062820;
  --felt-hi: #0F4A3D;          /* vignette centre only */
  --night: #0B1F1A;
  --moss: #1F6B57;
  --sea-glass: #A9CBBE;
  --gold: #F3C14B;
  --butter: #F7DC8E;
  --brass: #B88A22;
  --card: #F6EEDC;
  --card-hi: #FBF6EA;          /* input wells on paper */
  --card-edge: #E3D5B8;
  --card-shade: #C9B48C;       /* pressed edge of cream tokens */
  --ink: #222620;
  --muted-ink: #59605A;
  --tomato: #D2553A;
  --wood: #5A3A26;
  --wood-hi: #7A5134;

  /* suits */
  --stars: #F3C14B;
  --stars-ink: #9A6510;
  --moons: #4C4A8E;
  --ferns: #4F6B43;
  --shells: #A8402A;
  --drops: #2E4A55;
  --wild-face: #FBF1D6;
  --back: #0F3F35;

  /* rgb triplets for alpha use */
  --shadow-rgb: 4 18 14;
  --gold-rgb: 243 193 75;
  --cream-rgb: 246 238 220;

  /* legacy names from the first build */
  --felt-1: var(--felt);
  --felt-2: var(--felt-deep);

  /* ---- type */
  --font-display: "Young Serif", Georgia, "Times New Roman", serif;
  --font-body: "Alegreya Sans", "Segoe UI", system-ui, sans-serif;
  --font-sc: "Alegreya Sans SC", "Alegreya Sans", "Segoe UI", system-ui, sans-serif;
  --fs-base: 17px;

  /* ---- shape */
  --r-card: 9px;
  --r-panel: 13px;
  --r-input: 10px;
  --r-token: 999px;
  --shadow-paper: 0 1px 0 var(--card-edge), 0 6px 14px -6px rgb(var(--shadow-rgb) / .55);
  --shadow-card: 0 1px 0 var(--card-edge), 0 4px 10px -4px rgb(var(--shadow-rgb) / .6);
  --shadow-lift: 0 1px 0 var(--card-edge), 0 12px 18px -8px rgb(var(--shadow-rgb) / .65);
  --rail-w: 8px;

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

  /* ---- motion */
  --ease-card: cubic-bezier(.2, .9, .3, 1.2);
  --t-card: 220ms;
}
@media (max-width: 599px) { :root { --fs-base: 16px; --rail-w: 6px; } }

/* Table felts. Members' felts swap only the felt colours; gold stays gold. */
:root[data-theme="midnight"] { --felt: #1D3566; --felt-deep: #0C1733; --felt-hi: #24407A; }
:root[data-theme="plum"] { --felt: #3B2440; --felt-deep: #26162B; --felt-hi: #47304D; }
