.services {
  position: relative;
  overflow: hidden;
  background-color: #f3e8c8;
}

.services__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.services__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(243, 232, 200, 0.72) 0%, rgba(243, 232, 200, 0.35) 38%, rgba(243, 232, 200, 0.18) 100%);
  pointer-events: none;
}

.services__bg picture {
  display: block;
  width: 100%;
  height: 100%;
}

.services__bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.services__inner {
  position: relative;
  z-index: 1;
}

.services__header {
  max-width: 42rem;
  margin-inline: auto;
  margin-bottom: var(--space-12);
  text-align: center;
}

.services__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.01em;
  color: var(--color-on-surface);
  margin-bottom: var(--space-5);
}

.services__ornament {
  display: flex;
  justify-content: center;
  gap: 0.45rem;
  margin-bottom: var(--space-6);
  color: var(--color-brass);
}

.services__ornament span {
  width: 0.35rem;
  height: 0.35rem;
  transform: rotate(45deg);
  background: currentColor;
  opacity: 0.85;
}

.services__intro {
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.8vw, 1.125rem);
  font-weight: 400;
  line-height: 1.75;
  color: rgba(26, 28, 28, 0.78);
}

.services__track {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: var(--space-4);
  padding-bottom: var(--space-3);
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(181, 166, 66, 0.45) transparent;
}

.services__track::-webkit-scrollbar {
  height: 6px;
}

.services__track::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(181, 166, 66, 0.45);
}

@media (min-width: 768px) {
  .services__header {
    margin-bottom: var(--space-10);
  }
}

@media (min-width: 1200px) {
  .services__track {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0;
    overflow-x: visible;
    overflow-y: visible;
    scroll-snap-type: none;
  }
}

@media (min-width: 1400px) {
  .services__track {
    gap: 0;
  }
}

.service-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  flex: 0 0 min(78vw, 15.5rem);
  min-width: 0;
  scroll-snap-align: center;
  scroll-snap-stop: normal;
  background: transparent;
  border: none;
}

@media (min-width: 1200px) {
  .service-card {
    flex: unset;
    scroll-snap-align: unset;
    scroll-snap-stop: unset;
  }
}

.service-card:first-child {
  background: rgba(232, 240, 248, 0.5);
  border-radius: 0.125rem;
}

.service-card__media {
  position: relative;
  flex-shrink: 0;
  width: 100%;
  margin: 0;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 1.25rem 1.25rem 0.65rem 0.65rem;
  background: #1a1816;
}

.service-card__media picture {
  display: block;
  width: 100%;
  height: 100%;
}

.service-card__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.service-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  min-height: 0;
  padding: 0.6rem 0.55rem 0.7rem;
  text-align: left;
}

.service-card__meta {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-shrink: 0;
  gap: 0.25rem;
  width: 100%;
  margin-bottom: 0.45rem;
  --svc-num: 1.375rem;
  --svc-icon: 1.375rem;
  font-size: var(--svc-num);
  line-height: 1;
}

