/* ============================================
   Base styles - reset, typography, layout primitives
   Mobile-first
   ============================================ */

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

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

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--navy);
  margin-bottom: var(--space-3);
}

h1 { font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl)); }
h2 { font-size: clamp(var(--text-2xl), 4vw, var(--text-4xl)); }
h3 { font-size: clamp(var(--text-xl), 3vw, var(--text-3xl)); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

p {
  margin-bottom: var(--space-3);
}

p:last-child {
  margin-bottom: 0;
}

/* Links */
a {
  color: var(--navy);
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-underline-offset: 3px;
  transition: color var(--transition-fast);
}

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

/* Lists */
ul, ol {
  margin-bottom: var(--space-3);
  padding-left: var(--space-4);
}

li {
  margin-bottom: var(--space-1);
}

/* Containers */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--space-3);
  padding-right: var(--space-3);
}

@media (min-width: 768px) {
  .container {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }
}

.container-narrow {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding-left: var(--space-3);
  padding-right: var(--space-3);
}

/* Sections */
section {
  padding: var(--space-6) 0;
}

@media (min-width: 768px) {
  section {
    padding: var(--space-7) 0;
  }
}

.section-cream { background: var(--cream); }
.section-white { background: var(--white); }
.section-navy { background: var(--navy); color: var(--white); }
.section-navy h1, .section-navy h2, .section-navy h3 { color: var(--white); }

/* Accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--navy);
  color: var(--white);
  padding: var(--space-2) var(--space-3);
  z-index: 100;
  text-decoration: none;
}

.skip-link:focus {
  top: 0;
}

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

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

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