/* =========================================================
   AURUM MAISON — Design Tokens
   Premium Writing Instruments | Geneva 1887
   ========================================================= */

:root {
  /* ── Brand Colors ── */
  --gold-50:  #FDF8ED;
  --gold-100: #F7ECCC;
  --gold-200: #EDD38A;
  --gold-300: #D4AF55;
  --gold-400: #C9A84C;
  --gold-500: #B8952A;
  --gold-600: #9A7B1F;
  --gold-700: #7A6018;
  --gold-800: #5C4812;
  --gold-900: #3D300C;

  /* ── Ink (Near-Black) ── */
  --ink-50:  #F5F5F6;
  --ink-100: #E8E8EA;
  --ink-200: #C8C8CC;
  --ink-300: #9B9BA3;
  --ink-400: #6B6B75;
  --ink-500: #44444D;
  --ink-600: #2D2D35;
  --ink-700: #1E1E26;
  --ink-800: #141419;
  --ink-900: #0B0B0F;

  /* ── Cream (Warm White) ── */
  --cream-50:  #FEFDFB;
  --cream-100: #FAF8F2;
  --cream-200: #F3EEE4;
  --cream-300: #E8E0D0;
  --cream-400: #D9CEB8;
  --cream-500: #C5B89A;

  /* ── Semantic Colors ── */
  --color-primary:   var(--gold-500);
  --color-primary-hover: var(--gold-400);
  --color-primary-dark: var(--gold-600);
  --color-bg:        var(--cream-100);
  --color-surface:   #FFFFFF;
  --color-surface-raised: var(--cream-50);
  --color-border:    var(--cream-300);
  --color-border-subtle: var(--cream-200);
  --color-text:      var(--ink-900);
  --color-text-secondary: var(--ink-500);
  --color-text-muted: var(--ink-300);
  --color-text-inverse: #FFFFFF;
  --color-error:     #C62828;
  --color-error-bg:  #FFEBEE;
  --color-success:   #2E7D32;
  --color-success-bg: #E8F5E9;
  --color-warning:   #E65100;
  --color-warning-bg: #FFF3E0;
  --color-info:      #1565C0;
  --color-info-bg:   #E3F2FD;
  --color-overlay:   rgba(11, 11, 15, 0.72);

  /* ── Typography ── */
  --font-serif: 'Didot', 'Bodoni MT', 'Playfair Display', 'Book Antiqua', Georgia, serif;
  --font-sans:  -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, 'Helvetica Neue', Arial, sans-serif;
  --font-mono:  'SF Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;

  /* ── Type Scale ── */
  --text-xs:   0.6875rem;  /* 11px */
  --text-sm:   0.8125rem;  /* 13px */
  --text-base: 0.9375rem;  /* 15px */
  --text-md:   1rem;       /* 16px */
  --text-lg:   1.125rem;   /* 18px */
  --text-xl:   1.25rem;    /* 20px */
  --text-2xl:  1.5rem;     /* 24px */
  --text-3xl:  1.875rem;   /* 30px */
  --text-4xl:  2.25rem;    /* 36px */
  --text-5xl:  3rem;       /* 48px */
  --text-6xl:  3.75rem;    /* 60px */

  /* ── Line Heights ── */
  --leading-tight:   1.25;
  --leading-snug:    1.375;
  --leading-normal:  1.5;
  --leading-relaxed: 1.625;
  --leading-loose:   1.8;

  /* ── Letter Spacing ── */
  --tracking-tighter: -0.04em;
  --tracking-tight:   -0.02em;
  --tracking-normal:  0em;
  --tracking-wide:    0.04em;
  --tracking-wider:   0.08em;
  --tracking-widest:  0.16em;

  /* ── Font Weights ── */
  --weight-light:    300;
  --weight-regular:  400;
  --weight-medium:   500;
  --weight-semibold: 600;
  --weight-bold:     700;

  /* ── Spacing (8px grid) ── */
  --space-0:  0;
  --space-px: 1px;
  --space-0-5: 0.125rem;  /* 2px */
  --space-1:  0.25rem;    /* 4px */
  --space-1-5: 0.375rem;  /* 6px */
  --space-2:  0.5rem;     /* 8px */
  --space-2-5: 0.625rem;  /* 10px */
  --space-3:  0.75rem;    /* 12px */
  --space-4:  1rem;       /* 16px */
  --space-5:  1.25rem;    /* 20px */
  --space-6:  1.5rem;     /* 24px */
  --space-7:  1.75rem;    /* 28px */
  --space-8:  2rem;       /* 32px */
  --space-10: 2.5rem;     /* 40px */
  --space-12: 3rem;       /* 48px */
  --space-14: 3.5rem;     /* 56px */
  --space-16: 4rem;       /* 64px */
  --space-20: 5rem;       /* 80px */
  --space-24: 6rem;       /* 96px */
  --space-32: 8rem;       /* 128px */

  /* ── Border Radius ── */
  --radius-none: 0;
  --radius-sm:   2px;
  --radius-md:   4px;
  --radius-lg:   8px;
  --radius-xl:   12px;
  --radius-2xl:  16px;
  --radius-3xl:  24px;
  --radius-full: 9999px;

  /* ── Shadows ── */
  --shadow-xs:  0 1px 2px rgba(11, 11, 15, 0.04);
  --shadow-sm:  0 1px 4px rgba(11, 11, 15, 0.06), 0 1px 2px rgba(11, 11, 15, 0.04);
  --shadow-md:  0 4px 12px rgba(11, 11, 15, 0.08), 0 2px 4px rgba(11, 11, 15, 0.06);
  --shadow-lg:  0 8px 24px rgba(11, 11, 15, 0.10), 0 4px 8px rgba(11, 11, 15, 0.07);
  --shadow-xl:  0 16px 48px rgba(11, 11, 15, 0.12), 0 8px 16px rgba(11, 11, 15, 0.08);
  --shadow-2xl: 0 32px 64px rgba(11, 11, 15, 0.15), 0 16px 32px rgba(11, 11, 15, 0.10);
  --shadow-gold: 0 4px 20px rgba(184, 149, 42, 0.30);
  --shadow-inner: inset 0 1px 3px rgba(11, 11, 15, 0.08);

  /* ── Transitions ── */
  --ease-out:   cubic-bezier(0.0, 0.0, 0.2, 1.0);
  --ease-in:    cubic-bezier(0.4, 0.0, 1.0, 1.0);
  --ease-inout: cubic-bezier(0.4, 0.0, 0.2, 1.0);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1.0);
  --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);

  --duration-fast:   120ms;
  --duration-normal: 220ms;
  --duration-slow:   380ms;
  --duration-slower: 600ms;

  /* ── Z-indices ── */
  --z-base:       0;
  --z-raised:     10;
  --z-dropdown:   100;
  --z-sticky:     200;
  --z-overlay:    300;
  --z-drawer:     400;
  --z-modal:      500;
  --z-toast:      600;
  --z-tooltip:    700;
  --z-max:        9999;

  /* ── Layout ── */
  --container-sm:  640px;
  --container-md:  768px;
  --container-lg:  1024px;
  --container-xl:  1280px;
  --container-2xl: 1440px;
  --container-max: 1600px;

  /* ── Cart Drawer ── */
  --drawer-width: 420px;

  /* ── Header ── */
  --header-height: 64px;
  --header-height-mobile: 56px;
}

