/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html, body, h1, h2, h3, h4, p, ul, ol, li, figure { margin: 0; padding: 0; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-charcoal);
  background: var(--color-offwhite);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-charcoal);
  text-wrap: balance;
}

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

@media (min-width: 768px) {
  h1 { font-size: var(--text-5xl); }
  h2 { font-size: var(--text-4xl); }
}

p { color: var(--color-charcoal); text-wrap: pretty; }

/* Layout helpers */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.section {
  padding: var(--space-16) var(--space-6);
}

@media (min-width: 768px) {
  .section { padding: var(--space-20) var(--space-6); }
}

.section-dark {
  background: var(--color-navy);
  color: var(--color-white);
}

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

.section-white { background: var(--color-white); }
.section-offwhite { background: var(--color-offwhite); }
.section-gray { background: var(--color-gray); }

.section-header {
  max-width: 720px;
  margin: 0 auto var(--space-12);
  text-align: center;
}

.section-header.align-left {
  margin-left: 0;
  text-align: left;
}

.eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-red);
  margin-bottom: var(--space-4);
}

.subheadline {
  font-size: var(--text-lg);
  color: var(--color-midgray);
  margin-top: var(--space-4);
  text-wrap: pretty;
}

.section-dark .subheadline {
  color: var(--color-gray);
}

/* Grid utilities */
.grid {
  display: grid;
  gap: var(--space-8);
}

.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }

@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-12);
  align-items: center;
}

@media (min-width: 1024px) {
  .two-col { grid-template-columns: 1fr 1fr; }
  .two-col.reverse > *:first-child { order: 2; }
}

.text-center { text-align: center; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--color-red);
  color: var(--color-white);
  padding: var(--space-3) var(--space-6);
  z-index: 1000;
}

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