/* =========================================================================
   Услуги — services.css   (1em = 16px макета)
   Figma: десктоп 318:403, мобайл 2058:638
   ========================================================================= */

.svc {
  display: flex; flex-direction: column; gap: 2.125em;            /* заголовок → список 34 */
  margin: 5.3125em var(--pad) 0;                                   /* от хедера 85 */
}
.svc__title { color: rgba(243, 238, 231, .8); }                    /* text-secondary */

/* ---------- строка услуги ---------- */
.svc__list { display: flex; flex-direction: column; }
.svc-item {
  position: relative;
  display: flex; align-items: flex-start; gap: 1.25em;            /* 20 */
  padding: 2.5em 0;                                                /* линия → контент 40, контент → линия 40 */
}
.svc-item::before,
.svc__end::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: rgba(255, 255, 255, .3);
}
.svc__end { position: relative; height: 1px; margin-top: -2.125em; } /* гасим gap секции: линия сразу под списком */

.svc-item__text { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: .9375em; } /* 15 */
.svc-item__points { display: flex; flex-direction: column; gap: .75em; }   /* 12 */
.svc-item__points li { display: flex; align-items: center; gap: .5625em; } /* точка 4 + 9 */
.svc-item__points li::before {
  content: ""; flex: none; width: .25em; height: .25em;
  background: url(../../assets/img/services/dot.svg) center / 100% 100% no-repeat;
}
.svc-item__points li { color: rgba(243, 238, 231, .6); }

.svc-item__media { flex: none; width: 8.5625em; height: 9.6875em; overflow: hidden; } /* 137 × 155 */
.svc-item__img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 767.98px) {
  .svc { margin-top: 3.6875em; }                                   /* от хедера 59 */
  .svc__title { font-size: 1.9375em; color: var(--text); }        /* Mobile/H2 — 31 */
  .svc-item { padding: 1em 0 2.5em; }                              /* 16 сверху, 40 до следующей линии */
  .svc-item:last-child { padding-bottom: 0; }
  .svc-item__text { gap: 1em; }                                    /* 16 */
  .svc-item__points { gap: .5em; }                                 /* 8 */
  .svc-item__media { order: -1; width: 3.8125em; height: 4.3125em; } /* 61 × 69 */
  .svc__end { display: none; }                                     /* в мобайле нижней линии нет */
}

/* =========================================================================
   МОУШН: линия прорисовывается слева направо → картинка проявляется
   снизу вверх с лёгким scale → название и пункты поднимаются каскадом.
   Каждая строка — своё появление (data-inview), список длинный.
   ========================================================================= */
.js .svc-item::before,
.js .svc__end::before {
  transform: scaleX(0); transform-origin: 0 50%;
  transition: transform 1.4s var(--ease-out);
}
.js .svc-item.is-in::before,
.js .svc__end.is-in::before { transform: none; }

.js .svc-item__media {
  clip-path: inset(100% 0 0 0);
  transition: clip-path 1.5s var(--ease-reveal) .1s;
}
.js .svc-item__img { transform: scale(1.06); transition: transform 1.6s var(--ease-out) .1s; }
.js .svc-item.is-in .svc-item__media { clip-path: inset(0 0 0 0); }
.js .svc-item.is-in .svc-item__img { transform: none; }

.js .svc-item__name,
.js .svc-item__points li {
  opacity: 0; transform: translate3d(0, .75em, 0);
  transition: opacity 1s var(--ease-soft) var(--d, .15s), transform 1.2s var(--ease-out) var(--d, .15s);
}
.js .svc-item__points li { --d: calc(.3s + var(--bi, 0) * 70ms); }
.js .svc-item.is-in .svc-item__name,
.js .svc-item.is-in .svc-item__points li { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js .svc-item::before, .js .svc__end::before { transform: none; }
  .js .svc-item__media { clip-path: none; opacity: 0; transition: opacity .5s linear; }
  .js .svc-item.is-in .svc-item__media { opacity: 1; }
  .js .svc-item__img { transform: none; }
  .js .svc-item__name, .js .svc-item__points li { transform: none; transition: opacity .5s linear; }
}

/* сверка с макетом 318:428: строка пункта 23px (не 22.4), вокруг CTA 140 / 135 */
.svc-item__points li { line-height: 1.4375; }
.page-services .cta, main > .cta { margin-top: 8.75em; margin-bottom: 8.4375em; }
@media (max-width: 767.98px) {
  .page-services .cta, main > .cta { margin-top: 6.3125em; margin-bottom: 5.875em; }
}
/* линия-разделитель 1px занимает место, как в макете (шаг строки 1 + 40 + 176 + 40 = 257) */
.svc-item { padding-top: calc(2.5em + 1px); }
@media (max-width: 767.98px) { .svc-item { padding-top: 1em; } }
