/* Thermals brand tokens: the single source of truth for colour, type, space and shape.
   The download page (index.html) and the brand guide (brand/index.html) both read from here.
   Direction: Thermals should look like a utility that ships with macOS. See the brand guide for the reasoning. */

:root {
  /* ---- Neutrals: the greys of macOS itself. Tiles are the colour of the app's own window. ---- */
  --bg: #ffffff;            /* page */
  --band: #f5f5f7;          /* full-width section behind tiles */
  --tile: #ffffff;          /* tiles; same as the app's window in light mode */
  --ink: #1d1d1f;           /* text */
  --ink-2: #6e6e73;         /* secondary text */
  --ink-3: #86868b;         /* captions */
  --line: #d2d2d7;          /* hairlines */
  --nav: rgba(255, 255, 255, .78);

  /* ---- Action: system blue, the colour macOS uses for the thing you can click. ---- */
  --action: #0071e3;
  --action-hover: #0077ed;
  --link: #0066cc;

  /* ---- Ember: sampled from the app icon. The brand's one colour, used in exactly three places:
          the icon, the hero wash behind the product, and one line of the headline. ---- */
  --ember-light: #ffbb7b;
  --ember: #f36642;
  --ember-text: linear-gradient(90deg, #f26a2e, #dc3a20);
  --wash: linear-gradient(180deg, #fff6ee 0%, #ffe6d6 52%, #ffd0b8 100%);

  /* ---- Status: the app's verdict colours (macOS system colours). They only ever mean status. ---- */
  --relaxed: #34c759;
  --busy: #ffcc00;
  --near: #ff9500;
  --throttling: #ff3b30;

  /* ---- Type: the system font, on Apple's own scale. Size / line height / tracking travel together. ---- */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, monospace;

  --t-hero: clamp(2.5rem, 7.6vw, 5rem);        /* 40–80 */
  --t-title: clamp(2rem, 4.6vw, 3rem);         /* 32–48 */
  --t-tile: clamp(1.3125rem, 2.3vw, 1.75rem);  /* 21–28 */
  --t-lede: clamp(1.1875rem, 1.9vw, 1.3125rem);/* 19–21 */
  --t-body: 1.0625rem;                         /* 17 */
  --t-small: .875rem;                          /* 14 */
  --t-caption: .75rem;                         /* 12 */

  --lh-hero: 1.05;   --tr-hero: -.015em;
  --lh-title: 1.08;  --tr-title: -.003em;
  --lh-tile: 1.14;   --tr-tile: .007em;
  --lh-lede: 1.38;   --tr-lede: .011em;
  --lh-body: 1.47;   --tr-body: -.022em;
  --lh-small: 1.43;  --tr-small: -.016em;
  --lh-caption: 1.33;--tr-caption: -.01em;

  /* ---- Space: 4-point scale. ---- */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px; --s-10: 140px;
  --gutter: clamp(16px, 4vw, 22px);
  --page: 1024px;
  --gap: 20px;              /* between tiles */

  /* ---- Shape. ---- */
  --r-tile: 28px;
  --r-stage: 36px;
  --r-window: 22px;         /* a capture of the whole menu */
  --r-control: 980px;       /* capsule */
  --shadow-window: 0 0 0 .5px rgba(0, 0, 0, .12), 0 18px 50px -12px rgba(120, 50, 20, .28), 0 4px 14px rgba(0, 0, 0, .06);
  --shadow-module: 0 0 0 .5px rgba(0, 0, 0, .06);

  --ease: cubic-bezier(.25, .1, .25, 1);
  --fast: 200ms;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --band: #000000;
    --tile: #1d1d1d;        /* the app's window in dark mode */
    --ink: #f5f5f7;
    --ink-2: #a1a1a6;
    --ink-3: #86868b;
    --line: #424245;
    --nav: rgba(22, 22, 23, .78);
    --link: #2997ff;
    --ember-text: linear-gradient(90deg, #ffb27a, #ff6f47);
    --wash: linear-gradient(180deg, #170c07 0%, #33170c 55%, #55230f 100%);
    --relaxed: #30d158;
    --busy: #ffd60a;
    --near: #ff9f0a;
    --throttling: #ff453a;
    --shadow-window: 0 0 0 .5px rgba(255, 255, 255, .16), 0 24px 60px -12px rgba(0, 0, 0, .7);
    --shadow-module: 0 0 0 .5px rgba(255, 255, 255, .08);
  }
}
