/* ==========================================================================
   LAYOUT — containers, seções e grids estruturais
   ========================================================================== */
@layer layout {
  .container {
    width: min(100% - 2 * var(--gutter), var(--container));
    margin-inline: auto;
  }

  .container--wide {
    width: min(100% - 2 * var(--gutter), var(--container-wide));
  }

  .section {
    position: relative;
    padding-block: var(--space-3xl);
    isolation: isolate;
  }

  .section-head {
    display: grid;
    gap: var(--space-s);
    margin-bottom: var(--space-xl);
  }

  .section-head h2 {
    font-size: var(--step-5);
    line-height: var(--lh-tight);
  }

  .section-head p {
    max-width: 38ch;
    color: var(--c-muted);
  }

  @media (min-width: 900px) {
    .section-head--split {
      grid-template-columns: 1fr auto;
      align-items: end;
      column-gap: var(--space-xl);
    }
    .section-head--split p { justify-self: end; text-align: right; }
  }

  /* Telas ultrawide: respiro maior e tipografia contida */
  @media (min-width: 2200px) {
    :root {
      --container: 1600px;
      --container-wide: 1920px;
    }
  }
}
