.represented-brands {
  --brand-gap: clamp(10px, 1.2vw, 16px);
  --brand-visible: 4.5;
  padding: clamp(28px, 3vw, 44px) 0;
  color: #181b1d;
  background: #f5f5f3;
  text-align: center;
}

.represented-brands h2 {
  margin: 0 16px clamp(16px, 2vw, 24px);
  font-size: clamp(25px, 2.5vw, 34px);
  font-weight: 700;
}

.represented-brands-carousel {
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: clamp(16px, 3vw, 36px);
}

.represented-brands-track {
  display: flex;
  gap: var(--brand-gap);
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}

.represented-brands-track.is-looping {
  cursor: grab;
  touch-action: pan-y pinch-zoom;
  user-select: none;
}

.represented-brands-track.is-dragging { cursor: grabbing; }

.represented-brands-track:focus-visible {
  outline: 2px solid #a64411;
  outline-offset: 3px;
  border-radius: 8px;
}

.represented-brand {
  display: grid;
  place-items: center;
  flex: 0 0 calc((100% - (var(--brand-visible) - 1) * var(--brand-gap)) / var(--brand-visible));
  min-width: 0;
  height: clamp(68px, 7vw, 88px);
  overflow: hidden;
  isolation: isolate;
  border: 1px solid #c9cac7;
  border-radius: 9px;
  background: #fafaf8;
  transition: background-color .22s ease, border-color .22s ease;
}

.represented-brand img {
  width: min(76%, 146px);
  height: 64%;
  object-fit: contain;
  filter: grayscale(1);
}

.represented-brand.solid-logo img { mix-blend-mode: multiply; }

@media (hover: hover) {
  .represented-brand:hover {
    background: var(--orange);
    border-color: var(--orange);
  }
  .represented-brand.transparent-logo:hover img {
    filter: brightness(0) invert(1);
  }
  .represented-brand.solid-logo:hover img {
    filter: grayscale(1) contrast(1.65) invert(1);
    mix-blend-mode: screen;
  }
  .represented-brand:hover img { animation: represented-brand-turn .38s ease-out; }
}

@keyframes represented-brand-turn {
  from { transform: perspective(420px) rotateY(-32deg); }
  to { transform: perspective(420px) rotateY(0); }
}

@media (max-width: 1000px) {
  .represented-brands { --brand-visible: 3.5; }
}

@media (max-width: 640px) {
  .represented-brands { --brand-visible: 2.25; }
}

@media (prefers-reduced-motion: reduce) {
  .represented-brand { transition: none; }
  .represented-brand:hover img { animation: none; }
}
