/* Dear Website, design tokens. Light is the default; dark follows the system. Loaded before theme.css. */
:root {
  color-scheme: light dark;

  /* Brand colours: the same in both modes */
  --red: #E3001B;
  --blue: #1D3FBB;
  --ink: #101114;
  --airmail: repeating-linear-gradient(-45deg, var(--red) 0 10px, #fff 10px 16px, var(--blue) 16px 26px, #fff 26px 32px);

  /* The letter sheet: white in both modes */
  --sheet: #FFFFFF;
  --sheet-text: #101114;
  --sheet-grey: #5A5F6B;
  --sheet-rule: #D5D9E0;
  --sheet-mist: #F1F2F4;

  /* Mode colours */
  --ground: #FFFFFF;
  --text: #101114;
  --mist: #F1F2F4;
  --grey: #5A5F6B;
  --rule: #D5D9E0;
  --line: #101114;
  --accent: #E3001B;
  --link: #1D3FBB;
  --focus: #1D3FBB;
  --action: #E3001B;
  --action-text: #FFFFFF;
  --action-press: #B30015;
  --frame: #101114;

  /* Type. "Archivo Fallback" and "Archivo Expanded Fallback" are Arial and Arial Black scaled to the
     width of the web fonts (theme.css), so text keeps its line breaks when the fonts arrive. */
  --font-sans: Archivo, "Archivo Fallback", "Helvetica Neue", Arial, sans-serif;
  --font-display: "Archivo Expanded", "Archivo Expanded Fallback", "Arial Black", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --t-13: .8125rem;
  --t-15: .9375rem;
  --t-17: 1.0625rem;
  --t-21: 1.3125rem;
  --t-28: 1.75rem;
  --t-h2: clamp(1.75rem, 1.1rem + 2.6vw, 3rem);
  --t-h1: clamp(2.375rem, 1.2rem + 5vw, 4rem);

  /* Space */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --gutter: 20px;
  --section: 64px;
  --masthead: 56px;

  /* Radius */
  --radius-1: 4px;
  --radius-phone: 2.6em;

  /* Elevation: flat. Layers are separated by lines, not shadows. */
  --edge-1: 1px solid var(--rule);
  --edge-2: 2px solid var(--line);
  --edge-3: 4px solid var(--line);

  /* Motion */
  --dur-1: 120ms;
  --dur-2: 240ms;
  --loop-object: 10s;
  --loop-demo: 18s;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
}

@media (min-width: 768px) {
  :root { --gutter: 32px; --section: 80px; }
}
@media (min-width: 1280px) {
  :root { --gutter: 40px; --section: 112px; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #101114;
    --text: #FFFFFF;
    --mist: #1C1E24;
    --grey: #A4A9B5;
    --rule: #34373F;
    --line: #FFFFFF;
    --accent: #FF5548;
    --link: #8FA8FF;
    --focus: #8FA8FF;
    --action: #FFFFFF;
    --action-text: #101114;
    --action-press: #D5D9E0;
    --frame: #3A3E48;
  }
}
