/* ChefBrain design tokens (Phase 1, 02.11.2026)
   One source for the app and, later, the website. Calm and light: cream and white paper, charcoal text,
   one deep forest green for the brand and the main action, status colours only where status is meant.
   Light is the default on every device. Dark exists only as an explicit choice: <html data-theme="dark">.
   Components read these tokens; nothing else in the CSS should hold a raw colour, size or duration. */
:root {
  /* colour: paper and ink */
  --c-bg: #faf8f3;            /* warm ivory page (brand) */
  --c-surface: #ffffff;       /* cards, fields */
  --c-surface-2: #f4f1eb;     /* hover, quiet fills */
  --c-surface-3: #ece8e0;     /* tracks, skeletons */
  --c-ink: #161917;           /* graphite ink (brand) */
  --c-muted: #5f5e59;         /* secondary text, 6:1 on cream */
  --c-line: #e7e3dc;          /* hairlines */
  --c-line-strong: #d6d1c7;   /* field borders */
  /* colour: brand (deep forest green) */
  --c-brand: #1d4a37;
  --c-brand-hover: #163a2b;
  --c-brand-ink: #ffffff;
  --c-brand-soft: #eaf1ec;
  --c-brand-line: #c9dbcf;
  --c-sage: #8dbe9d;          /* the logo slice: accents and fills only, never text on white */
  --c-night: #0c1c15;         /* the deepest brand surface (login panel) */
  /* colour: status, always with a word or an icon next to it */
  --c-ok: #2b744a; --c-ok-soft: #e8f3ec;
  --c-warn: #94500a; --c-warn-soft: #fbf0e0;   /* amber: only 'above target / needs attention' */
  --c-bad: #b3342b; --c-bad-soft: #fbe9e6;
  /* colour: data origin (real numbers need no badge; demo and missing do) */
  --c-demo: var(--c-muted); --c-demo-soft: var(--c-surface-2);
  --c-missing: var(--c-warn); --c-missing-soft: var(--c-warn-soft);

  /* typography: one family for Hebrew and Latin */
  --font-sans: "IBM Plex Sans Hebrew", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --font-mono: ui-monospace, Menlo, Consolas, monospace;
  --fs-xs: 12px; --fs-sm: 14px; --fs-md: 16px; --fs-lg: 20px; --fs-xl: 24px; --fs-2xl: 32px; --fs-3xl: 44px;
  --fw-regular: 400; --fw-medium: 500; --fw-semibold: 600; --fw-bold: 700;
  --lh-tight: 1.2; --lh-body: 1.55;
  --tracking-tight: -0.015em;

  /* spacing: 4px base */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px;

  /* radius: restrained */
  --radius-sm: 6px;    /* chips inside text, small tags */
  --radius-md: 10px;   /* buttons, fields */
  --radius-lg: 14px;   /* cards, panels, dialogs */
  --radius-pill: 999px;

  /* borders and shadows: a hairline first, a shadow only to lift */
  --border: 1px solid var(--c-line);
  --border-strong: 1px solid var(--c-line-strong);
  --shadow-1: 0 1px 2px rgba(26, 26, 24, .04);
  --shadow-2: 0 1px 2px rgba(26, 26, 24, .04), 0 4px 16px -8px rgba(26, 26, 24, .08);
  --shadow-3: 0 2px 4px rgba(26, 26, 24, .04), 0 16px 36px -14px rgba(26, 26, 24, .20);
  --focus-ring: 0 0 0 3px var(--c-brand-soft);

  /* motion: short and exact; prefers-reduced-motion turns it off in styles.css */
  --dur-fast: 120ms; --dur: 200ms;
  --ease: cubic-bezier(.2, .7, .2, 1);

  /* layout */
  --content-max: 1200px;
  --sidebar-w: 248px;
  --tap-min: 44px;          /* 48px on phones */
  /* breakpoints (CSS cannot read variables inside @media, so these are the agreed numbers):
     phone < 700px, tablet 700–1099px, desktop >= 1100px */

  color-scheme: light;
}

/* Dark: only when chosen. Never follows the device on its own. */
:root[data-theme="dark"] {
  /* the same night as the website: near-black, a faint grid, sage as the one accent */
  --c-bg: #050806; --c-surface: #0b110e; --c-surface-2: #111a15; --c-surface-3: #18241d;
  --c-ink: #eef3ef; --c-muted: #a3b3a9; --c-line: #1b2a22; --c-line-strong: #2a3d32;
  --c-brand: #8dbe9d; --c-brand-hover: #a4cdb2; --c-brand-ink: #07110b; --c-brand-soft: #112219; --c-brand-line: #24402f;
  --c-sage: #8dbe9d; --c-night: #050806;
  --c-ok: #6bc48e; --c-ok-soft: #0f2a1c; --c-warn: #f0b46a; --c-warn-soft: #2a1f0e; --c-bad: #f0857a; --c-bad-soft: #301412;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .5); --shadow-2: 0 1px 2px rgba(0, 0, 0, .5), 0 8px 24px -12px rgba(0, 0, 0, .7);
  --shadow-3: 0 18px 40px -14px rgba(0, 0, 0, .8);
  --focus-ring: 0 0 0 3px rgba(141, 190, 157, .35);
  color-scheme: dark;
}
