/* Reset + Typography + Base Elements */

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

/* Skip-to-content link (accessibility) */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 10000;
  padding: 8px 16px;
  background: var(--primary);
  color: #fff;
  border-radius: 0 0 4px 4px;
  font-size: 0.875rem;
  text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  font-size: 16px;
}

/* Self-hosted fonts */
@font-face {
  font-family: 'Space Grotesk';
  src: url('../fonts/SpaceGrotesk-Variable.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter-Variable.woff2') format('woff2');
  font-weight: 400 600;
  font-display: swap;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: 'Space Grotesk', -apple-system, sans-serif;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

h1 {
  font-size: var(--fs-4xl);
  line-height: 1.1;
}

h2 {
  font-size: var(--fs-2xl);
  line-height: 1.25;
}

h3 {
  font-size: var(--fs-xl);
  font-weight: 600;
}

p {
  color: var(--text-secondary);
  font-size: var(--fs-base);
  line-height: 1.7;
}

p + p {
  margin-top: var(--sp-3);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--ease);
}

a:hover {
  color: var(--primary-hover);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Selection */
::selection {
  background: var(--primary-soft);
  color: var(--primary);
}

/* Utilities */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.text-primary { color: var(--primary); }
.text-accent { color: var(--accent); }
.text-muted { color: var(--text-muted); }
.font-heading { font-family: 'Space Grotesk', sans-serif; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
