/* Services page: depth gauge, kind filters, the ten rows. Builds on site.css. */

/* OPENING: text, a portrait catalogue picture, then the index heading on a narrow measure.
   On desk the heading sits under the text, both beside the picture. */
.opening__pic { min-width: 0; }
.opening__index { min-width: 0; }
.index__title { max-width: 11em; }
@media (min-width: 56rem) {
  .opening--side {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto 1fr;
    column-gap: var(--gap);
  }
  .opening--side .opening__text { grid-column: 1; grid-row: 1; }
  .opening--side .opening__pic { grid-column: 2; grid-row: 1 / span 2; }
  .opening--side .opening__index { grid-column: 1; grid-row: 2; padding-top: var(--gap); }
}

.index { display: grid; gap: var(--gap); padding-bottom: var(--sect); }
.index__main { min-width: 0; }
.index__lead { margin: .75rem 0 0; max-width: 36rem; }
.services-end { padding-block: 0 var(--sect); }

/* DEPTH GAUGE: a row of links on phones (all five fit), a pinned column with a stepping mint marker on desk */
.gauge { position: relative; background: var(--ground); }
.gauge__end { display: none; margin: 0; font-size: .95rem; line-height: 1.3; color: var(--ink-dim); }
.gauge ol {
  position: relative; display: flex; gap: 0; margin: 0; padding: .25rem 0;
  list-style: none; overflow-x: auto; scrollbar-width: none;
}
.gauge ol::-webkit-scrollbar { display: none; }
.gauge li { flex: 1 0 auto; }
.gauge li[hidden] { display: none; }
.gauge a {
  display: flex; align-items: center; justify-content: center; min-height: var(--line); padding-inline: .2rem;
  font: 800 clamp(1.125rem, 5.2vw, 1.5rem)/1 var(--display); color: var(--ink); text-decoration: none; white-space: nowrap;
}
.gauge a:hover { color: var(--mint); }
.gauge li.is-here a { color: var(--mint); text-decoration: underline; text-decoration-thickness: .18em; text-underline-offset: .3em; }

@media (min-width: 56rem) {
  .index { grid-template-columns: 9.5rem minmax(0, 1fr); align-items: start; }
  .gauge { position: sticky; top: 1rem; z-index: 2; padding: 1rem .5rem 1rem 0; }
  .gauge__end { display: block; }
  .gauge ol { display: block; margin: .5rem 0; padding: .5rem 0; overflow: visible; }
  .gauge ol::before {
    content: ""; position: absolute; left: .325rem; top: .9rem; bottom: .9rem; width: .25rem;
    background: var(--mulberry); border-radius: .2rem;
  }
  .gauge li { position: relative; }
  .gauge li::before {
    content: ""; position: absolute; left: 0; top: 50%; width: .9rem; height: .9rem; margin-top: -.45rem;
    background: var(--ground); box-shadow: inset 0 0 0 .14rem var(--ink-dim);
  }
  .gauge li.is-here::before { background: var(--mint); box-shadow: none; }
  .gauge a { justify-content: flex-start; min-height: 3.25rem; padding-inline: 1.7rem 0; }
  .gauge li.is-here a { text-decoration: none; }
}

/* FILTERS: unboxed text controls; the pressed one sits on a patch of mulberry paint */
.filters { display: flex; gap: .25rem .5rem; margin: 0; padding: .25rem; overflow-x: auto; scrollbar-width: thin; }
.filters[hidden] { display: none; }
.filters button {
  flex: none; min-height: var(--line); padding: 0 1rem; background: none; border: 0; cursor: pointer;
  color: var(--mint); font: 600 1rem/1.1 var(--text); white-space: nowrap;
  text-decoration: underline; text-decoration-thickness: .09em; text-underline-offset: .22em;
}
.filters button:hover { text-decoration-thickness: .2em; }
.filters button[aria-pressed="true"] {
  background: var(--mulberry); color: var(--ink); text-decoration: none;
  border-radius: 1.2rem .8rem 1.4rem .9rem / .9rem 1.3rem .8rem 1.2rem;
}
@media (min-width: 56rem) { .filters { flex-wrap: wrap; overflow: visible; } }

/* GROUPS */
.group { padding-top: clamp(2rem, 7vh, 4.5rem); scroll-margin-top: 1rem; }
.group[hidden], .row[hidden] { display: none; }
.group__head { display: grid; gap: .75rem var(--gap); align-items: end; }
.group__intro { margin: 0; max-width: 34rem; }
@media (min-width: 56rem) {
  .group__head { grid-template-columns: auto minmax(0, 34rem); justify-content: space-between; }
}

/* ROWS: full grid width, pictures alternate large and small, each caption against its own picture */
.row { display: grid; gap: var(--gap); align-items: start; padding-block: clamp(1.75rem, 5vh, 3rem) 0; }
.row__pic .farend__blob { width: fit-content; max-width: 100%; }
.row__pic img { width: auto; max-width: 100%; max-height: 22rem; }
.row__text { min-width: 0; display: grid; gap: .4rem; justify-items: start; }
.row__kind { margin: 0; font-size: 1rem; line-height: 1.2; color: var(--ink-dim); }
.row .svc__name a { display: inline-block; min-height: var(--line); }
.row .pair { grid-template-columns: 1fr; margin-top: .6rem; max-width: 26rem; }

@media (min-width: 48rem) {
  .row--lg { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  .row--sm { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); }
  .row--sm .row__pic { order: 2; }
  .row--lg .row__pic img { max-height: 28rem; }
  .row--sm .row__pic img { max-height: 19rem; }
  .row__text { padding-top: 1rem; }
}
@media (max-width: 47.99rem) {
  .row--sm .row__pic img { max-height: 15rem; }
}
