/*
 * Tokens, three layers: primitive -> semantic -> component.
 * Components read semantic tokens only, so a light scene is a re-scope of the
 * semantic layer (.scene--light) and nothing else has to know.
 *
 * The brand's accent is gold. The eight hues are not decoration: each one is
 * a service, and is used only where that service is being talked about.
 */

:root {
  /* -- primitive ---------------------------------------------------------- */
  --graphite-1: #252423;
  --graphite-2: #1e1d1c;
  --graphite-3: #191817;
  --paper-1: #dcd8d4;
  --paper-2: #cfcbc6;
  --chalk-1: #f6f4f2;
  --chalk-2: #cccac8;
  --chalk-3: #a3a09c;
  --chalk-4: #6f6c69;
  --coal-1: #1d1c1b;
  --coal-2: #45423f;
  --coal-3: #5f5b57;

  --gold-1: #f3dfa2;       /* light on a polished edge */
  --gold-2: #e2bf6e;       /* gold as type on graphite */
  --gold-3: #c99a3c;       /* gold as a surface */
  --gold-4: #8f6a1f;       /* gold in shadow */
  --gold-ink: #6b4e10;     /* gold as type on paper */

  --red: #ff4b4b;
  --coral: #ff7d36;
  --orange: #ffa828;
  --yellow: #ffcc2a;
  --lime: #b7ff54;
  --green: #18ff92;
  --cyan: #17f1d1;
  --blue: #5e89fb;

  --font-sans: "Barlow", "Bahnschrift", "DIN Alternate", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Mono", "SF Mono", Consolas, "Liberation Mono", monospace;

  --step--1: clamp(0.72rem, 0.69rem + 0.12vw, 0.8rem);
  --step-0: clamp(0.95rem, 0.9rem + 0.2vw, 1.08rem);
  --step-1: clamp(1.1rem, 1rem + 0.45vw, 1.35rem);
  --step-2: clamp(1.45rem, 1.2rem + 1vw, 2rem);
  --step-5: clamp(2.7rem, 1.4rem + 5.2vw, 5.6rem);

  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px;
  --sp-6: 32px; --sp-7: 48px; --sp-8: 64px; --sp-9: 96px;

  --radius-1: 4px; --radius-2: 8px; --radius-pill: 999px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-1: 140ms; --dur-2: 320ms;

  /* -- semantic (the dark scene is the default) ----------------------------- */
  --bg: var(--graphite-1);
  --bg-sunk: var(--graphite-2);
  --bg-raised: #2e2c2b;
  --ink: var(--chalk-1);
  --ink-2: var(--chalk-2);
  --ink-3: var(--chalk-3);
  --line: rgba(246, 244, 242, 0.14);
  --line-strong: rgba(246, 244, 242, 0.3);
  --line-accent: rgba(226, 191, 110, 0.42);
  --accent: var(--gold-3);
  --accent-ink: var(--gold-2);       /* accent when it is TYPE, not a fill */
  --on-accent: #1c1505;
  --focus: var(--gold-1);
  --veil: rgba(37, 36, 35, 0.72);    /* what is laid behind text that sits over the 3D */

  /* -- component ------------------------------------------------------------ */
  --dial-bezel: var(--graphite-3);
  --dial-screen: var(--graphite-2);
  --dial-tick: rgba(246, 244, 242, 0.34);
  --dial-tick-major: rgba(246, 244, 242, 0.7);
  --dial-vent: #d8b56a;
  --dial-stock: var(--chalk-4);
  --dial-tuned: var(--chalk-1);
  --dial-gain: var(--gold-2);

  --field-bg: rgba(246, 244, 242, 0.04);
  --field-line: var(--line-strong);
  --btn-bg: linear-gradient(180deg, var(--gold-1) 0%, var(--gold-2) 38%, var(--gold-3) 100%);
  --btn-ink: var(--on-accent);
}

/* A light scene: same components, other ground. */
.scene--light {
  --bg: var(--paper-1);
  --bg-sunk: var(--paper-2);
  --bg-raised: #e8e5e1;
  --ink: var(--coal-1);
  --ink-2: var(--coal-2);
  --ink-3: var(--coal-3);
  --line: rgba(29, 28, 27, 0.16);
  --line-strong: rgba(29, 28, 27, 0.38);
  --line-accent: rgba(107, 78, 16, 0.5);
  --accent-ink: var(--gold-ink);
  --focus: #1d1c1b;
  --veil: rgba(220, 216, 212, 0.74);
  --field-bg: rgba(29, 28, 27, 0.04);
  --dial-tick: rgba(29, 28, 27, 0.4);
  --dial-tick-major: rgba(29, 28, 27, 0.75);
  --dial-stock: var(--coal-3);
  --dial-tuned: var(--coal-1);
  --dial-gain: var(--gold-ink);
  color: var(--ink);
  background: var(--bg);
}
