/* ============================================================
   DESIGN TOKENS — Atomic Trust Website v2
   Space Grotesk + Inter + JetBrains Mono + Instrument Serif
   Teal accent, light-first, Stripe-quality polish
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&family=Instrument+Serif:ital@1&display=swap');

:root {
  /* ── Colors: Light (default) ── */
  --bg:             #ffffff;
  --bg-alt:         #f8fafb;
  --bg-dark:        #0c1220;
  --bg-panel:       #141c2e;
  --text:           #0f172a;
  --text-body:      #475569;
  --text-muted:     #94a3b8;
  --accent:         #7c3aed;
  --accent-dark:    #6d28d9;
  --accent-glow:    rgba(124, 58, 237, 0.15);
  --proof:          #7c3aed;
  --proof-glow:     rgba(124, 58, 237, 0.12);
  --conserved:      #10b981;
  --conserved-glow: rgba(16, 185, 129, 0.12);
  --warning:        #f59e0b;
  --danger:         #ef4444;
  --border:         #e2e8f0;
  --border-subtle:  #f1f5f9;

  /* ── Typography ── */
  --font-heading:   'Space Grotesk', system-ui, sans-serif;
  --font-body:      'Inter', system-ui, sans-serif;
  --font-code:      'JetBrains Mono', 'Fira Code', monospace;
  --font-delta:     'Instrument Serif', serif;

  /* ── Type Scale (fluid, clamp-based) ── */
  --text-xs:    clamp(0.75rem, 0.7rem + 0.15vw, 0.8125rem);
  --text-sm:    clamp(0.8125rem, 0.775rem + 0.2vw, 0.875rem);
  --text-base:  clamp(0.9375rem, 0.9rem + 0.2vw, 1rem);
  --text-lg:    clamp(1.0625rem, 1rem + 0.3vw, 1.125rem);
  --text-xl:    clamp(1.1875rem, 1.1rem + 0.4vw, 1.25rem);
  --text-2xl:   clamp(1.375rem, 1.2rem + 0.6vw, 1.5rem);
  --text-3xl:   clamp(1.625rem, 1.4rem + 0.8vw, 1.875rem);
  --text-4xl:   clamp(2rem, 1.6rem + 1.2vw, 2.25rem);
  --text-5xl:   clamp(2.5rem, 2rem + 1.6vw, 3rem);
  --text-6xl:   clamp(3rem, 2.4rem + 2vw, 3.75rem);
  --text-hero:  clamp(2.75rem, 2rem + 2.5vw, 4.5rem);

  /* ── 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;

  /* ── Layout ── */
  --max-w:      1200px;
  --max-w-lg:   1400px;
  --max-w-sm:   800px;
  --gutter:     clamp(1rem, 3vw, 2rem);
  --nav-h:      64px;
  --announce-h: 3px;

  /* ── Radii ── */
  --radius-sm:  4px;
  --radius:     6px;
  --radius-md:  8px;
  --radius-lg:  12px;
  --radius-xl:  16px;
  --radius-full: 9999px;

  /* ── Shadows ── */
  --shadow-sm:  0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow:     0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md:  0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-lg:  0 10px 15px rgba(0, 0, 0, 0.08), 0 4px 6px rgba(0, 0, 0, 0.04);
  --shadow-xl:  0 20px 25px rgba(0, 0, 0, 0.08), 0 8px 10px rgba(0, 0, 0, 0.04);

  /* ── Transitions ── */
  --ease:       cubic-bezier(0.4, 0, 0.2, 1);
  --ease-in:    cubic-bezier(0.4, 0, 1, 1);
  --ease-out:   cubic-bezier(0, 0, 0.2, 1);
  --duration:   200ms;
  --duration-md: 300ms;
  --duration-lg: 500ms;

  /* ── Z-Index Scale ── */
  --z-bg:       -1;
  --z-base:     0;
  --z-card:     10;
  --z-nav:      1000;
  --z-announce: 1010;
  --z-overlay:  200;
  --z-modal:    300;
}

/* ── Dark Sections (via class, not media query — light is default) ── */
.dark-section {
  --bg:         #0c1220;
  --bg-alt:     #141c2e;
  --text:       #f1f5f9;
  --text-body:  #cbd5e1;
  --text-muted: #64748b;
  --border:     #1e293b;
  --border-subtle: #1e293b;
}