.service-card__icon {
  display: block;
  width: var(--svc-icon);
  height: var(--svc-icon);
  flex-shrink: 0;
  margin: 0;
  overflow: visible;
  color: var(--color-brass);
  stroke: currentColor;
  fill: none;
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.service-card__icon path,
.service-card__icon circle {
  stroke: currentColor;
  fill: none;
  stroke-width: inherit;
  stroke-linecap: inherit;
  stroke-linejoin: inherit;
}

.service-card__num {
  font-family: var(--font-display);
  font-size: 1em;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
  color: var(--color-on-surface);
}

.service-card__title {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.3;
  flex-shrink: 0;
  color: var(--color-on-surface);
  width: 100%;
  max-width: 100%;
  margin: 0 0 0.5rem;
  padding: 0;
  border: none;
}

.service-card__list {
  display: block;
  flex: 1;
  width: 100%;
  min-height: 0;
  margin: 0;
  padding: 0 0 0 0.8rem;
  list-style: disc;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.45;
  color: rgba(26, 28, 28, 0.84);
}

.service-card__list li {
  width: 100%;
  max-width: 100%;
  padding: 0;
  text-align: left;
}

.service-card__list li::marker {
  color: rgba(26, 28, 28, 0.55);
  font-size: 0.55em;
}

.service-card__text {
  flex: 1;
  width: 100%;
  max-width: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.42;
  color: rgba(26, 28, 28, 0.82);
  text-align: left;
}

.service-card:nth-child(6) .service-card__meta {
  --svc-num: 1.25rem;
  --svc-icon: 1.25rem;
}

.service-card:nth-child(6) .service-card__title {
  font-size: 0.875rem;
}

.service-card:nth-child(6) .service-card__list,
.service-card:nth-child(6) .service-card__text {
  font-size: 0.6875rem;
}

@media (min-width: 768px) and (max-width: 1199px) {
  .service-card__title {
    font-size: 1.0625rem;
  }

  .service-card__list,
  .service-card__text {
    font-size: 0.8125rem;
    line-height: 1.45;
  }

  .service-card:nth-child(6) .service-card__title {
    font-size: 1rem;
  }

  .service-card:nth-child(6) .service-card__list,
  .service-card:nth-child(6) .service-card__text {
    font-size: 0.75rem;
  }
}

@media (min-width: 1200px) {
  .services__intro {
    font-size: 0.9375rem;
    line-height: 1.65;
  }

  .services__track {
    align-items: stretch;
    gap: 0;
  }

  .service-card {
    padding-inline: 0.65rem;
  }

  .service-card:not(:last-child) {
    border-right: 1px solid rgba(26, 28, 28, 0.1);
  }

  .service-card__body {
    padding: 0.55rem 0.15rem 0.65rem;
    min-height: 0;
  }

  .service-card__meta {
    margin-bottom: 0.4rem;
    gap: 0.22rem;
    --svc-num: 1.3125rem;
    --svc-icon: 1.3125rem;
  }

  .service-card__icon {
    stroke-width: 1.15;
  }

  .service-card__title {
    font-size: 0.875rem;
    line-height: 1.28;
    margin-bottom: 0.45rem;
  }

  .service-card__list,
  .service-card__text {
    font-size: 0.6875rem;
    line-height: 1.42;
  }

  .service-card:nth-child(6) .service-card__meta {
    --svc-num: 1.1875rem;
    --svc-icon: 1.1875rem;
  }

  .service-card:nth-child(6) .service-card__title {
    font-size: 0.8125rem;
  }

  .service-card:nth-child(6) .service-card__list,
  .service-card:nth-child(6) .service-card__text {
    font-size: 0.625rem;
  }

  .service-card__list {
    padding-left: 0.75rem;
  }
}

@media (max-width: 1199px) {
  .services__track .service-card.reveal,
  .services__track .service-card.reveal.is-visible {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media (max-width: 767px) {
  .services__header {
    margin-bottom: var(--space-8);
    text-align: left;
  }

  .services__title {
    font-size: clamp(1.75rem, 7vw, 2.125rem);
  }

  .services__ornament {
    justify-content: flex-start;
  }

  .services__bg-img {
    object-position: 85% top;
  }

  .services__track {
    gap: var(--space-3);
    margin-inline: calc(-1 * var(--gutter-mobile));
    padding-inline: var(--gutter-mobile);
    padding-inline-end: calc(var(--gutter-mobile) + 10vw);
    scroll-padding-inline: var(--gutter-mobile);
  }

  .service-card {
    flex-basis: min(82vw, 16.5rem);
    background: transparent;
  }

  .service-card:first-child {
    background: rgba(232, 240, 248, 0.72);
  }

  .service-card__media {
    margin-inline: 0;
  }

  .service-card__body {
    align-items: flex-start;
    min-height: 0;
    padding: 0.6rem 0.5rem 0.7rem;
    text-align: left;
  }

  .service-card__meta {
    margin-bottom: 0.45rem;
    --svc-num: 1.4375rem;
    --svc-icon: 1.4375rem;
  }

  .service-card__title {
    font-size: 1rem;
    margin-bottom: 0.5rem;
  }

  .service-card__list,
  .service-card__text {
    font-size: 0.8125rem;
    line-height: 1.48;
  }

  .service-card:nth-child(6) .service-card__meta {
    --svc-num: 1.3125rem;
    --svc-icon: 1.3125rem;
  }

  .service-card:nth-child(6) .service-card__title {
    font-size: 0.9375rem;
  }

  .service-card:nth-child(6) .service-card__list,
  .service-card:nth-child(6) .service-card__text {
    font-size: 0.75rem;
  }
}
