/*
  The "sites" section of a service page (docs/pages/service_pages/sections/sites.py): sites we built, on Night, one row of real
  screenshots that scrolls sideways like the other services' row (related.js shows the arrows once the row overflows). The
  title and its line sit at the left, the arrows at the right. Each card: the site's first screen in a browser's rounded frame,
  then the client, what they do and the address, all one link, then the case study link; the capture date sits once
  under the intro. Loads after service-page.css (its tokens and the arrows'
  base). Motion: the arrows' and cards' press and the hover, as in the other services' row.
*/
.svc-sites { padding-block: 64px; scroll-margin-top: -16px; }
@media (min-width: 768px) { .svc-sites { padding-block: 88px; } }
@media (min-width: 1250px) { .svc-sites { padding-block: 112px; } }
.svc-sites__head { display: grid; gap: 24px; margin-bottom: 40px; }
@media (min-width: 768px) { .svc-sites__head { grid-template-columns: minmax(0, 1fr) auto; align-items: end; margin-bottom: 56px; } }
.svc-sites__title { max-width: 14em; color: var(--fg); text-wrap: balance; }
.svc-sites__intro { max-width: 32em; margin-top: 16px; color: var(--muted); }
.svc-sites .svc-tools__bar { justify-self: start; margin: 0; }
@media (min-width: 768px) { .svc-sites .svc-tools__bar { justify-self: end; } }
/* The arrows on Night: white rings, filled white on hover */
.svc-sites .svc-tools__arrow { box-shadow: inset 0 0 0 1.5px rgb(255 255 255 / 0.6); color: #fff; }
/* Focus rings white on Night, as in the header and the closing band */
.service-page main .svc-sites :is(a, button):focus-visible { outline-color: #fff; }
@media (hover: hover) and (pointer: fine) { .svc-sites .svc-tools__arrow:not([aria-disabled="true"]):hover { background-color: #fff; color: var(--night); } }

/* The padding and the matching negative margin leave room for a card's focus ring, which the scroller would clip (as in the other
   services' row) */
.svc-sites__row { display: flex; gap: 16px; margin-block: -6px; padding-block: 6px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; }
.js .svc-sites__row { scrollbar-width: none; }
.js .svc-sites__row::-webkit-scrollbar { display: none; }
.svc-sites__row > li { display: flex; flex: 0 0 calc(100vw - 72px); scroll-snap-align: start; }
@media (min-width: 768px) { .svc-sites__row > li { flex-basis: 380px; } }
/* From 1250 px three cards fill the row, so a page with three sites shows them all and the arrows stay hidden */
@media (min-width: 1250px) { .svc-sites__row { gap: 24px; } .svc-sites__row > li { flex-basis: calc((100% - 48px) / 3); } }

/* The card: one link to the live site (picture, client, trade and address), then the case study link and the capture date. The
   address is underlined so the card reads as a link; hover thickens it and lights the picture's rim */
.svc-site { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.svc-site__visit { position: relative; display: flex; flex-direction: column; gap: 4px; border-radius: 16px; color: var(--fg); text-decoration: none; transition: scale 160ms var(--ease-out); }   /* relative: holds its sr-only words, which would otherwise sit outside the row and widen the page */
.svc-site__shot { display: block; aspect-ratio: 16 / 10; overflow: hidden; margin-bottom: 16px; border-radius: 16px; background-color: rgb(255 255 255 / 0.08); box-shadow: 0 0 0 1px rgb(255 255 255 / 0.12); transition: box-shadow 150ms var(--ease-out); }   /* the tint shows until the picture is in */
.svc-site__shot img { display: block; width: 100%; height: 100%; object-fit: cover; }
.svc-site__client { color: var(--fg); }
.svc-site__trade { color: var(--muted); }
.svc-site__host { display: inline-flex; align-items: center; align-self: flex-start; gap: 4px; min-height: 24px; margin-top: 4px; color: var(--fg); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.svc-site__host svg { width: 16px; height: 16px; }
@media (hover: hover) and (pointer: fine) {
  .svc-site__visit:hover .svc-site__shot { box-shadow: 0 0 0 2px rgb(255 255 255 / 0.6); }
  .svc-site__visit:hover .svc-site__host { text-decoration-thickness: 2px; }
}
/* Under a finger the card presses in a little, as the buttons do (not under a mouse, which has the hover rim: the card would shrink away from
   the pointer and a click at its very edge would land outside it) */
@media (hover: none), (pointer: coarse) { .svc-site__visit:active { scale: 0.97; } }
@media (prefers-reduced-motion: reduce) { .svc-site__visit:active { scale: 1; } }
