/* Sponsor ticker — band under hero, before filter bar.
   Continuous horizontal scroll. Hover-pause. prefers-reduced-motion respected. */

.sponsor-ticker {
  background: var(--bg-secondary);
  border-top: 1px solid rgba(27, 45, 92, 0.06);
  border-bottom: 1px solid rgba(27, 45, 92, 0.08);
  padding: 22px 0 26px;
  overflow: hidden;
  position: relative;
}

.sponsor-ticker__header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 18px;
  padding: 0 var(--s-5, 24px);
}

.sponsor-ticker__line {
  flex: 0 0 48px;
  height: 1px;
  background: rgba(27, 45, 92, 0.18);
}

.sponsor-ticker__eyebrow {
  font-family: "JetBrains Mono", "Courier New", monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: rgba(27, 45, 92, 0.55);
  white-space: nowrap;
}

.sponsor-ticker__viewport {
  overflow: hidden;
  mask-image: linear-gradient(
    to right,
    transparent 0,
    black 96px,
    black calc(100% - 96px),
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0,
    black 96px,
    black calc(100% - 96px),
    transparent 100%
  );
}

.sponsor-ticker__track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: sponsor-scroll 38s linear infinite;
}

/* Pause only on keyboard focus-within (a11y), never on mouse hover. */
.sponsor-ticker__track:focus-within {
  animation-play-state: paused;
}

@keyframes sponsor-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(calc(-1 * var(--sponsor-set-width, 50%))); }
}

@media (prefers-reduced-motion: reduce) {
  .sponsor-ticker__track {
    animation: none;
    justify-content: center;
    width: 100%;
    flex-wrap: wrap;
    gap: 36px 56px;
  }
}

.sponsor-ticker__item {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 88px;
  padding: 0 4px;
  margin-right: 72px;  /* applied to every item incl. last → seamless loop math */
  text-decoration: none;
  opacity: 0.68;
  filter: grayscale(15%);
  transition: opacity 220ms ease, filter 220ms ease, transform 220ms ease;
}

.sponsor-ticker__item:hover,
.sponsor-ticker__item:focus-visible {
  opacity: 1;
  filter: grayscale(0%);
  transform: translateY(-1px);
}

.sponsor-ticker__item:focus-visible {
  outline: 2px solid rgba(27, 45, 92, 0.4);
  outline-offset: 4px;
  border-radius: 4px;
}

.sponsor-ticker__logo {
  max-height: 100%;
  max-width: 240px;
  width: auto;
  display: block;
  object-fit: contain;
}

.sponsor-ticker__text {
  font-family: "Fraunces", "Times New Roman", serif;
  font-size: 19px;
  font-weight: 500;
  font-style: italic;
  color: var(--accent);
  letter-spacing: -0.01em;
  white-space: nowrap;
  line-height: 1;
}

/* Empty state — hide the entire band when no sponsors */
.sponsor-ticker--empty {
  display: none;
}

@media (max-width: 720px) {
  .sponsor-ticker {
    padding: 18px 0 22px;
  }
  .sponsor-ticker__header {
    margin-bottom: 14px;
    gap: 12px;
  }
  .sponsor-ticker__line {
    flex-basis: 28px;
  }
  .sponsor-ticker__track {
    animation-duration: 26s;
  }
  .sponsor-ticker__item {
    height: 64px;
    margin-right: 48px;
  }
  .sponsor-ticker__logo {
    max-width: 180px;
  }
  .sponsor-ticker__text {
    font-size: 16px;
  }
}
