/* ==========================================================================
   Layout — contenedores, grillas y ritmo de secciones
   ========================================================================== */

.container {
  width: min(calc(100% - 2.5rem), var(--content-max));
  margin-inline: auto;
}

.section > .btn {
  display: block;
  width: fit-content;
}

.section {
  padding-block: var(--space-8);
  border-bottom: var(--border-w) solid var(--line-on-paper);
}

.section:last-of-type {
  border-bottom: none;
}

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

.section--dark {
  background: var(--graphite);
  color: var(--text-on-dark);
  border-bottom-color: var(--line-on-dark);
}

.section--paper-2 {
  background: var(--paper-2);
}

.section-head {
  max-width: 46rem;
  margin-bottom: var(--space-6);
}

.history-header {
  max-width: 46rem;
  margin-bottom: var(--space-4);
}

.history-copy {
  max-width: 72rem;
}

.history-copy p {
  max-width: none;
}

.history-copy p + p {
  margin-top: 1rem;
}

.home-section .section-head,
.home-section .section-head--split,
.home-section .grid,
.home-section .legend-list,
.home-section .clients-marquee {
  width: min(calc(100% - 2.5rem), var(--content-max));
}

.home-section .section-head {
  text-align: left;
}

.home-section .section-head--split {
  align-items: start;
}

.home-section .section-head--split > p {
  margin-top: 3rem;
}

.section-head--split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-6);
  align-items: end;
  max-width: none;
}

.section-kicker {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--copper);
  margin-bottom: var(--space-3);
}

.section-kicker::before {
  content: "";
  width: 1.4rem;
  height: var(--border-w);
  background: currentColor;
}

.grid {
  display: grid;
  gap: var(--space-5);
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

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

  .section-head--split {
    grid-template-columns: 1fr;
    align-items: start;
  }
}

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

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

main {
  display: block;
}

.page-hero-space {
  padding-top: var(--space-8);
}