/* ── Dark Mode Overrides ── */
@media (prefers-color-scheme: dark) {
  :root {
    --color-bg:        var(--ink-900);
    --color-surface:   var(--ink-800);
    --color-surface-raised: var(--ink-700);
    --color-border:    var(--ink-600);
    --color-border-subtle: var(--ink-700);
    --color-text:      var(--cream-100);
    --color-text-secondary: var(--ink-200);
    --color-text-muted: var(--ink-400);
    --color-text-inverse: var(--ink-900);
    --color-overlay:   rgba(11, 11, 15, 0.88);
    --shadow-sm:  0 1px 4px rgba(0, 0, 0, 0.30);
    --shadow-md:  0 4px 12px rgba(0, 0, 0, 0.35);
    --shadow-lg:  0 8px 24px rgba(0, 0, 0, 0.40);
    --shadow-xl:  0 16px 48px rgba(0, 0, 0, 0.45);
  }
}

/* ── Manual Dark Mode Override ── */
[data-theme="dark"] {
  --color-bg:        var(--ink-900);
  --color-surface:   var(--ink-800);
  --color-surface-raised: var(--ink-700);
  --color-border:    var(--ink-600);
  --color-border-subtle: var(--ink-700);
  --color-text:      var(--cream-100);
  --color-text-secondary: var(--ink-200);
  --color-text-muted: var(--ink-400);
  --color-text-inverse: var(--ink-900);
  --color-overlay:   rgba(11, 11, 15, 0.88);
}

[data-theme="light"] {
  --color-bg:        var(--cream-100);
  --color-surface:   #FFFFFF;
  --color-surface-raised: var(--cream-50);
  --color-border:    var(--cream-300);
  --color-border-subtle: var(--cream-200);
  --color-text:      var(--ink-900);
  --color-text-secondary: var(--ink-500);
  --color-text-muted: var(--ink-300);
}
