/* ==========================================================================
   Nomad but Digital — Brands We've Worked With Showcase
   ========================================================================== */

.nbd-brands {
  background: #FFFEFE;
  border-top: 1px solid rgba(26, 27, 23, 0.06);
  padding: 76px 0;
  overflow: hidden;
}

.nbd-brands__head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 44px;
}

.nbd-brands__head .nbd-pill {
  margin-bottom: 14px;
}

.nbd-brands__lead {
  margin: 14px auto 0;
  font-size: 1rem;
  color: rgba(26, 27, 23, 0.72);
}

.nbd-brands__showcase {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 22px;
  max-width: 1440px;
  margin: 0 auto;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 7%, #000 93%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 7%, #000 93%, transparent 100%);
}

.nbd-brands__row {
  overflow: hidden;
  width: 100%;
}

.nbd-brands__track {
  display: flex;
  align-items: center;
  width: max-content;
  list-style: none;
  margin: 0;
  padding: 4px 0;
  will-change: transform;
}

.nbd-brands__row--left .nbd-brands__track {
  animation: nbd-brands-scroll-left 48s linear infinite;
}

.nbd-brands__row--right .nbd-brands__track {
  animation: nbd-brands-scroll-right 52s linear infinite;
}

.nbd-brands__showcase:hover .nbd-brands__track,
.nbd-brands__showcase:focus-within .nbd-brands__track {
  animation-play-state: paused;
}

.nbd-brands__item {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 26px;
}

.nbd-brands__logo {
  display: block;
  width: auto;
  height: auto;
  max-height: 56px;
  max-width: 185px;
  object-fit: contain;
  border-radius: 8px;
  opacity: 0.92;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
}

@media (hover: hover) and (pointer: fine) {
  .nbd-brands__item:hover .nbd-brands__logo {
    transform: translateY(-2px) scale(1.04);
    opacity: 1;
  }
}

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

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

@media (max-width: 960px) {
  .nbd-brands {
    padding: 64px 0;
  }
  .nbd-brands__head {
    margin-bottom: 34px;
  }
  .nbd-brands__item {
    padding: 6px 20px;
  }
  .nbd-brands__logo {
    max-height: 48px;
    max-width: 160px;
  }
}

@media (max-width: 640px) {
  .nbd-brands {
    padding: 52px 0;
  }
  .nbd-brands__showcase {
    gap: 16px;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 4%, #000 96%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0%, #000 4%, #000 96%, transparent 100%);
  }
  .nbd-brands__item {
    padding: 6px 15px;
  }
  .nbd-brands__logo {
    max-height: 42px;
    max-width: 140px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nbd-brands__showcase {
    -webkit-mask-image: none;
    mask-image: none;
    padding: 0 20px;
  }
  .nbd-brands__row {
    overflow: visible;
  }
  .nbd-brands__track {
    width: 100%;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 6px;
    animation: none !important;
    transform: none !important;
  }
  .nbd-brands__item[aria-hidden="true"] {
    display: none;
  }
  .nbd-brands__logo {
    transition: none !important;
  }
}
