/* Bucala design tokens v1. Source of truth: design/palette.json */
:root {
  --bc-ink: #0B1020;          /* primary text, dark surfaces */
  --bc-ink-2: #1B2238;        /* raised dark surface */
  --bc-jacaranda: #5B3DF5;    /* primary brand and actions on light */
  --bc-jacaranda-soft: #9278FF; /* primary on dark surfaces */
  --bc-gold: #F2B33D;         /* settlement spark, highlights on dark */
  --bc-gold-deep: #E09A1A;    /* gold on light surfaces (non-text only) */
  --bc-fynbos: #0E7754;       /* success, settled */
  --bc-clay: #C8431F;         /* error, failed */
  --bc-sky: #2468B5;          /* info, processing */
  --bc-mist: #F5F6FA;         /* page background */
  --bc-line: #DADDE7;         /* borders */
  --bc-slate: #5A6175;        /* secondary text */
  --bc-font-display: "Space Grotesk", "Inter", "Segoe UI", Arial, sans-serif;
  --bc-font-body: "Inter", "Segoe UI", Arial, sans-serif;
  --bc-font-mono: "JetBrains Mono", "Cascadia Code", Consolas, monospace;
  --bc-radius: 12px;
  --bc-radius-lg: 28px;
}

/* v1.1: status, dark mode, type and spacing scales */
:root {
  --bc-clay-strong: #B23A1A;     /* error text on tinted backgrounds */
  --bc-success-bg: #E3F5EC;
  --bc-failed-bg: #FBE9E4;
  --bc-processing-bg: #E4EEFA;
  --bc-pending-bg: #ECEEF3;

  /* Type scale (1.25 ratio, 16px base) */
  --bc-text-xs: 0.75rem;   /* 12px: captions, table meta */
  --bc-text-sm: 0.875rem;  /* 14px: dense UI, tables */
  --bc-text-md: 1rem;      /* 16px: body */
  --bc-text-lg: 1.25rem;   /* 20px: section titles */
  --bc-text-xl: 1.5625rem; /* 25px: page titles */
  --bc-text-2xl: 1.953rem; /* 31px: dashboard balances */
  --bc-text-3xl: 2.441rem; /* 39px: marketing headings */
  --bc-leading-tight: 1.2;
  --bc-leading-body: 1.5;

  /* Spacing (4px grid) */
  --bc-space-1: 4px;  --bc-space-2: 8px;  --bc-space-3: 12px; --bc-space-4: 16px;
  --bc-space-6: 24px; --bc-space-8: 32px; --bc-space-12: 48px; --bc-space-16: 64px;

  --bc-shadow-1: 0 1px 2px rgba(11, 16, 32, 0.08), 0 1px 1px rgba(11, 16, 32, 0.04);
  --bc-shadow-2: 0 8px 24px rgba(11, 16, 32, 0.12);
  --bc-focus-ring: 0 0 0 3px rgba(91, 61, 245, 0.45);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bc-bg: #0B1020; --bc-surface: #1B2238; --bc-text: #F5F6FA; --bc-text-2: #A3AAC0;
    --bc-primary: #9278FF; --bc-success: #4FD39A; --bc-failed: #FF8A6B; --bc-processing: #7DB7FF;
  }
}
:root, :root[data-theme="light"] {
  --bc-bg: #F5F6FA; --bc-surface: #FFFFFF; --bc-text: #0B1020; --bc-text-2: #5A6175;
  --bc-primary: #5B3DF5; --bc-success: #0E7754; --bc-failed: #B23A1A; --bc-processing: #2468B5;
}
:root[data-theme="dark"] {
  --bc-bg: #0B1020; --bc-surface: #1B2238; --bc-text: #F5F6FA; --bc-text-2: #A3AAC0;
  --bc-primary: #9278FF; --bc-success: #4FD39A; --bc-failed: #FF8A6B; --bc-processing: #7DB7FF;
}
