/**
 * Layout — containers, section rhythm and shared page furniture.
 */

/* --------------------------------------------------------------------------
 * Container
 * 1320px of content inside 60px gutters at desktop; the gutter shrinks to
 * 22px on mobile. Both figures come from --wb-container and --wb-gutter-lg.
 * ----------------------------------------------------------------------- */

.wb-container {
  width: 100%;
  max-width: calc(var(--wb-container) + (var(--wb-gutter) * 2));
  margin-inline: auto;
  padding-inline: var(--wb-gutter);
}

@media (min-width: 64rem) {
  .wb-container {
    max-width: calc(var(--wb-container) + (var(--wb-gutter-lg) * 2));
    padding-inline: var(--wb-gutter-lg);
  }

  /* Offerings, Residence and the Contact cards run one step wider still. */
  .wb-container--wide {
    max-width: calc(var(--wb-container-wide) + (var(--wb-gutter-lg) * 2));
    padding-inline: var(--wb-gutter-lg);
  }
}

.wb-main {
  display: block;
  min-height: 50vh;
}

/* --------------------------------------------------------------------------
 * Sections
 * ----------------------------------------------------------------------- */

.wb-section {
  padding-block: var(--wb-section-y);
}

.wb-section--tight {
  padding-block: calc(var(--wb-section-y) * 0.6);
}

.wb-section--surface {
  background-color: var(--wb-surface);
}

/* --------------------------------------------------------------------------
 * Section header — eyebrow, title, lead
 * Repeats in nearly every section of the design.
 * ----------------------------------------------------------------------- */

.wb-section-header {
  margin-bottom: var(--wb-space-8);
}

.wb-section-header--center {
  margin-inline: auto;
  max-width: 44rem;
  text-align: center;
}

.wb-eyebrow {
  margin: 0 0 var(--wb-space-3);
  color: var(--wb-secondary);
  font-size: var(--wb-fs-eyebrow);
  font-weight: var(--wb-fw-semibold);
  line-height: var(--wb-lh-body);
}

.wb-section-header__title {
  margin: 0;
  color: var(--wb-primary-dark);
}

.wb-section-header__lead {
  margin: var(--wb-space-5) 0 0;
  max-width: 46rem;
  color: var(--wb-text-muted);
  font-size: var(--wb-fs-lead);
  line-height: var(--wb-lh-body);
}

.wb-section-header--center .wb-section-header__lead {
  margin-inline: auto;
}

/* --------------------------------------------------------------------------
 * Page head — used by inner pages, archives and single posts
 * ----------------------------------------------------------------------- */

.wb-page-head {
  padding-block: var(--wb-space-10) var(--wb-space-8);
  /* Clears the fixed header, which is only transparent on the front page. */
  padding-top: calc(var(--wb-header-h) + var(--wb-space-8));
  background-color: var(--wb-surface);
}

.wb-page-head__title {
  margin: 0;
}

.wb-page-head__desc {
  margin-top: var(--wb-space-4);
  max-width: 46rem;
  color: var(--wb-text-muted);
}

/* --------------------------------------------------------------------------
 * Prose — long-form editor content
 * ----------------------------------------------------------------------- */

.wb-prose {
  max-width: 46rem;
}

.wb-prose > * + * {
  margin-top: var(--wb-space-5);
}

.wb-prose h2,
.wb-prose h3,
.wb-prose h4 {
  margin-top: var(--wb-space-8);
}

.wb-prose ul,
.wb-prose ol {
  padding-inline-start: var(--wb-space-5);
}

.wb-prose li + li {
  margin-top: var(--wb-space-2);
}

.wb-prose blockquote {
  padding-inline-start: var(--wb-space-5);
  border-inline-start: 3px solid var(--wb-secondary);
  color: var(--wb-text-muted);
  font-style: italic;
}

.wb-prose img {
  border-radius: var(--wb-radius-lg);
}

/* --------------------------------------------------------------------------
 * Grids
 * ----------------------------------------------------------------------- */

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

.wb-grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); }
.wb-grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.wb-grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); }

/* --------------------------------------------------------------------------
 * Misc
 * ----------------------------------------------------------------------- */

.wb-empty {
  padding-block: var(--wb-space-10);
  color: var(--wb-gray-500);
  text-align: center;
}

.wb-404 {
  padding-top: calc(var(--wb-header-h) + var(--wb-section-y));
  text-align: center;
}

.wb-404__text {
  margin-inline: auto;
  margin-bottom: var(--wb-space-6);
  max-width: 34rem;
  color: var(--wb-text-muted);
}

.wb-404 .search-form {
  display: flex;
  gap: var(--wb-space-2);
  margin-inline: auto;
  margin-bottom: var(--wb-space-6);
  max-width: 26rem;
}

.wb-single__media {
  margin-top: calc(var(--wb-space-8) * -1);
  border-radius: var(--wb-radius-lg);
  overflow: hidden;
}

.wb-single__img {
  width: 100%;
}
