/* rapploop.com's tokens: the Badge system (founder/brand.md §6). Ink, Paper and one Signal yellow. The values match
   packages/design-tokens, which the app reads; this file is written by hand, so change both together.
   Signal has one job, "act now": it is a fill with ink words on it, never text and never a thin line (1.3:1 on paper).
   Every colour site.css uses is set here, including the two scoped palettes at the end (the ink band, the message). */
:root {
  color-scheme: light dark;
  --space-2xs: 4px;
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 40px;
  --space-2xl: 64px;
  --space-3xl: 96px;
  --text-xs: 0.8125rem;
  --text-sm: 0.875rem;
  --text-md: 1rem;
  --text-lg: 1.125rem;
  --text-lead: clamp(1.125rem, 0.4vw + 1rem, 1.3125rem);
  --text-title: clamp(1.375rem, 0.6vw + 1.2rem, 1.75rem);
  --text-section: clamp(2.125rem, 2.6vw + 1.3rem, 3.75rem);
  --text-statement: clamp(2.125rem, 4.8vw + 0.5rem, 5.25rem);
  /* Larger than the plan's 9rem: the semi-condensed Archivo cut needs about 11rem for the first line to fill the box */
  --text-hero: clamp(3rem, 11.5vw + 0.5rem, 11rem);
  --text-display: clamp(2.625rem, 10.5vw, 6rem);
  --font-display: 'Archivo', 'Arial Narrow', system-ui, sans-serif;
  --font-body: 'Inter', 'Inter Fallback', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --tracking-display: -0.02em;
  --container: 1200px;
  --gutter: 48px;
  --grid-gap: 24px;
  --section-gap-s: 96px;
  --section-gap: 144px;
  --section-gap-l: 176px;
  --rule-hair: 1px;
  --rule-bar: 2px;
  --ease-enter: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-exit: cubic-bezier(0.7, 0, 0.84, 0);
  --ease-out: var(--ease-enter);
  --dur-quick: 120ms;
  --dur-micro: var(--dur-quick);
  --dur-base: 240ms;
  --dur-slow: 480ms;
  --screen-w: 380px;
  --screen-h: 600px;

  --color-paper: #f4f3ef;
  --color-surface: #ffffff;
  --color-well: #e7e5df;
  --color-ink: #111418;
  --color-muted: #5b5f66;
  --color-rule: #a3a5a6;
  --color-rule-strong: #6b6f76;
  --color-signal: #ffd400;
  --color-signal-ink: #111418;
  --color-error: #9b0009;
  --color-focus: #111418;
  /* The ink band's ground: ink by day, paper at night (the scoped palettes at the end of this file) */
  --color-band: #111418;
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --color-paper: #0d0f12;
  --color-surface: #16191d;
  --color-well: #1f2328;
  --color-ink: #f4f3ef;
  --color-muted: #a0a4ab;
  --color-rule: #2e333a;
  --color-rule-strong: #858990;
  --color-error: #f2847a;
  --color-focus: #f4f3ef;
  --color-band: #f4f3ef;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --color-paper: #0d0f12;
    --color-surface: #16191d;
    --color-well: #1f2328;
    --color-ink: #f4f3ef;
    --color-muted: #a0a4ab;
    --color-rule: #2e333a;
    --color-rule-strong: #858990;
    --color-error: #f2847a;
    --color-focus: #f4f3ef;
    --color-band: #f4f3ef;
  }
}

@media (max-width: 59.99rem) {
  :root {
    --gutter: 24px;
    --section-gap-s: 80px;
    --section-gap: 112px;
    --section-gap-l: 136px;
  }
}
@media (max-width: 39.99rem) {
  :root {
    --gutter: 16px;
    --grid-gap: 16px;
    --section-gap-s: 64px;
    --section-gap: 88px;
    --section-gap-l: 112px;
  }
}

/* The ink band: a section printed in reverse, in both themes. By day it is the night palette; at night it is the day
   palette, so the change of material shows either way */
.band-ink {
  --color-paper: #0d0f12;
  --color-surface: #16191d;
  --color-well: #1f2328;
  --color-ink: #f4f3ef;
  --color-muted: #a0a4ab;
  --color-rule: #2e333a;
  --color-rule-strong: #858990;
  --color-focus: #f4f3ef;
  --color-band-rule: rgb(244 243 239 / 0.24);
}
:root[data-theme='dark'] .band-ink {
  --color-paper: #f4f3ef;
  --color-surface: #ffffff;
  --color-well: #e7e5df;
  --color-ink: #111418;
  --color-muted: #5b5f66;
  --color-rule: #a3a5a6;
  --color-rule-strong: #6b6f76;
  --color-focus: #111418;
  --color-band-rule: rgb(17 20 24 / 0.24);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .band-ink {
    --color-paper: #f4f3ef;
    --color-surface: #ffffff;
    --color-well: #e7e5df;
    --color-ink: #111418;
    --color-muted: #5b5f66;
    --color-rule: #a3a5a6;
    --color-rule-strong: #6b6f76;
    --color-focus: #111418;
    --color-band-rule: rgb(17 20 24 / 0.24);
  }
}
/* The message inside the band is printed in the page's own palette, the reverse of the band */
.band-ink .message {
  --color-paper: #f4f3ef;
  --color-surface: #ffffff;
  --color-ink: #111418;
  --color-muted: #5b5f66;
  --color-rule: #a3a5a6;
  /* The box's own colour, so its outer edges line up with the Signal bar under it */
  --color-rule-strong: #f4f3ef;
  --color-focus: #111418;
}
:root[data-theme='dark'] .band-ink .message {
  --color-paper: #0d0f12;
  --color-surface: #0d0f12;
  --color-ink: #f4f3ef;
  --color-muted: #a0a4ab;
  --color-rule: #2e333a;
  --color-rule-strong: #0d0f12;
  --color-focus: #f4f3ef;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .band-ink .message {
    --color-paper: #0d0f12;
    --color-surface: #0d0f12;
    --color-ink: #f4f3ef;
    --color-muted: #a0a4ab;
    --color-rule: #2e333a;
    --color-rule-strong: #0d0f12;
    --color-focus: #f4f3ef;
  }
}
