.services {
  padding-block: clamp(80px, 10vw, 150px);
  background: #f2f1ed;
}

.section-container {
  width: 100%;
}

.section-heading {
  width: min(calc(100% - 48px), 1120px);
  margin: 0 auto 64px;
  text-align: center;
}

.section-heading span:first-child {
  display: block;
  margin-bottom: 10px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--color-olive);
}

.section-heading h2 {
  margin: 0 0 22px;
  font-size: clamp(2.2rem, 4vw, 3.6rem);
  letter-spacing: 0.04em;
  color: var(--color-text);
}

.services__grid {
  width: min(calc(100% - 48px), 1120px);
  margin: 0 auto;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 72px 24px;
}

.service-card {
  opacity: 0;
  transform: translateY(24px);
  animation: panel-reveal 700ms ease forwards;
}

.service-card:nth-child(1) {
  animation-delay: 40ms;
}

.service-card:nth-child(2) {
  animation-delay: 120ms;
}

.service-card:nth-child(3) {
  animation-delay: 200ms;
}

.service-card:nth-child(4) {
  animation-delay: 80ms;
}

.service-card:nth-child(5) {
  animation-delay: 160ms;
}

.service-card:nth-child(6) {
  animation-delay: 240ms;
}

.service-card__media {
  margin: 0;
  aspect-ratio: 5 / 6;
  overflow: hidden;
  background: #d9ddd4;
}

.service-card__media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 450ms ease;
}

.service-card:hover .service-card__media img,
.service-card:focus-within .service-card__media img {
  transform: scale(1.04);
}

.service-card__content {
  padding: 24px 10px 0;
  text-align: center;
}

.service-card h3 {
  margin: 0 0 14px;
  font-size: clamp(1.5rem, 2vw, 1.9rem);
  line-height: 1.2;
  color: #30342d;
}

.service-card p {
  margin: 0;
  font-size: 1.125rem;
  line-height: 1.65;
  color: #5f645b;
}

.services__actions {
  width: min(calc(100% - 48px), 1120px);
  margin: 64px auto 0;
  text-align: center;
}

.services__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  min-width: 44px;
  padding: 12px 28px;
  border: 1px solid var(--color-forest);
  color: var(--color-forest);
  text-decoration: none;
  font-size: 17px;
  font-weight: 600;
  transition:
    background-color var(--transition-fast),
    transform var(--transition-fast);
}

.services__cta:hover,
.services__cta:active {
  background-color: var(--color-forest);
  color: var(--color-white);
}

@keyframes panel-reveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1023px) {
  .services__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 699px) {
  .section-heading,
  .services__actions {
    width: min(calc(100% - 32px), 560px);
  }

  .section-heading {
    text-align: left;
  }

  .section-heading .brand-line {
    margin-left: 0;
  }

  .services__grid {
    width: min(calc(100% - 32px), 560px);
    grid-template-columns: 1fr;
    gap: 56px;
  }

  .service-card__media {
    aspect-ratio: 5 / 4;
  }

  .service-card__content {
    padding-inline: 0;
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  .service-card {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .service-card__media img {
    transition: none;
  }
}
