/* Base Reset & Typography Setup */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-secondary);
  color: var(--color-text-dark);
  background-color: var(--color-cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  font-size: clamp(1rem, 1vw + 0.5rem, 1.125rem);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-primary);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: var(--spacing-md);
  color: var(--color-text-dark);
}

h1 { font-size: clamp(2.5rem, 5vw + 1rem, 4.5rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(2rem, 4vw + 1rem, 3.5rem); letter-spacing: -0.02em; }
h3 { font-size: clamp(1.5rem, 3vw + 0.5rem, 2.5rem); letter-spacing: -0.01em; }
h4 { font-size: clamp(1.25rem, 2vw + 0.5rem, 1.75rem); }
h5 { font-size: clamp(1.125rem, 1.5vw + 0.5rem, 1.25rem); }

p {
  margin-bottom: var(--spacing-md);
  color: var(--color-text-muted);
  max-width: 65ch; /* Reduce text width for readability */
}

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

ul, ol {
  list-style: none;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

button, input, textarea, select {
  font: inherit;
  outline: none;
  border: none;
}

button {
  cursor: pointer;
  background: transparent;
}

/* Utilities */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

@media (min-width: 768px) {
  .container {
    padding: 0 var(--spacing-xl);
  }
}

.text-center { text-align: center; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

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