/* Load after styles.css. A complete, wrapped list is the safe default. */
html .service-strip,
html.js .service-strip {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 56px;
  overflow: hidden;
  border-block: 1px solid rgba(176, 122, 74, .4);
  background: #18212E;
  color: #F7F4EF;
}

/* Override the old html.js animation even when this module cannot start. */
html .service-strip .marquee-track,
html.js .service-strip .marquee-track,
html.js .service-strip:hover .marquee-track,
html.js .service-strip.is-paused .marquee-track {
  display: block;
  width: 100%;
  max-width: 100%;
  animation: none;
  transform: none;
}

html .service-strip .marquee-group,
html.js .service-strip .marquee-group {
  display: flex;
  flex: none;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  gap: 12px 20px;
  padding: 15px 20px;
}

html .service-strip .marquee-group[aria-hidden="true"],
html.js .service-strip .marquee-group[aria-hidden="true"] {
  display: none;
}

html .service-strip .marquee-group .marquee-word,
html.js .service-strip .marquee-group .marquee-word {
  color: #F7F4EF;
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .2em;
  line-height: 1.3;
  text-align: center;
  text-transform: uppercase;
  white-space: normal;
  overflow-wrap: anywhere;
  -webkit-text-fill-color: currentColor;
  -webkit-text-stroke: 0;
}

html .service-strip .marquee-group .marquee-icon,
html.js .service-strip .marquee-group .marquee-icon {
  display: block;
  flex: 0 0 26px;
  width: 26px;
  height: 14px;
  background: #B07A4A;
  font-size: 0;
  line-height: 0;
  transform: none;
  -webkit-mask: url("assets/haro-icon-white.svg") center / contain no-repeat;
  mask: url("assets/haro-icon-white.svg") center / contain no-repeat;
}

/* Nothing needs a pause control until the GSAP animation is actually running. */
html .service-strip .marquee-toggle,
html.js .service-strip .marquee-toggle {
  display: none;
}

@media screen and (prefers-reduced-motion: no-preference) {
  html .service-strip.marquee-is-active,
  html.js .service-strip.marquee-is-active {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    align-items: center;
    box-sizing: border-box;
    height: 56px;
  }

  /* The track is stationary and clipped; only its groups move. */
  html .service-strip.marquee-is-active .marquee-track,
  html.js .service-strip.marquee-is-active .marquee-track {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
    height: 100%;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 38px, #000 calc(100% - 38px), transparent);
    mask-image: linear-gradient(to right, transparent, #000 38px, #000 calc(100% - 38px), transparent);
  }

  html .service-strip.marquee-is-active .marquee-group,
  html.js .service-strip.marquee-is-active .marquee-group,
  html .service-strip.marquee-is-active .marquee-group[aria-hidden="true"],
  html.js .service-strip.marquee-is-active .marquee-group[aria-hidden="true"] {
    --marquee-gap: clamp(24px, 3vw, 44px);
    display: flex;
    flex: 0 0 auto;
    flex-wrap: nowrap;
    justify-content: space-around;
    width: max-content;
    min-width: 100%;
    gap: 0;
    padding: 0;
    will-change: transform;
  }

  /* Half-gaps on each item also make the join between copies even. */
  html .service-strip.marquee-is-active .marquee-group > *,
  html.js .service-strip.marquee-is-active .marquee-group > * {
    margin-inline: calc(var(--marquee-gap) / 2);
  }

  html .service-strip.marquee-is-active .marquee-group .marquee-word,
  html.js .service-strip.marquee-is-active .marquee-group .marquee-word {
    flex: 0 0 auto;
    white-space: nowrap;
    overflow-wrap: normal;
  }

  /* script.js can continue setting textContent to Pause/Play: the label is
     exposed via ARIA while the CSS icon remains visible and unobtrusive. */
  html .service-strip.marquee-is-active .marquee-toggle,
  html.js .service-strip.marquee-is-active .marquee-toggle {
    position: relative;
    z-index: 1;
    grid-column: 2;
    grid-row: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 0;
    background: transparent;
    color: #F7F4EF;
    font-size: 0;
    line-height: 0;
    cursor: pointer;
  }

  html .service-strip.marquee-is-active .marquee-toggle::before,
  html.js .service-strip.marquee-is-active .marquee-toggle::before {
    display: block;
    box-sizing: border-box;
    width: 12px;
    height: 14px;
    border-left: 3px solid currentColor;
    border-right: 3px solid currentColor;
    content: "";
  }

  html .service-strip.marquee-is-active .marquee-toggle[aria-pressed="true"]::before,
  html.js .service-strip.marquee-is-active .marquee-toggle[aria-pressed="true"]::before {
    width: 0;
    height: 0;
    border-top: 7px solid transparent;
    border-right: 0;
    border-bottom: 7px solid transparent;
    border-left: 11px solid currentColor;
    transform: translateX(1px);
  }

  html .service-strip.marquee-is-active .marquee-toggle:hover,
  html.js .service-strip.marquee-is-active .marquee-toggle:hover {
    background: rgba(176, 122, 74, .15);
    color: #F7F4EF;
  }

  html .service-strip.marquee-is-active .marquee-toggle:focus-visible,
  html.js .service-strip.marquee-is-active .marquee-toggle:focus-visible {
    outline: 2px solid #F7F4EF;
    outline-offset: -4px;
  }
}

@media (max-width: 700px) {
  html .service-strip,
  html.js .service-strip {
    min-height: 46px;
  }

  html .service-strip .marquee-group,
  html.js .service-strip .marquee-group {
    padding: 12px 16px;
  }

  html .service-strip .marquee-group .marquee-word,
  html.js .service-strip .marquee-group .marquee-word {
    font-size: 12px;
  }
}

@media screen and (max-width: 700px) and (prefers-reduced-motion: no-preference) {
  html .service-strip.marquee-is-active,
  html.js .service-strip.marquee-is-active {
    height: 46px;
  }

  html .service-strip.marquee-is-active .marquee-track,
  html.js .service-strip.marquee-is-active .marquee-track {
    -webkit-mask-image: linear-gradient(to right, transparent, #000 22px, #000 calc(100% - 22px), transparent);
    mask-image: linear-gradient(to right, transparent, #000 22px, #000 calc(100% - 22px), transparent);
  }

  html .service-strip.marquee-is-active .marquee-group,
  html.js .service-strip.marquee-is-active .marquee-group,
  html .service-strip.marquee-is-active .marquee-group[aria-hidden="true"],
  html.js .service-strip.marquee-is-active .marquee-group[aria-hidden="true"] {
    padding: 0;
  }
}

@media (prefers-reduced-motion: reduce), print {
  html .service-strip .marquee-group,
  html.js .service-strip .marquee-group {
    transform: none !important;
  }
}

@media (forced-colors: active) {
  html .service-strip .marquee-group .marquee-word,
  html.js .service-strip .marquee-group .marquee-word {
    color: CanvasText;
    -webkit-text-fill-color: CanvasText;
  }
  html .service-strip .marquee-group .marquee-icon,
  html.js .service-strip .marquee-group .marquee-icon {
    background: CanvasText;
  }
  html .service-strip.marquee-is-active .marquee-toggle,
  html.js .service-strip.marquee-is-active .marquee-toggle {
    border-color: ButtonText;
    color: ButtonText;
  }
}
