.services-section {
  position: relative;
  z-index: 1;
  padding: clamp(62px, 6vw, 96px) 0 clamp(88px, 8vw, 132px);
  overflow: hidden;
  background:
    radial-gradient(circle 520px at 96% 4%, rgba(7, 88, 248, 0.06), transparent 68%),
    radial-gradient(circle 460px at 2% 96%, rgba(7, 88, 248, 0.045), transparent 70%),
    #fff;
  scroll-margin-top: 82px;
}

.services-section::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #dfe6f2 18%, #dfe6f2 82%, transparent);
  content: "";
}

.services-shell {
  position: relative;
  z-index: 1;
}

.services-heading {
  display: flex;
  max-width: 820px;
  margin: 0 auto clamp(30px, 3.4vw, 48px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
}

.services-heading__title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.services-kicker {
  margin: 0;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #60708b;
  background: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.services-heading h2 {
  max-width: none;
  margin: 0;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 56px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  text-wrap: balance;
  white-space: nowrap;
}

.services-heading__intro {
  max-width: 620px;
  padding-bottom: 0;
}

.services-heading__intro > p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.7;
  text-wrap: balance;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: 286px;
  gap: clamp(18px, 1.6vw, 26px);
}

.service-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid #dfe6f2;
  border-radius: 18px;
  background: #e9eef6;
  box-shadow: 0 16px 42px rgba(7, 22, 47, 0.075);
  transform: translate3d(0, 0, 0);
  transition:
    border-color 500ms ease,
    box-shadow 700ms cubic-bezier(0.22, 1, 0.36, 1);
}

.service-card--websites {
  grid-column: span 7;
  grid-row: span 2;
}

.service-card--webapps,
.service-card--miniapps {
  grid-column: span 5;
}

.service-card--bots,
.service-card--mobile {
  grid-column: span 6;
}

.service-card__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1);
  transform-origin: center;
  transition: transform 1100ms cubic-bezier(0.2, 0.65, 0.3, 1);
}

.service-card--websites .service-card__image {
  object-position: 51% 45%;
}

.service-card--webapps .service-card__image {
  object-position: 52% 46%;
}

.service-card--miniapps .service-card__image {
  object-position: 58% 42%;
}

.service-card--bots .service-card__image {
  object-position: 52% 40%;
}

.service-card--mobile .service-card__image {
  object-position: 58% 22%;
}

.service-card::after {
  position: absolute;
  z-index: 1;
  right: 0;
  bottom: 0;
  left: 0;
  height: 46%;
  background: linear-gradient(180deg, rgba(3, 12, 30, 0) 0%, rgba(3, 12, 30, 0.58) 55%, rgba(3, 12, 30, 0.92) 100%);
  content: "";
  opacity: 1;
  pointer-events: none;
  transition: opacity 650ms ease;
}

.service-card__panel {
  position: absolute;
  z-index: 2;
  right: clamp(18px, 2vw, 28px);
  bottom: clamp(18px, 2vw, 28px);
  left: clamp(18px, 2vw, 28px);
  display: block;
  min-height: 0;
  padding: 0;
  font-family: "Golos Text", "Manrope", Arial, sans-serif;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transform: translate3d(0, 0, 0);
}

.service-card__panel::before {
  display: none;
}

.service-card--websites .service-card__panel {
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
}

.service-card--websites .service-card__panel::before {
  display: none;
}

.service-card__copy h3 {
  margin: 0;
  color: #fff;
  font-family: "Golos Text", "Manrope", Arial, sans-serif;
  font-size: clamp(22px, 1.55vw, 30px);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.02em;
  text-shadow: 0 3px 16px rgba(0, 5, 18, 0.82);
  text-wrap: balance;
}

.service-card__copy p {
  margin: 8px 0 0;
  color: rgba(238, 244, 255, 0.88);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.008em;
  text-shadow: 0 2px 12px rgba(0, 5, 18, 0.72);
}

.service-card--websites .service-card__copy h3 {
  color: #fff;
  font-size: clamp(25px, 1.8vw, 32px);
  text-shadow: 0 2px 8px rgba(0, 5, 20, 0.28);
}

.service-card--websites .service-card__copy p {
  color: rgba(238, 243, 255, 0.88);
  font-size: 15px;
  text-shadow: 0 1px 5px rgba(0, 5, 20, 0.25);
}

.service-card__link {
  display: none;
}

.service-card__link svg {
  width: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.service-card__link:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.service-card--websites .service-card__link {
  border-color: rgba(159, 193, 255, 0.3);
  color: #fff;
  background: rgba(24, 94, 225, 0.42);
  box-shadow: inset 0 1px 0 rgba(196, 216, 255, 0.28);
}

@media (hover: hover) {
  .service-card:hover {
    border-color: rgba(7, 88, 248, 0.28);
    box-shadow:
      0 22px 54px rgba(7, 22, 47, 0.12),
      0 7px 18px rgba(7, 88, 248, 0.05);
  }

  .service-card:hover .service-card__image {
    transform: scale(1.025);
  }

  .service-card:hover::after {
    opacity: 0.84;
  }

  .service-card:hover .service-card__panel {
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .service-card--websites:hover .service-card__panel {
    border: 0;
    background: transparent;
    box-shadow: none;
  }

}

@media (max-width: 1180px) {
  .services-heading {
    max-width: 760px;
  }

  .services-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 300px;
  }

  .service-card--websites {
    grid-column: 1 / -1;
    grid-row: span 2;
  }

  .service-card--webapps,
  .service-card--miniapps,
  .service-card--bots,
  .service-card--mobile {
    grid-column: span 1;
  }
}

@media (max-width: 820px) {
  .services-section {
    padding: 70px 0 82px;
  }

  .services-heading {
    gap: 12px;
    margin-bottom: 32px;
  }

  .services-heading h2 {
    max-width: none;
    font-size: 44px;
  }

  .services-heading__intro {
    max-width: 650px;
  }

  .services-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
    gap: 16px;
  }

  .service-card,
  .service-card--websites,
  .service-card--webapps,
  .service-card--miniapps,
  .service-card--bots,
  .service-card--mobile {
    grid-column: auto;
    grid-row: auto;
    min-height: 410px;
  }

  .service-card--websites {
    min-height: 500px;
  }
}

@media (max-width: 580px) {
  .services-section {
    padding: 58px 0 70px;
  }

  .services-heading__title {
    gap: 11px;
  }

  .services-heading h2 {
    font-size: 28px;
  }

  .services-heading__intro > p {
    font-size: 14px;
    line-height: 1.6;
  }

  .service-card,
  .service-card--websites {
    min-height: 390px;
    border-radius: 16px;
  }

  .service-card__panel,
  .service-card--websites .service-card__panel {
    right: 18px;
    bottom: 18px;
    left: 18px;
    min-height: 0;
    padding: 0;
  }

  .service-card__copy h3,
  .service-card--websites .service-card__copy h3 {
    font-size: clamp(18px, 5.3vw, 22px);
  }

  .service-card__copy p,
  .service-card--websites .service-card__copy p {
    margin-top: 3px;
    font-size: 12px;
  }

  .service-card__link {
    display: none;
  }

  .service-card__link svg {
    width: 15px;
  }
}

@media (max-width: 380px) {
  .services-heading h2 {
    font-size: 26px;
  }
}

