/**
 * @file
 * Page shell, full-width bands (Jethro's "wraps") and sidebar grid.
 */
.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.shell {
  width: min(100% - 2 * var(--gutter), var(--content-width));
  margin-inline: auto;
}

/* Bands */
.band {
  position: relative;
  padding-block: var(--band-pad);
}

.band--navy {
  color: var(--hh-cream);
  background-color: var(--hh-navy);
  --c-heading: var(--hh-cream);
  --c-text-muted: #c7c3b8;
  --c-link: var(--hh-green);
  --c-link-hover: var(--hh-cream);
  --c-focus: var(--hh-green);
}

.band--cream {
  background: var(--c-page);
}

.band--paper {
  background: var(--c-paper);
}

.band--tan {
  background-color: var(--c-band-tan);
  background-image: repeating-linear-gradient(
    -45deg,
    transparent 0 22px,
    rgb(184 93 49 / 5%) 22px 24px
  );
}

.main {
  flex: 1 0 auto;
  padding-block: clamp(2rem, 5vw, 4rem) var(--band-pad);
}

.main:focus {
  outline: none;
}

/* Highlighted strip (status messages). The messages block always prints an
   empty placeholder, so only pad the strip when there is something in it. */
.highlighted {
  background: var(--c-paper);
}

.highlighted:has(.message) {
  padding-top: 1.25rem;
}

/* Content + sidebars */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 3.5rem);
}

@media (min-width: 60rem) {
  .layout--sidebar-first {
    grid-template-columns: minmax(14rem, 18rem) minmax(0, 1fr);
  }

  .layout--sidebar-second {
    grid-template-columns: minmax(0, 1fr) minmax(14rem, 18rem);
  }

  .layout--both {
    grid-template-columns: minmax(12rem, 15rem) minmax(0, 1fr) minmax(12rem, 15rem);
  }

  .layout--sidebar-first .layout__sidebar--first,
  .layout--both .layout__sidebar--first {
    grid-row: 1;
    grid-column: 1;
  }

  .layout--sidebar-first .layout__content {
    grid-column: 2;
  }

  .layout--both .layout__content {
    grid-column: 2;
  }
}

.layout__sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-self: start;
}

@media (min-width: 60rem) {
  .layout__sidebar {
    position: sticky;
    top: calc(var(--header-h) * 0.75 + 1rem);
  }
}

/* Section heads */
.section-head {
  max-width: 46rem;
  margin: 0 auto clamp(2rem, 5vw, 3.5rem);
  text-align: center;
}

.section-head__title {
  font-size: var(--fs-h2);
}

.section-head__lede {
  margin: 0;
  color: var(--c-text-muted);
  font-size: var(--fs-lg);
}

/* Retro stripes: tan, russet and green, from the wordmark's swash. */
.retro-stripes {
  height: 9px;
  background: linear-gradient(
    to bottom,
    var(--hh-tan) 0 3px,
    var(--hh-russet) 3px 6px,
    var(--hh-green) 6px 9px
  );
}
