/* ==========================================================================
   Design Tokens - Enterprise Monochrome Dynamic Theme System
   Pure 2-State Theme: Dark and Light (Default selected from system)
   ========================================================================== */

:root {
  /* Font Stack - Simple, high-clarity enterprise typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-brand: 'Outfit', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  /* Typography Scale */
  --text-xs: 0.75rem;     /* 12px */
  --text-sm: 0.875rem;    /* 14px */
  --text-base: 1rem;       /* 16px */
  --text-lg: 1.125rem;    /* 18px */
  --text-xl: 1.25rem;     /* 20px */
  --text-2xl: 1.5rem;     /* 24px */
  --text-3xl: 1.875rem;   /* 30px */

  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  /* Spacing Scale */
  --space-1: 0.25rem;  /* 4px */
  --space-2: 0.5rem;   /* 8px */
  --space-3: 0.75rem;  /* 12px */
  --space-4: 1rem;     /* 16px */
  --space-5: 1.25rem;  /* 20px */
  --space-6: 1.5rem;   /* 24px */
  --space-8: 2rem;     /* 32px */
  --space-10: 2.5rem;  /* 40px */
  --space-12: 3rem;    /* 48px */

  /* Border Radii */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-pill: 9999px;

  /* Elevation / Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

  /* Micro-interactions & Transitions */
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring-overshoot: cubic-bezier(0.34, 1.35, 0.64, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: 150ms var(--ease-smooth);
  --transition-normal: 220ms var(--ease-smooth);
  --transition-spring: 350ms var(--ease-spring);
  --transition-pill-slide: 380ms var(--ease-spring-overshoot);

  /* Layout dimensions */
  --header-height: 64px;
  --dock-height: 56px;

  /* Stacking Context & Z-Index System */
  --z-base: 1;
  --z-dock: 90;
  --z-header: 50;
  --z-sticky: 100;
  --z-dropdown: 200;
  --z-modal-backdrop: 1050;
  --z-modal: 1200;
  --z-toast: 99999;
}

/* --------------------------------------------------------------------------
   Light Theme Tokens
   -------------------------------------------------------------------------- */
:root,
:root[data-theme="light"],
html[data-theme="light"] {
  --color-scheme: light;
  --bg-primary: #ffffff;
  --bg-secondary: #f0f2f5;
  --bg-tertiary: #e4e7eb;
  --bg-surface: #ffffff;
  --bg-dock: #f0f2f5;
  --bg-dock-hover: #ffffff;
  --bg-dock-active: #000000;

  --text-primary: #111111;
  --text-secondary: #555555;
  --text-muted: #888888;
  --text-inverted: #ffffff;

  --border-subtle: #e9ecef;
  --border-default: #dee2e6;
  --border-strong: #ced4da;
  --border-dock: transparent;

  --accent-primary: #000000;
  --accent-hover: #222222;
  --accent-subtle: #f0f2f5;

  --dock-shadow: 0 12px 32px -4px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.04);
}

/* --------------------------------------------------------------------------
   Dark Theme Tokens
   -------------------------------------------------------------------------- */
:root[data-theme="dark"],
html[data-theme="dark"] {
  --color-scheme: dark;
  --bg-primary: #0a0a0a;
  --bg-secondary: #1a1a1a;
  --bg-tertiary: #262626;
  --bg-surface: #141414;
  --bg-dock: rgba(26, 26, 26, 0.94);
  --bg-dock-hover: #333333;
  --bg-dock-active: #ffffff;

  --text-primary: #f5f5f5;
  --text-secondary: #a3a3a3;
  --text-muted: #666666;
  --text-inverted: #0a0a0a;

  --border-subtle: #1f1f1f;
  --border-default: #2a2a2a;
  --border-strong: #383838;
  --border-dock: transparent;

  --accent-primary: #ffffff;
  --accent-hover: #e5e5e5;
  --accent-subtle: #1a1a1a;

  --dock-shadow: 0 14px 34px -4px rgba(0, 0, 0, 0.6), 0 2px 8px rgba(0, 0, 0, 0.4);
}
