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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  font-size: var(--fs-body);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Dot grid background texture */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 0;
}

/* Everything above the grid */
nav, main, footer { position: relative; z-index: 1; }

/* Headings use Fraunces */
h1, h2, h3, h4, h5 {
  font-family: 'Fraunces', Georgia, serif;
  font-variation-settings: 'opsz' 144, 'SOFT' 50;
  line-height: 1.1;
  color: var(--text-primary);
  font-weight: 400;
}

/* Micro uppercase labels */
.micro-label {
  font-family: 'Inter', sans-serif;
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Monospace text */
.mono {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
}

/* Layout containers */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--sp-6);
}

.container--narrow { max-width: 720px; }
.container--picker { max-width: 800px; }

/* Screen reader only */
.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;
}

/* Links */
a {
  color: var(--accent-red);
  text-decoration: none;
  transition: color 150ms;
}
a:hover { text-decoration: underline; }

/* Focus states */
:focus-visible {
  outline: 2px solid var(--accent-red);
  outline-offset: 2px;
}

/* Staggered fade-up animation */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-up {
  animation: fadeUp 400ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.fade-up:nth-child(1) { animation-delay:   0ms; }
.fade-up:nth-child(2) { animation-delay:  60ms; }
.fade-up:nth-child(3) { animation-delay: 120ms; }
.fade-up:nth-child(4) { animation-delay: 180ms; }
.fade-up:nth-child(5) { animation-delay: 240ms; }
.fade-up:nth-child(6) { animation-delay: 300ms; }

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