/* ===== Страница услуги: общий шаблон для services/*.html ===== */

/* Как на главной: светлые блоки — скруглённые плашки на чёрном фоне */
.service-page {
  background: var(--quantum-black);
}

.service-page main {
  overflow: hidden;
}

.service-page .button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  padding: 0 26px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  transition:
    transform 260ms cubic-bezier(.22, 1, .36, 1),
    background 200ms ease,
    box-shadow 260ms ease;
}

.service-page .button:hover {
  transform: translateY(-2px);
}

.service-page .button:focus-visible {
  outline: 3px solid rgba(255, 210, 64, .9);
  outline-offset: 3px;
}

.service-page .button--dark {
  color: #ffffff;
  background: var(--quantum-black);
  box-shadow: 0 14px 30px rgba(10, 10, 10, .16);
}

.service-page .button--ghost {
  border-color: rgba(10, 10, 10, .18);
  color: var(--quantum-black);
  background: rgba(255, 255, 255, .6);
}

/* Первый экран */

.service-hero {
  position: relative;
  display: grid;
  min-height: min(100svh, 920px);
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(24px, 4vw, 72px);
  align-items: center;
  padding: clamp(120px, 12vw, 160px) clamp(20px, 5vw, 92px) clamp(56px, 6vw, 96px);
  border-radius: 0 0 44px 44px;
  background:
    radial-gradient(circle at 74% 62%, rgba(255, 210, 64, .26), transparent 30%),
    radial-gradient(circle at 30% 10%, rgba(255, 255, 255, .95), transparent 44%),
    var(--neural-white);
  isolation: isolate;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
  color: rgba(10, 10, 10, .5);
  font-size: 13px;
}

.breadcrumbs a {
  color: inherit;
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--quantum-black);
}

.breadcrumbs [aria-current="page"] {
  color: var(--quantum-black);
}

.service-hero__stage {
  display: inline-flex;
  margin: 0 0 22px;
  padding: 7px 12px;
  border: 1px solid rgba(10, 10, 10, .16);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .16em;
}

.service-hero h1 {
  margin: 0;
  font-family: "Bebas Neue", "Roboto", sans-serif;
  font-size: clamp(56px, 7vw, 120px);
  font-weight: 400;
  line-height: .86;
  letter-spacing: -.02em;
}

/* ===== Длинный заголовок услуги =====
   Три строки вместо двух: кегль меньше, чтобы самая длинная строка
   («В ЯНДЕКС КАРТАХ») помещалась в колонку. */
.service-hero h1.service-hero__title--long {
  font-size: clamp(40px, 5vw, 84px);
}

.service-hero__lead {
  max-width: 32em;
  margin: 28px 0 0;
  color: rgba(10, 10, 10, .68);
  font-size: clamp(17px, 1.3vw, 21px);
  line-height: 1.55;
}

.service-hero__price {
  display: grid;
  gap: 6px;
  margin-top: 32px;
}

.service-hero__price strong {
  font-family: "Bebas Neue", "Roboto", sans-serif;
  font-size: clamp(34px, 3vw, 48px);
  font-weight: 400;
  line-height: 1;
}

.service-hero__price span {
  color: rgba(10, 10, 10, .55);
  font-size: 14px;
}

.service-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.service-hero__visual {
  position: relative;
  justify-self: center;
  width: min(100%, 560px);
}

.service-hero__glow {
  position: absolute;
  z-index: -1;
  inset: 12% 8% 4%;
  border-radius: 50%;
  background: var(--solar-core);
  filter: blur(80px);
  opacity: .35;
}

.service-hero__visual img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 40px 44px rgba(10, 10, 10, .24));
  transform: rotate(-6deg);
}

/* Общая секция */

.service-section {
  position: relative;
  padding: clamp(64px, 7vw, 128px) clamp(20px, 5vw, 92px);
}

.service-section__inner {
  max-width: 1600px;
  margin: 0 auto;
}

.service-section__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px 48px;
  align-items: end;
  margin-bottom: clamp(32px, 4vw, 64px);
}

.service-section__eyebrow {
  grid-column: 1 / -1;
  margin: 0;
  color: rgba(10, 10, 10, .5);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .2em;
}

