/* Art direction: Tech media publication → Clean, authoritative, modern
   Palette: Cool neutrals (slate), accent: Electric blue #2563EB — trust, technology, precision
   Typography: Satoshi only — single family, weight-differentiated. Concordant pairing.
   Density: Spacious / editorial */

/* ===== 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 ===== */
  --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-body: 'Satoshi', 'Inter', system-ui, sans-serif;
  --font-display: 'Satoshi', 'Inter', system-ui, 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 (default) ===== */
:root, [data-theme="light"] {
  --color-bg:             #FFFFFF;
  --color-surface:        #F8FAFC;
  --color-surface-2:      #F1F5F9;
  --color-surface-offset: #E2E8F0;
  --color-surface-offset-2: #CBD5E1;
  --color-surface-dynamic: #94A3B8;
  --color-divider:        #E2E8F0;
  --color-border:         #CBD5E1;

  --color-text:           #0F172A;
  --color-text-muted:     #475569;
  --color-text-faint:     #94A3B8;
  --color-text-inverse:   #F8FAFC;

  --color-primary:        #2563EB;
  --color-primary-hover:  #1D4ED8;
  --color-primary-active: #1E40AF;
  --color-primary-highlight: #DBEAFE;

  --color-secondary:      #0EA5E9;

  --color-success:        #16A34A;
  --color-error:          #DC2626;
  --color-warning:        #D97706;

  --color-dark-section:   #0F172A;
  --color-dark-section-text: #F8FAFC;
  --color-dark-section-muted: #94A3B8;

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

/* ===== DARK MODE ===== */
[data-theme="dark"] {
  --color-bg:             #09090B;
  --color-surface:        #18181B;
  --color-surface-2:      #27272A;
  --color-surface-offset: #3F3F46;
  --color-surface-offset-2: #52525B;
  --color-surface-dynamic: #71717A;
  --color-divider:        #27272A;
  --color-border:         #3F3F46;

  --color-text:           #FAFAFA;
  --color-text-muted:     #A1A1AA;
  --color-text-faint:     #71717A;
  --color-text-inverse:   #09090B;

  --color-primary:        #3B82F6;
  --color-primary-hover:  #60A5FA;
  --color-primary-active: #2563EB;
  --color-primary-highlight: #1E3A5F;

  --color-secondary:      #38BDF8;

  --color-success:        #22C55E;
  --color-error:          #EF4444;
  --color-warning:        #F59E0B;

  --color-dark-section:   #18181B;
  --color-dark-section-text: #FAFAFA;
  --color-dark-section-muted: #A1A1AA;

  --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:             #09090B;
    --color-surface:        #18181B;
    --color-surface-2:      #27272A;
    --color-surface-offset: #3F3F46;
    --color-surface-offset-2: #52525B;
    --color-surface-dynamic: #71717A;
    --color-divider:        #27272A;
    --color-border:         #3F3F46;
    --color-text:           #FAFAFA;
    --color-text-muted:     #A1A1AA;
    --color-text-faint:     #71717A;
    --color-text-inverse:   #09090B;
    --color-primary:        #3B82F6;
    --color-primary-hover:  #60A5FA;
    --color-primary-active: #2563EB;
    --color-primary-highlight: #1E3A5F;
    --color-secondary:      #38BDF8;
    --color-success:        #22C55E;
    --color-error:          #EF4444;
    --color-warning:        #F59E0B;
    --color-dark-section:   #18181B;
    --color-dark-section-text: #FAFAFA;
    --color-dark-section-muted: #A1A1AA;
    --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);
  }
}
