/* The reference button sends its arrow out, then brings it back from the other side. */
@keyframes hl-arrow-move-right {
  0% { transform: translateX(0); opacity: 1; }
  49% { transform: translateX(100%); opacity: 0; }
  50% { transform: translateX(-100%); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}

@keyframes hl-arrow-move-left {
  0% { transform: translateX(0); opacity: 1; }
  49% { transform: translateX(-100%); opacity: 0; }
  50% { transform: translateX(100%); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}

.hl-page :is(.hl-scenario-link, .hl-service-link, .hl-service-feature-cta .hl-button,
             .hl-carousel .swiper-button-next, .hl-carousel .swiper-button-prev)::after {
  display: inline-block;
  will-change: transform, opacity;
}

.hl-page :is(#hl-hero-actions, #about) .hl-button::after {
  content: "→";
  display: inline-block;
  margin-left: 4px;
  font-size: 21px;
  line-height: 1;
  will-change: transform, opacity;
}

.hl-page :is(.hl-scenario-link, .hl-service-link, .hl-service-feature-cta .hl-button,
             .hl-carousel .swiper-button-next):is(:hover, :focus-visible)::after {
  animation: hl-arrow-move-right 375ms linear 1;
}

.hl-page :is(#hl-hero-actions, #about) .hl-button:is(:hover, :focus-visible)::after {
  animation: hl-arrow-move-right 375ms linear 1;
}

.hl-page .hl-carousel .swiper-button-prev:is(:hover, :focus-visible)::after {
  animation: hl-arrow-move-left 375ms linear 1;
}

/* Use matching vector shapes instead of platform-dependent arrow glyphs. */
@media (max-width: 767px) {
  .hl-page .hl-carousel :is(.swiper-button-prev, .swiper-button-next)::after {
    content: "" !important;
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    background-color: currentColor;
    -webkit-mask: var(--hl-carousel-arrow) center / 24px 24px no-repeat;
    mask: var(--hl-carousel-arrow) center / 24px 24px no-repeat;
  }

  .hl-page .hl-carousel .swiper-button-next {
    --hl-carousel-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 12h16m-6-6 6 6-6 6' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  }

  .hl-page .hl-carousel .swiper-button-prev {
    --hl-carousel-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 12H4m6-6-6 6 6 6' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  }
}

@media (prefers-reduced-motion: reduce) {
  .hl-page :is(.hl-scenario-link, .hl-service-link, .hl-service-feature-cta .hl-button,
               .hl-carousel .swiper-button-next, .hl-carousel .swiper-button-prev):is(:hover, :focus-visible)::after {
    animation: none;
  }
  .hl-page :is(#hl-hero-actions, #about) .hl-button:is(:hover, :focus-visible)::after {
    animation: none;
  }
}
