/* Devshin Online: the main website's design tokens. Every colour, size, space, corner and pane of glass the site
   uses is named here and nowhere else; app.css builds the components from these names, and /styleguide shows them.

   The look is the game's own menu glass ("Clearwater", the skin of v1's menus): dark tinted panes over the painted
   world, a one-pixel light edge instead of a frame, one sans typeface, a white pill for the main action and the
   tide colour for what is chosen. The site adds the serif of the game's dialogue for long reading. */

@font-face { font-family: 'Manrope Devshin'; src: url('../fonts/manrope.woff2') format('woff2'); font-weight: 400 800; font-display: swap; }
@font-face { font-family: 'Source Serif Devshin'; src: url('../fonts/source-serif-4.woff2') format('woff2'); font-weight: 400 700; font-display: swap; }

:root {
  color-scheme: dark;

  /* Colour: the island at dusk. ------------------------------------------------------------------------------ */
  --c-night: rgb(11 17 24);              /* the ground under everything */
  --c-ink: rgb(18 26 35);                /* text on a light pill */
  --c-text: rgb(244 247 250);            /* words on glass */
  --c-text-dim: rgb(244 247 250 / 0.76); /* body copy, second lines */
  --c-text-faint: rgb(244 247 250 / 0.54); /* dates, notes, hints (still 4.5:1 on the strongest glass) */
  --c-tide: rgb(120 224 242);            /* the accent: what is chosen, links, eyebrows (v1's --acc) */
  --c-tide-soft: rgb(120 224 242 / 0.2);
  --c-gold: rgb(244 210 132);            /* names and dates, as the dialogue writes a speaker */
  --c-life: rgb(124 227 139);            /* open, done, saved */
  --c-ember: rgb(255 186 92);            /* updating, careful */
  --c-danger: rgb(255 116 102);          /* closed, refused, wrong */

  /* Glass: four strengths of the same tinted pane, from a plate on the world to a sheet for reading. ------------ */
  --glass-plate: rgb(14 20 28 / 0.38);   /* over a busy picture, for a caption or a chip */
  --glass: rgb(14 20 28 / 0.55);         /* the usual pane: cards, the top bar */
  --glass-strong: rgb(12 22 34 / 0.74);  /* a sheet with a lot of words */
  --glass-read: rgb(12 19 28 / 0.88);    /* long reading: a post, a wiki page */
  --glass-solid: rgb(12 20 30 / 0.96);   /* menus that open over other glass */
  --glass-line: rgb(255 255 255 / 0.16); /* the light edge */
  --glass-line-strong: rgb(255 255 255 / 0.3);
  --glass-fill: rgb(255 255 255 / 0.07); /* a well inside a pane */
  --glass-fill-hi: rgb(255 255 255 / 0.14); /* the same, hovered; secondary buttons */
  --glass-blur: blur(22px) saturate(1.2);
  --glass-edge: inset 0 0 0 1px var(--glass-line);
  --glass-lift: 0 18px 50px rgb(0 0 0 / 0.3);
  --glass-text-shadow: 0 1px 2px rgb(0 0 0 / 0.55);

  /* Type. --------------------------------------------------------------------------------------------------- */
  --font-sans: 'Manrope Devshin', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Source Serif Devshin', Georgia, 'Times New Roman', serif;
  --font-mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --text-xs: 12.5px;
  --text-sm: 14px;
  --text-base: 16px;
  --text-md: 18px;
  --text-read: clamp(17px, 1.1vw + 12px, 19px); /* the serif body of a post or page */
  --text-lg: 21px;
  --text-xl: clamp(26px, 3.4vw, 38px);   /* section titles */
  --text-2xl: clamp(32px, 4.8vw, 54px);  /* page titles */
  --text-hero: clamp(42px, 6.6vw, 78px); /* the name of the game */
  --weight-body: 500;
  --weight-bold: 700;
  --weight-title: 800;
  --leading-tight: 1.08;
  --leading: 1.6;
  --leading-read: 1.72;
  --tracking-title: -0.025em;
  --tracking-eyebrow: 0.16em;

  /* Space: a 4 px step; the gutter is 16 px on a phone and grows to 48. --------------------------------------- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 72px;
  --space-section: clamp(48px, 9vh, 104px);
  --gutter: clamp(16px, 4vw, 48px);
  --page-max: 1180px;
  --read-max: 70ch;

  /* Corners. ----------------------------------------------------------------------------------------------- */
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 22px;
  --r-pill: 999px;

  /* Motion. ------------------------------------------------------------------------------------------------ */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur: 180ms;

  /* The top bar's height, so pages can start below it. */
  --top-h: 64px;
}

/* Where glass cannot blur (old browsers, or a viewer who asked for less transparency) the panes turn nearly solid,
   as v1's menus do on low-end devices. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root { --glass: rgb(14 20 28 / 0.9); --glass-strong: rgb(12 22 34 / 0.94); --glass-plate: rgb(14 20 28 / 0.8); }
}
@media (prefers-reduced-transparency: reduce) {
  :root { --glass-plate: rgb(14 20 28 / 0.86); --glass: rgb(14 20 28 / 0.92); --glass-strong: rgb(12 22 34 / 0.95); --glass-read: rgb(12 19 28 / 0.98); --glass-blur: none; }
}
@media (prefers-reduced-motion: reduce) {
  :root { --dur: 0ms; }
}
