/* Beekon console — design tokens.
 *
 * The colour/geometry/type system is the beekon brand system, lifted verbatim
 * from the landing + docs sites (beekon-landing/src/styles/global.css). Values
 * are OKLCH by design: the neutrals are NOT grey, they carry chroma 0.008-0.025
 * at hue 60-80, which is what makes the surface read as beekon rather than as a
 * generic dashboard. Do not substitute slate/#fff/#000.
 *
 * Fonts are self-hosted (fonts/*.woff2). The console CSP is `default-src 'self'`
 * with no font-src, so font-src falls back to 'self' and a CDN webfont would be
 * blocked outright — and an authenticated operator console should make zero
 * third-party requests anyway. Licences ship alongside in fonts/.
 */

/* --- Faces. Variable fonts: one file covers the whole weight range. --------- */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter.woff2") format("woff2");
}

@font-face {
  font-family: "Inter Tight";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-tight.woff2") format("woff2");
}

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

:root {
  /* Surfaces */
  --bg: oklch(98.5% 0.008 80);
  --bg-elev: oklch(99.5% 0.005 80);
  --bg-sunk: oklch(96% 0.012 80);
  --line: oklch(90% 0.012 75);
  --line-strong: oklch(82% 0.018 70);

  /* Ink */
  --ink: oklch(20% 0.015 60);
  --ink-2: oklch(35% 0.015 60);
  --ink-3: oklch(52% 0.02 65);
  --ink-4: oklch(65% 0.02 70);

  /* Brand */
  --honey: oklch(74% 0.16 65);
  --honey-2: oklch(82% 0.13 75);
  --honey-3: oklch(68% 0.18 50);
  --honey-ink: oklch(45% 0.14 55);

  /* Accent text + solid accent surfaces resolve per theme. Light uses the
     darkened --honey-ink for text (contrast on a near-white bg); dark uses
     --honey directly. Every accent rule reads these, never the raw ramp. */
  --accent-text: var(--honey-ink);
  --accent-solid: var(--ink);
  --accent-solid-ink: var(--bg);

  /* Status */
  --green: oklch(62% 0.13 155);
  --red: oklch(60% 0.18 25);
  --amber: oklch(72% 0.15 75);

  /* Geometry */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 22px;
  --r-pill: 999px;

  /* Type families */
  --f-display: "Inter Tight", "Inter", -apple-system, system-ui, sans-serif;
  --f-body: "Inter", -apple-system, system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Type scale — denser than the marketing scale (this is an operator tool),
     but keeping the brand's fractional sizes and its tracking signature:
     negative on display, strongly positive on uppercase mono micro-labels. */
  --t-display: 22px;
  --t-h2: 17px;
  --t-h3: 14.5px;
  --t-body: 14px;
  --t-sm: 13px;
  --t-xs: 12.5px;
  --t-micro: 11.5px;
  --t-eyebrow: 10.5px;

  --tr-display: -0.02em;
  --tr-h2: -0.018em;
  --tr-h3: -0.01em;
  --tr-body: -0.005em;
  --tr-eyebrow: 0.12em;

  /* Space — 4px grid, biased to multiples of 8 like the source system */
  --s-1: 4px;
  --s-2: 6px;
  --s-3: 8px;
  --s-4: 10px;
  --s-5: 12px;
  --s-6: 16px;
  --s-7: 20px;
  --s-8: 24px;
  --s-9: 32px;
  --s-10: 48px;

  /* Layout */
  --sidebar-w: 232px;
  --topbar-h: 56px;
  --content-max: 1120px;

  /* Motion */
  --dur-fast: 0.15s;
  --dur: 0.18s;
  --ease: ease;

  /* Focus ring — the brand's own treatment */
  --focus-ring: 0 0 0 3px color-mix(in oklch, var(--ink) 8%, transparent);

  color-scheme: light;
}

/* Dark: follows the OS by default, unless explicitly overridden to light. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: oklch(16% 0.012 60);
    --bg-elev: oklch(20% 0.015 60);
    --bg-sunk: oklch(13% 0.01 60);
    --line: oklch(28% 0.018 60);
    --line-strong: oklch(38% 0.025 60);
    --ink: oklch(96% 0.008 80);
    --ink-2: oklch(82% 0.012 75);
    --ink-3: oklch(65% 0.02 70);
    --ink-4: oklch(50% 0.02 65);

    --accent-text: var(--honey);
    --accent-solid: var(--honey);
    --accent-solid-ink: oklch(15% 0.02 60);
    --focus-ring: 0 0 0 3px color-mix(in oklch, var(--honey) 22%, transparent);

    color-scheme: dark;
  }
}

/* Manual override wins in both directions. */
:root[data-theme="dark"] {
  --bg: oklch(16% 0.012 60);
  --bg-elev: oklch(20% 0.015 60);
  --bg-sunk: oklch(13% 0.01 60);
  --line: oklch(28% 0.018 60);
  --line-strong: oklch(38% 0.025 60);
  --ink: oklch(96% 0.008 80);
  --ink-2: oklch(82% 0.012 75);
  --ink-3: oklch(65% 0.02 70);
  --ink-4: oklch(50% 0.02 65);

  --accent-text: var(--honey);
  --accent-solid: var(--honey);
  --accent-solid-ink: oklch(15% 0.02 60);
  --focus-ring: 0 0 0 3px color-mix(in oklch, var(--honey) 22%, transparent);

  color-scheme: dark;
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --dur-fast: 0.01ms;
    --dur: 0.01ms;
  }
}
