/* Art direction: Edson RV Park & Campground → Outdoorsy yet modern resort
   Palette: Warm earth tones (sandy beige surfaces) + deep forest green accent
   Typography: Instrument Serif (display, sophisticated nature) + Work Sans (body, clean readable)
   Density: Spacious/editorial — generous whitespace, let imagery breathe */

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

  /* ===== FONTS ===== */
  --font-display: 'Instrument Serif', Georgia, serif;
  --font-body: 'Work Sans', 'Helvetica Neue', sans-serif;

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

/* ===== LIGHT MODE (Edson Earth Palette) ===== */
:root, [data-theme="light"] {
  /* Surfaces — warm sandy beige */
  --color-bg:               #f5f2ec;
  --color-surface:          #faf8f4;
  --color-surface-2:        #ffffff;
  --color-surface-offset:   #ede9e0;
  --color-surface-offset-2: #e5e0d5;
  --color-surface-dynamic:  #ddd8cc;
  --color-divider:          #d1cbc0;
  --color-border:           #c5bfb3;

  /* Text — deep warm brown */
  --color-text:             #2c2618;
  --color-text-muted:       #6d6454;
  --color-text-faint:       #a69e8e;
  --color-text-inverse:     #faf8f4;

  /* Primary Accent — deep forest green */
  --color-primary:          #2a5e3f;
  --color-primary-hover:    #1e4a30;
  --color-primary-active:   #153823;
  --color-primary-highlight: #d4e3d9;

  /* Warning */
  --color-warning:          #964219;
  --color-warning-hover:    #713417;
  --color-warning-active:   #4b2614;
  --color-warning-highlight: #ddcfc6;

  /* Error */
  --color-error:            #a13544;
  --color-error-hover:      #7d2833;
  --color-error-active:     #561c23;
  --color-error-highlight:  #e0cece;

  /* Success */
  --color-success:          #437a22;
  --color-success-hover:    #2e5c10;
  --color-success-active:   #1e3f0a;
  --color-success-highlight: #d4dfcc;

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

/* ===== DARK MODE ===== */
[data-theme="dark"] {
  --color-bg:               #1a1916;
  --color-surface:          #211f1b;
  --color-surface-2:        #272520;
  --color-surface-offset:   #1e1d19;
  --color-surface-offset-2: #2a2824;
  --color-surface-dynamic:  #333028;
  --color-divider:          #2e2c26;
  --color-border:           #3e3b34;
  --color-text:             #d6d2c8;
  --color-text-muted:       #908a7e;
  --color-text-faint:       #5e594f;
  --color-text-inverse:     #2c2618;

  /* Primary — lighter green for dark mode */
  --color-primary:          #5ba872;
  --color-primary-hover:    #3e8d56;
  --color-primary-active:   #2d7243;
  --color-primary-highlight: #2e3b32;

  /* Warning */
  --color-warning:          #bb653b;
  --color-warning-hover:    #b95525;
  --color-warning-active:   #993d10;
  --color-warning-highlight: #3d3028;

  /* Error */
  --color-error:            #dd6974;
  --color-error-hover:      #c24a59;
  --color-error-active:     #a53142;
  --color-error-highlight:  #3d2e30;

  /* Success */
  --color-success:          #6daa45;
  --color-success-hover:    #4d8f25;
  --color-success-active:   #387015;
  --color-success-highlight: #2e3828;

  --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:               #1a1916;
    --color-surface:          #211f1b;
    --color-surface-2:        #272520;
    --color-surface-offset:   #1e1d19;
    --color-surface-offset-2: #2a2824;
    --color-surface-dynamic:  #333028;
    --color-divider:          #2e2c26;
    --color-border:           #3e3b34;
    --color-text:             #d6d2c8;
    --color-text-muted:       #908a7e;
    --color-text-faint:       #5e594f;
    --color-text-inverse:     #2c2618;
    --color-primary:          #5ba872;
    --color-primary-hover:    #3e8d56;
    --color-primary-active:   #2d7243;
    --color-primary-highlight: #2e3b32;
    --color-warning:          #bb653b;
    --color-warning-hover:    #b95525;
    --color-warning-active:   #993d10;
    --color-warning-highlight: #3d3028;
    --color-error:            #dd6974;
    --color-error-hover:      #c24a59;
    --color-error-active:     #a53142;
    --color-error-highlight:  #3d2e30;
    --color-success:          #6daa45;
    --color-success-hover:    #4d8f25;
    --color-success-active:   #387015;
    --color-success-highlight: #2e3828;
    --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);
  }
}
