/* Dark theme (default) */
:root, [data-theme="dark"] {
  --bg: #0a0a1a;
  --surface: #161b22;
  --text-primary: #e6edf3;
  --text-secondary: #9ba4ae;
  --text-muted: #656d76;
  --accent: #a78bfa;
  --accent-hover: #c4b5fd;
  --border: #30363d;
  --btn-primary-bg: #7c3aed;
  --btn-primary-hover: #6d28d9;
}

/* Light theme */
[data-theme="light"] {
  --bg: #f5f5f5;
  --surface: #ffffff;
  --text-primary: #1a1d21;
  --text-secondary: #525960;
  --text-muted: #747b84;
  --accent: #7c3aed;
  --accent-hover: #6d28d9;
  --border: #d3d7dc;
  --btn-primary-bg: #7c3aed;
  --btn-primary-hover: #6d28d9;
}

/* Fallback for no JS */
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --bg: #f5f5f5;
    --surface: #ffffff;
    --text-primary: #1a1d21;
    --text-secondary: #525960;
    --text-muted: #747b84;
    --accent: #7c3aed;
    --accent-hover: #6d28d9;
    --border: #d3d7dc;
    --btn-primary-bg: #7c3aed;
    --btn-primary-hover: #6d28d9;
  }
}

/* Theme toggle button */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.1s, background 0.1s, border-color 0.1s;
}

.theme-toggle:hover {
  color: var(--text-primary);
  background: var(--surface);
  border-color: var(--text-muted);
}

.theme-toggle svg {
  display: block;
}

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

body {
  font-family: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text-secondary);
  min-height: 100vh;
  line-height: 1.7;
}

/* Navigation */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
}

nav .brand {
  font-size: 18px;
  font-weight: 700;
  font-style: normal;
  color: var(--text-primary);
  text-decoration: none;
}

nav .nav-links {
  display: flex;
  gap: 24px;
}

nav .nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
}

nav .nav-links a:hover {
  color: var(--accent);
}

/* Main content */
main {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 24px 64px;
}

/* Hero */
.hero {
  text-align: center;
  margin-bottom: 48px;
}

.hero h1 {
  font-size: 48px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.hero .subtitle {
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.hero p {
  font-size: 16px;
  margin-bottom: 24px;
}

/* Buttons */
.cta {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.btn {
  display: inline-block;
  padding: 12px 32px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--btn-primary-bg);
  color: #fff;
}

.btn-primary:hover {
  background: var(--btn-primary-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Features grid */
.features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 16px;
}

.card h2 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.card p {
  font-size: 14px;
  margin-bottom: 8px;
}

.card p:last-child { margin-bottom: 0; }

.card ul {
  margin: 8px 0;
  padding-left: 20px;
  font-size: 14px;
}

.card li {
  margin-bottom: 4px;
}

/* Legal pages */
h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.effective {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.legal-quote {
  font-style: italic;
  color: var(--text-primary);
}

/* Links */
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

/* Footer */
footer {
  text-align: center;
  padding: 24px;
  font-size: 13px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 24px;
  justify-content: center;
}

/* Mobile */
@media (max-width: 480px) {
  .hero h1 { font-size: 32px; }
  main { padding: 32px 16px 48px; }
  nav { padding: 12px 16px; }
  nav .nav-links { gap: 16px; }
}
