/* style.css — Edge Collective Design Tokens & Component Styles */

/* ========== FONTS ========== */
/* Instrument Serif (display) loaded from Google Fonts */
/* Satoshi (body) loaded from Fontshare */

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

  /* ========== FONT FAMILIES ========== */
  --font-display: 'Instrument Serif', Georgia, serif;
  --font-body: 'Satoshi', 'Inter', sans-serif;

  /* ========== CONTENT WIDTHS ========== */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;
  --content-full: 100%;

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

/* ========== LIGHT MODE (default) ========== */
:root, [data-theme="light"] {
  /* Surfaces — warm, clean, premium */
  --color-bg:               #f8f7f4;
  --color-surface:          #ffffff;
  --color-surface-2:        #f3f2ee;
  --color-surface-offset:   #edecea;
  --color-surface-offset-2: #e5e3df;
  --color-surface-dynamic:  #dddbd6;
  --color-divider:          #d4d1ca;
  --color-border:           #cbc8c0;

  /* Text */
  --color-text:             #0a2540;
  --color-text-muted:       #556b82;
  --color-text-faint:       #9aacbe;
  --color-text-inverse:     #f8f7f4;

  /* Primary Accent — Deep Navy */
  --color-primary:          #0a2540;
  --color-primary-hover:    #163a5c;
  --color-primary-active:   #0d1f33;
  --color-primary-highlight: #d4dfe8;

  /* Action Accent — Teal/Cyan */
  --color-accent:           #00a4bd;
  --color-accent-hover:     #008da3;
  --color-accent-active:    #007589;
  --color-accent-highlight: #cceff5;

  /* Semantic */
  --color-error:            #a12c7b;
  --color-success:          #437a22;
  --color-warning:          #964219;

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

/* ========== DARK MODE ========== */
[data-theme="dark"] {
  --color-bg:               #0d1b2a;
  --color-surface:          #12233a;
  --color-surface-2:        #172b48;
  --color-surface-offset:   #162740;
  --color-surface-offset-2: #1c3050;
  --color-surface-dynamic:  #233b5a;
  --color-divider:          #1e3350;
  --color-border:           #294060;

  --color-text:             #d9e2ec;
  --color-text-muted:       #8da2b8;
  --color-text-faint:       #546b84;
  --color-text-inverse:     #0d1b2a;

  --color-primary:          #a8c6df;
  --color-primary-hover:    #8fb5d2;
  --color-primary-active:   #76a4c5;
  --color-primary-highlight: #1e3350;

  --color-accent:           #3ec5d6;
  --color-accent-hover:     #5ed0de;
  --color-accent-active:    #80dce7;
  --color-accent-highlight: #142d35;

  --color-error:            #d163a7;
  --color-success:          #6daa45;
  --color-warning:          #bb653b;

  --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:               #0d1b2a;
    --color-surface:          #12233a;
    --color-surface-2:        #172b48;
    --color-surface-offset:   #162740;
    --color-surface-offset-2: #1c3050;
    --color-surface-dynamic:  #233b5a;
    --color-divider:          #1e3350;
    --color-border:           #294060;
    --color-text:             #d9e2ec;
    --color-text-muted:       #8da2b8;
    --color-text-faint:       #546b84;
    --color-text-inverse:     #0d1b2a;
    --color-primary:          #a8c6df;
    --color-primary-hover:    #8fb5d2;
    --color-primary-active:   #76a4c5;
    --color-primary-highlight: #1e3350;
    --color-accent:           #3ec5d6;
    --color-accent-hover:     #5ed0de;
    --color-accent-active:    #80dce7;
    --color-accent-highlight: #142d35;
    --color-error:            #d163a7;
    --color-success:          #6daa45;
    --color-warning:          #bb653b;
    --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);
  }
}
