/* Design tokens, both themes, base type. Tokens and type only: no layout, no components. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/assets/fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

/* Source Sans 3 Bold: only the heading inside the example poster on /stories/work/ (the
   scribble to design figure). Hemal approved the face with the poster mockup, 2026-11-16. */
@font-face {
  font-family: "Source Sans 3";
  src: url("/assets/fonts/source-sans-3-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Serif";
  src: url("/assets/fonts/instrument-serif-latin-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* Dark theme (default): direction E, the black gallery wall. Colour lives only in the bands,
   the mural and the red full stop; everything else is black, white and grey. */
:root {
  --hs-bg: #080808;
  --hs-panel: #151617;
  --hs-line: #34373c;
  --hs-text: #fcfcfc;
  --hs-muted: #b4bcc6;
  --hs-band-green: #3dff8f;
  --hs-band-red: #ff3b47;
  --hs-band-blue: #6a9dff;
  --hs-band-ink: #080808;
  --hs-turn-bg: #f3efe9;
  --hs-turn-text: #080808;
  --hs-turn-muted: #3b3d42;
  --hs-focus: #ffd84d;
  /* Send button states. Amber and green carry dark grey text (8.3:1 and 11.5:1);
     the failure red is deep enough for white text (7.1:1). */
  --hs-send-amber: #ffb000;
  --hs-send-red: #b0121c;
  --hs-send-ink: #262626;
  --hs-send-paper: #ffffff;

  --hs-font-display: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --hs-font-serif: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --hs-font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  /* One ch of Bricolage holds about 1.46 characters of English: 52ch keeps a line under 80. */
  --hs-measure: 52ch;

  --bs-body-bg: var(--hs-bg);
  --bs-body-bg-rgb: 8, 8, 8;
  --bs-body-color: var(--hs-text);
  --bs-body-color-rgb: 252, 252, 252;
  --bs-emphasis-color: var(--hs-text);
  --bs-emphasis-color-rgb: 252, 252, 252;
  --bs-heading-color: var(--hs-text);
  --bs-code-color: var(--hs-text);
  --bs-secondary-color: var(--hs-muted);
  --bs-secondary-color-rgb: 180, 188, 198;
  --bs-tertiary-color: var(--hs-muted);
  --bs-tertiary-color-rgb: 180, 188, 198;
  --bs-secondary-bg: var(--hs-panel);
  --bs-secondary-bg-rgb: 21, 22, 23;
  --bs-tertiary-bg: var(--hs-panel);
  --bs-tertiary-bg-rgb: 21, 22, 23;
  --bs-link-color: var(--hs-text);
  --bs-link-color-rgb: 252, 252, 252;
  --bs-link-hover-color: var(--hs-text);
  --bs-link-hover-color-rgb: 252, 252, 252;
  --bs-border-color: var(--hs-line);
  --bs-border-color-translucent: rgba(252, 252, 252, 0.2);
  color-scheme: dark;
  --bs-body-font-family: var(--hs-font-display);
  --bs-body-font-size: 1rem;
  --bs-body-line-height: 1.5;
}

/* Light theme: the void becomes linen and the turned page inverts to black. Bands keep their
   colours and ink. */
html[data-theme="light"] {
  --hs-bg: #f3efe9;
  --hs-panel: #e8e2d8;
  --hs-line: #c9c2b6;
  --hs-text: #080808;
  --hs-muted: #3b3d42;
  --hs-band-green: #3dff8f;
  --hs-band-red: #ff3b47;
  --hs-band-blue: #6a9dff;
  --hs-band-ink: #080808;
  --hs-turn-bg: #080808;
  --hs-turn-text: #fcfcfc;
  --hs-turn-muted: #b4bcc6;
  --hs-focus: #080808;
  color-scheme: light;

  --bs-body-bg: var(--hs-bg);
  --bs-body-bg-rgb: 243, 239, 233;
  --bs-body-color: var(--hs-text);
  --bs-body-color-rgb: 8, 8, 8;
  --bs-emphasis-color: var(--hs-text);
  --bs-emphasis-color-rgb: 8, 8, 8;
  --bs-heading-color: var(--hs-text);
  --bs-code-color: var(--hs-text);
  --bs-secondary-color: var(--hs-muted);
  --bs-secondary-color-rgb: 59, 61, 66;
  --bs-tertiary-color: var(--hs-muted);
  --bs-tertiary-color-rgb: 59, 61, 66;
  --bs-secondary-bg: var(--hs-panel);
  --bs-secondary-bg-rgb: 232, 226, 216;
  --bs-tertiary-bg: var(--hs-panel);
  --bs-tertiary-bg-rgb: 232, 226, 216;
  --bs-link-color: var(--hs-text);
  --bs-link-color-rgb: 8, 8, 8;
  --bs-link-hover-color: var(--hs-text);
  --bs-link-hover-color-rgb: 8, 8, 8;
  --bs-border-color: var(--hs-line);
  --bs-border-color-translucent: rgba(8, 8, 8, 0.2);
}

/* Base type */
html {
  font-size: 112.5%;
}

body {
  background-color: var(--hs-bg);
  color: var(--hs-text);
  font-family: var(--hs-font-display);
  font-size: 1rem;
  line-height: 1.5;
  text-align: start;
}

p,
li,
blockquote,
dd {
  max-width: var(--hs-measure);
  text-align: start;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--hs-font-display);
  line-height: 1.5;
  text-align: start;
}

a {
  color: var(--hs-text);
  text-underline-offset: 0.2em;
}

code,
kbd,
pre,
samp {
  font-family: var(--hs-font-mono);
}

:focus-visible {
  outline: 3px solid var(--hs-focus);
  outline-offset: 4px;
}
