/* Image-led client stories. Native scrolling keeps every quote readable without JS. */
.client-stories {
  --story-inset: max(var(--ed-gutter), calc((100% - var(--ed-container, 75rem)) / 2));
  --story-gap: clamp(2rem, 5vw, 5rem);
  --story-width: min(48vw, 43rem);
  --story-radius: 6px;
}
.client-stories__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; margin-bottom: var(--home-heading-gap); }
.client-stories__score { display: inline-flex; flex-direction: column; align-items: flex-start; gap: .5rem; font-size: var(--ed-body); line-height: 1.4; }
.client-stories__score .ed-blue-stars { display: flex; gap: .125rem; }
.client-stories__score svg { width: 1rem; height: 1rem; color: var(--brand); }
/* The Sortlist wordmark in place of its name, Hulusi 16 Sept: the same asset the
   current site uses beside its rating, sized to the text's x-height. */
.client-stories__score-text { display: inline-flex; align-items: center; gap: .4rem; }
.client-stories__score-logo { height: 1.05rem; width: auto; margin-top: .05rem; }
.client-stories__head h2 { margin-top: 1.25rem; font-size: var(--ed-title); line-height: var(--ed-heading-line); letter-spacing: var(--ed-tracking); font-weight: 500; }
.client-stories__head h2 span { color: var(--ed-muted); }
.client-stories__head > .ed-text-link { flex-shrink: 0; margin-bottom: .15rem; }
.client-stories__rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: var(--story-width); gap: var(--story-gap);
  padding: .5rem max(var(--story-inset), calc(100% - var(--story-inset) - var(--story-width))) .5rem var(--story-inset); margin-block: -.5rem;
  overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none;
  scroll-snap-type: x mandatory; scroll-padding-inline: var(--story-inset);
}
.client-stories__rail::-webkit-scrollbar { display: none; }
.client-stories__rail:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.client-story { position: relative; margin: 0; min-width: 0; scroll-snap-align: start; }
.client-story + .client-story::before { content: ""; position: absolute; left: calc(var(--story-gap) / -2); top: 0; bottom: 0; width: 1px; background: var(--ed-line); }
.client-story__media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--story-radius); background: var(--ed-frame); }
.client-story__media img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.client-story__media--lounge img { object-position: center 12%; }
.client-story__media--natural img { object-position: center top; }
.client-story__media--brand { display: grid; place-items: center; background: #f1f5f4; border: 1px solid var(--ed-line); }
.client-story__media--brand img { position: absolute; top: 7%; left: 21%; width: 58%; height: 44%; object-fit: contain; object-position: center; }
.client-story__media--artway { background: #fff; }
.client-story__media--artway img { top: 12%; left: 18%; width: 64%; height: 36%; object-fit: cover; }
/* The film plays in place of the photo while the card is hovered (client-stories.js).
   The films are vertical screen recordings: shown whole in the middle, the
   card's photo blurred and dimmed behind them, rather than cropped to a strip. */
.client-story__preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity 320ms ease; pointer-events: none; }
.client-story__media > img { transition: filter 320ms ease; }
.client-story__media.is-previewing > img { filter: blur(14px) brightness(.55); }
.client-story__media.is-previewing .client-story__preview { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .client-story__preview { display: none; } .client-story__media > img { transition: none; } }
.client-story__play { position: absolute; right: 1rem; bottom: 1rem; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border: 1px solid rgb(255 255 255 / 55%); border-radius: 50%; background: rgb(255 255 255 / 85%); color: var(--ed-ink); cursor: pointer; transition: background var(--ed-duration), transform var(--ed-duration); }
.client-story__play:hover { background: #fff; transform: scale(1.06); }
.client-story__play:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.client-story__play svg { width: 1rem; height: 1rem; margin-left: 2px; fill: currentColor; }
.client-story__metric { position: absolute; left: 1rem; bottom: 1rem; max-width: calc(100% - 2rem); padding: .75rem 1rem; border-radius: var(--story-radius); color: var(--ed-ink); background: rgb(255 255 255 / 62%); border: 1px solid rgb(255 255 255 / 55%); backdrop-filter: blur(16px); }
.client-story__metric > span { font-size: clamp(2.25rem,3.5vw,3.25rem); line-height: 1; letter-spacing: -.055em; font-variant-numeric: tabular-nums; }
.client-story__metric p { max-width: 12rem; margin-top: .375rem; font-size: .875rem; line-height: 1.4; }
.client-story blockquote { margin: 1.5rem 0 0; font-size: var(--ed-lede); line-height: 1.5; letter-spacing: -.015em; color: var(--ed-ink); }
.client-story figcaption { margin-top: 1.5rem; }
.client-story__author { font-size: var(--ed-lede); font-weight: 500; line-height: 1.4; }
.client-story__role { font-size: var(--ed-body); line-height: 1.5; color: var(--ed-muted); margin-top: .125rem; }
.client-story__company, .client-story__logo { margin-top: 1.5rem; }
.client-story__company { font-size: var(--ed-lede); line-height: 1.4; font-weight: 600; }
.client-story__logo { width: auto; height: 1.75rem; }
.client-story__logo--smc { height: 2.75rem; max-width: 10rem; object-fit: contain; object-position: left center; }
.client-story__logo--artway { width: 8rem; height: 3.25rem; object-fit: cover; }
.client-film-open { overflow: hidden; }
.client-film { position: fixed; inset: 0; width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 5rem clamp(1rem, 8vw, 8rem); border: 0; background: transparent; color: #fff; }
.client-film[open] { display: grid; place-items: center; }
.client-film::backdrop { background: rgb(0 0 0 / 88%); }
.client-film__panel { width: min(100%, 68rem); }
.client-film__title { margin-bottom: 1rem; font-size: var(--ed-body); font-weight: 400; text-align: center; }
.client-film__title span { color: #bdbdbd; }
.client-film video { display: block; width: auto; height: auto; max-width: 100%; max-height: calc(100dvh - 11rem); margin-inline: auto; object-fit: contain; background: #000; }
.client-film__close { position: absolute; top: 1rem; right: 1rem; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border: 0; background: transparent; color: #fff; cursor: pointer; }
.client-film__close svg { width: 1.5rem; height: 1.5rem; }
.client-film__error { padding-top: 1rem; font-size: var(--ed-body); }
.client-film__error a { text-decoration: underline; }
.client-stories__controls { display: flex; align-items: center; gap: 2rem; margin-top: 2rem; }
.client-stories__controls[hidden] { display: none; }
.client-stories__segments { display: flex; align-items: center; gap: .625rem; flex: 1; min-width: 0; }
.client-stories__segment { display: grid; align-items: center; flex: 1; min-width: 1rem; height: 2.75rem; cursor: pointer; border: 0; background: transparent; }
.client-stories__segment[aria-current="true"] { flex: 6; }
.client-stories__segment span { display: block; height: 3px; border-radius: var(--ed-radius-pill); background: var(--ed-line); transition: background var(--ed-duration) var(--ed-ease); }
.client-stories__segment[aria-current="true"] span { background: var(--ed-ink); }
.client-stories__segment:hover span { background: var(--brand); }
.client-stories__arrows { display: flex; gap: .5rem; }
.client-stories__arrows button { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border: 1px solid var(--ed-line); border-radius: 50%; background: transparent; color: var(--ed-ink); cursor: pointer; transition: background var(--ed-duration), color var(--ed-duration); }
.client-stories__arrows button:hover:not(:disabled) { background: var(--ed-ink); color: var(--surface); }
.client-stories__arrows button:disabled { opacity: .35; cursor: default; }
.client-stories__arrows button:active:not(:disabled) { transform: scale(.96); }
.client-stories__arrows svg { width: 1.125rem; height: 1.125rem; }
.client-stories__arrows [data-story-prev] svg { transform: rotate(180deg); }
@media (max-width: 1023px) {
  .client-stories { --story-width: 65vw; }
  .client-stories__head { align-items: flex-start; flex-direction: column; gap: 1rem; }
}
@media (max-width: 639px) {
  .client-stories { --story-width: calc(100vw - var(--ed-gutter) * 2); --story-gap: 1.5rem; }
  .client-stories__head h2 { font-size: clamp(1.875rem, 7vw, 2.5rem); }
  .client-story__media { aspect-ratio: 4 / 3; }
  .client-story__metric { left: .75rem; bottom: .75rem; padding: .75rem 1rem; }
  .client-story__play { right: .75rem; bottom: .75rem; }
  .client-story__metric > span { font-size: 2rem; }
  .client-story__metric p { font-size: var(--ed-label); }
  .client-stories__controls { gap: 1rem; margin-top: 1.25rem; }
  .client-stories__segments { gap: .375rem; }
}
@media (prefers-reduced-motion: reduce) {
  .client-stories *, .client-stories *::before { transition: none !important; }
}

/* 24 Sept: the stories stand on the globe's horizon, so each is a compact
   spread (picture beside the words) and the horizon and a full story fit on
   one screen. Below 1024px the card stacks as before. */
@media (min-width: 1024px) {
  .client-stories { --story-width: min(62rem, 70vw); --story-gap: 1.5rem; }
  .client-story { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); grid-template-rows: auto 1fr; column-gap: 2.5rem; align-items: start; }
  .client-story__media { grid-row: 1 / 3; }
  .client-story__media { aspect-ratio: 4 / 3; }
  .client-story blockquote { margin-top: 0; grid-column: 2; grid-row: 1; }
  .client-story figcaption { grid-column: 2; grid-row: 2; align-self: end; margin-top: 1.25rem; }
  .client-story blockquote p { font-size: 1.125rem; line-height: 1.55; }
}
/* Frosted glass (24 Sept, round 4). The globe runs on behind the stories and
   each story is a pane of frosted glass over it: the planet glows through,
   blurred enough that no dot competes with a word; a sheen on the upper half
   and a bright rim give the gloss. Same material as the metric chips. */
.client-story {
  padding: 1rem; border-radius: calc(var(--story-radius) + 6px);
  background: linear-gradient(180deg, rgb(255 255 255 / .55) 0%, rgb(255 255 255 / .2) 50%, rgb(255 255 255 / .32) 100%);
  border: 1px solid rgb(255 255 255 / .85);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .95), 0 1px 2px rgb(18 20 23 / .04), 0 24px 48px -24px rgb(18 32 80 / .18);
  -webkit-backdrop-filter: blur(14px) saturate(1.6); backdrop-filter: blur(14px) saturate(1.6);
}
.client-story + .client-story::before { content: none; }
@media (min-width: 1024px) {
  .client-story { padding: 1.25rem 2rem 1.25rem 1.25rem; }
  .client-story figcaption { padding-bottom: .25rem; }
}
/* Where the browser has no backdrop blur, the pane turns nearly opaque. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .client-story { background: rgb(253 253 254 / .96); }
}
.client-stories__score { margin: 0; }
