/* Art direction: Premium New England charter fishing → Confident, masculine, refined
   Palette: Cool navy foundation, warm gold accent — deep ocean + brass nautical hardware
   Typography: Cormorant Garamond (display) + DM Sans (body) — editorial authority meets clean modern
   Density: Spacious, editorial — generous whitespace befitting premium outdoor brand */

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

  /* 4px Spacing 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.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%;

  /* Font families */
  --font-display: 'Cormorant Garamond', 'Georgia', serif;
  --font-body: 'DM Sans', 'Helvetica Neue', sans-serif;
}

/* ============================
   LIGHT MODE (Default)
   ============================ */
:root, [data-theme="light"] {
  /* Surfaces — clean off-white with subtle warmth */
  --color-bg:             #f8f9fa;
  --color-surface:        #ffffff;
  --color-surface-2:      #f1f3f5;
  --color-surface-offset: #e9ecef;
  --color-surface-offset-2: #dee2e6;
  --color-surface-dynamic: #ced4da;
  --color-divider:        #dee2e6;
  --color-border:         #ced4da;

  /* Text */
  --color-text:           #0a1628;
  --color-text-muted:     #4a5568;
  --color-text-faint:     #a0aec0;
  --color-text-inverse:   #f8f9fa;

  /* Primary — Rich Gold/Amber (brass nautical hardware) */
  --color-primary:        #b5861d;
  --color-primary-hover:  #9a7118;
  --color-primary-active: #7d5b13;
  --color-primary-highlight: #f5eed9;

  /* Secondary — Muted Steel Blue */
  --color-secondary:      #4a6fa5;
  --color-secondary-hover: #3d5d8c;
  --color-secondary-active: #304a73;

  /* Navy accent for dark surfaces */
  --color-navy:           #0a1628;
  --color-navy-light:     #162a4a;

  /* Error */
  --color-error:          #c53030;
  --color-error-hover:    #9b2c2c;
  --color-error-active:   #742a2a;
  --color-error-highlight: #fed7d7;

  /* Success */
  --color-success:        #2f855a;
  --color-success-hover:  #276749;
  --color-success-active: #1e4d38;
  --color-success-highlight: #c6f6d5;

  /* Warning */
  --color-warning:        #b7791f;
  --color-warning-hover:  #975a16;
  --color-warning-active: #744210;
  --color-warning-highlight: #fefcbf;

  /* Shadows — cool-toned to match palette */
  --shadow-sm: 0 1px 2px oklch(0.15 0.02 250 / 0.06);
  --shadow-md: 0 4px 12px oklch(0.15 0.02 250 / 0.08);
  --shadow-lg: 0 12px 32px oklch(0.15 0.02 250 / 0.12);
}

/* ============================
   DARK MODE
   ============================ */
[data-theme="dark"] {
  /* Surfaces — deep navy ocean */
  --color-bg:             #0a1628;
  --color-surface:        #0f1d35;
  --color-surface-2:      #152442;
  --color-surface-offset: #0d1a30;
  --color-surface-offset-2: #1a2d50;
  --color-surface-dynamic: #1f3460;
  --color-divider:        #1e2d4a;
  --color-border:         #2a3f65;

  /* Text */
  --color-text:           #e2e8f0;
  --color-text-muted:     #a0aec0;
  --color-text-faint:     #4a5568;
  --color-text-inverse:   #0a1628;

  /* Primary — Warm Gold (brighter for dark bg) */
  --color-primary:        #d4a53a;
  --color-primary-hover:  #e8b94e;
  --color-primary-active: #f0c862;
  --color-primary-highlight: #1f2d1a;

  /* Secondary — Steel Blue (lighter for dark bg) */
  --color-secondary:      #6b8fc4;
  --color-secondary-hover: #84a5d6;
  --color-secondary-active: #9dbae6;

  /* Navy */
  --color-navy:           #f8f9fa;
  --color-navy-light:     #e2e8f0;

  /* Error */
  --color-error:          #fc8181;
  --color-error-hover:    #feb2b2;
  --color-error-active:   #fecaca;
  --color-error-highlight: #2d1b1b;

  /* Success */
  --color-success:        #68d391;
  --color-success-hover:  #9ae6b4;
  --color-success-active: #c6f6d5;
  --color-success-highlight: #1a2d1e;

  /* Warning */
  --color-warning:        #f6ad55;
  --color-warning-hover:  #fbd38d;
  --color-warning-active: #fefcbf;
  --color-warning-highlight: #2d261a;

  /* Shadows */
  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.25);
  --shadow-md: 0 4px 12px oklch(0 0 0 / 0.35);
  --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.45);
}

/* System preference fallback */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg:             #0a1628;
    --color-surface:        #0f1d35;
    --color-surface-2:      #152442;
    --color-surface-offset: #0d1a30;
    --color-surface-offset-2: #1a2d50;
    --color-surface-dynamic: #1f3460;
    --color-divider:        #1e2d4a;
    --color-border:         #2a3f65;
    --color-text:           #e2e8f0;
    --color-text-muted:     #a0aec0;
    --color-text-faint:     #4a5568;
    --color-text-inverse:   #0a1628;
    --color-primary:        #d4a53a;
    --color-primary-hover:  #e8b94e;
    --color-primary-active: #f0c862;
    --color-primary-highlight: #1f2d1a;
    --color-secondary:      #6b8fc4;
    --color-secondary-hover: #84a5d6;
    --color-secondary-active: #9dbae6;
    --color-navy:           #f8f9fa;
    --color-navy-light:     #e2e8f0;
    --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.25);
    --shadow-md: 0 4px 12px oklch(0 0 0 / 0.35);
    --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.45);
  }
}
