/* MARK: Service How it works band */

/* MARK: Band */

.service-steps {
  --steps-rgb: 69 190 225;
  --steps-glow-rgb: var(--steps-rgb);
  --steps-glow-alpha: 34%;
  --steps-ring-alpha: 60%;
  --steps-halo-alpha: 12%;
  --steps-line-alpha: 75%;
  --steps-leaf-rgb: var(--steps-rgb);
  --steps-badge: var(--calabash-company-orange-a11y-on-dark);
  --steps-hover: var(--calabash-company-orange-a11y-on-dark);
  --steps-hover-halo: rgb(235 105 16 / 20%);
  --steps-node: 64px;
  --steps-gap: 40px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-bottom: var(--calabash-section-gap);
  padding: clamp(48px, 5.5vw, 76px) 0;
  background:
    radial-gradient(
      60% 130% at 92% 0%,
      rgb(var(--steps-glow-rgb) / var(--steps-glow-alpha)) 0%,
      rgb(var(--steps-glow-rgb) / 0%) 64%
    ),
    linear-gradient(115deg, var(--calabash-navy-dark) 0%, var(--calabash-navy) 58%, #0b3d68 100%);
  color: var(--calabash-white);
  font-family: var(--font-primary);
  font-size: 16px;
  line-height: 1.65;
}

.service-steps--orange {
  --steps-rgb: 235 105 16;
  --steps-glow-rgb: 69 190 225;
  --steps-leaf-rgb: 69 190 225;
  --steps-ring-alpha: 65%;
  --steps-halo-alpha: 14%;
  --steps-badge: var(--calabash-company-turquoise);
  --steps-hover: var(--calabash-company-turquoise);
  --steps-hover-halo: rgb(69 190 225 / 22%);
}

.service-steps--navy {
  --steps-rgb: 255 255 255;
  --steps-glow-rgb: 100 175 230;
  --steps-glow-alpha: 26%;
  --steps-ring-alpha: 55%;
  --steps-halo-alpha: 9%;
  --steps-line-alpha: 55%;
}

.service-steps,
.service-steps *,
.service-steps *::before,
.service-steps *::after {
  box-sizing: border-box;
}

.service-steps__inner {
  width: min(
    calc(100% - (var(--calabash-page-padding) * 2)),
    var(--calabash-page-max-width)
  );
  margin-inline: auto;
}

/* MARK: Ambient leaves */

.service-steps__decor {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.service-steps__leaf {
  position: absolute;
  top: var(--leaf-top, auto);
  bottom: var(--leaf-bottom, auto);
  left: var(--leaf-left);
  width: var(--leaf-size);
  aspect-ratio: 33.8 / 56;
  background-color: rgb(var(--steps-leaf-rgb));
  opacity: var(--leaf-opacity);
  -webkit-mask: url("../images/footer/calabash-icon-only.svg") center / contain no-repeat;
  mask: url("../images/footer/calabash-icon-only.svg") center / contain no-repeat;
  transform: rotate(var(--leaf-rotate));
}

.service-steps__leaf--1 {
  --leaf-top: 4px;
  --leaf-left: 47%;
  --leaf-size: 22px;
  --leaf-opacity: 0.35;
  --leaf-rotate: -24deg;
  --leaf-duration: 9s;
}

.service-steps__leaf--2 {
  --leaf-bottom: 3px;
  --leaf-left: 33%;
  --leaf-size: 22px;
  --leaf-opacity: 0.22;
  --leaf-rotate: 32deg;
  --leaf-drift-y: 10px;
  --leaf-duration: 13s;
}

.service-steps__leaf--3 {
  --leaf-top: 4px;
  --leaf-left: 91%;
  --leaf-size: 22px;
  --leaf-opacity: 0.28;
  --leaf-rotate: 14deg;
  --leaf-duration: 11s;
}

@media (prefers-reduced-motion: no-preference) {
  .service-steps__leaf {
    animation: service-steps-float var(--leaf-duration) ease-in-out infinite;
  }
}

@keyframes service-steps-float {
  0%,
  100% {
    transform: translate(0, 0) rotate(var(--leaf-rotate));
  }

  50% {
    transform: translate(12px, var(--leaf-drift-y, -16px)) rotate(calc(var(--leaf-rotate) + 12deg));
  }
}

/* MARK: Heading and lead */

.service-steps__header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 48px;
  margin-bottom: clamp(36px, 4vw, 56px);
}

.service-steps .service-steps__heading {
  margin: 0;
  color: var(--calabash-white);
  font-size: clamp(1.75rem, 2.6vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.service-steps .service-steps__lead {
  max-width: 460px;
  margin: 0;
  color: var(--calabash-white-82);
  font-size: 1.05rem;
  line-height: 1.6;
}

/* MARK: Steps */

.service-steps__list {
  display: grid;
  grid-template-columns: repeat(var(--steps-count, 4), minmax(0, 1fr));
  gap: 0 var(--steps-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

.service-steps__list li {
  position: relative;
}

.service-steps__node {
  position: relative;
  z-index: 1;
  display: grid;
  width: var(--steps-node);
  height: var(--steps-node);
  margin-bottom: 22px;
  place-items: center;
  border-radius: 50%;
  background: rgb(255 255 255 / 7%);
  box-shadow:
    0 0 0 2px rgb(var(--steps-rgb) / var(--steps-ring-alpha)),
    0 0 0 10px rgb(var(--steps-rgb) / var(--steps-halo-alpha));
  transition: box-shadow var(--calabash-transition), transform var(--calabash-transition);
}

.service-steps__list li:hover .service-steps__node {
  box-shadow:
    0 0 0 2px var(--steps-hover),
    0 0 0 10px var(--steps-hover-halo);
  transform: translateY(-3px);
}

.service-steps .service-steps__icon {
  display: block;
  width: 30px;
  height: 30px;
}

.service-steps__number {
  position: absolute;
  top: -6px;
  right: -8px;
  display: grid;
  min-width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  background: var(--steps-badge);
  box-shadow: 0 0 0 3px var(--calabash-navy);
  color: var(--calabash-navy);
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1;
}

.service-steps__list li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: calc(var(--steps-node) / 2 - 1px);
  left: calc(var(--steps-node) + 18px);
  width: calc(100% - var(--steps-node) - 18px + var(--steps-gap) - 18px);
  height: 2px;
  background: repeating-linear-gradient(
    90deg,
    rgb(var(--steps-rgb) / var(--steps-line-alpha)) 0 8px,
    transparent 8px 16px
  );
}

.service-steps .service-steps__title {
  margin: 0 0 8px;
  color: var(--calabash-white);
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.25;
}

.service-steps .service-steps__description {
  margin: 0;
  color: var(--calabash-white-82);
}

/* MARK: Responsive */

@media (max-width: 1100px) {
  .service-steps {
    --steps-gap: 28px;
  }
}

@media (max-width: 900px) {
  .service-steps__header {
    display: block;
  }

  .service-steps .service-steps__lead {
    margin-top: 12px;
  }

  .service-steps__list {
    grid-template-columns: 1fr;
    gap: 28px 0;
    max-width: 680px;
  }

  .service-steps__list li {
    display: grid;
    grid-template-columns: var(--steps-node) minmax(0, 1fr);
    column-gap: 22px;
    align-items: start;
  }

  .service-steps__node {
    margin-bottom: 0;
  }

  .service-steps__list li:not(:last-child)::after {
    top: calc(var(--steps-node) + 14px);
    left: calc(var(--steps-node) / 2 - 1px);
    width: 2px;
    height: calc(100% - var(--steps-node));
    background: repeating-linear-gradient(
      180deg,
      rgb(var(--steps-rgb) / var(--steps-line-alpha)) 0 8px,
      transparent 8px 16px
    );
  }
}

@media (max-width: 600px) {
  .service-steps {
    --steps-node: 56px;
  }

  .service-steps__list li {
    column-gap: 18px;
  }

  .service-steps .service-steps__icon {
    width: 26px;
    height: 26px;
  }
}

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

  .service-steps__list li:hover .service-steps__node {
    transform: none;
  }
}
