/* SPDX-License-Identifier: AGPL-3.0-or-later */
/*
 * Design tokens of the site. Every colour, size and face used anywhere on the site is named
 * here; a page or component that needs something else adds a token first (docs/design-system.md).
 *
 * Where the values come from: the wood, parchment, sky and gold were measured on screenshots of
 * the owner's own copy of the game running (pause menu, day plaque, map); the slate and the
 * square bevelled buttons follow the official site. Nothing here is a file of theirs.
 */

@font-face {
  font-family: "Jacquard 24";
  src: url("../fonts/Jacquard24-Regular.ttf") format("truetype");
  font-display: swap;
}
@font-face {
  font-family: "EB Garamond";
  src: url("../fonts/EBGaramond-Variable.ttf") format("truetype");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "EB Garamond";
  src: url("../fonts/EBGaramond-Italic-Variable.ttf") format("truetype");
  font-weight: 400 800;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Silkscreen";
  src: url("../fonts/Silkscreen-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Silkscreen";
  src: url("../fonts/Silkscreen-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  /* The place: sky above the ground line, water below it. */
  --sky-high: #132229;        /* top of the night sky */
  --sky-low: #24404a;         /* sky at the horizon */
  --ground: #4a3a2a;          /* the strip of earth */
  --grass: #3c5a2e;           /* its top edge */
  --water: #0e181d;           /* below the ground line */
  --water-near: #1a2e35;      /* the water right under the ground line */
  --shimmer: #6f8f9a;         /* short dashes on the water */

  /* Wood: what is pressed. */
  --plank: #806858;
  --plank-light: #a08672;     /* top and left edge, hover face */
  --plank-dark: #4d3b30;      /* bottom and right edge */
  --plank-ink: #fdf9f0;       /* lettering on wood */
  --outline: #1c1512;         /* the dark pixel line around wood and parchment */

  /* The plaque: the redder wood the game hangs its day number on. One per screen at most. */
  --plaque: #b07048;
  --plaque-light: #cf9264;
  --plaque-dark: #7a4a30;

  /* Parchment: what is read or typed on. */
  --parchment: #d6b878;
  --parchment-shade: #b89a5c;
  --ink: #33211c;             /* text on parchment */
  --ink-soft: #5f4634;        /* secondary text on parchment */

  /* Gold: the one thing to do next, and focus. */
  --coin: #ffcf60;
  --coin-light: #fff0a0;
  --coin-dark: #c98a3a;
  --coin-ink: #33211c;

  /* Banner red: what destroys or fails. */
  --banner: #a44630;
  --banner-light: #c9694a;
  --banner-dark: #6a2a22;
  --banner-pale: #f2b29c;     /* words about a failure, on the sky */

  /* Text on the sky. */
  --bone: #ece6da;
  --bone-dim: #a9b4b6;

  /* Faces. */
  --face-display: "Jacquard 24", "Old English Text MT", "UnifrakturCook", serif;
  --face-text: "EB Garamond", Garamond, Georgia, serif;
  --face-plank: "Silkscreen", "Lucida Console", monospace;

  /* Type scale: 1.25 on an 18 px text size (Garamond reads small). */
  --text-small: 1rem;         /* 16 px: the smallest text there is */
  --text: 1.125rem;           /* 18 px */
  --text-large: 1.4rem;       /* 22 px */
  --title: 2.75rem;           /* 44 px, display face */
  --title-large: 4.25rem;     /* 68 px, display face, sign-in only */
  --plank-text: 0.9375rem;    /* 15 px Silkscreen: its pixels stay square at this size */
  --leading: 1.5;

  /* Everything sits on a 4 px pixel grid. */
  --px: 4px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;

  --measure: 34rem;           /* the widest a column of text or a form gets */
  --menu-width: 15rem;        /* the plank menu */
  --horizon: 68vh;            /* where the ground line sits on a tall enough screen */
  --press: 2px;               /* how far a button moves when pressed */
  --target: 44px;             /* the smallest thing a finger has to hit */
}

@media (prefers-reduced-motion: reduce) {
  :root { --press: 0px; }
}
