/* ─────────────────────────────────────────────────────────────────────────────
   base.css — Reset, design tokens, typography
   ───────────────────────────────────────────────────────────────────────────── */

/* ── Design Tokens ─────────────────────────────────────────────────────────── */
:root {
  /* Colors */
  --clr-bg:        #0f0f1a;
  --clr-surface:   #1a1a2e;
  --clr-surface-2: #22223b;
  --clr-border:    #2d2d4e;
  --clr-primary:   #6c3ce1;
  --clr-primary-h: #8b5cf6;
  --clr-accent:    #f5a623;
  --clr-text:      #e8e8f0;
  --clr-text-muted:#9090b0;
  --clr-success:   #2ecc71;
  --clr-warning:   #f39c12;
  --clr-error:     #e74c3c;
  --clr-info:      #3498db;

  /* Spacing */
  --sp-xs:  4px;
  --sp-sm:  8px;
  --sp-md:  16px;
  --sp-lg:  24px;
  --sp-xl:  40px;

  /* Typography */
  --font:   'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-sz-sm:  13px;
  --font-sz-md:  16px;
  --font-sz-lg:  20px;
  --font-sz-xl:  28px;

  /* Shapes */
  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-full: 999px;

  /* Shadows */
  --shadow-card: 0 4px 20px rgba(0,0,0,0.5);
  --shadow-btn:  0 2px 8px rgba(108,60,225,0.4);
}

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

html {
  font-size: var(--font-sz-md);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background:  var(--clr-bg);
  color:       var(--clr-text);
  min-height:  100dvh;
  line-height: 1.5;
  overflow-x:  hidden;
}

img { max-width: 100%; display: block; }
a   { color: var(--clr-primary-h); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 {
  line-height: 1.2;
  font-weight: 700;
}
h1 { font-size: var(--font-sz-xl); }
h2 { font-size: var(--font-sz-lg); }
h3 { font-size: var(--font-sz-md); }

p  { color: var(--clr-text-muted); font-size: var(--font-sz-md); }
strong { color: var(--clr-text); }
small  { font-size: var(--font-sz-sm); color: var(--clr-text-muted); }

hr.divider {
  border: none;
  border-top: 1px solid var(--clr-border);
  margin: var(--sp-lg) 0;
}

/* ── Accessibility ──────────────────────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--clr-primary-h);
  outline-offset: 2px;
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration:   0.01ms !important;
    transition-duration:  0.01ms !important;
  }
}
