/* ---------------------------------------------------------------- sitemap
   Built on the portfolio's ruled frame: each group is a row with its
   number and name in the left rail, and its pages on a grid to the right.
   Every page shows a one-line description and links to its main sections. */

.sm-head__title { max-width: 18ch; }
.sm-head .lede { max-width: 54ch; }

.sm { padding-block: clamp(32px, 5vw, 72px) clamp(64px, 8vw, 120px); }

.sm-group {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
  column-gap: clamp(24px, 4vw, 64px);
  padding-block: clamp(28px, 3.5vw, 44px);
  border-top: 1px solid var(--rule-strong);
}
.sm-group:last-child { border-bottom: 1px solid var(--rule-strong); }

.sm-group__head { display: flex; align-items: baseline; gap: 16px; align-self: start; position: sticky; top: 104px; }
.sm-group__num { font-family: var(--face-display); font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.08em; color: var(--red); flex: none; white-space: nowrap; }
.sm-group__title { font-family: var(--face-display); font-weight: 600; font-size: clamp(1.25rem, 1rem + 0.8vw, 1.75rem); line-height: 1.15; letter-spacing: -0.015em; color: var(--ink); max-width: 14ch; }

.sm-pages {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
  gap: clamp(28px, 3vw, 40px) clamp(24px, 3vw, 44px);
}
.sm-page { display: grid; align-content: start; gap: 8px; padding-top: 14px; border-top: 1px solid var(--rule); }

.sm-page__title { font-family: var(--face-display); font-weight: 600; font-size: 1.1875rem; line-height: 1.25; letter-spacing: -0.01em; color: var(--ink); }
.sm-page__title a {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  min-height: 24px;
  color: inherit;
  text-decoration: none;
  background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 1.5px no-repeat;
  transition: background-size 400ms cubic-bezier(0.2, 0.75, 0.1, 1), color 200ms ease;
}
.sm-page__title a::after { content: "\2192"; font-size: 0.85em; color: var(--red); transition: transform 300ms cubic-bezier(0.2, 0.75, 0.1, 1); }
.sm-page--ext .sm-page__title a::after { content: "\2197"; }
.sm-page__title a:hover { background-size: 100% 1.5px; }
.sm-page__title a:hover::after { transform: translateX(3px); }

.sm-page__desc { font-size: 0.9375rem; line-height: 1.5; color: var(--ink-soft); max-width: 44ch; }

.sm-subs { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 2px; }
.sm-subs--cols { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); column-gap: 16px; }
.sm-subs li { display: grid; grid-template-columns: 10px minmax(0, 1fr); align-items: baseline; column-gap: 8px; }
.sm-subs li::before { content: ""; height: 1px; background: var(--rule-strong); transform: translateY(-0.3em); }
.sm-subs a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  font-size: 0.875rem;
  line-height: 1.35;
  color: var(--ink-soft);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 0.2em;
  transition: color 200ms ease, text-decoration-color 200ms ease;
}
.sm-subs a:hover { color: var(--red); text-decoration-color: currentColor; }

/* the company list spans the full width of its group */
.sm-page:has(.sm-subs--cols) { grid-column: 1 / -1; }

@media (max-width: 900px) {
  .sm-group { grid-template-columns: 1fr; row-gap: 20px; }
  .sm-group__head { position: static; }
  .sm-group__title { max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  .sm-page__title a, .sm-page__title a::after, .sm-subs a { transition: none; }
}