.service-section__header h2 {
  margin: 0;
  font-family: "Bebas Neue", "Roboto", sans-serif;
  font-size: clamp(52px, 5.6vw, 96px);
  font-weight: 400;
  line-height: .86;
  letter-spacing: -.01em;
}

.service-section__header > p:not(.service-section__eyebrow) {
  max-width: 30em;
  margin: 0;
  color: rgba(10, 10, 10, .62);
  font-size: 16px;
  line-height: 1.55;
}

.service-section:not(.service-section--dark) {
  margin-top: 8px;
  border-radius: 44px;
  background: #e9e9e5;
}

/* Светлые секции подряд складываются в одну плашку */
.service-section:not(.service-section--dark) + .service-section:not(.service-section--dark) {
  margin-top: 0;
  padding-top: clamp(24px, 3vw, 48px);
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.service-section:not(.service-section--dark):has(+ .service-section:not(.service-section--dark)) {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.service-section--dark {
  color: #f7f7f4;
  background: var(--quantum-black);
}

.service-section--dark .service-section__eyebrow,
.service-section--dark .service-section__header > p:not(.service-section__eyebrow) {
  color: rgba(247, 247, 244, .55);
}

/* Кому подходит */

.fit-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(10px, 1vw, 16px);
}

/* Шесть карточек — по три в ряд */
.fit-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.fit-card {
  display: flex;
  min-height: 250px;
  flex-direction: column;
  padding: clamp(22px, 2vw, 32px);
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 28px;
  background: linear-gradient(160deg, rgba(255, 255, 255, .92), rgba(240, 240, 237, .78));
  box-shadow: 0 18px 44px rgba(10, 10, 10, .07);
}

.fit-card::before {
  width: 10px;
  height: 10px;
  margin-bottom: 26px;
  border-radius: 50%;
  content: "";
  background: var(--solar-core);
  box-shadow: 0 0 0 5px rgba(255, 210, 64, .25);
}

.fit-card h3 {
  margin: 0;
  font-size: clamp(20px, 1.5vw, 24px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -.03em;
}

.fit-card p {
  margin: 12px 0 0;
  color: rgba(10, 10, 10, .62);
  font-size: 15px;
  line-height: 1.5;
}

/* Что входит */

.included-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  border-top: 1px solid rgba(247, 247, 244, .16);
  list-style: none;
}

.included-list li {
  padding: 28px clamp(16px, 1.6vw, 28px) 32px 0;
  border-bottom: 1px solid rgba(247, 247, 244, .16);
}

.included-list li:not(:nth-child(4n + 1)) {
  padding-left: clamp(16px, 1.6vw, 28px);
  border-left: 1px solid rgba(247, 247, 244, .16);
}

.included-list__index {
  display: block;
  color: var(--solar-core);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
}

.included-list h3 {
  margin: 18px 0 0;
  font-size: clamp(18px, 1.35vw, 22px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -.02em;
}

.included-list p {
  margin: 10px 0 0;
  color: rgba(247, 247, 244, .62);
  font-size: 15px;
  line-height: 1.55;
}

/* Этапы */

.steps-list {
  display: grid;
  grid-template-columns: repeat(var(--steps, 4), minmax(0, 1fr));
  gap: clamp(10px, 1vw, 16px);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps-list li {
  position: relative;
  padding: 26px clamp(20px, 1.8vw, 28px) 28px;
  border-radius: 28px;
  background: var(--neural-white);
}

.steps-list__index {
  display: block;
  color: rgba(10, 10, 10, .2);
  font-size: clamp(48px, 4vw, 72px);
  font-weight: 300;
  line-height: .8;
  letter-spacing: -.06em;
}

.steps-list h3 {
  margin: 22px 0 0;
  font-size: clamp(19px, 1.4vw, 23px);
  font-weight: 500;
  letter-spacing: -.02em;
}

.steps-list p {
  margin: 10px 0 0;
  color: rgba(10, 10, 10, .62);
  font-size: 15px;
  line-height: 1.55;
}

.service-steps__note {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: clamp(20px, 2vw, 32px) 0 0;
  color: rgba(10, 10, 10, .7);
  font-size: 15px;
}

.service-steps__note::before {
  width: 3px;
  height: 22px;
  border-radius: 2px;
  content: "";
  background: var(--solar-core);
}

/* ===== Блок «Сколько стоит» ===== */
.price-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 3vw, 56px);
  padding: clamp(26px, 3vw, 52px);
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: clamp(24px, 2.8vw, 42px);
  background: linear-gradient(160deg, rgba(255, 255, 255, .95), rgba(240, 240, 237, .8));
  box-shadow: 0 18px 44px rgba(10, 10, 10, .07);
}

.price-panel__value {
  margin: 0;
  font-family: "Bebas Neue", "Roboto", sans-serif;
  font-size: clamp(56px, 6vw, 104px);
  line-height: .9;
  letter-spacing: -.02em;
}

.price-panel__value span {
  font-family: "Roboto", sans-serif;
  font-size: clamp(16px, 1.3vw, 20px);
  font-weight: 500;
  letter-spacing: 0;
}

.price-panel__caption {
  max-width: 30em;
  margin: 18px 0 0;
  color: rgba(10, 10, 10, .66);
  font-size: 16px;
  line-height: 1.55;
}

.price-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.price-panel__facts {
  display: grid;
  gap: 14px;
  align-content: start;
  margin: 0;
  padding: 0;
  list-style: none;
}

.price-panel__facts li {
  padding: 16px 18px;
  border-radius: 18px;
  color: rgba(10, 10, 10, .68);
  background: rgba(10, 10, 10, .04);
  font-size: 15px;
  line-height: 1.5;
}

.price-panel__facts strong {
  color: var(--quantum-black);
  font-weight: 600;
}

@media (max-width: 860px) {
  .fit-grid--three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .price-panel {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  .fit-grid--three {
    grid-template-columns: minmax(0, 1fr);
  }

  .price-panel__actions .button {
    flex: 1 1 100%;
  }
}

/* Кейсы */

.service-case {
  display: grid;
  overflow: hidden;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  border-radius: clamp(24px, 2.8vw, 42px);
  color: #ffffff;
  background: #0b0b0b;
  text-decoration: none;
  transition: transform 440ms cubic-bezier(.16, 1, .3, 1), box-shadow 440ms ease;
}

.service-case + .service-case {
  margin-top: clamp(10px, 1vw, 16px);
}

.service-case:hover {
  box-shadow: 0 34px 80px rgba(10, 10, 10, .2);
  transform: translateY(-6px);
}

.service-case:focus-visible {
  outline: 3px solid var(--solar-core);
  outline-offset: 4px;
}

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

.service-case__copy {
  display: flex;
  flex-direction: column;
  padding: clamp(28px, 3vw, 52px);
}

.service-case__tag {
  color: rgba(255, 255, 255, .55);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .18em;
}

.service-case h3 {
  margin: 18px 0 0;
  font-family: "Bebas Neue", "Roboto", sans-serif;
  font-size: clamp(38px, 3.6vw, 60px);
  font-weight: 400;
  line-height: .9;
  text-transform: uppercase;
}

.service-case p {
  margin: 16px 0 0;
  color: rgba(255, 255, 255, .7);
  font-size: 16px;
  line-height: 1.55;
}

.service-case__more {
  align-self: flex-start;
  margin-top: auto;
  padding-top: 28px;
  color: var(--solar-core);
  font-size: 15px;
  font-weight: 600;
}

.service-case--soon {
  display: flex;
  min-height: 0;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(28px, 3vw, 52px);
  border: 1px dashed rgba(10, 10, 10, .22);
  color: var(--quantum-black);
  background: rgba(255, 255, 255, .45);
}

.service-case--soon:hover {
  box-shadow: none;
}

.service-case--soon p {
  max-width: 36em;
  color: rgba(10, 10, 10, .62);
}

.service-case--soon .service-case__tag {
  color: rgba(10, 10, 10, .5);
}

.service-case--soon .service-case__more {
  color: var(--quantum-black);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Ссылка на все кейсы под карточкой-предложением */
.service-case__all {
  display: inline-block;
  margin-top: 16px;
  color: var(--quantum-black);
  font-size: 15px;
  font-weight: 600;
  text-underline-offset: 4px;
}

/* Чем усилить */

.related-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(10px, 1vw, 16px);
}

.related-card {
  position: relative;
  display: flex;
  min-height: 300px;
  overflow: hidden;
  flex-direction: column;
  padding: clamp(24px, 2.4vw, 38px);
  border-radius: clamp(24px, 2.8vw, 42px);
  color: var(--quantum-black);
  background: linear-gradient(145deg, #dededb, #f7f7f4 64%, #d8d8d4);
  box-shadow: 0 18px 50px rgba(10, 10, 10, .08);
  text-decoration: none;
  isolation: isolate;
  transition: transform 440ms cubic-bezier(.16, 1, .3, 1), box-shadow 440ms ease;
}

.related-card:hover {
  box-shadow: 0 34px 80px rgba(10, 10, 10, .17);
  transform: translateY(-6px);
}

.related-card:focus-visible {
  outline: 3px solid rgba(10, 10, 10, .85);
  outline-offset: 4px;
}

.related-card img {
  position: absolute;
  z-index: -1;
  top: 20px;
  right: 20px;
  width: clamp(110px, 10vw, 170px);
  height: auto;
  opacity: .85;
  filter: drop-shadow(0 22px 24px rgba(10, 10, 10, .2));
  transform: rotate(7deg);
}

.related-card__stage {
  align-self: flex-start;
  margin: 0;
  padding: 6px 10px;
  border: 1px solid rgba(10, 10, 10, .16);
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .16em;
}

.related-card h3 {
  max-width: 70%;
  margin: auto 0 0;
  padding-top: 80px;
  font-family: "Bebas Neue", "Roboto", sans-serif;
  font-size: clamp(34px, 3vw, 50px);
  font-weight: 400;
  line-height: .9;
  text-transform: uppercase;
}

.related-card p {
  max-width: 30em;
  margin: 12px 0 0;
  color: rgba(10, 10, 10, .62);
  font-size: 15px;
  line-height: 1.5;
}

.related-card__more {
  margin-top: 20px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ===== Цвет этапов системы =====
   Как в «Услугах и ценах» на главной: 01 Привлечь — светлый,
   02 Убедить — жёлтый, 03 Не потерять — чёрный. */
.service-hero__stage--convince {
  border-color: transparent;
  background: var(--solar-core);
}

.service-hero__stage--keep {
  border-color: transparent;
  color: var(--neural-white);
  background: var(--quantum-black);
}

.related-card--convince {
  background: linear-gradient(145deg, #ffd240, #f3bd18);
}

.related-card--convince p {
  color: rgba(10, 10, 10, .72);
}

.related-card--convince .related-card__stage {
  border-color: rgba(10, 10, 10, .28);
}

.related-card--keep {
  color: #ffffff;
  background: linear-gradient(145deg, #080808, #242423 66%, #0e0e0e);
}

.related-card--keep p {
  color: rgba(255, 255, 255, .65);
}

.related-card--keep .related-card__stage {
  border-color: rgba(255, 255, 255, .26);
}

.related-card--keep img {
  filter: brightness(1.22);
}

/* Вопросы по услуге */

.faq-list {
  display: grid;
  gap: 10px;
  max-width: 1100px;
}

.faq-item {
  border: 1px solid rgba(247, 247, 244, .14);
  border-radius: 24px;
  background: #141414;
  transition: border-color 200ms ease;
}

.faq-item[open] {
  border-color: rgba(255, 210, 64, .45);
}

.faq-item summary {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  padding: 22px 26px;
  font-size: clamp(18px, 1.4vw, 22px);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -.02em;
  list-style: none;
  cursor: pointer;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border: 1px solid rgba(247, 247, 244, .2);
  border-radius: 50%;
  content: "+";
  color: var(--solar-core);
  font-size: 20px;
  font-weight: 400;
  transition: transform 260ms ease;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item summary:focus-visible {
  outline: 2px solid var(--solar-core);
  outline-offset: 4px;
  border-radius: 24px;
}

.faq-item p {
  max-width: 52em;
  margin: 0;
  padding: 0 26px 24px;
  color: rgba(247, 247, 244, .7);
  font-size: 16px;
  line-height: 1.6;
}

/* Форма на странице услуги стоит на тёмном фоне, как на главной */

.service-page .contact {
  padding-top: clamp(12px, 2vw, 28px);
}

/* Адаптив */

/* ===== Компактные карточки кейсов =====
   Когда кейсов по услуге больше двух: первый — крупной карточкой,
   остальные — в обёртке .service-case-grid с классом service-case--compact. */

.service-case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(10px, 1vw, 16px);
  margin-top: clamp(10px, 1vw, 16px);
}

.service-case-grid .service-case {
  margin-top: 0;
}

.service-case--compact {
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
}

.service-case--compact img {
  height: auto;
  min-height: 0;
  aspect-ratio: 16 / 9;
  object-position: center top;
}

.service-case--compact .service-case__copy {
  padding: clamp(20px, 1.8vw, 28px);
}

.service-case--compact h3 {
  margin-top: 12px;
  font-size: clamp(28px, 2.2vw, 36px);
}

.service-case--compact p {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.5;
}

.service-case--compact .service-case__more {
  padding-top: 18px;
}

@media (max-width: 1100px) {
  .fit-grid,
  .included-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .included-list li:not(:nth-child(4n + 1)) {
    padding-left: 0;
    border-left: 0;
  }

  .included-list li:nth-child(even) {
    padding-left: clamp(16px, 1.6vw, 28px);
    border-left: 1px solid rgba(247, 247, 244, .16);
  }

  .steps-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .service-hero {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
    padding-top: 112px;
  }

  .service-hero__visual {
    order: -1;
    width: min(64vw, 300px);
    margin-bottom: -12px;
  }

  .service-section__header {
    grid-template-columns: minmax(0, 1fr);
  }

  .service-case {
    grid-template-columns: minmax(0, 1fr);
  }

  .service-case img {
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

  .related-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  .service-hero {
    padding: 100px 16px 48px;
    border-radius: 0 0 30px 30px;
  }

  .service-section:not(.service-section--dark) {
    border-radius: 30px;
  }

  .service-hero h1 {
    font-size: clamp(36px, 11.2vw, 56px);
  }

  .service-hero__actions .button {
    flex: 1 1 100%;
  }

  .service-section {
    padding: 56px 16px;
  }

  .service-section__header h2 {
    font-size: clamp(44px, 12.4vw, 56px);
  }

  .fit-grid,
  .included-list,
  .steps-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .fit-card {
    min-height: 0;
  }

  .included-list li:nth-child(even) {
    padding-left: 0;
    border-left: 0;
  }

  .faq-item summary {
    padding: 18px 20px;
  }

  .faq-item p {
    padding: 0 20px 20px;
  }

  .related-card {
    min-height: 0;
  }

  .related-card h3 {
    max-width: 100%;
    padding-top: 110px;
  }
}

@media (max-width: 1100px) {
  /* На планшете — по два в ряд, чтобы четыре кейса не разбивались на 3 + 1 */
  .service-case-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  /* На телефоне компактные кейсы — строки с миниатюрой, без описания */
  .service-case-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    margin-top: 8px;
  }

  .service-case--compact {
    grid-template-columns: 104px minmax(0, 1fr);
    align-items: stretch;
    border-radius: 22px;
  }

  .service-case--compact img {
    height: 100%;
    aspect-ratio: auto;
    object-position: left top;
  }

  .service-case--compact .service-case__copy {
    padding: 16px 18px;
  }

  .service-case--compact .service-case__tag {
    font-size: 9px;
  }

  .service-case--compact h3 {
    margin-top: 8px;
    font-size: 28px;
  }

  .service-case--compact p {
    display: none;
  }

  .service-case--compact .service-case__more {
    padding-top: 10px;
    font-size: 14px;
  }
}

@media (max-width: 560px) {
  .service-hero h1.service-hero__title--long {
    font-size: clamp(30px, 9.6vw, 48px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .service-page .button,
  .service-case,
  .related-card,
  .faq-item summary::after {
    transition: none;
  }
}
