.scrolling-text {
  overflow: hidden;
  background: var(--scrolling-text-background, rgb(var(--color-background)));
}

.scrolling-text__viewport {
  width: 100%;
  max-width: 100%;
}

.scrolling-text__viewport--contained {
  box-sizing: border-box;
  max-width: var(--page-width, 1200px);
  padding-inline: var(--page-margin, 1.25rem);
  margin-inline: auto;
}

.scrolling-text__track {
  overflow: hidden;
}

.scrolling-text__inner {
  display: flex;
  width: max-content;
  will-change: transform;
}

.scrolling-text--mode-auto .scrolling-text__inner {
  animation: scrolling-text-marquee linear infinite;
  animation-duration: var(--scrolling-text-duration, 10s);
}

.scrolling-text--mode-scroll .scrolling-text__inner {
  animation: none;
}

.scrolling-text__half {
  display: flex;
  flex-shrink: 0;
  flex-wrap: nowrap;
  align-items: center;
  gap: clamp(1rem, 3vw, 3rem);
}

.scrolling-text__chunk {
  flex-shrink: 0;
  font-size: var(--scrolling-text-font-size, 5rem);
  line-height: 1.05;
  white-space: nowrap;
}

.scrolling-text--fill .scrolling-text__chunk {
  color: rgb(var(--scrolling-text-color, var(--color-text)));
}

.scrolling-text--outline .scrolling-text__chunk {
  color: transparent;
  -webkit-text-stroke-width: max(1px, 0.035em);
  -webkit-text-stroke-color: rgb(var(--scrolling-text-color, var(--color-text)));
  paint-order: stroke fill;
}

@keyframes scrolling-text-marquee {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .scrolling-text--mode-auto .scrolling-text__inner {
    animation: none;
    transform: none;
  }

  .scrolling-text--mode-scroll .scrolling-text__inner {
    transform: none;
  }
}
