/* Gondan Media T1 — Homepage: Our clients (index.php, clients.js). Template 1 tokens only.
   Two strips of frosted-glass logo plaques glides across a curved rail. Each plaque turns slightly as it
   travels, as if on a drum, and comes into focus through the "lens" in the middle: larger, sharper and in
   its own colours. Logos only, no names or text. Away from the lens the logos are
   quiet (monochrome, softer), so the row never shouts. Hover pauses the strip; drag or swipe turns it by hand.
   Logos are always shown whole (object-fit: contain), never cropped or stretched.
   Without script: the same plaques in a simple centred grid. */
.clients { position: relative; padding: var(--sec) 0 calc(var(--sec) * .85); background: linear-gradient(180deg, #F6F9FC 0%, var(--white) 100%); border-top: 1px solid var(--line-2); overflow: hidden; }
.clients__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 80px); align-items: end; }
.clients__head h2 { margin-top: 16px; max-width: 18ch; color: var(--navy); }
.clients__side { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; }
.clients__lede { max-width: 34em; color: var(--muted); font-size: 1.02rem; }
.clients__count { flex: none; display: flex; align-items: center; gap: 12px; color: var(--navy); }
.clients__count b { font-size: clamp(2.6rem, 2rem + 2vw, 3.8rem); font-weight: 300; letter-spacing: -.05em; line-height: .9; font-variant-numeric: tabular-nums; }
.clients__count span { font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; color: var(--soft); line-height: 1.5; }

/* the rail */
.clients__rail { --tile-w: 236px; --tile-h: 132px; --gap: 24px; --px: 22px; --py: 18px; position: relative; margin-top: clamp(40px, 5vw, 64px); }
.clients__tile { position: relative; width: var(--tile-w); height: var(--tile-h); display: flex; align-items: center; justify-content: center; padding: 0; border-radius: 20px; box-sizing: border-box;
  background: linear-gradient(160deg, rgba(255,255,255,.96), rgba(244,248,252,.9)); border: 1px solid rgba(11,26,51,.07);
  box-shadow: inset 0 1px 0 #fff, 0 1px 2px rgba(11,26,51,.05), 0 14px 30px -18px rgba(11,26,51,.35); }
.clients__tile img { display: block; max-width: calc(var(--tile-w) - var(--px) * 2); max-height: calc(var(--tile-h) - var(--py) * 2); width: auto; height: auto; object-fit: contain;   /* always whole, never cropped or stretched */
  -webkit-user-drag: none; user-select: none; }

/* without script: a centred grid */
.clients__set { list-style: none; margin: 0 auto; padding: 0 var(--pad); max-width: var(--wrap-max); display: flex; flex-wrap: wrap; justify-content: center; gap: var(--gap); }

/* with script (.is-live): lanes */
.clients.is-live .clients__set { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }   /* stays as the list for screen readers */
.clients__lane { position: relative; height: calc(var(--tile-h) * 1.6);   /* room for the focused plaque's lift and shadow */ perspective: 1400px; touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none;
  -webkit-mask: linear-gradient(90deg, transparent 0, #000 12%, #000 88%, transparent 100%); mask: linear-gradient(90deg, transparent 0, #000 12%, #000 88%, transparent 100%); }
.clients__lane + .clients__lane { margin-top: calc(var(--gap) * .3); }
.clients__lane.is-dragging { cursor: grabbing; }
.clients__lane .clients__tile { position: absolute; left: 0; top: 50%; margin-top: calc(var(--tile-h) / -2); will-change: transform; transform-style: preserve-3d; }
/* --f: how far into the lens a plaque is, 0 (out) to 1 (centred); set by clients.js */
.clients__lane .clients__tile img { filter: grayscale(calc(.6 - var(--f, 0) * .6)); opacity: calc(.82 + var(--f, 0) * .18); }
.clients__lane .clients__tile::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; opacity: var(--f, 0);
  box-shadow: 0 0 0 1.5px rgba(79,134,198,.55), 0 26px 44px -20px rgba(31,58,104,.55); }
/* the lens: a soft glass glow fixed in the middle of the rail */
.clients__lens { position: absolute; left: 50%; top: 0; bottom: 0; width: calc(var(--tile-w) * 1.6); transform: translateX(-50%); pointer-events: none;
  background: radial-gradient(50% 46% at 50% 50%, rgba(157,189,224,.32), rgba(157,189,224,0) 72%); }

@media (max-width: 900px) {
  .clients__head { grid-template-columns: 1fr; align-items: start; }
  .clients__side { align-items: flex-start; }
}
@media (max-width: 640px) {
  .clients__rail { --tile-w: 164px; --tile-h: 96px; --gap: 14px; --px: 14px; --py: 12px; }
  .clients__tile { border-radius: 16px; }
  .clients__side { flex-direction: column; gap: 18px; }
  .clients__lane { -webkit-mask: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%); mask: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%); }
}
@media (prefers-reduced-motion: reduce) {
  }
