/* Services, site v4. The most practical page on the site: a list to scan, every item a way into the work.
   Rows on hairlines, not cards. Each group's title holds its place on the left on a wide screen while its rows pass.
   Pictures are real pages, shown whole (never cropped), kept small so the list stays the point. */

.sv { padding-top: var(--hd); }

/* the top: headline, one line, and an index of the eight services under the four words of the home page (Trace, Refine, Untangle, Exceed) */
.sv-top { padding-top: clamp(56px, 9vw, 132px); padding-bottom: clamp(40px, 6vw, 84px); display: grid; gap: clamp(18px, 2.2vw, 28px); }
.sv-top h1 { max-width: 11em; }
.sv-index { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: clamp(10px, 2vw, 26px); }
.sv-ix { border-top: 1px solid var(--rule); display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; align-content: start; }
.sv-w { font-size: 14px; line-height: 1.4; color: var(--soft); padding: 12px 0 2px; max-width: 24em; }
.sv-w b { font-family: var(--disp); font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--paper); margin-right: 4px; }
.sv-index ul { list-style: none; padding: 0; margin: 0; }
.sv-index a { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 46px; color: var(--paper); font-weight: 500; font-size: 17px; text-decoration: none; white-space: nowrap; }
.sv-index a::after { content: "\2193"; font-weight: 400; color: var(--quiet); transition: transform .4s var(--ease), color .3s; }
.sv-index a:hover::after { transform: translateY(3px); color: var(--paper); }
.sv-index a:hover, .sv-index a:focus-visible { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
@media (min-width: 900px) {
  .sv-index { grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: clamp(20px, 2.6vw, 40px); }
  .sv-ix { grid-template-columns: minmax(0, 1fr); border-top-width: 2px; }
  .sv-w { padding-top: 12px; margin-bottom: 4px; }
  /* the four labels share one row, so every list starts on the same line whatever its label wraps to */
  .sv-index { grid-template-rows: auto auto; }
  .sv-ix { grid-row: span 2; grid-template-rows: subgrid; }
  .sv-index a { justify-content: flex-start; font-size: 16px; min-height: 40px; }
}
/* the six earlier group addresses: an empty marker at the top of the matching service, out of the grid so it takes no column */
.sv-g { position: relative; }
.sv-alias { position: absolute; top: 0; left: 0; width: 1px; height: 1px; }

/* a service: its name, one line, one place in the work to see it, the way to its page, and at most one real picture.
   (Audience round 6: the earlier rows repeated each service page, so the index keeps one line each; their addresses stay as markers.) */
.sv-g { padding-top: clamp(26px, 3.4vw, 48px); padding-bottom: clamp(30px, 4vw, 56px); border-top: 1px solid var(--rule); display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; scroll-margin-top: calc(var(--hd) + 8px); }
.sv-gh { padding: 0; }
.sv-line { margin-top: 10px; font-size: 1.08rem; line-height: 1.45; color: var(--soft); max-width: 28em; }
.sv-see { margin-top: 12px; font-size: 15.5px; line-height: 1.4; color: var(--soft); max-width: 30em; }
.sv-see a { color: var(--paper); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; text-decoration-color: var(--rule2); transition: text-decoration-color .3s; padding: 12px 0; }
.sv-see a::after { content: "\00a0\2192"; font-weight: 400; } /* the arrow is glued to the last word: never alone on a line */
.sv-see a:hover { text-decoration-color: currentColor; }
.sv-more { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 4px; font-weight: 600; font-size: 15.5px; color: var(--paper); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; text-decoration-color: currentColor; white-space: nowrap; }
.sv-more::after { content: "\2192"; font-weight: 400; transition: transform .4s var(--ease); }
.sv-more:hover::after { transform: translateX(4px); }

/* the picture: whole, its own shape. --w and --h are the file's size, so the box is reserved before it loads */
.sv-m { --cap: 260px; margin: 0; justify-self: start; width: min(100%, calc(var(--cap) * var(--w) / var(--h))); aspect-ratio: var(--w) / var(--h); background: var(--ink2); border-radius: 2px; overflow: hidden; box-shadow: 0 0 0 1px var(--rule); }
.sv-m img, .sv-m video { width: 100%; height: 100%; object-fit: contain; }
.sv-m.is-tall { --cap: 440px; }

/* wide: the words on the left, the picture on the right */
@media (min-width: 900px) {
  .sv-g { grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); column-gap: clamp(32px, 4vw, 72px); align-items: start; }
  .sv-g:not(.has-m) .sv-gh { grid-column: 1; }
  .sv-m { justify-self: end; --cap: 300px; }
  .sv-m.is-tall { --cap: 420px; }
}
@media (min-width: 1300px) { .sv-m { --cap: 330px; } }

/* the end: one question, one button */
.sv-end { padding-top: clamp(56px, 8vw, 120px); padding-bottom: clamp(72px, 10vw, 150px); border-top: 1px solid var(--rule); display: grid; gap: 16px; justify-items: start; }
.sv-go { margin-top: 10px; }
.sv-end .small { margin-top: 2px; }
@media (max-width: 430px) { .sv-go, .sv-go .btn { width: 100%; } .sv-go .btn { justify-content: space-between; white-space: normal; text-align: left; } }

@media (prefers-reduced-motion: reduce) {
  .sv-index a::after, .sv-more::after, .sv-see a { transition: none; }
}
