/* style.css — Everlead Design Tokens + Component Styles */

/* ============================================
   GOOGLE FONTS IMPORT (handled in HTML)
   Display: Libre Baskerville
   Body: DM Sans
   ============================================ */

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

/* ============================================
   SPACING — 4px grid
   ============================================ */
:root {
  --space-1:  0.25rem;  /*  4px */
  --space-2:  0.5rem;   /*  8px */
  --space-3:  0.75rem;  /* 12px */
  --space-4:  1rem;     /* 16px */
  --space-5:  1.25rem;  /* 20px */
  --space-6:  1.5rem;   /* 24px */
  --space-8:  2rem;     /* 32px */
  --space-10: 2.5rem;   /* 40px */
  --space-12: 3rem;     /* 48px */
  --space-16: 4rem;     /* 64px */
  --space-20: 5rem;     /* 80px */
  --space-24: 6rem;     /* 96px */
  --space-32: 8rem;     /* 128px */
}

/* ============================================
   CUSTOM PALETTE — EVERLEAD (LIGHT MODE)
   Warm cream surfaces, forest green + burnished gold
   ============================================ */
:root, [data-theme="light"] {
  /* --- Surfaces --- */
  --color-bg:              #F5F0E8;
  --color-surface:         #FAF8F3;
  --color-surface-2:       #FFFEF9;
  --color-surface-offset:  #EDE8DE;
  --color-surface-dynamic: #E3DDD2;
  --color-divider:         #D4CCBD;
  --color-border:          #C8BFAD;

  /* --- Text --- */
  --color-text:            #1C2B1A;
  --color-text-muted:      #5E6B5C;
  --color-text-faint:      #A3AB9F;
  --color-text-inverse:    #FAF8F3;

  /* --- Primary Accent: Forest Green --- */
  --color-primary:         #1B4332;
  --color-primary-hover:   #143328;
  --color-primary-active:  #0F261E;
  --color-primary-highlight: #C9D9CD;

  /* --- Gold CTA --- */
  --color-gold:            #B8860B;
  --color-gold-hover:      #9A7209;
  --color-gold-active:     #7C5B07;
  --color-gold-highlight:  #E8DFC4;

  /* --- Semantic --- */
  --color-error:           #8B2E2E;
  --color-success:         #1B4332;

  /* --- Radius --- */
  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --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.15 0.03 150 / 0.06);
  --shadow-md: 0 4px 12px oklch(0.15 0.03 150 / 0.09);
  --shadow-lg: 0 12px 32px oklch(0.15 0.03 150 / 0.13);

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

  /* --- Fonts --- */
  --font-display: 'Libre Baskerville', 'Georgia', serif;
  --font-body:    'DM Sans', 'Helvetica Neue', sans-serif;
}

/* ============================================
   DARK MODE
   Primary stays deep forest green so hero,
   testimonials, footer keep their branded look.
   Surfaces go dark, gold warms up slightly.
   ============================================ */
[data-theme="dark"] {
  --color-bg:              #141A13;
  --color-surface:         #1A211A;
  --color-surface-2:       #1F271F;
  --color-surface-offset:  #1C231B;
  --color-surface-dynamic: #2A322A;
  --color-divider:         #252D25;
  --color-border:          #353E35;

  --color-text:            #D4DCD2;
  --color-text-muted:      #7A847A;
  --color-text-faint:      #545E54;
  --color-text-inverse:    #FAF8F3;

  /* Keep deep green — same as light mode for branded sections */
  --color-primary:         #1B4332;
  --color-primary-hover:   #234F3F;
  --color-primary-active:  #0F261E;
  --color-primary-highlight: #252E27;

  --color-gold:            #D4A31A;
  --color-gold-hover:      #E8B830;
  --color-gold-active:     #F0CC60;
  --color-gold-highlight:  #3A3520;

  --color-error:           #C05050;
  --color-success:         #6B9473;

  --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:              #141A13;
    --color-surface:         #1A211A;
    --color-surface-2:       #1F271F;
    --color-surface-offset:  #1C231B;
    --color-surface-dynamic: #2A322A;
    --color-divider:         #252D25;
    --color-border:          #353E35;
    --color-text:            #D4DCD2;
    --color-text-muted:      #7A847A;
    --color-text-faint:      #545E54;
    --color-text-inverse:    #FAF8F3;
    --color-primary:         #1B4332;
    --color-primary-hover:   #234F3F;
    --color-primary-active:  #0F261E;
    --color-primary-highlight: #252E27;
    --color-gold:            #D4A31A;
    --color-gold-hover:      #E8B830;
    --color-gold-active:     #F0CC60;
    --color-gold-highlight:  #3A3520;
    --color-error:           #C05050;
    --color-success:         #6B9473;
    --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);
  }
}
