/* Design tokens for The Broadsheet. Change values here, not in components. */

@font-face {
  font-family: 'Newsreader Display';
  src: url('../fonts/newsreader-display.woff2') format('woff2');
  font-weight: 300 400;
  font-display: swap;
}
@font-face {
  font-family: 'Newsreader';
  src: url('../fonts/newsreader-text.woff2') format('woff2');
  font-weight: 400 500;
  font-display: swap;
}
@font-face {
  font-family: 'Newsreader';
  src: url('../fonts/newsreader-italic.woff2') format('woff2');
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('../fonts/jetbrains-mono.woff2') format('woff2');
  font-weight: 400 500;
  font-display: swap;
}

:root {
  /* Colour roles */
  --paper: #f1ede4;       /* page */
  --paper-deep: #e6e0d3;  /* code plates, inset blocks */
  --ink: #151515;         /* headlines and body, 15.6:1 on paper */
  --ink-soft: #4a4741;    /* metadata and secondary text, 7.9:1 */
  --cobalt: #2447a6;      /* links, focus, the travelling dots, 7.1:1 */
  --cobalt-wash: rgb(36 71 166 / 0.1);
  --rule: #c9c3b6;        /* hairlines only, never text */
  --error: #8a1c12;       /* failed actions, 8.0:1 on paper */

  /* Type */
  --font-display: 'Newsreader Display', 'Newsreader', Georgia, 'Times New Roman', serif;
  --font-text: 'Newsreader', Georgia, 'Times New Roman', serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;

  --step-masthead: clamp(3.5rem, 12.4vw, 13.5rem);
  --step-h2: clamp(2.25rem, 6vw, 5.5rem);
  --step-h3: clamp(1.75rem, 3.5vw, 3rem);
  --step-deck: clamp(1.25rem, 2vw, 1.625rem);
  --step-body: 1.0625rem;
  --step-meta: 0.8125rem;
  --step-code: 0.875rem;

  /* Spacing, 4px base */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;  --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 72px; --s-9: 112px; --s-10: 160px;
  --section-pad: clamp(56px, 7vw, 104px);
  --gutter: 16px;
  --col-gap: 16px;
  --cols: 4;
  --max: 1600px;
  --header-h: 52px;

  /* Motion */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 160ms;
  --dur: 240ms;

  color-scheme: light;
}

@media (min-width: 768px) {
  :root { --gutter: 32px; --col-gap: 24px; --cols: 6; --header-h: 56px; }
}
@media (min-width: 1100px) {
  :root { --gutter: 48px; --col-gap: 32px; --cols: 12; }
}
