.hero-ribbons {
  position: relative;
  flex: none;
  width: 100%;
  height: clamp(9rem, 13vw, 15rem);
  margin-top: 1.5rem;
  overflow: hidden;
  isolation: isolate;
}

.hero-ribbon {
  position: absolute;
  top: 50%;
  left: -5%;
  display: flex;
  align-items: center;
  width: 110%;
  height: clamp(2.75rem, 4vw, 3.75rem);
  overflow: hidden;
  color: rgb(var(--lime-ink));
  font-family: var(--font-sans);
  font-size: clamp(.875rem, 1.35vw, 1.25rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.025em;
  text-transform: uppercase;
}

.hero-ribbon--front {
  z-index: 2;
  background: rgb(var(--lime));
  transform: translateY(-50%) rotate(-3.2deg);
  box-shadow: 0 5px 18px rgb(0 0 0 / .15);
}

.hero-ribbon--back {
  z-index: 1;
  background: color-mix(in srgb, rgb(var(--lime)) 18%, rgb(var(--night-fg)));
  transform: translateY(-50%) rotate(3.2deg);
}

.hero-ribbon-track {
  display: flex;
  flex: none;
  width: max-content;
  animation: hero-ribbon-scroll 36s linear infinite;
  will-change: transform;
}

.hero-ribbon--back .hero-ribbon-track {
  animation-duration: 42s;
  animation-direction: reverse;
}

.hero-ribbon-group {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-around;
  gap: clamp(2rem, 4vw, 5rem);
  min-width: 110vw;
  padding-inline: clamp(1rem, 2vw, 2.5rem);
}

.hero-ribbon-label,
.hero-ribbon-star {
  flex: none;
  white-space: nowrap;
}

.hero-ribbon-star {
  font-size: 1.15em;
}

.hero-ribbon--front .hero-ribbon-star {
  opacity: .65;
}

.hero-ribbon--back .hero-ribbon-star {
  color: rgb(var(--accent-deep));
}

@keyframes hero-ribbon-scroll {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-50%, 0, 0); }
}

@media (hover: hover) and (pointer: fine) {
  .hero-ribbons:hover .hero-ribbon-track {
    animation-play-state: paused;
  }
}

@media (max-width: 640px) {
  .hero-ribbons {
    height: 8rem;
    margin-top: .5rem;
  }
  .hero-ribbon--front {
    transform: translateY(-50%) rotate(-5deg);
  }
  .hero-ribbon--back {
    transform: translateY(-50%) rotate(5deg);
  }
}
