/* Services — Услуги */

.services {
  background-color: #ffffff;
  padding-left: 5%;
  padding-right: 5%;
}

@media screen and (max-width: 1200px) and (min-width: 768px) {
  .services {
    padding-left: 20px;
    padding-right: 20px;
  }
}

.services__inner {
  width: 100%;
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
  padding-top: 4rem;
  padding-bottom: 4rem;
  box-sizing: border-box;
}

@media screen and (min-width: 768px) {
  .services__inner {
    padding-top: 80px;
    padding-bottom: 80px;
  }

  .services__header {
    margin-bottom: 5rem;
  }

  .services__card {
    padding: 45px;
  }
}

.services__header {
  text-align: center;
  max-width: 48rem;
  margin: 0 auto 3rem;
}

.services__tagline {
  margin: 0 0 0.75rem;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 26px;
  line-height: 1.2;
  color: #051133;
}

.services__title {
  margin: 0 0 1.25rem;
  font-family: 'Inter Tight', sans-serif;
  font-weight: 500;
  font-size: 89px;
  line-height: 1.1;
  color: #051133;
}

@media screen and (min-width: 768px) {
  .services__tagline {
    margin-bottom: 1rem;
  }

  .services__title {
    margin-bottom: 1.5rem;
  }
}

.services__lead {
  margin: 0;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 28px;
  line-height: 1.2;
  color: #051133;
}

.services__scroll {
  min-width: 0;
  max-width: 100%;
}

.services__swiper,
.services__grid,
.services__card {
  min-width: 0;
  max-width: 100%;
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

.services__card {
  background-color: #f2f2f2;
  border: none;
  border-radius: 10px;
  min-height: 560px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.services__card-content {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.services__card-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 100%;
  height: 100%;
}

.services__card-title {
  margin: 0 0 1.5rem;
  font-family: 'Inter Tight', sans-serif;
  font-weight: 600;
  font-size: 46px;
  line-height: 1.2;
  color: #051133;
}

.services__card-text {
  margin: 0;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.3;
  color: #051133;
}

.services__more {
  display: inline-block;
  margin-top: 40px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  color: #FF840B;
  text-decoration: underline;
  text-decoration-color: #FF840B;
  text-decoration-skip-ink: none;
  text-underline-position: from-font;
  text-underline-offset: 0;
  white-space: nowrap;
  transition: color 0.2s ease-in-out, text-decoration-color 0.2s ease-in-out;
}

.services__more:hover {
  color: #051133;
  text-decoration-color: #051133;
}

.services__spacer {
  flex: 1 1 auto;
  min-height: 60px;
}

.services__links {
  display: block;
  margin-top: 0;
  padding-top: 0;
  flex-shrink: 0;
}

.services__links-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
}

.services__links-list li {
  margin: 0;
  padding: 8px 0;
}

.services__link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: -0.6px;
  color: #051133;
  text-decoration: none;
  word-break: break-word;
  transition: color 0.2s ease-in-out;
}

.services__link::after {
  content: '';
  flex: none;
  width: 1rem;
  height: 1rem;
  background-color: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M6 3L11 8L6 13' stroke='black' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat center / contain;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M6 3L11 8L6 13' stroke='black' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat center / contain;
}

.services__link:hover {
  color: #ff840b;
}

.services__figures {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 292px;
  height: 280px;
  z-index: 0;
  pointer-events: none;
}

.services__figure {
  position: absolute;
  display: block;
  max-width: none;
}

.services__figure--outsourcing {
  left: 39.5px;
  top: 94px;
  width: 252px;
  height: 120px;
}

.services__figure--1c {
  left: 123.5px;
  top: 23px;
  width: 168px;
  height: 240px;
}

.services__figure--dc {
  left: 123.5px;
  top: 20px;
  width: 168px;
  height: 240px;
}

.services__figure--cloud {
  left: 165.5px;
  top: 44px;
  width: 126px;
  height: 192px;
}

.services__figure--infra,
.services__figure--devops {
  left: 123.5px;
  top: 0;
  width: 168px;
  height: 240px;
}

@media screen and (min-width: 1001px) {
  .services__swiper .swiper-slide {
    display: flex;
    flex-direction: column;
    min-width: 0;
    width: auto !important;
  }

  .services__swiper .swiper-slide > .services__card {
    width: 100%;
    flex: 1 1 auto;
    min-width: 0;
  }

  .services__swiper-footer {
    display: none;
  }

  .services__swiper .swiper-wrapper.services__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    transform: none !important;
  }
}

