/* Art direction: Luxury yacht brokerage → Premium, nautical, editorial
   Palette: Deep navy + warm cream + gold accent — inspired by Fraser Yachts aesthetic
   Typography: Cormorant (display) + General Sans (body) — editorial luxury maritime
   Density: Spacious — generous whitespace, editorial breathing room */

/* ================================================================
   DESIGN TOKENS
   ================================================================ */

:root {
  /* Type Scale */
  --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(3rem,     0.5rem  + 7vw,    8rem);

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

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

  /* Typography */
  --font-display: 'Cormorant', 'Georgia', serif;
  --font-body: 'General Sans', 'Helvetica Neue', sans-serif;
}

/* ================================================================
   LIGHT MODE (DEFAULT) — Warm Cream + Navy Accents
   ================================================================ */

:root, [data-theme="light"] {
  /* Surfaces — warm cream/white */
  --color-bg:               #f8f6f1;
  --color-surface:          #ffffff;
  --color-surface-2:        #f2efe8;
  --color-surface-offset:   #eae6dd;
  --color-surface-offset-2: #e2ddd3;
  --color-surface-dynamic:  #d8d2c6;
  --color-divider:          #d4cfc5;
  --color-border:           #c8c2b8;

  /* Text */
  --color-text:           #0a1628;
  --color-text-muted:     #5a6478;
  --color-text-faint:     #9aa0ac;
  --color-text-inverse:   #f8f6f1;

  /* Primary Accent — Gold */
  --color-primary:          #c9a84c;
  --color-primary-hover:    #b8952f;
  --color-primary-active:   #9e7e20;
  --color-primary-highlight: #f5edda;

  /* Navy — for dark sections, hero backgrounds */
  --color-navy:           #0a1628;
  --color-navy-light:     #0f2140;
  --color-navy-surface:   #142c52;

  /* Ocean Blue — secondary accent */
  --color-secondary:        #1a5276;
  --color-secondary-hover:  #144263;
  --color-secondary-active: #0f3350;

  /* Semantic */
  --color-error:          #a13544;
  --color-error-hover:    #892c3a;
  --color-error-highlight: #fde8ec;
  --color-success:        #2e7d32;
  --color-success-hover:  #256529;
  --color-success-highlight: #e8f5e9;
  --color-warning:        #e65100;
  --color-warning-hover:  #bf4400;
  --color-warning-highlight: #fff3e0;

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

/* ================================================================
   DARK MODE — Deep Navy + Gold Accents
   ================================================================ */

[data-theme="dark"] {
  /* Surfaces — deep navy progression */
  --color-bg:               #0a1628;
  --color-surface:          #0f2140;
  --color-surface-2:        #142c52;
  --color-surface-offset:   #0d1b35;
  --color-surface-offset-2: #1a3563;
  --color-surface-dynamic:  #1f3d6e;
  --color-divider:          #1e3258;
  --color-border:           #2a4470;

  /* Text — warm whites */
  --color-text:           #f8f6f1;
  --color-text-muted:     #a8b4c8;
  --color-text-faint:     #6b7a94;
  --color-text-inverse:   #0a1628;

  /* Primary Accent — brighter gold for dark bg */
  --color-primary:          #d4b55a;
  --color-primary-hover:    #e0c46e;
  --color-primary-active:   #ecd382;
  --color-primary-highlight: #1e2a3f;

  /* Navy surfaces (same as bg in dark mode) */
  --color-navy:           #0a1628;
  --color-navy-light:     #0f2140;
  --color-navy-surface:   #142c52;

  /* Ocean Blue */
  --color-secondary:        #3d8cb5;
  --color-secondary-hover:  #5aa3c9;
  --color-secondary-active: #78b8d8;

  /* Semantic */
  --color-error:          #ef5350;
  --color-error-hover:    #e53935;
  --color-error-highlight: #2a1a1a;
  --color-success:        #66bb6a;
  --color-success-hover:  #4caf50;
  --color-success-highlight: #1a2a1a;
  --color-warning:        #ffa726;
  --color-warning-hover:  #fb8c00;
  --color-warning-highlight: #2a2217;

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

/* System preference fallback */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg:               #0a1628;
    --color-surface:          #0f2140;
    --color-surface-2:        #142c52;
    --color-surface-offset:   #0d1b35;
    --color-surface-offset-2: #1a3563;
    --color-surface-dynamic:  #1f3d6e;
    --color-divider:          #1e3258;
    --color-border:           #2a4470;
    --color-text:           #f8f6f1;
    --color-text-muted:     #a8b4c8;
    --color-text-faint:     #6b7a94;
    --color-text-inverse:   #0a1628;
    --color-primary:          #d4b55a;
    --color-primary-hover:    #e0c46e;
    --color-primary-active:   #ecd382;
    --color-primary-highlight: #1e2a3f;
    --color-navy:           #0a1628;
    --color-navy-light:     #0f2140;
    --color-navy-surface:   #142c52;
    --color-secondary:        #3d8cb5;
    --color-secondary-hover:  #5aa3c9;
    --color-secondary-active: #78b8d8;
    --color-error:          #ef5350;
    --color-success:        #66bb6a;
    --color-warning:        #ffa726;
    --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);
  }
}
