/* ===========================================================================
   Sitemap
   Loaded only on page-templates/sitemap.php.
   =========================================================================== */

/* --- Banner: the shared one, as on every other child page ---------------- */
/* Same 0.62 wash as about and contact: the accessibility floor for white
 * text over this photography. Do not lighten it. */
[data-sm="banner"] {
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.62)),
    var(--pr-banner-image);
  background-position: center, center;
  background-size: cover, cover;
  background-repeat: no-repeat, no-repeat;
  /* The header is fixed and out of flow; pad the banner clear of it. */
  padding-top: var(--pr-header-height, 0px);
}

[data-sm="body"] {
  /* --gutter-page, like every other child page. This was a hard-coded copy of
     --gutter-header (82px), so the sitemap's content sat ~68px wider than
     contact, gallery, blog, single and the generic page template. */
  padding: var(--section-pad) var(--gutter-page);
}

[data-sm="intro"] {
  max-width: 68ch;
  margin-bottom: clamp(32px, 3.33vw, 64px);
}

/* Columns, not a single tall list: a sitemap is scanned, not read. Auto-fit
   means the count follows the width rather than a stack of breakpoints. */
[data-sm="columns"] {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(32px, 3.33vw, 64px);
  align-items: start;
}

[data-sm="grouptitle"] {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--display-md);
  line-height: 1.1;
  color: var(--ink);
  text-transform: uppercase;
  margin: 0 0 20px;
  padding-bottom: 12px;
  /* Same light-ground hairline as .pr-prose td and the single-post rules;
     --hairline is white-on-dark and would be invisible here. */
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

[data-sm="list"] {
  list-style: none;
  margin: 0;
  padding: 0;
}

[data-sm="list"] li {
  margin: 0 0 10px;
}

[data-sm="list"] a {
  font-family: var(--font-body);
  font-size: var(--body);
  line-height: 1.45;
  color: var(--ink);
  text-decoration: none;
  /* 44px minimum hit area without stretching the visual line height. */
  display: inline-block;
  padding: 6px 0;
}

[data-sm="list"] a:hover,
[data-sm="list"] a:focus-visible {
  text-decoration: underline;
}

/* Child pages: indented and set slightly back, so the hierarchy reads without
   a second type size. */
[data-sm="list"][data-sm-depth="1"],
[data-sm="list"][data-sm-depth="2"],
[data-sm="list"][data-sm-depth="3"],
[data-sm="list"][data-sm-depth="4"] {
  margin: 6px 0 14px 18px;
  padding-left: 14px;
  border-left: 1px solid rgba(0, 0, 0, 0.12);
}

[data-sm="empty"] {
  font-family: var(--font-body);
  font-size: var(--body);
  color: var(--muted);
  margin: 0;
}

[data-sm="more"] {
  margin-top: 22px;
}

@media (max-width: 991px) {
  /* Centred titles and copy at tablet and below, per the layout rules — but
     NOT the lists: a centred list of links loses its left edge and becomes
     much harder to scan. */
  [data-sm="grouptitle"] {
    text-align: center;
  }

  [data-sm="intro"] {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
  }
}
