.hero-service-slider {
  position: relative;
  min-width: 0;
  height: 470px;
  overflow: hidden;
  border: 1px solid rgba(100, 126, 255, .25);
  border-radius: 28px;
  background: #070a17;
  box-shadow: 0 40px 100px rgba(0, 0, 0, .35);
  outline: none;
}

.hero-service-slides,
.hero-service-slide,
.hero-service-slide img,
.hero-service-shade {
  position: absolute;
  inset: 0;
}

.hero-service-slide {
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transform: scale(1.035);
  transition: opacity .65s ease, visibility .65s ease, transform 1s ease;
}

.hero-service-slide.is-active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.hero-service-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-service-shade {
  background: linear-gradient(0deg, rgba(3, 5, 14, .96) 0%, rgba(3, 5, 14, .56) 42%, rgba(3, 5, 14, .06) 76%), linear-gradient(120deg, rgba(4, 217, 255, .08), transparent 38%);
}

.hero-service-slide figcaption {
  position: absolute;
  z-index: 2;
  right: 30px;
  bottom: 76px;
  left: 30px;
}

.hero-service-slide small {
  display: block;
  margin-bottom: 10px;
  color: #04d9ff;
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .18em;
}

.hero-service-slide strong {
  color: #fff;
  font: 600 27px/1.1 "Space Grotesk";
  letter-spacing: -.035em;
}

.hero-service-controls {
  position: absolute;
  z-index: 4;
  right: 24px;
  bottom: 20px;
  left: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hero-service-dots,
.hero-service-arrows {
  display: flex;
  gap: 8px;
}

.hero-service-dots button {
  width: 26px;
  height: 5px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .25);
  cursor: pointer;
  transition: width .3s ease, background .3s ease;
}

.hero-service-dots button.is-active {
  width: 48px;
  background: linear-gradient(90deg, #04d9ff, #823cff);
}

.hero-service-arrows button {
  position: relative;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 50%;
  background: rgba(7, 10, 22, .75);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(12px);
  transition: .25s;
}

.hero-service-arrows button::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
}

.hero-service-arrows button[data-hero-service-prev]::before { transform: translate(-38%, -50%) rotate(-135deg); }
.hero-service-arrows button[data-hero-service-next]::before { transform: translate(-62%, -50%) rotate(45deg); }
.hero-service-arrows button:hover { transform: translateY(-2px); border-color: #04d9ff; background: rgba(4, 217, 255, .12); }
.hero-service-slider button:focus-visible { outline: 2px solid #04d9ff; outline-offset: 3px; }

@media (max-width: 900px) {
  .hero-service-slider { width: min(100%, 680px); height: 430px; margin-inline: auto; }
}

@media (max-width: 580px) {
  .hero-service-slider { height: 340px; border-radius: 22px; }
  .hero-service-slide figcaption { right: 22px; bottom: 70px; left: 22px; }
  .hero-service-slide strong { font-size: 23px; }
  .hero-service-controls { right: 18px; bottom: 17px; left: 18px; }
  .hero-service-arrows button { width: 38px; height: 38px; }
  .hero-service-dots button { width: 20px; }
  .hero-service-dots button.is-active { width: 38px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-service-slide { transition: none; }
}

/* Passive, service-specific hero gallery blended into the section background */
.hero-service-slider-passive {
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  -webkit-mask-image: none;
  mask-image: none;
}

.hero-service-slider-passive::after {
  display: none;
}

.hero-service-slider-passive .hero-service-slide img {
  opacity: 1;
  mix-blend-mode: lighten;
  filter: saturate(.94) contrast(1.05);
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 30%, rgba(0, 0, 0, .98) 48%, rgba(0, 0, 0, .68) 64%, rgba(0, 0, 0, .24) 78%, transparent 96%);
  mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 30%, rgba(0, 0, 0, .98) 48%, rgba(0, 0, 0, .68) 64%, rgba(0, 0, 0, .24) 78%, transparent 96%);
}

.hero-service-slider-passive .hero-service-slide img.crop-left,
.hero-service-slider-passive .hero-service-slide img.crop-center,
.hero-service-slider-passive .hero-service-slide img.crop-right {
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100%;
  object-fit: cover;
  transform: none;
  transition: none;
}

.hero-service-slider-passive .hero-service-slide img.crop-left { object-position: 18% center; }
.hero-service-slider-passive .hero-service-slide img.crop-center { object-position: 50% center; }
.hero-service-slider-passive .hero-service-slide img.crop-right { object-position: 82% center; }

.hero-service-slider-passive .hero-service-slide.is-active img {
  transform: none;
}

/* The gallery becomes the hero background, eliminating any image boundary */
.hero .hero-service-slider-passive {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

.hero .hero-grid > :first-child {
  position: relative;
  z-index: 2;
}

.hero .hero-service-slider-passive::after {
  display: block;
  content: "";
  position: absolute;
  z-index: 3;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(5, 7, 17, .98) 0%, rgba(5, 7, 17, .9) 31%, rgba(5, 7, 17, .52) 56%, rgba(5, 7, 17, .2) 78%, rgba(5, 7, 17, .42) 100%), linear-gradient(180deg, rgba(5, 7, 17, .48), transparent 24%, transparent 68%, rgba(5, 7, 17, .82));
}

.hero .hero-service-slider-passive .hero-service-slide img {
  opacity: .72;
  mix-blend-mode: normal;
  filter: saturate(.9) contrast(1.05);
  -webkit-mask-image: none;
  mask-image: none;
}

/* Background galleries run in CSS so they cannot be paused by pointer or script state. */
.hero .hero-service-slider-passive .hero-service-slide {
  visibility: visible;
  opacity: 0;
  transform: none;
  transition: opacity .9s ease;
  animation: hero-service-background-cycle 30s infinite;
}

.hero .hero-service-slider-passive .hero-service-slide:nth-child(1) { animation-delay: 0s; }
.hero .hero-service-slider-passive .hero-service-slide:nth-child(2) { animation-delay: 10s; }
.hero .hero-service-slider-passive .hero-service-slide:nth-child(3) { animation-delay: 20s; }

.hero .hero-service-slider-passive.hero-service-static .hero-service-slide {
  visibility: visible;
  opacity: 1;
  animation: none;
}

@keyframes hero-service-background-cycle {
  0%, 29% { opacity: 1; }
  33%, 96% { opacity: 0; }
  100% { opacity: 1; }
}

@media (max-width: 900px) {
  .hero .hero-service-slider-passive::after {
    background: linear-gradient(180deg, rgba(5, 7, 17, .8) 0%, rgba(5, 7, 17, .64) 46%, rgba(5, 7, 17, .88) 100%);
  }

  .hero .hero-service-slider-passive .hero-service-slide img {
    opacity: .58;
  }
}

/* Softer separators for the summary strip shared by the three service pages. */
.stats {
  border-color: rgba(151, 166, 207, .055);
}

.stats > div {
  border-color: rgba(151, 166, 207, .055);
}
