/* =========================================================
   2x3x10x — Design Tokens
   Editorial executive brand: deep charcoal, warm ivory,
   muted bronze, refined neutrals.
   ========================================================= */

:root,
[data-theme='light'] {
  /* Brand palette — warm ivory + charcoal + bronze */
  --color-bg: #f5f1ea;            /* warm ivory */
  --color-surface: #fbf7f0;       /* paper */
  --color-surface-2: #efe9df;     /* parchment */
  --color-surface-offset: #e6dfd1;
  --color-divider: #d9d2c3;
  --color-border: #cdc6b6;

  /* Text — graphite charcoal */
  --color-text: #1f1d1a;          /* near-black charcoal */
  --color-text-muted: #5b554c;
  --color-text-faint: #8c8578;
  --color-text-inverse: #f5f1ea;

  /* Bronze / antique gold accent */
  --color-primary: #8a6a3b;       /* muted bronze */
  --color-primary-hover: #6e5128;
  --color-primary-active: #4f3a1c;
  --color-primary-highlight: #ecdfc7;

  /* Subtle ink accent for hover details */
  --color-ink: #2b2724;

  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 8px;
  --radius-full: 9999px;

  --transition-interactive: 220ms cubic-bezier(0.16, 1, 0.3, 1);

  --shadow-sm: 0 1px 2px rgba(31, 29, 26, 0.06);
  --shadow-md: 0 8px 24px rgba(31, 29, 26, 0.08);
  --shadow-lg: 0 24px 56px rgba(31, 29, 26, 0.12);

  --content-narrow: 640px;
  --content-default: 1040px;
  --content-wide: 1280px;

  /* Typography */
  --font-display: 'Cormorant Garamond', 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', Menlo, monospace;

  /* Fluid type */
  --text-xs: clamp(0.75rem, 0.7rem + 0.2vw, 0.8125rem);
  --text-sm: clamp(0.875rem, 0.82rem + 0.25vw, 0.9375rem);
  --text-base: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  --text-lg: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
  --text-xl: clamp(1.5rem, 1.25rem + 1vw, 2.125rem);
  --text-2xl: clamp(2rem, 1.4rem + 2.4vw, 3.25rem);
  --text-3xl: clamp(2.5rem, 1.4rem + 4vw, 4.5rem);
  --text-hero: clamp(3rem, 1.2rem + 6vw, 6.5rem);

  /* Spacing */
  --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;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;
}

[data-theme='dark'] {
  /* Inverted editorial — deep charcoal ground, ivory ink, bronze accent */
  --color-bg: #14110d;
  --color-surface: #1a1714;
  --color-surface-2: #211d18;
  --color-surface-offset: #29241e;
  --color-divider: #2e2922;
  --color-border: #3a3429;

  --color-text: #ecead9;
  --color-text-muted: #a39c8a;
  --color-text-faint: #6b6557;
  --color-text-inverse: #14110d;

  --color-primary: #c9a464;
  --color-primary-hover: #d9b67a;
  --color-primary-active: #e3c690;
  --color-primary-highlight: #3a3025;

  --color-ink: #ecead9;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 24px 56px rgba(0, 0, 0, 0.6);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #14110d;
    --color-surface: #1a1714;
    --color-surface-2: #211d18;
    --color-surface-offset: #29241e;
    --color-divider: #2e2922;
    --color-border: #3a3429;
    --color-text: #ecead9;
    --color-text-muted: #a39c8a;
    --color-text-faint: #6b6557;
    --color-text-inverse: #14110d;
    --color-primary: #c9a464;
    --color-primary-hover: #d9b67a;
    --color-primary-active: #e3c690;
    --color-primary-highlight: #3a3025;
    --color-ink: #ecead9;
  }
}
