/* ============================================
   LAYOUT — Grid, Sections, Responsive
   ============================================ */

/* ── Container ── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

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

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

/* ── Section ── */
.section {
  padding: var(--space-section) 0;
  position: relative;
}

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

.section-dark {
  background-color: var(--bg-tertiary);
}

/* ── Section Header ── */
.section-header {
  margin-bottom: var(--space-3xl);
}

.section-header .overline {
  margin-bottom: var(--space-md);
  display: block;
}

.section-header h2 {
  margin-bottom: var(--space-lg);
}

.section-header p {
  max-width: 50ch;
}

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

.section-header-center p {
  margin-left: auto;
  margin-right: auto;
}

/* ── Grid Layouts ── */
.grid {
  display: grid;
  gap: var(--space-xl);
}

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

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

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

.grid-asymmetric {
  grid-template-columns: 1.5fr 1fr;
}

.grid-asymmetric-reverse {
  grid-template-columns: 1fr 1.5fr;
}

/* ── Flex Utilities ── */
.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.flex-center {
  align-items: center;
  justify-content: center;
}

.flex-between {
  justify-content: space-between;
}

.flex-gap-sm {
  gap: var(--space-sm);
}

.flex-gap-md {
  gap: var(--space-md);
}

.flex-gap-lg {
  gap: var(--space-lg);
}

.flex-gap-xl {
  gap: var(--space-xl);
}

/* ── CTA Row ── */
.cta-row {
  display: flex;
  gap: var(--space-lg);
  align-items: center;
  flex-wrap: wrap;
}

/* ── Full-Width Section ── */
.full-width {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ── Two-Column Text + Media ── */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: center;
}

.split-wide {
  gap: var(--space-3xl);
}

/* ── Spacer Utilities ── */
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }
.mt-3xl { margin-top: var(--space-3xl); }

.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }
.mb-3xl { margin-bottom: var(--space-3xl); }

/* ── Body Padding for Fixed Nav ── */
.page-content {
  padding-top: 80px;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .grid-3 {
    grid-template-columns: 1fr 1fr;
  }

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

  .grid-asymmetric,
  .grid-asymmetric-reverse {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --space-section: 5rem;
    --gutter: 1.25rem;
  }

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

  .split {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .cta-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .section-header {
    margin-bottom: var(--space-2xl);
  }

  .page-content {
    padding-top: 70px;
  }
}

@media (max-width: 480px) {
  :root {
    --space-section: 4rem;
    --gutter: 1rem;
  }
}
