/* ═══════════════════════════════════════════════════════════════
   F.Studio — SEO-слои главной страницы
   ═══════════════════════════════════════════════════════════════ */

body.home .home-section,
body.home .home-section :is(h2, h3, p, button, a) {
  font-family: "Montserrat", sans-serif;
}

/* ── Общие секции: только цвет, без линий ── */

body.home {
  --home-bg-base: #14141f;
  --home-bg-surface: #101018;
  --home-bg-tint: #161622;
  --home-bridge-h: clamp(56px, 7vw, 96px);
  --home-section-pad: clamp(72px, 8vw, 96px);
}

.home-section {
  position: relative;
  isolation: isolate;
  padding: var(--home-section-pad) 0;
}

.home-section > .container {
  position: relative;
  z-index: 1;
}

.home-section--tint {
  background:
    radial-gradient(ellipse 80% 60% at 20% 0%, rgba(100, 144, 250, 0.07), transparent 62%),
    radial-gradient(ellipse 60% 50% at 100% 100%, rgba(126, 70, 234, 0.05), transparent 55%),
    var(--home-bg-tint);
}

.home-section--surface {
  background:
    radial-gradient(ellipse 80% 55% at 50% 0%, rgba(100, 144, 250, 0.06), transparent 58%),
    var(--home-bg-surface);
}

/* Мягкий переход между секциями */
.home-section--surface + .home-section--tint::before,
.home-section--tint + .home-section--surface::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: var(--home-bridge-h);
  pointer-events: none;
  z-index: 0;
}

.home-section--surface + .home-section--tint::before {
  background: linear-gradient(180deg, var(--home-bg-surface) 0%, transparent 100%);
}

.home-section--tint + .home-section--surface::before {
  background: linear-gradient(180deg, var(--home-bg-tint) 0%, transparent 100%);
}

.home-section--tint + .home-section--tint::before,
.home-section--surface + .home-section--surface::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(960px, calc(100% - 48px));
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(100, 144, 250, 0.22) 50%, transparent 100%);
  z-index: 0;
}

.home-section-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding: 14px 22px;
  border-radius: 100px;
  border: 1px solid rgba(100, 144, 250, 0.28);
  background: rgba(100, 144, 250, 0.08);
  color: #dee8ff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.home-section-btn:hover {
  color: #fff;
  border-color: rgba(100, 144, 250, 0.45);
  background: rgba(100, 144, 250, 0.16);
}

/* ── SEO-текстовый слой ── */

.home-seo-layer__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}

.home-seo-layer__content {
  min-width: 0;
}

.home-seo-layer__visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-seo-layer__svg {
  width: 100%;
  max-width: 400px;
  height: auto;
}

