/* —— Services page —— */

.services-page {
  width: 100%;
  max-width: min(var(--max), 100%);
  padding: clamp(16px, 3.5vw, 24px) clamp(14px, 3.5vw, 24px) 40px;
  box-sizing: border-box;
  min-width: 0;
  overflow-x: clip;
  align-self: stretch;
  margin-inline: auto;
}

.services-lede {
  max-width: 720px;
  margin: 0 auto 48px;
  text-align: center;
}

.services-lede__kicker {
  margin: 0 0 12px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(255, 158, 207, 0.75);
}

.services-lede__title {
  margin: 0 0 16px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(2rem, 4.8vw, 2.85rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.08;
  color: #fff;
}

.services-lede__text {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.72;
  color: rgba(255, 255, 255, 0.58);
}

.services-catalog {
  margin-bottom: 48px;
}

.services-catalog__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2.5vw, 22px);
}

.svc-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(14, 14, 22, 0.85);
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.svc-card:hover {
  border-color: rgba(255, 180, 220, 0.22);
  transform: translateY(-3px);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.45);
}

.svc-card__media {
  margin: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #0a0a10;
}

.svc-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.svc-card:hover .svc-card__media img {
  transform: scale(1.04);
}

.svc-card__body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: clamp(18px, 2.5vw, 22px) clamp(18px, 2.5vw, 22px) clamp(20px, 3vw, 24px);
}

.svc-card__body h3 {
  margin: 0 0 10px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: #fff;
}

.svc-card__body p {
  margin: 0 0 18px;
  flex: 1 1 auto;
  font-size: 0.9rem;
  line-height: 1.62;
  color: rgba(255, 255, 255, 0.55);
}

.svc-card__more {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  font-size: 0.82rem;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.svc-card__more:hover {
  background: linear-gradient(135deg, rgba(217, 70, 168, 0.35), rgba(255, 122, 89, 0.2));
  border-color: rgba(255, 180, 220, 0.35);
  transform: translateY(-1px);
}

/* Service detail modal */

.service-modal {
  position: fixed;
  inset: 0;
  z-index: 9650;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(16px, 4vw, 28px);
  padding-top: max(clamp(16px, 4vw, 28px), env(safe-area-inset-top, 0px));
  padding-bottom: max(clamp(16px, 4vw, 28px), env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  background: rgba(4, 4, 8, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease, visibility 0.35s;
}

.service-modal.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.service-modal__panel {
  position: relative;
  width: min(920px, 100%);
  max-height: min(90vh, 880px);
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  border-radius: 24px;
  border: 1px solid rgba(255, 180, 220, 0.2);
  background: linear-gradient(155deg, rgba(20, 18, 30, 0.99), rgba(8, 8, 14, 0.99));
  box-shadow: 0 32px 72px rgba(0, 0, 0, 0.65);
  transform: translateY(16px) scale(0.98);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.service-modal.is-visible .service-modal__panel {
  transform: translateY(0) scale(1);
}

.service-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(8, 8, 12, 0.75);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease;
}

.service-modal__close:hover {
  background: rgba(255, 255, 255, 0.1);
}

.service-modal__close svg {
  width: 18px;
  height: 18px;
}

.service-modal__media {
  margin: 0;
  min-height: 220px;
  background: #0a0a10;
}

.service-modal__media img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
}

.service-modal__content {
  padding: clamp(24px, 4vw, 36px) clamp(22px, 4vw, 32px) clamp(26px, 4vw, 34px);
}

.service-modal__tag {
  margin: 0 0 10px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(94, 234, 212, 0.7);
}

.service-modal__title {
  margin: 0 0 14px;
  padding-right: 36px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(1.35rem, 3vw, 1.65rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #fff;
}

.service-modal__text {
  margin: 0 0 16px;
  font-size: 0.94rem;
  line-height: 1.72;
  color: rgba(255, 255, 255, 0.62);
}

.service-modal__list {
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
}

.service-modal__list li {
  position: relative;
  padding-left: 1.1em;
  margin-bottom: 0.55em;
  font-size: 0.88rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.72);
}

.service-modal__list li::before {
  content: '·';
  position: absolute;
  left: 0;
  color: #ff9ecf;
  font-weight: 700;
}

.service-modal__contact {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: linear-gradient(135deg, #d946a8, #ff7a59);
  box-shadow: 0 10px 24px rgba(217, 70, 168, 0.3);
  transition: transform 0.2s ease, filter 0.2s ease;
}

.service-modal__contact:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
}

body.service-modal-open {
  overflow: hidden;
  touch-action: none;
}

body.service-modal-open .service-modal {
  touch-action: pan-y;
}

@media (min-width: 901px) {
  .service-modal {
    align-items: center;
  }
}

@media (max-width: 900px) {
  .services-catalog__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .service-modal__panel {
    grid-template-columns: 1fr;
    max-height: none;
    overflow: visible;
    margin: auto 0;
  }

  .service-modal__media img {
    min-height: 200px;
    max-height: 240px;
  }
}

@media (max-width: 560px) {
  .services-catalog__grid {
    grid-template-columns: 1fr;
  }

  .svc-card:hover {
    transform: none;
  }

  .svc-card:hover .svc-card__media img {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .svc-card,
  .svc-card__media img,
  .service-modal,
  .service-modal__panel,
  .svc-card__more,
  .service-modal__contact {
    transition: none;
  }
}
