/* Clients Wall — design values (.trust-stats / .trust-wall). */

.qlegy .qlg-clients__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin-bottom: 80px;
  padding-bottom: 80px;
  border-bottom: 1px solid var(--qlegy-line);
}
.qlegy .qlg-clients__stat-l {
  color: var(--qlegy-fg-mute);
  margin-top: 12px;
  font-family: var(--qlegy-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
@media (max-width: 800px) {
  .qlegy .qlg-clients__stats { grid-template-columns: repeat(2, 1fr); }
}

.qlegy .qlg-clients__wall {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--qlegy-line);
  border-inline-start: 1px solid var(--qlegy-line);
  overflow: hidden;
}
.qlegy .qlg-clients__cell {
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--qlegy-line);
  border-inline-end: 1px solid var(--qlegy-line);
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--qlegy-fg-dim);
  position: relative;
  z-index: 1;
  padding: 18px 22px;
  text-decoration: none;
  transition: color 0.3s var(--qlegy-ease), background 0.3s var(--qlegy-ease);
}
.qlegy .qlg-clients__cell:hover { color: var(--qlegy-fg); background: rgba(255, 255, 255, 0.03); }
.qlegy .qlg-clients__cell img {
  max-width: 100%;
  max-height: 56px;
  width: auto;
  height: auto;
  object-fit: contain;
  opacity: 0.78;
  transition: opacity 0.3s var(--qlegy-ease), filter 0.3s var(--qlegy-ease), transform 0.4s var(--qlegy-ease);
}
.qlegy .qlg-clients__cell:hover img { opacity: 1; transform: scale(1.04); }
.qlegy .qlg-clients__cell--invert img { filter: brightness(0) invert(1); opacity: 0.65; }
.qlegy .qlg-clients__cell--invert:hover img { opacity: 0.95; }
.qlegy .qlg-clients__cell--raw img { filter: saturate(0.85) brightness(0.95); }
.qlegy .qlg-clients__cell--raw:hover img { filter: saturate(1) brightness(1); }

.qlegy .qlg-clients__cursor {
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(103, 232, 249, 0.18), transparent 60%);
  pointer-events: none;
  filter: blur(8px);
  z-index: 0;
  opacity: 0;
  transition: opacity 0.25s;
}

.qlegy .qlg-clients__marquee { margin-top: 64px; }
.qlegy .qlg-clients__mq-name {
  font-size: clamp(24px, 3vw, 44px);
  font-weight: 500;
  opacity: 0.5;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .qlegy .qlg-clients__wall { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 700px) {
  .qlegy .qlg-clients__wall { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Mobile logo carousel (two opposite-scrolling rows) ---------- */
.qlegy .qlg-clients__carousel { display: none; }

.qlegy .qlg-clients__crow {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.qlegy .qlg-clients__ctrack {
  display: flex;
  width: max-content;
  animation: qlg-clients-scroll 30s linear infinite;
  will-change: transform;
}
/* Second row travels the other way. */
.qlegy .qlg-clients__crow--rtl .qlg-clients__ctrack { animation-direction: reverse; }
@keyframes qlg-clients-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .qlegy .qlg-clients__ctrack { animation: none; }
}

.qlegy .qlg-clients__chip {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 72px;
  padding: 14px 24px;
  /* margin (not flex gap) so the duplicated set repeats seamlessly at -50% */
  margin-inline-end: 12px;
  border: 1px solid var(--qlegy-line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  text-decoration: none;
}
.qlegy .qlg-clients__chip img {
  max-height: 44px;
  max-width: 150px;
  width: auto;
  height: auto;
  object-fit: contain;
  opacity: 0.85;
}
.qlegy .qlg-clients__chip--invert img { filter: brightness(0) invert(1); opacity: 0.72; }
.qlegy .qlg-clients__chip--raw img { filter: saturate(0.9) brightness(0.98); }
.qlegy .qlg-clients__chip .qlg-clients__name {
  font-size: 15px;
  color: var(--qlegy-fg-dim);
  white-space: nowrap;
  letter-spacing: -0.01em;
}

/* Swap grid → carousel only on phones, and only when enabled. */
@media (max-width: 700px) {
  .qlegy .qlg-clients--mobile-carousel .qlg-clients__wall { display: none; }
  .qlegy .qlg-clients--mobile-carousel .qlg-clients__carousel {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 8px;
  }
}
