/* ============================================================
   BROBUILT FITOUTS — DESIGN TOKENS
   Architectural / premium minimal system.
   Off-white & concrete surfaces, charcoal ink, restrained gold accent.
   ============================================================ */

:root {
  /* ---- Type scale (fluid, clamp-based) ---- */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 5rem);
  --text-hero: clamp(2.75rem, 0.5rem + 6vw, 6.5rem);

  /* ---- Spacing (4px system) ---- */
  --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;

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

  /* ---- Transitions ---- */
  --transition-interactive: 200ms cubic-bezier(0.16, 1, 0.3, 1);

  /* ---- Content widths ---- */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;
  --content-max: 1440px;
  --content-full: 100%;

  /* ---- Fonts ---- */
  --font-display: 'Clash Display', 'General Sans', 'Helvetica Neue', sans-serif;
  --font-body: 'Switzer', 'General Sans', 'Helvetica Neue', sans-serif;
}

/* ============================================================
   LIGHT MODE (default)
   ============================================================ */
:root,
[data-theme='light'] {
  /* Surfaces — warm off-white / concrete */
  --color-bg: #faf9f6;
  --color-surface: #ffffff;
  --color-surface-2: #f4f2ee;
  --color-surface-offset: #edebe7;
  --color-surface-offset-2: #dad7d1;
  --color-surface-dynamic: #e4e1db;
  --color-divider: #e0ddd7;
  --color-border: #d2cec6;

  /* Ink */
  --color-text: #161513;
  --color-text-muted: #5c584f;
  --color-text-faint: #948f84;
  --color-text-inverse: #faf9f6;

  /* Dark band surfaces (charcoal sections) */
  --color-ink-bg: #161513;
  --color-ink-surface: #1d1c19;
  --color-ink-surface-2: #24221f;
  --color-ink-border: #38352f;
  --color-ink-text: #f4f2ee;
  --color-ink-text-muted: #b6b1a6;

  /* Gold accent — restrained, used sparingly */
  --color-gold: #a9822f;
  --color-gold-hover: #8f6d25;
  --color-gold-active: #75591e;
  --color-gold-highlight: #f0e6cf;
  --color-gold-on-dark: #cca857;

  /* Primary = charcoal ink (used for main CTAs on light surfaces) */
  --color-primary: #161513;
  --color-primary-hover: #2b2924;
  --color-primary-active: #000000;
  --color-primary-highlight: #e4e1db;

  /* Status colors (minimal use — forms only) */
  --color-success: #43663a;
  --color-error: #8a3324;
  --color-warning: #a9822f;

  --shadow-sm: 0 1px 2px rgba(22, 21, 19, 0.06);
  --shadow-md: 0 8px 24px rgba(22, 21, 19, 0.08);
  --shadow-lg: 0 24px 48px rgba(22, 21, 19, 0.14);
}

/* ============================================================
   DARK MODE
   ============================================================ */
[data-theme='dark'] {
  --color-bg: #14130f;
  --color-surface: #1a1916;
  --color-surface-2: #201f1b;
  --color-surface-offset: #262420;
  --color-surface-offset-2: #322f28;
  --color-surface-dynamic: #3a372f;
  --color-divider: #302e28;
  --color-border: #423f37;

  --color-text: #f2f0eb;
  --color-text-muted: #b3ada0;
  --color-text-faint: #7a756a;
  --color-text-inverse: #14130f;

  --color-ink-bg: #0d0c0a;
  --color-ink-surface: #17150f;
  --color-ink-surface-2: #1d1b15;
  --color-ink-border: #322f26;
  --color-ink-text: #f2f0eb;
  --color-ink-text-muted: #a49e8f;

  --color-gold: #cca857;
  --color-gold-hover: #dcbc72;
  --color-gold-active: #e8cd8d;
  --color-gold-highlight: #3a331f;
  --color-gold-on-dark: #cca857;

  --color-primary: #f2f0eb;
  --color-primary-hover: #ffffff;
  --color-primary-active: #d9d5cb;
  --color-primary-highlight: #322f28;

  --color-success: #7ea36f;
  --color-error: #c96a52;
  --color-warning: #cca857;

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

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #14130f;
    --color-surface: #1a1916;
    --color-surface-2: #201f1b;
    --color-surface-offset: #262420;
    --color-surface-offset-2: #322f28;
    --color-surface-dynamic: #3a372f;
    --color-divider: #302e28;
    --color-border: #423f37;
    --color-text: #f2f0eb;
    --color-text-muted: #b3ada0;
    --color-text-faint: #7a756a;
    --color-text-inverse: #14130f;
    --color-ink-bg: #0d0c0a;
    --color-ink-surface: #17150f;
    --color-ink-surface-2: #1d1b15;
    --color-ink-border: #322f26;
    --color-ink-text: #f2f0eb;
    --color-ink-text-muted: #a49e8f;
    --color-gold: #cca857;
    --color-gold-hover: #dcbc72;
    --color-gold-active: #e8cd8d;
    --color-gold-highlight: #3a331f;
    --color-primary: #f2f0eb;
    --color-primary-hover: #ffffff;
    --color-primary-active: #d9d5cb;
    --color-primary-highlight: #322f28;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 24px 56px rgba(0, 0, 0, 0.55);
  }
}
