/* Dark theme: the colour tokens of style.css with their dark values, in the
   same order, then the few rules that differ in dark. base.pug links this
   file after style.css with the media of the visitor's choice
   (app._inject_theme): "(prefers-color-scheme: dark)" while it follows the
   system, "all" for dark, "not all" for light; theme.js switches it.

   The names describe the light theme. --bg-white is the surface (the page,
   cards, the nav); --bg-light-grey the bands set behind it, darker than the
   surface in both themes, so a card still sits on top of its section. */
:root {
  color-scheme: dark;
  --primary-blue: #4A90E2;
  --light-blue: #6BA3E8;
  --dark-blue: #357ABD;
  --text-primary: #E4E9EE;
  --text-secondary: #A3ADB7;
  --text-light: #7E8994;
  --bg-white: #1A1E23;
  --bg-light-grey: #14171B;
  --bg-translucent: rgba(26, 30, 35, 0.9);
  --bg-screenshot: #FFFFFF;
  --border-light: #2B3138;
  --shadow-subtle: 0 2px 4px rgba(0, 0, 0, 0.25);
  --shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-rgb: 0, 0, 0;
  --hero-veil-top: rgba(26, 30, 35, 1.0);
  --hero-veil-bottom: rgba(26, 30, 35, 0.4);
  --red: #E06070;
  --text-red: #F08593;
  --tint-red: #3A1F24;
  --green: #2E9E5B;
  --text-green: #6FCF97;
  --tint-green: #1B3326;
  --tint-green-light: #1B3326;
  --amber: #E0A100;
  --text-amber: #E8C25A;
  --tint-amber: #3A3118;
  --orange: #D98C1F;
  --tint-orange: #3A2C1A;
  --text-blue: #79AEF0;
  --tint-blue: #1E2A3A;
  --tint-blue-light: #1D2735;
  --tint-blue-faint: #1F242B;
}

/* The nav's switch shows where it goes: a sun while dark. */
.nav-theme .fa-moon {
  display: none;
}

.nav-theme .fa-sun {
  display: inline-block;
}

/* The hero's drawing, dark: hero-bg.jpg inverted and coloured to the dark
   surface. A CSS background has no .dark file of its own (app._dark_media
   sees only <img> and <video>), so it is named here. */
.hero.hero-with-bg {
  background-image: linear-gradient(var(--hero-veil-top), var(--hero-veil-bottom)),
                    url('../images/hero-bg.dark.jpg');
}

/* A light screenshot keeps the white it was taken on, around it in the
   framed carousels as in the light theme. A slide or a device screen with a
   dark file (app._dark_media) shows that file here, on the dark surface. */
.app-shot .carousel-slide:not(:has([data-dark-media])) {
  background: var(--bg-screenshot);
}

.device-stage picture .device-screen {
  background: var(--bg-white);
}
