/* =====================================================================
   Fable5 design system — shared structural tokens (both sites, marketing + app).
   Brand-specific values live in /assets/{domain}/css/brand.css (layer 2)
   and may be overridden per-site from the DB via Html.ThemeTokens() (layer 3).
   ===================================================================== */
:root {
  /* ---- ink (text) + surfaces: shared slate scale ---- */
  --ink-1: #0B1220;            /* headings / primary text */
  --ink-2: #3D4A5F;            /* body */
  --ink-3: #64748B;            /* secondary / captions */
  --surface-0: #FFFFFF;        /* cards, raised */
  --surface-1: #FAFBFD;        /* page background */
  --surface-2: #F1F4F9;        /* wells, alt sections */
  --line: #E3E8EF;             /* hairlines, borders */

  /* ---- brand slots (filled by brand.css; DB may override) ---- */
  --brand-50:  #F0F4FF;
  --brand-100: #E0E9FF;
  --brand-200: #C2D2FF;
  --brand-300: #94AEFF;
  --brand-400: #6688FF;
  --brand-500: #3D63F5;
  --brand-600: #335EEA;        /* primary anchor */
  --brand-700: #2848C4;
  --brand-800: #1F3799;
  --brand-900: #182A70;
  --brand-accent: #6B5EAE;
  --brand-font: 'HK Grotesk Pro', system-ui, -apple-system, sans-serif;

  /* ---- semantic ---- */
  --success: #17B26A;
  --warning: #F79009;
  --danger:  #F04438;

  /* ---- spacing (4px scale) ---- */
  --space-1: 4px;  --space-2: 8px;   --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 24px;  --space-8: 32px; --space-10: 40px;
  --space-12: 48px; --space-16: 64px; --space-20: 80px; --space-24: 96px;

  /* ---- radius ---- */
  --radius-sm: 6px; --radius-md: 10px; --radius-lg: 16px; --radius-xl: 24px;
  --radius-full: 999px;

  /* ---- elevation ---- */
  --shadow-1: 0 1px 2px rgba(11, 18, 32, .05);
  --shadow-2: 0 3px 10px rgba(11, 18, 32, .07);
  --shadow-3: 0 12px 32px rgba(11, 18, 32, .10);

  /* ---- type scale (1.25, rem @ 16px root) ---- */
  --text-xs: .8rem;      /* 12.8 */
  --text-sm: .9rem;      /* 14.4 */
  --text-base: 1rem;     /* 16 */
  --text-lg: 1.25rem;    /* 20 */
  --text-xl: 1.563rem;   /* 25 */
  --text-2xl: 1.953rem;  /* 31.25 */
  --text-3xl: 2.441rem;  /* 39 */
  --text-4xl: 3.052rem;  /* 48.8 */
  --tracking-tight: -.02em;
  --tracking-display: -.03em;

  /* ---- motion ---- */
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --dur-fast: 150ms;
  --dur-base: 250ms;
}

/* Map brand slots onto Bootstrap 5 variables so existing components pick
   up the skin without markup changes. */
:root {
  --bs-primary: var(--brand-600);
  --bs-primary-rgb: 51, 94, 234; /* brand.css overrides per site */
  --bs-link-color: var(--brand-600);
  --bs-link-hover-color: var(--brand-700);
  --bs-body-color: var(--ink-2);
  --bs-body-bg: var(--surface-1);
  --bs-border-color: var(--line);
  --bs-body-font-family: var(--brand-font);
}

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