/* ==========================================================================
   Mirage Furniture — Clients (#clients)
   A full-bleed, right-to-left logo marquee of the hotels, lodges and estates
   Mirage has supplied. Two identical logo groups scroll as one continuous
   track; translating the track by exactly one group width (-50%) loops
   seamlessly. Pauses on hover. Degrades to a static, wrapped, centred row
   for reduced-motion users.
   ========================================================================== */

.clients {
  position: relative;
  z-index: 1;
  width: 100%;
  background: var(--color-bg);
  padding: var(--space-6) 0;
  overflow: hidden;
}

/* --- Heading (constrained, centred; keeps the section's horizontal pad) --- */
.clients__head {
  max-width: 52rem;
  margin: 0 auto;
  padding: 0 var(--nav-pad-x);
  text-align: center;
}
.clients__eyebrow {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  font-size: var(--text-sm);
  color: var(--color-text-body);
}
.clients__title {
  margin-top: var(--space-2);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(1.5rem, 2.6vw, 2.25rem);
  line-height: var(--leading-snug);
  color: var(--color-text-primary);
}

/* --- Marquee viewport (full-bleed; fades out at both edges) --------------- */
.clients__marquee {
  margin-top: clamp(2rem, 5vh, 3.5rem);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}
.clients__track {
  display: flex;
  width: max-content;
  animation: clients-scroll 60s linear infinite;
}
.clients__marquee:hover .clients__track,
.clients__marquee:focus-within .clients__track {
  animation-play-state: paused;
}

.clients__group {
  display: flex;
  align-items: center;
  gap: clamp(2.5rem, 6vw, 5.5rem);
  /* Trailing space so the seam between the two groups matches the inter-logo
     gap (flex `gap` adds no space after the last item). */
  padding-right: clamp(2.5rem, 6vw, 5.5rem);
  margin: 0;
  padding-left: 0;
  list-style: none;
}
.clients__item {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Fixed-width cell so every logo occupies the same visual footprint,
     regardless of its natural aspect ratio. */
  width: clamp(7rem, 11vw, 10rem);
  height: clamp(3.5rem, 5vw, 5rem);
}
.clients__logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}
/* Logos that ship with a dark baked-in background read as deliberate chips. */
.clients__item--dark .clients__logo {
  border-radius: 6px;
  padding: 0.4rem;
  background: var(--color-bg);
}

@keyframes clients-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* --- Mobile: tighten the cell width, keep height generous for legibility ---- */
@media (max-width: 600px) {
  .clients__item {
    width: clamp(6rem, 28vw, 8rem);
    height: 3.5rem;
  }
  .clients__group {
    gap: clamp(1.5rem, 6vw, 2.5rem);
    padding-right: clamp(1.5rem, 6vw, 2.5rem);
  }
}

/* --- Reduced motion: no scroll; show one static, wrapped, centred row ----- */
@media (prefers-reduced-motion: reduce) {
  .clients__marquee {
    overflow: visible;
    -webkit-mask-image: none;
    mask-image: none;
  }
  .clients__track {
    width: auto;
    animation: none;
  }
  .clients__group {
    flex-wrap: wrap;
    justify-content: center;
    row-gap: var(--space-4);
    padding: 0 var(--nav-pad-x);
  }
  .clients__group[aria-hidden="true"] {
    display: none;
  }
}
