/*
 * Cart Shelf: tokens
 * Feel: a shelf of homemade game cartridges in a dark bedroom at night.
 * Deep navy pages, a maroon tabletop band under a chunky CSS television,
 * grey plastic cartridge cards with ribbed headers and pixel-art labels,
 * notched pixel corners instead of rounded ones, and a hot pink button that
 * looks like you could press it with a thumb. Pixel headlines, monospace
 * body, a sixteen color palette used sparingly. Retro, nostalgic, raw.
 *
 * Fonts (free, Google Fonts):
 * <link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,400;0,600;1,400&family=Pixelify+Sans:wght@500;700&family=Silkscreen:wght@400;700&display=swap" rel="stylesheet">
 */
:root {
  /* Surfaces: navy night at the top, charcoal further down */
  --cs-night: #10142b;
  --cs-deep: #0a0d1e;
  --cs-shelf: #1d2140;
  --cs-desk: #5b2a33;
  --cs-desk-hi: #7a3a43;
  --cs-desk-lo: #3e1b22;
  --cs-floor: #26242e;
  --cs-bar: #18171f;
  --cs-screen: #050508;

  /* Cartridge plastic */
  --cs-cart: #6d6a78;
  --cs-cart-hi: #8b8897;
  --cs-cart-lo: #4c4955;
  --cs-label-bg: #121019;

  /* Text */
  --cs-text: #f1eef8;
  --cs-dim: #b9b4c9;
  --cs-faint: #847f96;

  /* Accents */
  --cs-pink: #ff5d97;
  --cs-pink-lo: #c63a6f;
  --cs-sun: #ffd447;
  --cs-sky: #49b6ff;
  --cs-mint: #3ddc84;
  --cs-plum: #7b4dd6;
  --cs-orange: #ff9a3c;
  --cs-ok: var(--cs-mint);
  --cs-warn: var(--cs-sun);

  /* The sixteen colors, used as a strip or as label art */
  --cs-pal: linear-gradient(90deg,
    #0a0d1e 0 6.25%, #1d2140 0 12.5%, #7a3a43 0 18.75%, #2f8a57 0 25%,
    #8a5a3c 0 31.25%, #4c4955 0 37.5%, #b9b4c9 0 43.75%, #f1eef8 0 50%,
    #ff3e5b 0 56.25%, #ff9a3c 0 62.5%, #ffd447 0 68.75%, #3ddc84 0 75%,
    #49b6ff 0 81.25%, #7b4dd6 0 87.5%, #ff5d97 0 93.75%, #ffc9a8 0 100%);

  /* Fonts */
  --cs-pixel: "Pixelify Sans", "Courier New", monospace;
  --cs-tiny: "Silkscreen", "Courier New", monospace;
  --cs-body: "IBM Plex Mono", ui-monospace, Menlo, monospace;

  /* Type scale */
  --cs-text-hero: clamp(40px, 6.4vw, 76px);
  --cs-text-h1: clamp(32px, 4.4vw, 52px);
  --cs-text-h2: clamp(24px, 3vw, 34px);
  --cs-text-h3: 20px;
  --cs-text-lead: 18px;
  --cs-text-body: 16px;
  --cs-text-small: 14px;
  --cs-text-micro: 11px;
  --cs-leading: 1.65;

  /* Shape: no rounding anywhere, corners are notched in pixel steps */
  --cs-radius: 0;
  --cs-notch: 6px;
  --cs-notch-lg: 12px;
  --cs-corners: polygon(var(--cs-notch) 0, calc(100% - var(--cs-notch)) 0, calc(100% - var(--cs-notch)) 2px, calc(100% - 2px) 2px, calc(100% - 2px) var(--cs-notch), 100% var(--cs-notch), 100% calc(100% - var(--cs-notch)), calc(100% - 2px) calc(100% - var(--cs-notch)), calc(100% - 2px) calc(100% - 2px), calc(100% - var(--cs-notch)) calc(100% - 2px), calc(100% - var(--cs-notch)) 100%, var(--cs-notch) 100%, var(--cs-notch) calc(100% - 2px), 2px calc(100% - 2px), 2px calc(100% - var(--cs-notch)), 0 calc(100% - var(--cs-notch)), 0 var(--cs-notch), 2px var(--cs-notch), 2px 2px, var(--cs-notch) 2px);
  --cs-cart-cut: polygon(0 0, calc(100% - var(--cs-notch-lg)) 0, 100% var(--cs-notch-lg), 100% 100%, 0 100%);
  --cs-bevel: inset 0 -4px 0 rgba(0, 0, 0, .35), inset 0 2px 0 rgba(255, 255, 255, .22);
  --cs-bevel-cart: inset 3px 3px 0 var(--cs-cart-hi), inset -3px -3px 0 var(--cs-cart-lo);
  --cs-drop: 0 6px 0 rgba(0, 0, 0, .45);
  --cs-border: 2px solid var(--cs-shelf);
  --cs-border-hi: 2px solid var(--cs-cart-lo);
  --cs-focus: 0 0 0 2px var(--cs-night), 0 0 0 4px var(--cs-sun);

  /* Space */
  --cs-space-1: 4px;
  --cs-space-2: 8px;
  --cs-space-3: 12px;
  --cs-space-4: 16px;
  --cs-space-5: 24px;
  --cs-space-6: 40px;
  --cs-space-7: 64px;
  --cs-space-8: 96px;
  --cs-container: 1180px;
  --cs-narrow: 720px;

  /* Motion: snappy, in steps */
  --cs-step: 90ms steps(2);
}