/* >1000 — 2 колонки; 768–1000 — Swiper; ≤767 — Swiper */
@media screen and (max-width: 1000px) and (min-width: 768px) {
  .services__scroll {
    container-type: inline-size;
    width: calc(100% + 40px);
    max-width: none;
    margin-left: -20px;
    margin-right: -20px;
    min-width: 0;
    overflow-x: clip;
  }

  .services__swiper,
  .services__grid {
    max-width: none;
    min-width: 0;
  }

  .services__swiper {
    display: block;
    position: relative;
    overflow: hidden;
    width: 100%;
    padding-bottom: 2.5rem;
    scroll-snap-type: none;
  }

  .services__swiper .swiper-wrapper.services__grid {
    display: flex !important;
    flex-flow: row nowrap !important;
    align-items: stretch;
    width: 100% !important;
    max-width: 100% !important;
    gap: 0 !important;
    padding-inline: 0;
    grid-template-columns: none !important;
  }

  .services__swiper .swiper-slide {
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
    width: min(600px, calc(100cqw - 1rem - 28px)) !important;
    height: auto;
    box-sizing: border-box;
  }

  .services__swiper .swiper-slide > .services__card {
    width: 100%;
    flex: 1 1 auto;
    min-height: 560px;
    height: 100%;
  }

  .services__swiper-footer {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 0;
    display: flex;
    justify-content: center;
    width: auto;
    z-index: 2;
    box-sizing: border-box;
  }
}

@media screen and (max-width: 1000px) {
  .services__pagination.swiper-pagination {
    position: static;
    width: auto;
    display: flex;
    align-items: center;
    gap: 0.35rem;
  }

  .services__pagination .swiper-pagination-bullet {
    width: 0.5rem;
    height: 0.5rem;
    margin: 0 !important;
    background: #051133;
    opacity: 0.35;
  }

  .services__pagination .swiper-pagination-bullet-active {
    opacity: 1;
  }
}

@media screen and (max-width: 767px) {
  .services {
    padding-left: 0;
    padding-right: 0;
  }

  .services__inner {
    overflow: visible;
  }

  .services__header {
    padding-left: var(--page-gutter);
    padding-right: var(--page-gutter);
    box-sizing: border-box;
  }

  .services__scroll {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    overflow-x: visible;
  }

  .services__swiper {
    display: block;
    position: relative;
    overflow: visible;
    width: 100%;
    max-width: none;
    padding-left: var(--page-gutter);
    padding-right: var(--page-gutter);
    padding-bottom: 2.5rem;
    box-sizing: border-box;
    scroll-snap-type: none;
  }

  .services__swiper .swiper-wrapper.services__grid {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    grid-template-columns: none !important;
    width: 100% !important;
    max-width: 100% !important;
    gap: 0 !important;
    padding-inline: 0 !important;
    align-items: stretch;
  }

  .services__swiper .swiper-slide {
    display: flex;
    flex-direction: column;
    flex-shrink: 0 !important;
    width: auto;
    height: auto;
    box-sizing: border-box;
  }

  .services__swiper .swiper-slide > .services__card {
    width: 100%;
    flex: 1 1 auto;
    min-width: 0;
  }

  .services__card {
    width: 100%;
    flex: none;
    scroll-snap-align: unset;
    scroll-snap-stop: normal;
    min-height: 420px;
    padding: 20px;
  }

  .services__swiper-footer {
    position: absolute;
    left: var(--page-gutter);
    right: var(--page-gutter);
    width: auto;
    bottom: 0;
    display: flex;
    justify-content: center;
    z-index: 2;
    box-sizing: border-box;
  }

  .services__links {
    padding-top: 2.5rem;
  }

  .services__tagline {
    font-size: 1rem;
  }

  .services__title {
    font-size: 2rem;
    line-height: 1.1;
  }

  .services__lead {
    font-size: 1rem;
    line-height: 1.2;
  }

  .services__card-title {
    font-size: 1.5rem;
  }

  .services__more {
    margin-top: 1.25rem;
    font-size: 16px;
  }

  .services__spacer {
    min-height: 60px;
  }

  .services__card-text {
    font-size: 1rem;
    line-height: 1.2;
  }

  .services__link {
    font-size: 16px;
    letter-spacing: -0.48px;
    line-height: 1.25;
  }

  .services__figures {
    transform: scale(0.684);
    transform-origin: 100% 100%;
  }
}
