/*
 * ui-lib Theme Tokens — Warm (default since 2026-10-13)
 * Navy primary, maroon accent, cream surfaces, warm shadows.
 * Source: bakery-illustration palette (Joseph, 2026-10-13).
 * Alternative: css/theme-indigo.css (the previous default).
 */

:root {
  /* ── Colors ── */
  --color-primary: #1e2a4a;          /* navy — illustration pants/oven */
  --color-primary-hover: #2e3e69;    /* lighter: base is already dark */
  --color-primary-active: #141d38;

  --color-accent: #a63a3a;           /* maroon — baker's coat */
  --color-accent-hover: #8a2e2e;

  --color-link: #a63a3a;
  --color-link-hover: #8a2e2e;
  --color-focus-ring: rgba(30, 42, 74, 0.15);

  --color-success: #22c55e;
  --color-success-hover: #16a34a;
  --color-warning: #f59e0b;
  --color-warning-hover: #d97706;
  --color-error: #ef4444;
  --color-error-hover: #dc2626;
  --color-info: #3b82f6;
  --color-info-hover: #2563eb;

  --color-bg: #fbf8f3;               /* warm off-white page */
  --color-surface: #f4ede2;          /* cream cards */
  --color-surface-hover: #ede4d9;    /* illustration cream */
  --color-text: #1e2a4a;             /* navy ink, ~13:1 on bg */
  --color-text-muted: #6b6255;       /* warm taupe, ~5.7:1 on bg */
  --color-text-inverse: #ffffff;
  --color-border: #e4dbca;
  --color-border-hover: #cfc2ac;
  --color-divider: #efe8da;

  /* ── Typography ── */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;

  --leading-tight: 1.25;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;

  /* ── Spacing ── */
  --space-0: 0;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;

  /* ── Border Radius ── */
  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-full: 9999px;

  /* ── Shadows (warm-tinted, not pure black) ── */
  --shadow-xs: 0 1px 2px rgba(70, 52, 28, 0.06);
  --shadow-sm: 0 1px 3px rgba(70, 52, 28, 0.10), 0 1px 2px rgba(70, 52, 28, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(70, 52, 28, 0.10), 0 2px 4px -2px rgba(70, 52, 28, 0.10);
  --shadow-lg: 0 10px 15px -3px rgba(70, 52, 28, 0.10), 0 4px 6px -4px rgba(70, 52, 28, 0.10);
  --shadow-xl: 0 20px 25px -5px rgba(70, 52, 28, 0.10), 0 8px 10px -6px rgba(70, 52, 28, 0.10);

  /* ── Transitions ── */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;

  /* ── Z-index ── */
  --z-dropdown: 50;
  --z-sticky: 100;
  --z-overlay: 200;
  --z-modal: 300;
  --z-toast: 400;
}

/* ── Dark Mode (warm-shifted; cream text from the illustration wall) ── */
.dark {
  --color-bg: #191410;
  --color-surface: #221b14;
  --color-surface-hover: #2e2519;
  --color-text: #f2ede3;
  --color-text-muted: #a99c88;
  --color-text-inverse: #191410;
  --color-border: #3a3125;
  --color-border-hover: #4e4335;
  --color-divider: #221b14;

  --color-primary: #43598f;          /* navy lightened to stay visible */
  --color-primary-hover: #556ba5;
  --color-primary-active: #37497a;

  --color-link: #d98c8c;             /* maroon lightened for dark bg, ~5.9:1 */
  --color-link-hover: #e8a5a5;
  --color-focus-ring: rgba(107, 140, 214, 0.35);

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
}
