/* Design tokens for genupixel.xyz, taken from honest-router's colors_and_type.css.
   Changes: self-hosted fonts instead of a remote font stylesheet, dark values
   behind prefers-color-scheme instead of a .dark class, type sizes in rem, and
   two page-width tokens. */

@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/geist-latin.woff2") format("woff2");
  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+2074, u+20ac, u+2122, u+2191, u+2193, u+2212, u+2215, u+feff, u+fffd;
}

@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/geist-mono-latin.woff2") format("woff2");
  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+2074, u+20ac, u+2122, u+2191, u+2193, u+2212, u+2215, u+feff, u+fffd;
}

:root {
  color-scheme: light dark;

  --background: oklch(1 0 0);
  --foreground: oklch(0.145 0 0);
  --card: oklch(1 0 0);
  --card-foreground: oklch(0.145 0 0);
  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.145 0 0);
  --primary: oklch(0.205 0 0);
  --primary-foreground: oklch(0.985 0 0);
  --secondary: oklch(0.97 0 0);
  --secondary-foreground: oklch(0.205 0 0);
  --muted: oklch(0.97 0 0);
  --muted-foreground: oklch(0.556 0 0);
  --accent: oklch(0.97 0 0);
  --accent-foreground: oklch(0.205 0 0);
  --destructive: oklch(0.577 0.245 27.325);
  --destructive-foreground: oklch(0.985 0 0);
  --border: oklch(0.922 0 0);
  --input: oklch(0.922 0 0);
  --ring: oklch(0.708 0 0);

  --hr-trust: oklch(0.62 0.13 150);
  --hr-trust-soft: oklch(0.95 0.04 150);
  --hr-trust-strong: oklch(0.30 0.12 155);
  --hr-warn: oklch(0.74 0.15 75);
  --hr-warn-soft: oklch(0.96 0.06 80);
  --hr-warn-strong: oklch(0.46 0.16 60);
  --hr-error-gateway: oklch(0.55 0.20 25);
  --hr-error-gateway-soft: oklch(0.96 0.05 25);
  --hr-error-gateway-strong: oklch(0.42 0.18 25);
  --hr-error-upstream: oklch(0.55 0.14 260);
  --hr-error-upstream-soft: oklch(0.96 0.04 260);
  --hr-error-upstream-strong: oklch(0.42 0.13 260);

  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "JetBrains Mono", "SF Mono", menlo, monospace;

  --text-display-size: clamp(2.25rem, 1.4rem + 3.6vw, 3.5rem);
  --text-display-line: 1.05;
  --text-h1-size: clamp(1.875rem, 1.5rem + 1.6vw, 2.25rem);
  --text-h1-line: 1.15;
  --text-h2-size: 1.5rem;
  --text-h2-line: 1.25;
  --text-h3-size: 1.125rem;
  --text-h3-line: 1.35;
  --text-lead-size: 1.125rem;
  --text-lead-line: 1.6;
  --text-body-size: 1rem;
  --text-body-line: 1.6;
  --text-small-size: 0.875rem;
  --text-small-line: 1.45;
  --text-mono-lg-size: 0.875rem;
  --text-mono-size: 0.875rem;
  --text-mono-sm-size: 0.8125rem;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-14: 56px;
  --space-20: 80px;

  --radius: 0.625rem;
  --radius-sm: 0.375rem;
  --radius-btn: 0.5rem;
  --radius-pill: 9999px;

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.04);
  --shadow-md: 0 4px 12px -2px rgb(0 0 0 / 0.08), 0 2px 4px -2px rgb(0 0 0 / 0.04);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 80ms;
  --dur: 120ms;
  --dur-slow: 200ms;

  --page-wide: 75rem;
  --page-prose: 55rem;
}

/* Documentation-only: @media queries cannot read CSS variables; copy the px literal. */
@media (prefers-color-scheme: dark) {
  :root {
    --background: oklch(0.145 0 0);
    --foreground: oklch(0.985 0 0);
    --card: oklch(0.18 0 0);
    --card-foreground: oklch(0.985 0 0);
    --popover: oklch(0.205 0 0);
    --popover-foreground: oklch(0.985 0 0);
    --primary: oklch(0.985 0 0);
    --primary-foreground: oklch(0.205 0 0);
    --secondary: oklch(0.205 0 0);
    --secondary-foreground: oklch(0.985 0 0);
    --muted: oklch(0.205 0 0);
    --muted-foreground: oklch(0.708 0 0);
    --accent: oklch(0.205 0 0);
    --accent-foreground: oklch(0.985 0 0);
    --destructive: oklch(0.396 0.141 25.723);
    --destructive-foreground: oklch(0.985 0 0);
    --border: oklch(1 0 0 / 0.12);
    --input: oklch(1 0 0 / 0.15);
    --ring: oklch(0.439 0 0);

    --hr-trust: oklch(0.72 0.13 150);
    --hr-trust-soft: oklch(0.28 0.06 150);
    --hr-trust-strong: oklch(0.85 0.13 150);
    --hr-warn: oklch(0.78 0.15 75);
    --hr-warn-soft: oklch(0.28 0.06 80);
    --hr-warn-strong: oklch(0.85 0.15 75);
    --hr-error-gateway: oklch(0.66 0.20 25);
    --hr-error-gateway-soft: oklch(0.28 0.08 25);
    --hr-error-gateway-strong: oklch(0.80 0.16 25);
    --hr-error-upstream: oklch(0.70 0.14 260);
    --hr-error-upstream-soft: oklch(0.26 0.06 260);
    --hr-error-upstream-strong: oklch(0.80 0.12 260);
  }
}