.home-seo-layer__title {
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 700;
  line-height: 1.25;
  color: var(--fs-text, #dee8ff);
  margin: 0 0 20px;
}

.home-seo-layer__lead p,
.home-seo-layer__more p,
.home-seo-layer__outro {
  font-size: 16px;
  line-height: 1.75;
  color: var(--fs-text-muted, #9ba8c4);
  margin: 0 0 16px;
}

.home-seo-layer__subtitle {
  font-size: 18px;
  font-weight: 600;
  color: var(--fs-text, #dee8ff);
  margin: 28px 0 16px;
}

.home-seo-layer__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 20px;
}

.home-seo-layer__chip {
  display: inline-flex;
  align-items: center;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid rgba(100, 144, 250, 0.18);
  background: rgba(22, 22, 36, 0.72);
  color: #c5d4f5;
  font-size: 14px;
  line-height: 1.35;
  text-decoration: none;
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.home-seo-layer__chip:hover {
  color: #fff;
  border-color: rgba(100, 144, 250, 0.38);
  background: rgba(100, 144, 250, 0.12);
  transform: translateY(-1px);
}

.home-seo-layer__chip--static {
  cursor: default;
}

.home-seo-layer__toggle {
  appearance: none;
  cursor: pointer;
  margin-top: 16px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
}

/* ── Кейсы на главной ── */

.home-cases__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 36px;
}

.home-cases__head-text {
  max-width: 720px;
}

.home-cases__title {
  font-size: clamp(28px, 3.2vw, 38px);
  font-weight: 700;
  color: var(--fs-text, #dee8ff);
  margin: 0 0 12px;
}

.home-cases__lead {
  font-size: 16px;
  line-height: 1.65;
  color: var(--fs-text-muted, #9ba8c4);
  margin: 0;
}

.home-cases .fs-pub-grid--cases {
  margin-top: 0;
}

.home-cases .fs-pub-grid.fs-pub-grid--cases .fs-pub-card,
.home-cases .fs-pub-grid.fs-pub-grid--cases .fs-pub-card--featured {
  border: none;
  background: rgba(22, 22, 36, 0.78);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.3);
}

.home-cases .fs-pub-grid.fs-pub-grid--cases .fs-pub-card:hover {
  border: none;
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.38);
  transform: translateY(-3px);
}

.home-cases .fs-pub-grid.fs-pub-grid--cases .fs-pub-card--lead .fs-pub-card__media {
  border-right: none;
}

.home-cases .fs-pub-grid.fs-pub-grid--cases .fs-pub-card--side.fs-pub-card--has-media .fs-pub-card__media--cover,
.home-cases .fs-pub-grid.fs-pub-grid--cases .fs-pub-card--side.fs-pub-card--has-media .fs-pub-card__media--logo {
  border-bottom: none;
}

/* ── Блок доверия ── */

body.home .home-trust {
  padding-bottom: clamp(32px, 4vw, 48px);
}

.home-trust__title {
  font-size: clamp(28px, 3.2vw, 38px);
  font-weight: 700;
  color: var(--fs-text, #dee8ff);
  margin: 0 0 32px;
  max-width: 720px;
}

.home-trust__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.home-trust__card {
  --trust-accent: #6490fa;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 28px 26px 30px;
  border-radius: 20px;
  background:
    linear-gradient(155deg, color-mix(in srgb, var(--trust-accent) 8%, transparent), transparent 42%),
    rgba(22, 22, 36, 0.88);
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.home-trust__card[data-accent="blue"] { --trust-accent: #6490fa; }
.home-trust__card[data-accent="violet"] { --trust-accent: #9b7bff; }
.home-trust__card[data-accent="purple"] { --trust-accent: #b49afe; }
.home-trust__card[data-accent="teal"] { --trust-accent: #5bc4c4; }
.home-trust__card[data-accent="rose"] { --trust-accent: #e87878; }
.home-trust__card[data-accent="lime"] { --trust-accent: #aad584; }

.home-trust__icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  border-radius: 14px;
  color: var(--trust-accent);
  background: color-mix(in srgb, var(--trust-accent) 14%, transparent);
  flex-shrink: 0;
}

.home-trust__icon svg {
  width: 26px;
  height: 26px;
}

.home-trust__card-title {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
  color: #dee8ff;
  margin: 0 0 10px;
}

.home-trust__card-text {
  font-size: 14px;
  line-height: 1.65;
  color: #9ba8c4;
  margin: 0;
}

/* ── Поддержка после других подрядчиков ── */

.home-takeover {
  position: relative;
  padding: 0 0 var(--home-section-pad);
  background: var(--home-bg-surface);
}

.home-takeover::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--home-bridge-h);
  pointer-events: none;
  background: linear-gradient(180deg, transparent 0%, var(--home-bg-tint) 100%);
}

.home-takeover__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px 40px;
  padding: clamp(28px, 4vw, 44px) clamp(24px, 4vw, 48px);
  border-radius: var(--fs-radius, 20px);
  background:
    linear-gradient(135deg, rgba(100, 144, 250, 0.12) 0%, rgba(126, 70, 234, 0.08) 100%),
    rgba(22, 22, 36, 0.92);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.32);
}

.home-takeover__content {
  flex: 1 1 420px;
  max-width: 680px;
}

.home-takeover__title {
  font-family: "Montserrat", sans-serif;
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 700;
  line-height: 1.3;
  color: var(--fs-text, #dee8ff);
  margin: 0 0 14px;
}

.home-takeover__text {
  font-family: "Montserrat", sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--fs-text-muted, #9ba8c4);
  margin: 0;
}

.home-takeover__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.home-takeover__actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  width: auto;
  padding: 11px 20px;
  font-family: "Montserrat", sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.01em;
  border-radius: 9px;
  white-space: nowrap;
}

/* ── FAQ ── */

.home-faq {
  padding-bottom: clamp(48px, 6vw, 64px);
}

.home-faq__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: clamp(28px, 4vw, 48px);
  align-items: start;
}

.home-faq__title {
  font-size: clamp(28px, 3.2vw, 38px);
  font-weight: 700;
  color: var(--fs-text, #dee8ff);
  margin: 0 0 28px;
}

.home-faq__list {
  display: grid;
  gap: 12px;
}

.home-faq__item {
  border-radius: 16px;
  background: rgba(22, 22, 36, 0.88);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.home-faq__item[open] {
  background: rgba(28, 28, 44, 0.95);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.24);
}

.home-faq__q {
  padding: 18px 52px 18px 22px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  color: var(--fs-text, #dee8ff);
  list-style: none;
  position: relative;
  line-height: 1.45;
}

.home-faq__q::-webkit-details-marker {
  display: none;
}

.home-faq__q::after {
  content: "";
  position: absolute;
  right: 22px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--fs-accent, #6490fa);
  border-bottom: 2px solid var(--fs-accent, #6490fa);
  transform: translateY(-60%) rotate(45deg);
  transition: transform 0.28s ease;
}

.home-faq__item[open] .home-faq__q::after {
  transform: translateY(-30%) rotate(-135deg);
}

.home-faq__a {
  padding: 0 22px 20px;
}

.home-faq__a p {
  color: var(--fs-text-muted, #9ba8c4);
  line-height: 1.7;
  margin: 0;
  font-size: 16px;
}

.home-faq__aside-card {
  position: sticky;
  top: 96px;
  padding: 28px 24px 32px;
  border-radius: 20px;
  background:
    linear-gradient(160deg, rgba(100, 144, 250, 0.1), rgba(126, 70, 234, 0.06)),
    rgba(22, 22, 36, 0.92);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.28);
  text-align: center;
}

.home-faq__svg {
  width: 100%;
  max-width: 260px;
  height: auto;
  margin: 0 auto 8px;
  display: block;
}

.home-faq__aside-title {
  font-size: 22px;
  font-weight: 700;
  color: #dee8ff;
  margin: 0 0 10px;
}

.home-faq__aside-text {
  font-size: 15px;
  line-height: 1.65;
  color: #9ba8c4;
  margin: 0 0 22px;
}

.home-faq__aside-card .btn {
  width: 100%;
}

/* ── Технологии (cms-block) ── */

.cms-block--premium {
  position: relative;
  padding-top: clamp(48px, 6vw, 64px);
  padding-bottom: clamp(32px, 4vw, 48px);
}

body.home .cms-block--premium::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: clamp(40px, 5vw, 64px);
  pointer-events: none;
  background: linear-gradient(180deg, transparent 0%, var(--home-bg-base) 100%);
}

body.home .prices-block {
  position: relative;
  padding-top: clamp(48px, 6vw, 64px);
  padding-bottom: clamp(40px, 5vw, 56px);
  background: var(--home-bg-base);
}

body.home .prices-block::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--home-bridge-h);
  pointer-events: none;
  background: linear-gradient(180deg, transparent 0%, var(--home-bg-surface) 100%);
}

body.home .home-seo-layer {
  padding-top: clamp(56px, 6vw, 72px);
}

body.home section.form-block {
  position: relative;
}

body.home section.form-block::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: var(--home-bridge-h);
  pointer-events: none;
  background: linear-gradient(180deg, var(--home-bg-tint) 0%, transparent 100%);
}

.cms-block__title {
  font-family: "Montserrat", sans-serif;
  font-size: clamp(24px, 2.8vw, 32px);
  font-weight: 700;
  color: var(--fs-text, #dee8ff);
  text-align: center;
  margin: 0 0 8px;
}

.cms-block__lead {
  font-family: "Montserrat", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--fs-text-muted, #9ba8c4);
  text-align: center;
  max-width: 560px;
  margin: 0 auto 32px;
}

/* ── Адаптив ── */

@media (max-width: 1024px) {
  .home-seo-layer__layout,
  .home-faq__layout {
    grid-template-columns: 1fr;
  }

  .home-seo-layer__visual {
    order: -1;
    max-width: 360px;
    margin: 0 auto;
  }

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

  .home-faq__aside-card {
    position: static;
  }
}

@media (max-width: 640px) {
  body.home {
    --home-section-pad: 56px;
    --home-bridge-h: 48px;
  }

  .home-cases__head {
    flex-direction: column;
    align-items: flex-start;
  }

  .home-section-btn:not(.home-seo-layer__toggle) {
    width: 100%;
    justify-content: center;
  }

  .home-trust__grid {
    grid-template-columns: 1fr;
  }

  .home-takeover__actions {
    width: auto;
  }

  .home-takeover__actions .btn {
    flex: 0 0 auto;
    width: auto;
  }
}
