/* Base styles - reset, typography, color variables */

:root {
  /* Light mode (default) */
  --color-bg: #FAFAF8;
  --color-surface: #F5F3EF;
  --color-border: #E5E2DC;
  --color-text: #2D2A26;
  --color-text-muted: #6B665E;

  /* Accent (overridden per app) */
  --color-accent: #6B665E;
  --color-accent-hover: #5A554E;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.2s ease;
}

[data-theme="dark"] {
  --color-bg: #0a0a0a;
  --color-surface: #141414;
  --color-border: #2a2a2a;
  --color-text: #fafafa;
  --color-text-muted: #888;
}

/* App accent overrides */
.app-stories { --color-accent: #D4725A; --color-accent-hover: #C4624A; }
.app-quixess { --color-accent: #3b82f6; --color-accent-hover: #2563eb; }
.app-ayto { --color-accent: #9370DB; --color-accent-hover: #7B5FC4; }

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  transition: background var(--transition-normal), color var(--transition-normal);
}

a { color: var(--color-accent); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--color-accent-hover); }

h1, h2, h3 { line-height: 1.2; font-weight: 600; }
h1 { font-size: clamp(2rem, 5vw, 2.75rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.25rem; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 var(--space-6); }

kbd {
  display: inline-block;
  padding: 0.15rem 0.4rem;
  font-size: 0.85em;
  font-family: inherit;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 4px;
}

/* App Store badge theme toggle */
.badge-dark { display: none; }
[data-theme="dark"] .badge-light { display: none; }
[data-theme="dark"] .badge-dark { display: inline; }
