.services-section {
  position: relative;
  background: var(--color-background);
}

.services-stage {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100svh;
  padding-block: var(--anchor-offset) 64px;
}

#services-title {
  font-size: clamp(32px, 3.2vw, 46px);
  text-align: center;
}

.services-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
  gap: 28px;
  margin: 56px 0 0;
  padding: 0;
  list-style: none;
}

.service-slot {
  min-width: 0;
}

.service-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transform-origin: 50% 65%;
}

.service-art {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
}

.service-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  transition: transform .35s cubic-bezier(.22, 1, .36, 1);
}

.service-copy {
  width: 100%;
  max-width: 290px;
  margin-top: 24px;
}

.service-copy h3 {
  display: grid;
  place-items: center;
  min-height: 2.6em;
  font-size: clamp(20px, 1.7vw, 24px);
  line-height: 1.3;
  letter-spacing: 0;
  text-wrap: balance;
  transition: color .2s;
}

.service-copy p {
  margin-top: 10px;
  min-height: 3.2em;
  color: var(--color-textmuted);
  font-size: 14px;
  line-height: 1.6;
  text-wrap: balance;
}

.service-item:hover h3,
.service-item:focus-visible h3 {
  color: var(--color-accent);
}

.service-item:focus-visible .service-art img {
  transform: translateY(-6px);
}

@media (min-width: 1024px) {
  .service-art {
    width: min(100%, max(140px, calc(100svh - 430px)));
  }
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .service-item:hover .service-art img {
    transform: translateY(-6px);
  }
}

@media (max-width: 1023px) {
  .services-stage {
    padding-block: var(--anchor-offset) 48px;
  }

  .services-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: min(100%, 520px);
    gap: 24px;
    margin-top: 40px;
    margin-inline: auto;
  }

  .service-art {
    max-width: 260px;
  }

  .service-copy h3 {
    min-height: 2.6em;
    font-size: 24px;
  }

  .service-copy p {
    min-height: 3.2em;
  }
}

@media (max-width: 599px) {
  .services-stage {
    padding-block: var(--anchor-offset) 24px;
  }

  .services-gallery {
    margin-top: 28px;
  }

  .service-art {
    width: min(100%, 145px);
  }

  .service-copy {
    margin-top: 12px;
  }

  .service-copy h3 {
    min-height: 2.6em;
    font-size: 17px;
  }

  .service-copy p {
    margin-top: 8px;
    min-height: 4.5em;
    font-size: 12px;
    line-height: 1.5;
  }
}

@media (prefers-reduced-motion: reduce) {
  .service-item .service-art img {
    transform: none;
  }
}
