/**
 * base.css - Reset and Typography
 *
 * CSS reset for consistent cross-browser behavior.
 * Base typography rules using design tokens from variables.css.
 * Dark theme only - no light mode needed.
 */

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

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, picture, video, canvas, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }

/* LINKS */
a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover, a:focus { color: var(--color-primary-dim); text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }

/* TYPOGRAPHY - Headlines */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-headline);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
}

h1 { font-size: var(--text-5xl); letter-spacing: -0.02em; }
h2 { font-size: var(--text-4xl); letter-spacing: -0.01em; }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

@media (max-width: 768px) {
  h1 { font-size: var(--text-4xl); }
  h2 { font-size: var(--text-3xl); }
  h3 { font-size: var(--text-2xl); }
  h4 { font-size: var(--text-xl); }
}

/* TYPOGRAPHY - Body */
p { margin-bottom: var(--space-4); }
p:last-child { margin-bottom: 0; }
strong, b { font-weight: var(--weight-semibold); }
em, i { font-style: italic; }
small { font-size: var(--text-sm); }

/* TYPOGRAPHY - Code */
code, kbd, samp, pre { font-family: var(--font-mono); font-size: var(--text-sm); }

code {
  background-color: var(--color-bg-surface);
  padding: var(--space-1) var(--space-2);
  border-radius: 4px;
  color: var(--color-primary);
}

pre {
  background-color: var(--color-bg-surface);
  padding: var(--space-4);
  border-radius: var(--border-radius);
  overflow-x: auto;
}
pre code { background: none; padding: 0; }

/* LISTS */
ul, ol { padding-left: var(--space-5); margin-bottom: var(--space-4); }
li { margin-bottom: var(--space-2); }
li:last-child { margin-bottom: 0; }

/* GLOW UTILITIES */
.glow { text-shadow: var(--text-glow-primary); }
.glow-secondary { text-shadow: var(--text-glow-secondary); }
.glow-box { box-shadow: var(--glow-primary); }
.glow-box-secondary { box-shadow: var(--glow-secondary); }

/* ACCESSIBILITY */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--color-bg-elevated);
  color: var(--color-text);
  padding: var(--space-3) var(--space-4);
  z-index: 1000;
  transition: top var(--transition-fast);
}
.skip-link:focus { top: 0; }

/* Reduced motion handled in animations.css (consolidated) */

.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;
}
