/*
 * Burn Time for Brands — semantic design tokens (F02).
 *
 * Every raw value below is traced to an inspected iOS source in
 * docs/brand-system.md. Components never use raw colours: they use the
 * semantic tokens in the second block, so a palette change is one edit here.
 * Values marked "web adaptation" have no iOS equivalent and are provisional.
 */
:root {
  /* ---- Brand palette (iOS evidence) -------------------------------- */
  --bt-sage: #a9c1a3;          /* primary button/fill: Main.storyboard (25 uses), many Swift screens */
  --bt-cream: #fff9e8;         /* screen background: Main.storyboard, LaunchScreen.storyboard, Logo.png */
  --bt-leaf: #52704b;          /* "Burn" in the wordmark and launch screen */
  --bt-forest: #11200d;        /* label/heading text on cream and sage (storyboard textColor) */
  --bt-forest-deep: #081804;   /* darkest green text (storyboard textColor, Swift) */
  --bt-slate: #344054;         /* body text, "time" in the wordmark (Swift, 31 uses) */
  --bt-slate-muted: #667085;   /* placeholder/secondary text (Swift, 20 uses) */
  --bt-ink: #0c1120;           /* headings/ink (storyboard textColor, Swift) */
  --bt-line: #d0d5dd;          /* field border (storyboard value) */
  --bt-line-soft: #eaecf0;     /* divider/border (storyboard value) */
  --bt-mist: #eef1f0;          /* tinted surface (storyboard backgroundColor) */
  --bt-success-bg: #edfcf2;    /* success tint (Swift) */
  --bt-success: #099250;       /* success (Swift) */

  /* ---- Web adaptations (no iOS equivalent; provisional) ------------- */
  --bt-sage-strong: #8fae88;   /* hover for sage fills */
  --bt-leaf-text: #3f5a39;     /* leaf darkened so links reach AA on white and cream */
  --bt-warn-bg: #fff3d6;       /* needs-review / stale: no iOS equivalent */
  --bt-warn-line: #a35f00;
  --bt-warn-text: #7a4b00;
  --bt-danger-bg: #fdecea;     /* error: no iOS equivalent */
  --bt-danger-line: #d92d20;
  --bt-danger-text: #912018;

  /* ---- Semantic colour tokens -------------------------------------- */
  --color-bg: var(--bt-cream);                 /* page */
  --color-surface: #ffffff;                    /* elevated cards, tables, fields */
  --color-surface-muted: var(--bt-mist);       /* table headers, code, wells */
  --color-text: var(--bt-slate);               /* primary text */
  --color-text-strong: var(--bt-ink);          /* headings */
  --color-text-muted: #545f73;                 /* secondary (iOS #667085, darkened to reach AA on cream) */
  --color-brand: var(--bt-leaf);               /* decorative brand green */
  --color-link: var(--bt-leaf-text);
  --color-link-hover: var(--bt-forest);
  --color-action-bg: var(--bt-sage);
  --color-action-bg-hover: var(--bt-sage-strong);
  --color-action-text: var(--bt-forest);
  --color-border: var(--bt-line);
  --color-border-soft: var(--bt-line-soft);
  --color-focus: var(--bt-ink);                /* web adaptation: 3px ring */
  --color-focus-halo: #ffffff;
  --color-success-bg: var(--bt-success-bg);
  --color-success-text: #05603a;
  --color-success-line: var(--bt-success);
  --color-warn-bg: var(--bt-warn-bg);
  --color-warn-text: var(--bt-warn-text);
  --color-warn-line: var(--bt-warn-line);
  --color-danger-bg: var(--bt-danger-bg);
  --color-danger-text: var(--bt-danger-text);
  --color-danger-line: var(--bt-danger-line);

  /* ---- Typography --------------------------------------------------- */
  /* The app uses Inter plus the iOS system font (Info.plist UIAppFonts,
     UIFont(name: "Inter-Medium")). No font file is shipped with the web app. */
  --font-sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  /* Public landing page only (docs/brand-system.md §7). Both faces are
     referenced by the app's Main.storyboard and are self-hosted as OFL
     woff2 subsets (fonts.css); the fallbacks are installed system serifs, so
     neither stack falls back to the sans UI stack. Signed-in dashboard
     surfaces stay on --font-sans. */
  --font-display: Oranienbaum, "Abhaya Libre", "Hoefler Text", "Palatino Linotype", Palatino, Georgia, serif;
  --font-text: "Abhaya Libre", "Hoefler Text", "Palatino Linotype", Palatino, Georgia, serif;
  --text-xs: 0.75rem;     /* iOS 11-12 pt captions */
  --text-sm: 0.875rem;    /* iOS 14 pt medium (most common) */
  --text-md: 1rem;        /* iOS 16 pt semibold */
  --text-lg: 1.25rem;     /* iOS 20 pt bold */
  --text-xl: 1.5rem;      /* iOS 24-26 pt bold */
  --text-display: 2rem;   /* KPI numerals; iOS uses 48 heavy for timers */
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  --leading-tight: 1.25;
  --leading-body: 1.55;

  /* ---- Spacing (4px base; iOS layouts use 8/16/32 insets) ----------- */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --page-max: 72rem;
  --gutter: 1rem;         /* 16px side gutter at narrow widths */
  --touch-min: 2.75rem;   /* 44px minimum touch target */

  /* ---- Radii (iOS cornerRadius 10/12/14/16/24) ---------------------- */
  --radius-sm: 0.625rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-pill: 999px;

  /* ---- Shadows (provisional: iOS uses a few ad-hoc layer shadows) --- */
  --shadow-card: 0 1px 2px rgb(17 32 13 / 0.06), 0 1px 3px rgb(17 32 13 / 0.08);
  --shadow-raised: 0 4px 12px rgb(17 32 13 / 0.1);

  /* ---- Borders ------------------------------------------------------ */
  --border-width: 1px;   /* iOS borderWidth = 1.0 */
}
