/* Geostrat artwork theme.
 *
 * Everything the piece artwork paints with is a CSS variable defined in this file.
 * Change a value here and every piece, icon and animation follows; nothing is redrawn.
 *
 * Section 1 is the PROVISIONAL BLOC PALETTE. Replace the eighteen values there to re-colour the game.
 */

/* ===== 1. BLOC PALETTE (provisional, colour-blind safe) =====================================
 * Six colours taken from the Okabe-Ito set, which stays distinguishable under the common forms of
 * colour blindness. Each bloc has three values:
 *   --gs-bloc-N        the bloc's colour
 *   --gs-bloc-N-dark   a darker shade of it (edges, shadows, treads)
 *   --gs-bloc-N-ink    the colour for details drawn ON the bloc colour (white or near-black)
 * The numbers 0 to 5 follow the order of the blocs in config/map.default.json.
 */
:root {
  --gs-bloc-0: #0072B2; --gs-bloc-0-dark: #00456C; --gs-bloc-0-ink: #FFFFFF; /* North America: blue */
  --gs-bloc-1: #D55E00; --gs-bloc-1-dark: #8A3D00; --gs-bloc-1-ink: #1B2430; /* South America: vermilion */
  --gs-bloc-2: #F0E442; --gs-bloc-2-dark: #A39A12; --gs-bloc-2-ink: #1B2430; /* Europe: yellow */
  --gs-bloc-3: #009E73; --gs-bloc-3-dark: #00644A; --gs-bloc-3-ink: #1B2430; /* Africa: green */
  --gs-bloc-4: #CC79A7; --gs-bloc-4-dark: #8C4470; --gs-bloc-4-ink: #1B2430; /* Northern Eurasia: pink-purple */
  --gs-bloc-5: #56B4E9; --gs-bloc-5-dark: #1F78B0; --gs-bloc-5-ink: #1B2430; /* East Asia: sky blue */
  --gs-neutral: #B9AC8C; --gs-neutral-dark: #7F7458; --gs-neutral-ink: #1B2430; /* neutral countries */

  /* ===== 2. INK, PAPER AND THE REST ===== */
  --gs-ink: #1B2430;        /* outlines and lettering on a light background */
  --gs-paper: #F4ECD8;      /* the light background */
  --gs-ink-dark: #F4ECD8;   /* outlines and lettering on a dark background */
  --gs-paper-dark: #18202B; /* the dark background */
  --gs-chip: #FFFDF6;       /* count badges and bloc emblems: always light ... */
  --gs-chip-ink: #1B2430;   /* ... with dark lettering, whatever the background */
  --gs-alert: #B3261E;      /* danger: attacks, losses, the doomsday clock */
  --gs-sea: #BCD3D6;
  --gs-sea-dark: #7FA3AB;
  --gs-land: #E6DABA;       /* neutral land */

  /* the four resources, and credits */
  --gs-res-food: #9DB53B;
  --gs-res-energy: #F5B400;
  --gs-res-minerals: #8E9BAA;
  --gs-res-rare: #9A77DB;
  --gs-res-credits: #E9D58F;

  --gs-font: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* What a piece actually reads. These five are the whole contract between artwork and theme. */
  --ink: var(--gs-ink);
  --paper: var(--gs-paper);
  --chip: var(--gs-chip);
  --chip-ink: var(--gs-chip-ink);
  --bloc: var(--gs-neutral);
  --bloc-dark: var(--gs-neutral-dark);
  --bloc-ink: var(--gs-neutral-ink);
}

/* ===== 3. HOW A PIECE GETS ITS COLOURS =====
 * Put one of these classes on a piece (or on anything that contains pieces). */
.gs-bloc-0 { --bloc: var(--gs-bloc-0); --bloc-dark: var(--gs-bloc-0-dark); --bloc-ink: var(--gs-bloc-0-ink); }
.gs-bloc-1 { --bloc: var(--gs-bloc-1); --bloc-dark: var(--gs-bloc-1-dark); --bloc-ink: var(--gs-bloc-1-ink); }
.gs-bloc-2 { --bloc: var(--gs-bloc-2); --bloc-dark: var(--gs-bloc-2-dark); --bloc-ink: var(--gs-bloc-2-ink); }
.gs-bloc-3 { --bloc: var(--gs-bloc-3); --bloc-dark: var(--gs-bloc-3-dark); --bloc-ink: var(--gs-bloc-3-ink); }
.gs-bloc-4 { --bloc: var(--gs-bloc-4); --bloc-dark: var(--gs-bloc-4-dark); --bloc-ink: var(--gs-bloc-4-ink); }
.gs-bloc-5 { --bloc: var(--gs-bloc-5); --bloc-dark: var(--gs-bloc-5-dark); --bloc-ink: var(--gs-bloc-5-ink); }
.gs-bloc-neutral { --bloc: var(--gs-neutral); --bloc-dark: var(--gs-neutral-dark); --bloc-ink: var(--gs-neutral-ink); }

/* Light and dark surroundings: only ink and paper swap. */
.gs-light { --ink: var(--gs-ink); --paper: var(--gs-paper); }
.gs-dark  { --ink: var(--gs-ink-dark); --paper: var(--gs-paper-dark); }

/* ===== 4. PIECES ===== */
.gs-piece, .gs-icon { overflow: visible; vertical-align: middle; flex: none; }
.gs-piece text, .gs-icon text { font-family: var(--gs-font); font-weight: 800; }
.gs-piece .gs-stack { opacity: .8; }
