/*
 * The tokens of the push.do design system: the fonts, the colours of both
 * themes, the type families, spacing, radii, the one shadow and the sizes.
 *
 * This file is the same in the site (site/public/static/tokens.css) and in
 * the web app (server/internal/webapp/static/tokens.css); a test of the site
 * compares them. Change both, and the design system with them.
 *
 * Three rules stand behind the names:
 *   amber (lamp) is only where something waits for the person;
 *   what is pressed is a pill, what is read or filled in is a box, what
 *   waits for an answer is a slab;
 *   what a terminal prints is in the mono face.
 */

/* ---- fonts: Onest for texts, JetBrains Mono for what a terminal prints */

@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(fonts/onest-cyrillic-ext.woff2) format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(fonts/onest-cyrillic.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(fonts/onest-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(fonts/onest-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url(fonts/jetbrains-mono-cyrillic-ext.woff2) format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url(fonts/jetbrains-mono-cyrillic.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url(fonts/jetbrains-mono-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url(fonts/jetbrains-mono-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light dark;

  /* ---- colour, light */
  --ground: #fafbfc;       /* the page and the screen where one reads */
  --plate: #eceff3;        /* the faceplate: the bar, the topic list, the footer, the bench */
  --raised: #ffffff;       /* what lies on top: fields, commands, an answered question */
  --ink: #0f1720;          /* text; the fill of the main button; the focus ring */
  --ink-muted: #55616d;    /* secondary text: times, addresses, notes */
  --on-ink: #fafbfc;       /* text on ink */
  --line: #d5dbe2;         /* borders of what is only read; the dots of the bench */
  --line-strong: #7d8a97;  /* borders of what is worked with: fields, buttons */
  --lamp: #ffb000;         /* amber: the fill of what waits for the person */
  --lamp-edge: #a86a00;    /* the rim of an amber fill on a light ground */
  --lamp-halo: rgba(255, 176, 0, 0.3);
  --lamp-soft: #fff1cc;    /* a quiet amber ground for a "waiting" line */
  --lamp-ink: #10171f;     /* text and buttons on amber, the same in both themes */
  --lamp-paper: #fff8e8;   /* text on those buttons, the field on amber */
  --signal: #804400;       /* amber as text */
  --danger: #b3261e;       /* an error, a message of high priority; always with a word */
  --shadow-float: 0 1px 0 #d5dbe2, 0 18px 40px -24px rgba(15, 23, 32, 0.35);

  /* ---- type */
  --font-sans: Onest, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* ---- spacing: a step of 4px */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;

  /* ---- shape */
  --radius-chip: 4px;      /* tags, a word of code in a text */
  --radius-box: 8px;       /* read or filled in */
  --radius-slab: 14px;     /* waits for an answer; a thing on the bench */
  --radius-pill: 999px;    /* pressed */

  /* ---- sizes */
  --size-bar: 48px;
  --size-control: 40px;
  --size-control-small: 32px;
  --size-stamp: 52px;      /* the column of times in a feed */
}
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #10171e;
    --plate: #0a1016;
    --raised: #18222c;
    --ink: #e6ebf0;
    --ink-muted: #8f9ba8;
    --on-ink: #10171e;
    --line: #27333f;
    --line-strong: #5f6f7f;
    --lamp-edge: #ffb000;
    --lamp-halo: rgba(255, 176, 0, 0.26);
    --lamp-soft: #2b2210;
    --signal: #ffc75e;
    --danger: #ff8a7a;
    --shadow-float: 0 1px 0 #27333f, 0 18px 40px -24px rgba(0, 0, 0, 0.8);
  }
}
