/* ============================================
   DDD Design Tokens & Base Styles
   Single source of truth for the design system
   ============================================ */

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

:root {
  /* Colors */
  --bg: #0D1117;
  --bg-card: rgba(255,255,255,0.03);
  --bg-ui: #1E232D;
  --border: rgba(255,255,255,0.07);
  --text: #FFFFFF;
  --text-secondary: #9CA3AF;
  --text-muted: #8d95a2;
  --accent: #2DD4BF;
  --accent-light: #5eead4; /* Higher contrast variant for small text on dark bg (WCAG AA) */
  --accent-dim: rgba(45,212,191,0.15);
  --accent-glow: rgba(45,212,191,0.08);

  /* Typography */
  --sans: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'SF Mono', 'Fira Code', 'Courier New', monospace;

  /* Layout */
  --max-w: 680px;
  --gap: clamp(2.5rem, 5vw, 4rem);
  --gap-sm: clamp(1.5rem, 3vw, 2.5rem);
  --gap-lg: clamp(4rem, 8vw, 6rem);
}

html {
  color-scheme: dark only;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  scrollbar-color: rgba(255,255,255,0.12) transparent;
  scrollbar-width: thin;
}
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
  max-width: 100vw;
}

::selection { background: var(--accent-dim); color: var(--accent); }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--text); }
button:focus-visible, input:focus-visible, a:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.25rem; }
section { padding: var(--gap) 0; }

/* Mobile spacing overrides — tighter vertical rhythm without cramping */
@media (max-width: 600px) {
  :root {
    --gap: 1.75rem;
    --gap-sm: 1rem;
    --gap-lg: 2.5rem;
  }
}
