/* Art direction: Macau AI Profit Engine → Bloomberg Terminal meets boutique hotel management
   Palette: Warm gold/teal (casino heritage + ocean), premium fintech aesthetic
   Typography: Space Grotesk (display, modern geometric) + Inter (body, clean data)
   Density: Dense (dashboard), generous KPI cards */

/* ===================== FONTS ===================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  --font-display: 'Space Grotesk', 'Helvetica Neue', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ===================== TYPE SCALE ===================== */
: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.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);
}

/* ===================== SPACING (4px base) ===================== */
: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;
}

/* ===================== LIGHT MODE (Macau-inspired) ===================== */
:root, [data-theme="light"] {
  /* Surfaces */
  --color-bg:               #FAFAF7;
  --color-surface:          #FFFFFF;
  --color-surface-2:        #F5F5F2;
  --color-surface-offset:   #EEEEE9;
  --color-surface-dynamic:  #E6E4DF;
  --color-divider:          #DCD9D5;
  --color-border:           #D4D1CA;

  /* Text */
  --color-text:             #1A1A1A;
  --color-text-muted:       #6B7280;
  --color-text-faint:       #9CA3AF;
  --color-text-inverse:     #FFFFFF;

  /* Primary — Deep Gold */
  --color-primary:          #C9952B;
  --color-primary-hover:    #A87A1E;
  --color-primary-active:   #8A6318;
  --color-primary-highlight: #F5EDD8;

  /* Secondary — Deep Teal */
  --color-secondary:        #0A6B6E;
  --color-secondary-hover:  #085456;
  --color-secondary-active: #063F41;

  /* Success */
  --color-success:          #2E8B57;
  --color-success-hover:    #246E45;
  --color-success-active:   #1A5234;
  --color-success-highlight: #D4E8DC;

  /* Warning */
  --color-warning:          #D4762C;
  --color-warning-hover:    #B56324;
  --color-warning-active:   #96511C;
  --color-warning-highlight: #F5E6D4;

  /* Error */
  --color-error:            #C0392B;
  --color-error-hover:      #A03022;
  --color-error-active:     #80261B;
  --color-error-highlight:  #F5D6D2;

  /* 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 */
  --shadow-sm: 0 1px 2px oklch(0.2 0.01 80 / 0.06);
  --shadow-md: 0 4px 12px oklch(0.2 0.01 80 / 0.08);
  --shadow-lg: 0 12px 32px oklch(0.2 0.01 80 / 0.12);

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

/* ===================== DARK MODE ===================== */
[data-theme="dark"] {
  /* Surfaces */
  --color-bg:               #111315;
  --color-surface:          #1A1D21;
  --color-surface-2:        #22262B;
  --color-surface-offset:   #2A2E33;
  --color-surface-dynamic:  #33383E;
  --color-divider:          #3A3F46;
  --color-border:           #454B53;

  /* Text */
  --color-text:             #E8E8E8;
  --color-text-muted:       #9CA3AF;
  --color-text-faint:       #6B7280;
  --color-text-inverse:     #111315;

  /* Primary — Gold (lighter for dark bg) */
  --color-primary:          #DABA5A;
  --color-primary-hover:    #C9A43E;
  --color-primary-active:   #B89030;
  --color-primary-highlight: #2E2A1E;

  /* Secondary — Teal (lighter for dark bg) */
  --color-secondary:        #3AADAB;
  --color-secondary-hover:  #2E9190;
  --color-secondary-active: #237574;

  /* Success */
  --color-success:          #4CAF7C;
  --color-success-hover:    #3C9166;
  --color-success-active:   #2D7350;
  --color-success-highlight: #1E2E24;

  /* Warning */
  --color-warning:          #E8944A;
  --color-warning-hover:    #D4812E;
  --color-warning-active:   #C07020;
  --color-warning-highlight: #302418;

  /* Error */
  --color-error:            #E05545;
  --color-error-hover:      #C94535;
  --color-error-active:     #B33828;
  --color-error-highlight:  #301C1A;

  /* Shadows */
  --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);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg:               #111315;
    --color-surface:          #1A1D21;
    --color-surface-2:        #22262B;
    --color-surface-offset:   #2A2E33;
    --color-surface-dynamic:  #33383E;
    --color-divider:          #3A3F46;
    --color-border:           #454B53;
    --color-text:             #E8E8E8;
    --color-text-muted:       #9CA3AF;
    --color-text-faint:       #6B7280;
    --color-text-inverse:     #111315;
    --color-primary:          #DABA5A;
    --color-primary-hover:    #C9A43E;
    --color-primary-active:   #B89030;
    --color-primary-highlight: #2E2A1E;
    --color-secondary:        #3AADAB;
    --color-secondary-hover:  #2E9190;
    --color-secondary-active: #237574;
    --color-success:          #4CAF7C;
    --color-success-hover:    #3C9166;
    --color-success-active:   #2D7350;
    --color-success-highlight: #1E2E24;
    --color-warning:          #E8944A;
    --color-warning-hover:    #D4812E;
    --color-warning-active:   #C07020;
    --color-warning-highlight: #302418;
    --color-error:            #E05545;
    --color-error-hover:      #C94535;
    --color-error-active:     #B33828;
    --color-error-highlight:  #301C1A;
    --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);
  }
}
