/* ============================================
   Base — Reset, Typography, Utilities
   ============================================ */

/* --- Reset --- */

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

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

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

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

a {
  color: var(--curtain);
  text-decoration: none;
  transition: color var(--transition-base);
}

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

ul, ol {
  list-style: none;
}

/* --- Typography --- */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: var(--leading-tight);
  color: var(--text-primary);
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }

p + p {
  margin-top: var(--space-md);
}

strong {
  font-weight: 600;
}

/* --- Utilities --- */

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.container--narrow {
  max-width: var(--max-width-narrow);
}

.container--wide {
  max-width: var(--max-width-wide);
}

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

.section {
  padding: var(--space-4xl) 0;
}

.section--alt {
  background-color: var(--mist);
}

.section--dark {
  background-color: var(--charcoal);
  color: var(--text-on-dark);
}

.section--dark h2,
.section--dark h3,
.section--dark h4 {
  color: var(--white);
}

.section--cream {
  background-color: var(--cream);
}

.section__header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto var(--space-3xl);
}

.section__header p {
  margin-top: var(--space-md);
  color: var(--text-secondary);
  font-size: var(--text-lg);
}

/* --- Responsive --- */

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

  .section {
    padding: var(--space-3xl) 0;
  }

  .container {
    padding: 0 var(--space-md);
  }
}
