/* Clients — agency-tabbed showcase rail.
   Each tile is a coloured panel carrying the client's mark and a screenshot of their
   site inset from the top-left, bleeding off the right edge. Tiles overlap like a
   fanned stack; hovering one lifts it clear of its neighbours and raises the caption.
   Touch/narrow layouts drop the overlap and show the caption open, since there is no hover. */

.clients-page {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: calc(100 * var(--vh, 1vh));
  padding: 92px 0 0;
  overflow: hidden;
}

/* Tabs ------------------------------------------------------------------ */
.wk-tabs { display: flex; width: 100%; border-top: 1px solid rgba(10, 10, 10, .14); border-bottom: 1px solid rgba(10, 10, 10, .14); overflow-x: auto; scrollbar-width: none; }
.wk-tabs::-webkit-scrollbar { display: none; }
.wk-tab { display: flex; align-items: center; justify-content: center; flex: 1 0 auto; min-width: 180px; padding: 22px 30px; border: 0; border-right: 1px solid rgba(10, 10, 10, .12); background: transparent; color: rgba(10, 10, 10, .5); font: inherit; font-size: 15px; font-weight: 700; letter-spacing: -0.01em; text-align: center; white-space: nowrap; cursor: pointer; transition: color .3s var(--ease), background-color .3s var(--ease); }
.wk-tab:last-child { border-right: 0; }
.wk-tab:hover { color: rgba(10, 10, 10, .85); }
/* Agency marks sit at a common optical height; inactive tabs read back in grey. */
.wk-tab-logo { display: block; width: auto; height: 22px; max-width: 150px; object-fit: contain; filter: grayscale(1); opacity: .45; transition: opacity .3s var(--ease), filter .3s var(--ease); }
.wk-tab:hover .wk-tab-logo { opacity: .75; }
.wk-tab.is-active .wk-tab-logo { filter: none; opacity: 1; }
.wk-tab.is-active { background: #fffdfa; color: #0a0a0a; box-shadow: inset 0 -2px 0 #0a0a0a; }

/* Rail ------------------------------------------------------------------ */
.wk-rail { display: flex; gap: 0; width: 100%; padding: 34px 40px 48px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.wk-rail::-webkit-scrollbar { display: none; }

.wk-tile { position: relative; z-index: 1; flex: 0 0 auto; height: clamp(300px, calc(58 * var(--vh, 1vh)), 540px); width: auto; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 6px; background: #fffdfa; box-shadow: 0 14px 34px rgba(10, 10, 10, .16); scroll-snap-align: center; }
.wk-tile + .wk-tile { margin-left: clamp(-90px, calc(-6 * var(--vw, 1vw)), -48px); }
/* The leftmost *visible* tile sits flush: filtering hides siblings, so the adjacent
   selector above would otherwise pull the new first tile off the rail edge. */
.wk-tile.is-lead { margin-left: 0; }
.wk-tile.is-hidden { display: none; }

/* Art panel: agency tint, client mark top-left, screenshot inset and bleeding right. */
.wk-art { position: absolute; inset: 0; display: block; background: var(--tile-bg, #efeadf); overflow: hidden; }
.wk-logo { position: absolute; top: 26px; left: 26px; z-index: 2; display: block; width: var(--lw); height: var(--lh); }
.wk-logo img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: left center; }
.wk-frame { position: absolute; top: 84px; right: -42px; left: 26px; height: 58%; overflow: hidden; border-radius: 5px 0 0 5px; background: #fff; box-shadow: 0 18px 40px rgba(10, 10, 10, .22); will-change: transform, filter; }
.wk-frame .wk-shot { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top left; }

/* No screenshot: the mark carries the tile instead. */
.wk-art.is-mark { display: flex; align-items: center; justify-content: center; padding: 38px; }
.wk-art.is-mark .wk-logo { position: static; width: var(--lw); height: var(--lh); max-width: 72%; max-height: 42%; }
.wk-art.is-mark .wk-logo img { object-position: center; }

/* Caption: rests at the foot, climbs to half height on hover. */
.wk-bar { position: absolute; right: 0; bottom: 0; left: 0; display: flex; flex-direction: column; height: 92px; padding: 20px 22px; background: #fffdfa; overflow: hidden; will-change: height; }
.wk-bar-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.wk-bar-text { display: block; min-width: 0; }
.wk-name { display: block; font-size: 17px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
.wk-kind { display: block; margin-top: 5px; color: rgba(10, 10, 10, .46); font-size: 13px; }
.wk-more { display: block; margin-top: 16px; opacity: 0; }
.wk-desc { display: block; color: rgba(10, 10, 10, .62); font-size: 14px; line-height: 1.5; }
.wk-go { display: inline-block; margin-top: 16px; color: #0a0a0a; font-size: 10px; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; }







/* Card colour is sampled from each client's own site, so the panel reads as their
   brand. On a dark panel the mark is knocked out to white to stay legible. */
.wk-tile.on-dark .wk-logo img { filter: brightness(0) invert(1); }
.wk-tile.on-dark .wk-mark img { filter: brightness(0) invert(1); }
/* White-on-block marks already carry their own plate; knocking them out would
   leave a solid white rectangle. */
.wk-tile.is-plate .wk-logo img, .wk-tile.is-plate .wk-mark img { filter: none; }

.wk-rail.js-reveal .wk-tile { opacity: 0; }

/* Rail navigation: arrows either side of a progress track whose dot tracks scroll
   position. Hidden where the rail becomes a vertical stack and there is nothing
   to scroll sideways. */
.wk-nav { display: flex; align-items: center; gap: 22px; width: 100%; padding: 0 40px 30px; }
.wk-arrow { display: flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 42px; height: 42px; padding: 0 0 3px; border: 1px solid rgba(10, 10, 10, .2); border-radius: 50%; background: transparent; color: #0a0a0a; font: inherit; font-size: 20px; line-height: 1; cursor: pointer; transition: background-color .3s var(--ease), border-color .3s var(--ease), color .3s var(--ease), opacity .3s var(--ease); }
.wk-arrow:hover { border-color: #0a0a0a; background: #0a0a0a; color: #fffdfa; }
.wk-arrow[disabled] { opacity: .3; cursor: default; }
.wk-arrow[disabled]:hover { border-color: rgba(10, 10, 10, .2); background: transparent; color: #0a0a0a; }
.wk-track { position: relative; flex: 1 1 auto; height: 1px; background: rgba(10, 10, 10, .18); cursor: pointer; }
.wk-dot { position: absolute; top: 50%; left: 0; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; background: var(--accent, #ff5e00); will-change: transform; }

/* Tablet ---------------------------------------------------------------- */
@media (max-width: 1000px) {
  .clients-page { justify-content: flex-start; padding-top: 84px; }
  .wk-tab { min-width: 140px; padding: 16px 20px; }
  .wk-tab-logo { height: 18px; max-width: 112px; }
  .wk-rail { padding: 32px 22px 34px; }
  .wk-nav { gap: 16px; padding: 0 22px 26px; }
  .wk-tile { height: clamp(280px, calc(48 * var(--vh, 1vh)), 420px); }
  .wk-tile + .wk-tile { margin-left: -34px; }
  .wk-logo { top: 20px; left: 20px; }
  .wk-frame { top: 70px; left: 20px; right: -32px; }
}

/* Phone / no-hover: stack, no overlap, caption already open. ------------- */
@media (max-width: 479px) {
  .clients-page { min-height: 0; padding: 74px 0 36px; justify-content: flex-start; overflow: visible; }
  .wk-rail { display: grid; grid-template-columns: 1fr; gap: 16px; padding: 18px 16px 34px; overflow: hidden; scroll-snap-type: none; }
  .wk-tile { height: auto; width: 100%; aspect-ratio: 4 / 5; }
  .wk-tile + .wk-tile { margin-left: 0; }
  .wk-logo { top: 18px; left: 18px; }
  .wk-frame { top: 68px; left: 18px; right: -22px; height: 42%; }
  .wk-bar { height: auto; max-height: 54%; padding: 16px 18px; }
  .wk-more { opacity: 1; margin-top: 12px; }
  .wk-nav { display: none; }
  .wk-tab { min-width: 108px; padding: 14px 12px; }
  .wk-tab-logo { height: 15px; max-width: 84px; }
}

@media (prefers-reduced-motion: reduce) {
  .wk-rail.js-reveal .wk-tile { opacity: 1; }
  .wk-bar { height: auto; }
  .wk-more { opacity: 1; }
}

/* Phones: all four agency tabs fit without scrolling; inactive marks stay legible. */
.wk-tab-logo { opacity: .6; }
@media (max-width: 640px) {
  .wk-tab { flex: 1 1 0; min-width: 0; padding: 16px 6px; }
  .wk-tab-logo { height: 16px; max-width: 100%; }
}

/* Matched to Webflow: tab marks stay dark grey, tighter fan, caption text peeks in. */
.wk-tab-logo, .wk-tab:hover .wk-tab-logo { opacity: 1; filter: grayscale(1); }
.wk-tab.is-active .wk-tab-logo { filter: none; }
.wk-tile + .wk-tile { margin-left: -70px; }
.wk-more { opacity: 1; }
.wk-hint { flex: 0 0 auto; color: rgba(10, 10, 10, .5); font-size: 10px; font-weight: 800; letter-spacing: .24em; text-transform: uppercase; }
@media (max-width: 1000px) { .wk-tile + .wk-tile { margin-left: -34px; } }
@media (max-width: 479px) { .wk-tile + .wk-tile { margin-left: 0; } }

/* Agency tabs in their own brand colours (sampled from each agency's site), logos knocked out to white.
   Inactive tabs are muted; hover and the active tab show full colour with a light underline. */
.wk-tabs { border-color: transparent; }
.wk-tab { border-right-color: rgba(255, 255, 255, .22); filter: saturate(.35) brightness(.95); transition: filter .3s var(--ease), box-shadow .3s var(--ease); }
.wk-tab[data-filter="tsa"] { background: linear-gradient(135deg, #ff4826, #ff7a3d); }
.wk-tab[data-filter="df"] { background: linear-gradient(90deg, #32b1a6, #4c90c4, #666fe2); }
.wk-tab[data-filter="fbf"] { background: linear-gradient(135deg, #151819, #34393c); filter: brightness(1.6); }
.wk-tab[data-filter="concio"] { background: linear-gradient(135deg, #002f20, #0b5a3a); filter: saturate(.35) brightness(1.25); }
.wk-tab:hover, .wk-tab.is-active, .wk-tab[data-filter].is-active { filter: none; }
.wk-tab.is-active { box-shadow: inset 0 -3px 0 #fffdfa; }
.wk-tab .wk-tab-logo, .wk-tab:hover .wk-tab-logo, .wk-tab.is-active .wk-tab-logo { opacity: 1; filter: brightness(0) invert(1); }
/* Five by Five's brand is yellow; white would vanish on it, so its mark stays black. */
.wk-tab[data-filter="fbf"] { background: linear-gradient(135deg, #d9dc3c, #e3e650, #eef07e); filter: saturate(.35) brightness(.95); }
.wk-tab[data-filter="fbf"]:hover, .wk-tab[data-filter="fbf"].is-active { filter: none; }
.wk-tab[data-filter="fbf"].is-active { box-shadow: inset 0 -3px 0 #151819; }
.wk-tab[data-filter="fbf"] .wk-tab-logo { filter: brightness(0); }
/* Touchscreens (incl. touch laptops on big monitors) keep the side-scrolling rail;
   they just get the caption open, since there is no hover to raise it. */
@media (hover: none) { .wk-bar { height: auto; max-height: 54%; } .wk-more { opacity: 1; } }
