/* ============================================
   CUSTOM PALETTE: Navy / Gold / Cream
   Premium, authoritative, editorial feel.
   Deep navy hero, warm gold CTAs, cream body.
   ============================================ */

/* --- Type Scale (fluid with clamp) --- */
:root {
  --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.9rem  + 0.5vw,  1.125rem);
  --text-lg:   clamp(1.125rem, 0.95rem + 0.85vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1rem    + 1.5vw,  2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem  + 2.5vw,  3.5rem);
  --text-3xl:  clamp(2.5rem,   1rem    + 4vw,    5rem);
  --text-hero: clamp(3rem,     0.5rem  + 7vw,    8rem);
}

/* --- 4px Spacing System --- */
:root {
  --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;
}

/* --- Font families --- */
:root {
  --font-display: 'Playfair Display', 'Georgia', serif;
  --font-body: 'Inter', 'Helvetica Neue', sans-serif;
}

/* ============================================
   LIGHT MODE (default)
   ============================================ */
:root, [data-theme="light"] {
  /* --- Surfaces (Warm Cream) --- */
  --color-bg:              #FAF8F5;
  --color-surface:         #FFFFFF;
  --color-surface-2:       #F5F2ED;
  --color-surface-offset:  #EDE9E3;
  --color-surface-offset-2: #E6E1DA;
  --color-surface-dynamic: #DDD8D0;
  --color-divider:         #D4CFC7;
  --color-border:          #C8C3BA;

  /* --- Text --- */
  --color-text:            #1B2A4A;
  --color-text-muted:      #5A6478;
  --color-text-faint:      #9CA3AF;
  --color-text-inverse:    #FAF8F5;

  /* --- Navy (Hero/Header backgrounds) --- */
  --color-navy:            #1B2A4A;
  --color-navy-light:      #243556;
  --color-navy-dark:       #121D35;

  /* --- Primary Accent: Gold --- */
  --color-primary:         #C8A951;
  --color-primary-hover:   #B89840;
  --color-primary-active:  #A68930;
  --color-primary-highlight: #F5EDD5;
  --color-primary-text:    #1B2A4A;

  /* --- Semantic: Success (Green) --- */
  --color-success:         #2D7A3A;
  --color-success-highlight: #E3F2E5;

  /* --- Semantic: Error --- */
  --color-error:           #B83030;

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

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

  /* --- Shadows (warm-tinted) --- */
  --shadow-sm: 0 1px 2px oklch(0.2 0.02 60 / 0.06);
  --shadow-md: 0 4px 12px oklch(0.2 0.02 60 / 0.08);
  --shadow-lg: 0 12px 32px oklch(0.2 0.02 60 / 0.12);

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

/* ============================================
   DARK MODE
   ============================================ */
[data-theme="dark"] {
  /* --- Surfaces (Deep Navy tones — NOT pure black) --- */
  --color-bg:              #0F1824;
  --color-surface:         #15202F;
  --color-surface-2:       #1A2738;
  --color-surface-offset:  #1E2C40;
  --color-surface-offset-2: #243356;
  --color-surface-dynamic: #2A3A5A;
  --color-divider:         #2E3F5E;
  --color-border:          #3A4D6E;

  /* --- Text (Light/cream on dark navy) --- */
  --color-text:            #E8E4DE;
  --color-text-muted:      #9AA3B4;
  --color-text-faint:      #5E6B80;
  --color-text-inverse:    #0F1824;

  /* --- Navy (reversed for dark mode) --- */
  --color-navy:            #0F1824;
  --color-navy-light:      #15202F;
  --color-navy-dark:       #0A1018;

  /* --- Primary Accent: Gold (brightened for dark bg) --- */
  --color-primary:         #D4B866;
  --color-primary-hover:   #E0C87A;
  --color-primary-active:  #ECDA92;
  --color-primary-highlight: #2A2820;
  --color-primary-text:    #0F1824;

  /* --- Semantic: Success --- */
  --color-success:         #4CAF60;
  --color-success-highlight: #1A2D1E;

  /* --- Semantic: Error --- */
  --color-error:           #E05555;

  /* --- Shadows (deeper for dark) --- */
  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.2);
  --shadow-md: 0 4px 12px oklch(0 0 0 / 0.3);
  --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.4);
}

/* System preference fallback */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg:              #0F1824;
    --color-surface:         #15202F;
    --color-surface-2:       #1A2738;
    --color-surface-offset:  #1E2C40;
    --color-surface-offset-2: #243356;
    --color-surface-dynamic: #2A3A5A;
    --color-divider:         #2E3F5E;
    --color-border:          #3A4D6E;
    --color-text:            #E8E4DE;
    --color-text-muted:      #9AA3B4;
    --color-text-faint:      #5E6B80;
    --color-text-inverse:    #0F1824;
    --color-navy:            #0F1824;
    --color-navy-light:      #15202F;
    --color-navy-dark:       #0A1018;
    --color-primary:         #D4B866;
    --color-primary-hover:   #E0C87A;
    --color-primary-active:  #ECDA92;
    --color-primary-highlight: #2A2820;
    --color-primary-text:    #0F1824;
    --color-success:         #4CAF60;
    --color-success-highlight: #1A2D1E;
    --color-error:           #E05555;
    --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.2);
    --shadow-md: 0 4px 12px oklch(0 0 0 / 0.3);
    --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.4);
  }
}
