/* ===== Section 3 — Clients logo slider =====
   Two rows of logos scrolling in opposite directions. Logos show in white on the dark
   background; hovering a card turns it white and shows the logo in its real colours.
   To add a client: drop the logo in images/clients/ and add one .client card to each row
   in index.html (the rows are duplicated by js/main.js for a seamless loop). */
.section3 {
  position: relative;
  background: var(--black);
  padding: clamp(56px, 7vw, 96px) 0;
  overflow: hidden;
}

.section3__head { text-align: center; margin-bottom: clamp(30px, 4vw, 48px); }
.section3 .eyebrow { color: var(--muted); margin-bottom: 12px; }
.section3__title {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(30px, 3.6vw, 52px);
  line-height: 1;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.section3.is-visible .section3__title { opacity: 1; transform: none; }

/* ----- Rows ----- */
.clients {
  display: grid;
  gap: clamp(14px, 1.6vw, 22px);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  opacity: 0;
  transition: opacity 1.2s var(--ease) 0.2s;
}
.section3.is-visible .clients { opacity: 1; }

.clients__row { display: flex; width: max-content; }
.clients__track {
  display: flex;
  gap: clamp(14px, 1.6vw, 22px);
  padding-right: clamp(14px, 1.6vw, 22px);
  animation: clientsScroll var(--speed, 40s) linear infinite;
}
.clients__row--reverse .clients__track { animation-direction: reverse; }
.clients__row:hover .clients__track { animation-play-state: paused; }
@keyframes clientsScroll { to { transform: translateX(-100%); } }

/* ----- Logo cards ----- */
.client {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: clamp(150px, 16vw, 220px);
  height: clamp(84px, 8vw, 110px);
  padding: 18px 26px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  transition: background 0.4s var(--ease), border-color 0.4s, transform 0.4s var(--ease);
}
.client img {
  max-width: 100%;
  max-height: clamp(42px, 4.4vw, 62px);
  object-fit: contain;
  filter: brightness(0) invert(1);   /* every logo as a white silhouette */
  opacity: 0.7;
  transition: filter 0.4s var(--ease), opacity 0.4s;
}
.client:hover { background: var(--white); border-color: var(--white); transform: translateY(-4px); }
.client:hover img { filter: none; opacity: 1; }

/* white-on-colour logos (Metric, Travel Time): the file holds only the white symbol,
   and on hover the card fills with the brand's own colour (set with --brand in index.html) */
.client--badge:hover { background: var(--brand); border-color: var(--brand); }
.client--badge:hover img { filter: none; }

@media (prefers-reduced-motion: reduce) {
  .clients__track { animation: none; }
  .clients__row { width: auto; flex-wrap: wrap; justify-content: center; }
}
