/*
 * IdRa brand tokens: the single source of truth for every IdRa surface (app, docs, landing).
 * Plain custom properties, no framework. See docs/BRAND.md.
 *
 * Every themed value is `light-dark(<light>, <dark>)`, so one block covers both modes:
 * it follows the OS by default, and `.light` / `.dark` on an ancestor force a mode.
 */

:root {
  color-scheme: light dark;

  /* Fixed brand inks: the same in both modes. */
  --ink: #0b3c43;
  --ink-raised: #14505a;
  --ink-line: #24626c;
  --ink-foreground: #d5e6e6;
  --intaglio: #0e6470;
  --intaglio-light: #5cc4cc;
  --iris: #8a6fd1;

  /* Surfaces and text */
  --background: light-dark(#f2f6f5, #0c1b1e);
  --foreground: light-dark(#14282c, #e6eeed);
  --card: light-dark(#ffffff, #122428);
  --card-foreground: var(--foreground);
  --popover: light-dark(#ffffff, #16292e);
  --popover-foreground: var(--foreground);
  --muted: light-dark(#e8efed, #1a3035);
  --muted-foreground: light-dark(#4f6367, #a0b3b5);
  --secondary: light-dark(#e2ebe9, #1f373c);
  --secondary-foreground: light-dark(#1c3438, #dbe6e5);
  --border: light-dark(#d3dedc, #27403f);
  --input: light-dark(#7a8e91, #62797c);

  /* Action. A tenant's brand color replaces --primary and --ring on its branded surfaces. */
  --primary: light-dark(var(--intaglio), var(--intaglio-light));
  --primary-foreground: light-dark(#ffffff, #062226);
  --accent: light-dark(#dcebea, #1c3d43);
  --accent-foreground: light-dark(#0b4f59, #b9e6e8);
  --ring: var(--primary);

  /* Status: `-foreground` is text and icons, `-surface` the tint behind them. */
  --success: light-dark(#0f6b43, #6fd6a0);
  --success-surface: light-dark(#dcf2e6, #10331f);
  --warning: light-dark(#7d5200, #f0c35a);
  --warning-surface: light-dark(#faeecb, #3a2c08);
  --destructive: light-dark(#b3261e, #ff9c92);
  --destructive-surface: light-dark(#fbe3e0, #421614);
  --info: light-dark(#1a5aa8, #8fbdf5);
  --info-surface: light-dark(#e1ecfa, #122c4c);

  /* Charts. Slots 2-4 carry good / warning / critical. Validated for color-blind separation. */
  --chart-1: light-dark(#0a6fb0, #3187dc);
  --chart-2: light-dark(#0f8f6f, #0d9a68);
  --chart-3: light-dark(#dba100, #ad9000);
  --chart-4: light-dark(#c5321f, #d8432f);
  --chart-5: light-dark(#8259d6, #9878e4);
  --chart-serious: light-dark(#e0701a, #d9742a);
  --chart-neutral: light-dark(#8a9a9c, #6f8285);

  /* Navigation rail: ink in both modes. */
  --sidebar: light-dark(var(--ink), #09262b);
  --sidebar-foreground: var(--ink-foreground);
  --sidebar-primary: var(--intaglio-light);
  --sidebar-primary-foreground: #062226;
  --sidebar-accent: light-dark(var(--ink-raised), #123c43);
  --sidebar-accent-foreground: #ffffff;
  --sidebar-border: light-dark(var(--ink-line), #1b444b);
  --sidebar-ring: var(--intaglio-light);

  /* Type */
  --font-sans: "Atkinson Hyperlegible Next Variable", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "Atkinson Hyperlegible Mono Variable", ui-monospace, monospace;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;

  /* Spacing: multiples of one 4px unit. */
  --space-unit: 0.25rem;

  /* Radius: controls `--radius`; scale up with the size of the surface. */
  --radius: 0.5rem;
  --radius-stamp: 0.25rem; /* status badges */
  --radius-panel: 0.75rem; /* panels, tables, dialogs */

  /* Motion */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --duration-press: 120ms;
  --duration-ui: 180ms;
}

.light {
  color-scheme: light;
}

.dark {
  color-scheme: dark;
}
