/* Every design token of the customizer's interface.

   This is the only file that holds color values. Everything else uses these
   variables, and tints are made with color-mix() from them, so a new theme is
   one more [data-theme="name"] block here and nothing else.

   The theme is chosen by data-theme on <html>: each person picks Light, Dark
   or Auto in the account menu (UI.theme in ui/ui.js), and partials/head.php
   applies it before the page is drawn. Check both on .dev/ui-kit.php. */

:root,
[data-theme="light"] {
  color-scheme: light;

  --color-stage: #E7E7E3;       /* page background, behind the panels */
  --color-panel: #FFFFFF;       /* panels, cards, dialogs */
  --color-raised: #F2F2EE;      /* fields, menus, secondary buttons */
  --color-hover: #E8E8E3;       /* hover on anything clickable */
  --color-line: #DCDCD6;        /* borders and dividers */
  --color-swatch-line: #DCDCD6; /* edge of a color swatch, which can be any color */
  --color-text: #17181A;
  --color-muted: #55585E;       /* labels and help */
  --color-faint: #686B72;       /* units, section labels, summaries */
  --color-accent: #FF6B2C;      /* the one action that matters, slider fill, focus */
  --color-accent-text: #B93F0A; /* accent used as text or a link on panels */
  --color-on-accent: #FFFFFF;   /* text on an accent background */
  --color-good: #1C7C45;
  --color-bad: #C22F2F;
  --color-dot: #D3D3CD;         /* dot grid on the stage */
  --color-scrim: rgb(0 0 0 / .55);
  --color-shadow: rgb(0 0 0 / .35);
  --shadow-pop: 0 16px 40px var(--color-shadow);
  --shadow-stage: 0 24px 60px var(--color-shadow);
}

[data-theme="dark"] {
  color-scheme: dark;

  --color-stage: #101113;
  --color-panel: #191A1D;
  --color-raised: #24262A;
  --color-hover: #2C2E33;
  --color-line: #303237;
  --color-swatch-line: #5C5F66;
  --color-text: #F3F3F0;
  --color-muted: #A9ABB0;
  --color-faint: #8F9298;
  --color-accent: #FF6B2C;
  --color-accent-text: #FF8A55;
  --color-on-accent: #141414;
  --color-good: #7BDB9B;
  --color-bad: #FF9A9A;
  --color-dot: #232529;
}

/* Everything below is the same in every theme */
:root {
  /* The stage's dot grid sits on the user's backdrop color, not on the theme,
     so it picks one of these by how light the backdrop is (ui/studio.js) */
  --color-dot-on-light: rgb(0 0 0 / .07);
  --color-dot-on-dark: rgb(255 255 255 / .08);

  /* Change this one value to make the whole app rounder or sharper */
  --radius-unit: 2px;
  --radius-sm: calc(var(--radius-unit) * 3);   /* 6px  fields, small buttons */
  --radius-md: calc(var(--radius-unit) * 4);   /* 8px  buttons, controls */
  --radius-lg: calc(var(--radius-unit) * 6);   /* 12px cards, popovers */
  --radius-xl: calc(var(--radius-unit) * 7);   /* 14px dialogs */
  --radius-full: 999px;                        /* switches, avatars, swatches */

  --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'DM Mono', ui-monospace, monospace;

  --text-xs: 11px;    /* section labels, units */
  --text-sm: 12px;    /* values, help */
  --text-md: 13px;    /* body */
  --text-lg: 14px;
  --text-xl: 21px;    /* wordmark, inspector title */
  --text-2xl: 28px;   /* page titles */

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;

  --control-h: 36px;     /* buttons and fields */
  --control-h-sm: 28px;  /* number and color boxes in the inspector */
  --touch-min: 44px;     /* every tap target on phones */

  --speed: 160ms;
}
