@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("assets/fonts/newsreader-400.woff2") format("woff2");
}
@font-face {
  font-family: "Newsreader";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/newsreader-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 400 600;
  font-stretch: 100%;
  font-display: swap;
  src: url("assets/fonts/archivo-var.woff2") format("woff2");
}
@font-face {
  font-family: "Chivo Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/chivo-mono-400.woff2") format("woff2");
}
@font-face {
  font-family: "Chivo Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("assets/fonts/chivo-mono-500.woff2") format("woff2");
}

:root {
  color-scheme: light;

  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
  --font-body: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Chivo Mono", ui-monospace, "SFMono-Regular", monospace;

  --color-paper: #f4efe4;
  --color-paper-2: #eae2d3;
  --color-paper-3: #fbf8f0;
  --color-ink: #14120e;
  --color-ink-2: #3b362c;
  --color-muted: #6a6254;
  --color-rule: #d3c9b8;
  --color-rule-strong: #a79c87;

  --color-accent: #0069b4;
  --color-accent-bright: #007cd4;
  --color-accent-ink: #ffffff;
  --color-accent-soft: #d8eaf7;
  --color-signal: #b33a23;
  --color-signal-bright: #c8452c;
  --color-focus: #0069b4;
  --color-error: #b33a23;
  --color-success: #2f6b4f;

  --color-band: #14120e;
  --color-band-2: #1e1a14;
  --color-band-ink: #f4efe4;
  --color-band-muted: #bdb3a2;
  --color-band-rule: #3e382d;
  --color-band-accent: #8fc7f2;
  --color-band-accent-ink: #101215;
  --color-band-error: #ffb09a;
  --color-band-success: #9ad8b8;
  --color-document: #fbf8f0;

  --color-backdrop: rgb(20 18 14 / 0.72);

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-md: 1.0625rem;
  --text-lg: 1.25rem;
  --text-xl: 1.5rem;
  --text-display: clamp(3.1rem, 5.6vw, 5.8rem);
  --text-h2: clamp(2.2rem, 3.4vw, 3.9rem);
  --text-h3: clamp(1.2rem, 1.2vw + 0.9rem, 1.6rem);
  --text-lead: clamp(1.05rem, 0.5vw + 0.95rem, 1.3rem);
  --text-mono: 0.72rem;

  --container: 1320px;
  --gutter: clamp(20px, 5vw, 72px);
  --gap: clamp(16px, 2vw, 28px);
  --section-gap: clamp(96px, 11vw, 168px);
  --nav-h: 76px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 240ms;

  --z-base: 1;
  --z-raised: 10;
  --z-sticky: 200;
  --z-nav: 300;
  --z-modal: 400;
  --z-toast: 500;
}

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

  --color-paper: #12110e;
  --color-paper-2: #1a1814;
  --color-paper-3: #22201a;
  --color-ink: #f2ede1;
  --color-ink-2: #d8d0c0;
  --color-muted: #a69d8c;
  --color-rule: #3a352b;
  --color-rule-strong: #5e5749;

  --color-accent: #7cc0f5;
  --color-accent-bright: #9ad2ff;
  --color-accent-ink: #101215;
  --color-accent-soft: #1d2b38;
  --color-signal: #ff9a7e;
  --color-signal-bright: #ffb09a;
  --color-focus: #7cc0f5;
  --color-error: #ff9a7e;
  --color-success: #8fd3b0;

  --color-band: #0b0a08;
  --color-band-2: #15130f;
  --color-band-ink: #f2ede1;
  --color-band-muted: #a99f8e;
  --color-band-rule: #2e2a22;
  --color-band-accent: #8fc7f2;
  --color-band-accent-ink: #101215;
  --color-band-error: #ffb09a;
  --color-band-success: #9ad8b8;
  --color-document: #f4efe4;

  --color-backdrop: rgb(5 4 3 / 0.78);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-mode]) {
    color-scheme: dark;

    --color-paper: #12110e;
    --color-paper-2: #1a1814;
    --color-paper-3: #22201a;
    --color-ink: #f2ede1;
    --color-ink-2: #d8d0c0;
    --color-muted: #a69d8c;
    --color-rule: #3a352b;
    --color-rule-strong: #5e5749;

    --color-accent: #7cc0f5;
    --color-accent-bright: #9ad2ff;
    --color-accent-ink: #101215;
    --color-accent-soft: #1d2b38;
    --color-signal: #ff9a7e;
    --color-signal-bright: #ffb09a;
    --color-focus: #7cc0f5;
    --color-error: #ff9a7e;
    --color-success: #8fd3b0;

    --color-band: #0b0a08;
    --color-band-2: #15130f;
    --color-band-ink: #f2ede1;
    --color-band-muted: #a99f8e;
    --color-band-rule: #2e2a22;
    --color-band-accent: #8fc7f2;
    --color-band-accent-ink: #101215;
    --color-band-error: #ffb09a;
    --color-band-success: #9ad8b8;
    --color-document: #f4efe4;

    --color-backdrop: rgb(5 4 3 / 0.78);
  }
}
