/* B2mrak design tokens (brand v2, 2026-11-11). One file for every system and site we build.
   Rules and reasons: ../BRAND.md (brand) and ../SYSTEM-DESIGN.md (software). Names follow shadcn/ui so our UI kit
   (Radix + Tailwind 4) picks them up as they are. A client's own colour replaces --primary and --ring only. */
:root {
  /* brand */
  --orange: #F0530C; --ink: #16130F; --paper: #F3EEE3; --paper-2: #E9E2D2; --slip: #FFFDF8; --rust: #B83C04;
  --ink-2: #4B453C; --ink-3: #6B6458;

  /* surfaces and text */
  --background: var(--paper);            --foreground: var(--ink);
  --card: var(--slip);                   --card-foreground: var(--ink);
  --popover: var(--slip);                --popover-foreground: var(--ink);
  --muted: var(--paper-2);               --muted-foreground: var(--ink-2);
  --faint: var(--ink-3);
  --accent: var(--paper-2);              --accent-foreground: var(--ink);        /* hover surface, NOT orange */
  --sidebar: var(--slip);                --sidebar-foreground: var(--ink);       --sidebar-accent: var(--paper-2);

  /* action */
  --primary: var(--orange);              --primary-foreground: var(--ink);       /* never white text on orange */
  --secondary: var(--ink);               --secondary-foreground: var(--paper);
  --link: var(--rust);
  --ring: var(--orange);

  /* lines */
  --border: rgb(22 19 15 / .16);         --border-strong: rgb(22 19 15 / .32);   --input: rgb(22 19 15 / .32);
  --rule: var(--ink);                    /* the 2 px ledger rule on top of tables and sections */

  /* status: always with a word and a dot, never colour alone */
  --ok: #1D6B3F;        --ok-soft: rgb(29 107 63 / .11);
  --warn: #8A5A00;      --warn-soft: rgb(138 90 0 / .12);
  --destructive: #B42318; --destructive-soft: rgb(180 35 24 / .09);
  --action: var(--rust); --action-soft: rgb(240 83 12 / .12);                    /* "needs you" */
  --neutral: var(--ink-3); --neutral-soft: rgb(22 19 15 / .07);

  /* type */
  --font-display: "Bricolage Grotesque", "Alexandria", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", "IBM Plex Sans Arabic", system-ui, "Segoe UI", Tahoma, sans-serif;
  --font-mono: "IBM Plex Mono", "IBM Plex Sans Arabic", ui-monospace, monospace;
  --text-xs: .8125rem;  /* 13: the smallest text we ship */
  --text-sm: .875rem;   /* 14: tables, help text */
  --text-base: .9375rem;/* 15: UI text */
  --text-lg: 1.125rem;  /* 18: section titles */
  --text-xl: 1.5rem;    /* 24: page titles (phone) */
  --text-2xl: 1.75rem;  /* 28: page titles (desktop) */

  /* shape */
  --radius-sm: 6px;     /* checkboxes, chips, tags */
  --radius: 10px;       /* inputs, menus, toasts */
  --radius-lg: 14px;    /* cards, dialogs, sheets */
  --radius-pill: 999px; /* buttons, tabs, badges */

  /* space: a 4 px grid */
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-6: 24px; --space-8: 32px; --space-12: 48px;
  --control: 40px; --control-sm: 32px; --control-lg: 48px;   /* heights; 48 for the main action on a phone */
  --sidebar-w: 256px; --sidebar-rail: 64px; --topbar-h: 56px; --tabbar-h: 60px;

  /* depth: borders first; a shadow only when something floats above the page */
  --shadow-float: 0 16px 40px -12px rgb(22 19 15 / .28), 0 0 0 1px rgb(22 19 15 / .08);

  /* motion */
  --ease: cubic-bezier(.2, .7, .2, 1);
  --t-fast: 120ms;      /* hover, press, focus */
  --t-base: 180ms;      /* menus, tooltips, toasts, list rows */
  --t-slow: 240ms;      /* dialogs, sheets, sidebar */
}

/* night theme, per system and only if the client wants it: <html data-theme="dark"> */
:root[data-theme="dark"] {
  --background: #16130F; --foreground: #F3EEE3;
  --card: #1F1B16; --card-foreground: #F3EEE3; --popover: #26211B; --popover-foreground: #F3EEE3;
  --muted: #2A251F; --muted-foreground: #C9C1B2; --faint: #9A9284;
  --accent: #2A251F; --accent-foreground: #F3EEE3;
  --sidebar: #1B1813; --sidebar-foreground: #F3EEE3; --sidebar-accent: #2A251F;
  --secondary: #F3EEE3; --secondary-foreground: #16130F;
  --link: #FF8B55;
  --border: rgb(243 238 227 / .14); --border-strong: rgb(243 238 227 / .28); --input: rgb(243 238 227 / .28); --rule: #F3EEE3;
  --ok: #6FCF97; --warn: #E0B050; --destructive: #F97066; --action: #FF8B55; --neutral: #9A9284;
  --shadow-float: 0 16px 40px -12px rgb(0 0 0 / .7), 0 0 0 1px rgb(243 238 227 / .1);
}

@media (prefers-reduced-motion: reduce) {
  :root { --t-fast: 0ms; --t-base: 0ms; --t-slow: 0ms; }
}
