/* ==========================================================================
   BASE.CSS — Design Tokens (Light/Dark), Modern Reset & Typography
   Max lines: < 250 lines
   ========================================================================== */

:root {
  /* --- Dark Theme Tokens (Default) --- */
  --color-bg-primary:    #06120E;
  --color-bg-surface:    #0B1E17;
  --color-bg-elevated:   #10281F;
  --color-bg-glass:      rgba(255, 255, 255, 0.05);
  --color-bg-glass-hover:rgba(255, 255, 255, 0.09);

  --color-border:        rgba(255, 255, 255, 0.10);
  --color-border-strong: rgba(255, 255, 255, 0.18);
  --color-border-accent: rgba(16, 185, 129, 0.35);

  --color-accent:        #10B981;
  --color-accent-hover:  #059669;
  --color-accent-light:  #34D399;
  --color-accent-glow:   rgba(16, 185, 129, 0.25);
  --color-accent-subtle: rgba(16, 185, 129, 0.12);

  --color-hero-bg:       linear-gradient(135deg, #012B17 0%, #033E26 60%, #022415 100%);
  --color-section-tint:  #0A2219;
  --color-footer-bg:     #021B13;

  --color-text-primary:  #F1F5F9;
  --color-text-secondary:#94A3B8;
  --color-text-muted:    #64748B;
  --color-text-accent:   #34D399;

  --color-success:       #10B981;
  --color-error:         #EF4444;
  --color-warning:       #F59E0B;

  --shadow-card:         0 8px 30px rgba(0, 0, 0, 0.35);
  --shadow-glow:         0 0 24px var(--color-accent-glow);

  /* --- Spacing Scale --- */
  --sp-1: 0.25rem;  --sp-2: 0.5rem;   --sp-3: 0.75rem;
  --sp-4: 1rem;     --sp-5: 1.25rem;  --sp-6: 1.5rem;
  --sp-8: 2rem;     --sp-10: 2.5rem;  --sp-12: 3rem;
  --sp-16: 4rem;    --sp-20: 5rem;    --sp-24: 6rem;

  /* --- Border Radius --- */
  --radius-sm: 4px;   --radius-md: 8px;   --radius-lg: 12px;
  --radius-xl: 16px;  --radius-2xl: 24px; --radius-full: 9999px;

  /* --- Typography --- */
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-ui:      'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  --text-xs: 0.75rem;    --text-sm: 0.875rem; --text-base: 1rem;
  --text-lg: 1.125rem;   --text-xl: 1.25rem;  --text-2xl: 1.5rem;
  --text-3xl: 2rem;      --text-4xl: 2.5rem;  --text-5xl: 3.25rem;

  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Light Theme Override --- */
[data-theme="light"] {
  --color-bg-primary:    #FFFFFF;
  --color-bg-surface:    #F8FAFC;
  --color-bg-elevated:   #FFFFFF;
  --color-bg-glass:      rgba(255, 255, 255, 0.85);
  --color-bg-glass-hover:rgba(0, 0, 0, 0.04);

  --color-border:        rgba(0, 0, 0, 0.08);
  --color-border-strong: rgba(0, 0, 0, 0.16);
  --color-border-accent: rgba(5, 150, 105, 0.35);

  --color-accent:        #059669;
  --color-accent-hover:  #047857;
  --color-accent-light:  #10B981;
  --color-accent-glow:   rgba(5, 150, 105, 0.20);
  --color-accent-subtle: rgba(5, 150, 105, 0.08);

  --color-hero-bg:       linear-gradient(135deg, #012B17 0%, #033E26 60%, #022415 100%);
  --color-section-tint:  #F0FBF3;
  --color-footer-bg:     #032219;

  --color-text-primary:  #0F172A;
  --color-text-secondary:#475569;
  --color-text-muted:    #64748B;
  --color-text-accent:   #059669;

  --shadow-card:         0 8px 30px rgba(0, 0, 0, 0.06);
}

/* --- Reset --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-ui);
  background-color: var(--color-bg-primary);
  color: var(--color-text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color var(--transition-base), color var(--transition-base);
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  background: none;
  border: none;
}

ul, ol {
  list-style: none;
}

/* --- Shared Layout Helpers --- */
.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(1rem, 4vw, 2rem);
  padding-right: clamp(1rem, 4vw, 2rem);
}

.container--narrow {
  max-width: 860px;
}

.section {
  padding-top: clamp(4rem, 8vw, 6.5rem);
  padding-bottom: clamp(4rem, 8vw, 6.5rem);
}

.section--sm {
  padding-top: clamp(2.5rem, 5vw, 4rem);
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
}

.section--tinted {
  background-color: var(--color-section-tint);
}

.section--surface {
  background-color: var(--color-bg-surface);
}

.section__eyebrow {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  margin-bottom: var(--sp-3);
}

.section-heading {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 400;
  color: var(--color-text-primary);
  line-height: 1.2;
  margin-bottom: var(--sp-4);
}

.section-subheading {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  max-width: 650px;
  line-height: 1.6;
}

.text-center {
  text-align: center;
}

.text-center .section-subheading {
  margin-left: auto;
  margin-right: auto;
}

.gradient-text {
  background: linear-gradient(135deg, #34D399 0%, #10B981 50%, #A7F3D0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Reveal Animations */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
