/* ============================================================
   Cheaply Design System: CSS Custom Properties
   Cheaply-calibre monochrome marketplace UI
   ============================================================ */

:root {
  /* -- Core palette --------------------------------------------- */
  --black: #111111;
  --white: #FFFFFF;

  /* Warm grays: slightly amber-tinted for human warmth */
  --gray-950: #0d0c0c;
  --gray-900: #1a1a1a;
  --gray-800: #2d2d2d;
  --gray-700: #404040;
  --gray-600: #575757;
  --gray-500: #737373;
  --gray-400: #9e9e9e;
  --gray-300: #b8b8b8;
  --gray-200: #e0e0e0;
  --gray-150: #ebebeb;
  --gray-100: #f0f0f0;
  --gray-50: #f7f7f5;

  /* -- Semantic roles -------------------------------------------- */
  --color-bg: #fafaf9;
  --color-bg-secondary: #f5f5f4;
  --color-surface: #ffffff;
  --color-border: #e8e8e8;
  --color-border-subtle: #f0f0ef;
  --color-border-focus: #1a1a1a;

  --color-text: #1a1a1a;
  --color-text-muted: #737373;
  --color-text-subtle: #9e9e9e;
  --color-text-inverse: #ffffff;

  --color-primary: #1a1a1a;
  --color-primary-hover: #2d2d2d;

  /* Status: Monochrome with soft backgrounds */
  --color-success: #2d2d2d;
  --color-warning: #404040;
  --color-error: #1a1a1a;
  --color-success-bg: #f0f0ef;
  --color-warning-bg: #ebebeb;
  --color-error-bg: #f5eeee;
  --color-error-text: #1a1a1a;

  /* Focus ring: accessible, monochrome */
  --focus-ring: 0 0 0 3px rgba(26, 26, 26, 0.12);

  /* -- Typography ----------------------------------------------- */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.8125rem;
  --text-base: 0.875rem;
  --text-md: 0.9375rem;
  --text-lg: 1.0rem;
  --text-xl: 1.125rem;
  --text-2xl: 1.25rem;
  --text-3xl: 1.5rem;
  --text-4xl: 1.75rem;
  --text-5xl: 2.125rem;
  --text-6xl: 2.5rem;

  --weight-normal: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  --weight-black: 800;

  --leading-none: 1;
  --leading-tight: 1.15;
  --leading-snug: 1.3;
  --leading-normal: 1.5;
  --leading-relaxed: 1.65;

  --tracking-tightest: -0.04em;
  --tracking-tight: -0.02em;
  --tracking-normal: 0em;
  --tracking-wide: 0.02em;
  --tracking-widest: 0.08em;

  /* -- Spacing --------------------------------------------------- */
  --space-0: 2px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 40px;
  --space-7: 48px;
  --space-8: 56px;
  --space-10: 64px;
  --space-12: 80px;
  --space-16: 100px;

  /* -- Border Radius -------------------------------------------- */
  --radius-none: 0px;
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-card: 14px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* -- Shadows: Warm and layered -------------------------------- */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.05), 0 0 0 1px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 16px 40px rgba(0, 0, 0, 0.10), 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-search: 0 2px 12px rgba(0, 0, 0, 0.08);
  --shadow-search-hover: 0 4px 20px rgba(0, 0, 0, 0.12);
  --shadow-dropdown: 0 8px 28px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);

  /* -- Z-index --------------------------------------------------- */
  --z-base: 0;
  --z-raised: 10;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-overlay: 300;
  --z-modal: 400;
  --z-toast: 500;

  /* -- Layout ---------------------------------------------------- */
  --container-xl: 1200px;
  --container-2xl: 1400px;
  --header-height: 80px;
  --category-bar-height: 50px;
  --grid-cols-xl: 4;
  --grid-cols-lg: 3;
  --grid-cols-md: 2;
  --grid-cols-sm: 2;
  --grid-gap: 20px;

  /* -- Transitions: Smooth, organic ----------------------------- */
  --ease-out: cubic-bezier(0.0, 0.0, 0.2, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-fast: 180ms ease-in-out;
  --transition-base: 220ms ease-in-out;
  --transition-slow: 320ms ease-in-out;
  --transition-spring: 380ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

[data-theme="dark"] {
  --color-bg: #111110;
  --color-bg-secondary: #1a1a19;
  --color-surface: #222221;
  --color-border: #2d2d2b;
  --color-border-subtle: #252524;
  --color-border-focus: #e0e0e0;
  --color-text: #f0f0ef;
  --color-text-muted: #9e9e9e;
  --color-text-subtle: #737373;
  --color-text-inverse: #111110;
  --color-primary: #f0f0ef;
  --color-primary-hover: #e0e0e0;
  --color-success-bg: #1f2421;
  --color-warning-bg: #242220;
  --color-error-bg: #261f1f;
  --color-error-text: #f0f0ef;
  --focus-ring: 0 0 0 3px rgba(240, 240, 239, 0.15);
}