/* ============================================================
   Qertum — Brand Mark v1.0 design system
   "Monochrome by design. Ink on light, paper on ink — nothing else."
   Ink #0C100F · Paper #F5F7F5
   A monogram built from cryptographic geometry, not decoration:
   hairlines, fixed proportions, generous clear space.
   ============================================================ */

/* ---- Self-hosted variable fonts (latin subset) ----
   Served from our own origin so the page makes no third-party request, the
   CSP needs no external font-src, and no visitor IP reaches a font CDN.
   Files are copied from the @fontsource-variable/* dev dependencies into
   public/fonts; re-copy them after bumping those packages. */
@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Space Grotesk Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 300 700;
  src: url("/fonts/space-grotesk-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url("/fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* The only two colours in the system */
  --ink: #0c100f;
  --paper: #f5f7f5;

  /* Semantic fg/bg — Paper on Ink by default */
  --fg: var(--paper);
  --bg: var(--ink);

  /* Tonal steps, all derived from fg over bg (still monochrome).
     The mix percentages are contrast floors, not taste: --fg-dim is the
     lightest tone still used for real text. The 64% mix clears WCAG AA
     (4.5:1) in both themes, including text on raised card surfaces.
     It used to be 40%, which measured 3.5:1 on ink and failed. Anything
     below --fg-dim is decorative only and must never carry text. */
  --fg-muted: color-mix(in srgb, var(--fg) 72%, var(--bg));
  --fg-dim: color-mix(in srgb, var(--fg) 64%, var(--bg));
  --fg-faint: color-mix(in srgb, var(--fg) 28%, var(--bg));

  --line: color-mix(in srgb, var(--fg) 10%, var(--bg));
  --line-strong: color-mix(in srgb, var(--fg) 20%, var(--bg));

  --surface: color-mix(in srgb, var(--fg) 4%, var(--bg));
  --surface-2: color-mix(in srgb, var(--fg) 8%, var(--bg));

  /* Typography — Space Grotesk for the engineered display voice,
     Inter for reading, JetBrains Mono for technical labels & code */
  --font-display: "Space Grotesk Variable", "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-sans: "Inter Variable", "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono Variable", "JetBrains Mono", ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace;

  /* Layout */
  --maxw: 1120px;
  --radius: 8px;
  --radius-sm: 4px;
}

/* Light theme overrides */
:root[data-theme="light"] {
  --fg: var(--ink);
  --bg: var(--paper);
}

/* "Ink on paper" — the light inversion of the system */
.invert {
  --fg: var(--ink);
  --bg: var(--paper);
  background: var(--bg);
  color: var(--fg);
}
