/* ============================================================
   Инвест Девелопмент - стили лендинга
   Прототип Ч/Б. Цвет добавляется на этапе финиша.
   ПК-контейнер 1200px, mobile-first.
   ============================================================ */

/* -------- Reset / base -------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; }

/* -------- Tokens (Ч/Б палитра) -------- */
:root {
  --bg:           #f4f3ef;
  --bg-card:     #ffffff;
  --bg-soft:     #ecebe6;
  --ink:         #14181d;
  --ink-soft:    #4a4f57;
  --ink-muted:   #7a7e85;
  --line:        #d9d7d1;
  --line-soft:   #e6e4df;
  --accent-ink:  #0a0c10;
  --accent-ink-hover: #1f242b;

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;

  --shadow-card: 0 1px 0 var(--line-soft), 0 12px 32px -22px rgba(20,24,29,.18);
  --shadow-btn:  0 14px 30px -14px rgba(10,12,16,.55);

  --container: 1200px;
  --gutter: 24px;

  --header-h: 64px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* широкий контейнер для шапки и hero: центрируется, max-width 1480px.
   На viewport ~1840px контент стоит на ~200px от левого края - справа остаётся
   место под фоновую картинку hero. */
.container--wide {
  max-width: 1480px;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(244, 243, 239, 0.86);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.site-header__inner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px 20px;
  min-height: var(--header-h);
  padding-top: 10px;
  padding-bottom: 10px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.brand__mark {
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent-ink);
  color: #fff;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.brand__name { font-size: 16px; }

.site-header__contacts { display: none; }
.header-phone {
  display: inline-flex;
  flex-direction: column;
  text-align: right;
  line-height: 1.15;
}
.header-phone__num {
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.header-phone__hours {
  font-size: 12px;
  color: var(--ink-muted);
  margin-top: 4px;
}

.site-header__messengers {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.msg {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 0;
  transition: transform .15s ease;
}
.msg svg { width: 17px; height: 17px; fill: currentColor; }
.msg__icon { display: block; width: 100%; height: 100%; object-fit: contain; }
.msg:hover { transform: translateY(-1px); }
.msg__label {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0);
  overflow: hidden;
}

@media (min-width: 768px) {
  .site-header__inner {
    grid-template-columns: auto 1fr auto;
    gap: 24px;
  }
  .site-header__contacts { display: flex; justify-content: flex-end; }
  .brand__name { font-size: 17px; }
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  overflow: hidden;
  padding: 28px 0 32px;
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  display: flex;
  align-items: center;
}

/* full-bleed фон hero - картинка справа во всю высоту */
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-color: var(--bg);
  background-image: url('../assets/img/hero.webp');
  background-position: right center;
  background-size: cover;
  background-repeat: no-repeat;
}
/* слой над картинкой: слева blur 4px + 10% off-white поверх; справа всё чисто.
   Видимая зона задаётся mask-image - постепенно исчезает к ~58% ширины. */
.hero__bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(244, 243, 239, 0.10);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  mask-image: linear-gradient(90deg, #000 0%, #000 42%, transparent 58%);
  -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 42%, transparent 58%);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
}

.hero__content {
  width: 100%;
  max-width: 660px;
}

.hero__pill {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-card);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 14px;
}

.hero__title {
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.06;
  letter-spacing: -0.025em;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 14px;
  text-wrap: balance;
}

.hero__sub {
  font-size: clamp(14px, 1.1vw, 16px);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 62ch;
  margin-bottom: 28px;
}

/* ---- буллиты: 3 в ряд, со слотом под cutout-визуал сверху ---- */
.hero__bullets {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 24px;
  max-width: 620px;
}
.bullet {
  position: relative;
  padding: 50px 16px 14px;
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-self: stretch;
  min-width: 0;
}
.bullet__visual {
  position: absolute;
  top: -36px;
  left: 14px;
  width: 76px;
  height: 76px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  filter: drop-shadow(0 6px 14px rgba(20, 24, 29, 0.18));
}
.bullet:nth-child(1) .bullet__visual { background-image: url('../assets/img/b1.webp'); }
.bullet:nth-child(2) .bullet__visual { background-image: url('../assets/img/b2.webp'); }
.bullet:nth-child(3) .bullet__visual { background-image: url('../assets/img/b3.webp'); }
.bullet__title {
  display: block;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.bullet__text {
  font-size: 12.5px;
  color: var(--ink-soft);
  line-height: 1.5;
}

/* ---- CTA ---- */
.hero__cta {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 60px;
  padding: 0 28px;
  border-radius: 16px;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.btn--primary {
  background: var(--accent-ink);
  color: #fff;
  box-shadow: var(--shadow-btn);
  width: 100%;
}
.btn--primary:hover {
  background: var(--accent-ink-hover);
  transform: translateY(-1px);
}
.hero__cta-note {
  font-size: 12.5px;
  color: var(--ink-muted);
  text-align: center;
}

/* -------- Hero - мобайл оверрайды до 767px --------
   Каркас: сверху «сцена» с продуктовой фотографией (~30svh),
   под ней - pill + H1 по центру, подзаголовок и буллиты слева,
   буллиты горизонтальные (иконка | текст), компактная CTA снизу.
   Цель - экран читается без скроллов, кнопка выглядывает на ~15%. */
@media (max-width: 767px) {
  /* ---- HEADER: ужимаем до 56px, чтобы освободить hero ---- */
  .site-header__inner {
    min-height: 56px;
    padding-top: 8px;
    padding-bottom: 8px;
    gap: 8px 12px;
  }
  .brand { gap: 10px; }
  .brand__mark { width: 32px; height: 32px; font-size: 12px; border-radius: 9px; }
  .brand__name { font-size: 15px; }
  .site-header__messengers { gap: 6px; }
  .msg { width: 34px; height: 34px; }
  .msg svg { width: 15px; height: 15px; }

  /* ---- HERO ----
     Архитектура: hero = flex column по контенту (без min-height: 100svh).
     bg — фиксированная высота через clamp: ~35svh с потолком 340px.
          Компактная сцена на больших экранах, нормальная на средних phone.
     inner — flex: 0 0 auto, контент по высоте.
     Под hero сразу идёт следующая секция — никакой зарезервированной пустоты. */
  .hero {
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch; /* перебиваем center из base — без этого пустой bg-div схлопывается в width:0 */
  }

  /* сцена — фиксированная высота через clamp:
     min 200px — не схлопывается на узких экранах,
     35svh — около трети viewport,
     max 340px — не доминирует на больших телефонах. */
  .hero__bg {
    position: relative;
    inset: auto;
    flex: 0 0 auto;
    width: 100%;
    height: clamp(200px, 35svh, 340px);
    background-position: center;
    background-size: cover;
  }
  .hero__bg::before { display: none; }
  .hero__bg::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 56px;
    background: linear-gradient(to bottom, rgba(244,243,239,0) 0%, var(--bg) 100%);
    pointer-events: none;
  }

  .hero__inner {
    flex: 0 0 auto;
    padding: 18px var(--gutter) 22px;
  }
  .hero__content { max-width: 100%; }

  /* pill компактный, по центру.
     Прогрессивный ритм: pill→H1: 12 · H1→sub: 14 · sub→bullets: 18 · bullets→CTA: 22 */
  .hero__pill {
    display: flex;
    width: max-content;
    height: 24px;
    padding: 0 11px;
    font-size: 10.5px;
    margin: 0 auto 12px;
  }

  /* H1 — центр, плотный, балансированные строки */
  .hero__title {
    text-align: center;
    font-size: 20px;
    line-height: 1.06;
    letter-spacing: -0.02em;
    margin-bottom: 14px;
    text-wrap: balance;
  }

  /* подзаголовок — слева, в 1–2 строки */
  .hero__sub {
    text-align: left;
    font-size: 12.5px;
    line-height: 1.4;
    margin-bottom: 18px;
    max-width: 100%;
  }

  /* буллиты — компактные горизонтальные строки */
  .hero__bullets {
    grid-template-columns: 1fr;
    gap: 6px;
    margin-bottom: 22px;
    max-width: 100%;
  }
  .bullet {
    padding: 9px 12px 9px 58px;
    min-height: 54px;
    gap: 2px;
    justify-content: center;
  }
  .bullet__visual {
    top: 50%;
    left: 8px;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    filter: drop-shadow(0 3px 7px rgba(20, 24, 29, 0.12));
  }
  .bullet__title { font-size: 12.5px; line-height: 1.22; }
  .bullet__text { font-size: 11px; line-height: 1.4; }

  /* CTA — крупнее, шире, заметнее */
  .hero__cta { gap: 8px; }
  .btn--primary { min-height: 58px; font-size: 16px; border-radius: 16px; }
  .hero__cta-note { font-size: 11.5px; }

  /* видео-стикер мельче, чтобы меньше перекрывал фото */
  .hero__video {
    top: 10px;
    left: 12px;
    width: clamp(68px, 19vw, 88px);
  }
  .hero__video-play { width: 30px; height: 30px; }
  .hero__video-play svg { width: 11px; height: 11px; }
}

/* -------- Hero - десктоп >= 768 -------- */
@media (min-width: 768px) {
  .hero { padding: 32px 0 40px; }
  .hero__content { max-width: 740px; }
  .hero__pill { margin-bottom: 16px; }
  .hero__title { margin-bottom: 16px; font-size: clamp(34px, 3.4vw, 46px); }
  .hero__sub { margin-bottom: 26px; max-width: 64ch; }
  .hero__bullets {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: 1fr;
    align-items: stretch;
    gap: 14px;
    margin-bottom: 28px;
    max-width: 560px;
  }
  .bullet { padding: 46px 14px 12px; }
  .bullet__visual { width: 64px; height: 64px; top: -30px; left: 12px; border-radius: 16px; }
  .bullet__title { font-size: 13px; }
  .bullet__text { font-size: 11.5px; }
  .hero__cta {
    max-width: 560px;
  }
  .btn--primary { font-size: 18px; min-height: 76px; }
}

/* -------- Hero - 1024+ -------- */
@media (min-width: 1024px) {
  .hero { padding: 40px 0 48px; }
  .hero__content { max-width: 780px; }
  .hero__title { font-size: clamp(38px, 3vw, 48px); }
  .hero__sub { font-size: 16px; max-width: 62ch; }
  .hero__bullets { gap: 16px; max-width: 600px; }
  .bullet { padding: 50px 16px 14px; }
  .bullet__visual { width: 68px; height: 68px; top: -32px; left: 14px; }
  .bullet__title { font-size: 13.5px; }
  .bullet__text { font-size: 12px; }
  .hero__cta { max-width: 600px; }
}

/* -------- Hero - широкие экраны 1280+ -------- */
@media (min-width: 1280px) {
  .hero__content { max-width: 820px; }
  .hero__title { font-size: clamp(42px, 2.9vw, 52px); }
  .hero__bullets { max-width: 640px; }
  .hero__cta { max-width: 640px; }
}

/* ============================================================
   Общие элементы секций
   ============================================================ */
.section-pill {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-card);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ============================================================
   Section · Кейсы
   ============================================================ */
.cases {
  padding: 64px 0 72px;
  background: var(--bg);
}

.cases__head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  max-width: 720px;
  margin-bottom: 32px;
}
.cases__title {
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 800;
  color: var(--ink);
}
.cases__sub {
  font-size: clamp(14px, 1.1vw, 17px);
  line-height: 1.55;
  color: var(--ink-soft);
}

/* ---- slider ---- */
.cases__slider {
  position: relative;
}
.cases__viewport {
  overflow: hidden;
  /* добавляем небольшой gutter справа для тени последней карточки */
  margin-right: -16px;
  padding-right: 16px;
}
.cases__track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 8px 4px 24px;
  margin: -8px -4px 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.cases__track::-webkit-scrollbar { display: none; }

/* ---- card ---- */
.case-card {
  flex: 0 0 auto;
  width: 240px;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  box-shadow: var(--shadow-card);
  scroll-snap-align: start;
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}
.case-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 1px 0 var(--line-soft), 0 20px 38px -22px rgba(20,24,29,.22);
}

.case-card[data-case-open] { cursor: pointer; }
.case-card[data-case-open]:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.case-card__cover {
  position: relative;
  aspect-ratio: 3 / 4;
  background-color: #1a1d22;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.case-card__cover--placeholder {
  background-image: linear-gradient(135deg, #e8e7e2 0%, #d9d7d1 100%);
  background-color: var(--bg-soft);
  display: grid;
  place-items: center;
}
.case-card__cover--placeholder::after {
  content: 'Фото скоро';
  color: var(--ink-muted);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 600;
}
.case-card__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 10px;
  background: rgba(20, 24, 29, 0.88);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: 999px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.case-card__body {
  padding: 14px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.case-card__metric {
  font-weight: 800;
  font-size: 15px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.case-card__sub {
  font-size: 12px;
  color: var(--ink-muted);
  line-height: 1.4;
}
.case-card__more {
  margin-top: auto;
  padding-top: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.005em;
  border-top: 1px solid var(--line-soft);
}
.case-card__more:hover { color: var(--accent-ink); }

/* ---- Видео-виджет в hero. Чистый стикер 9:16 без текста и обводки.
       Mobile: левый верхний угол hero, поверх фоновой картинки.
       ≥1024px: правый верхний угол hero. ---- */
.hero__video {
  position: absolute;
  top: clamp(12px, 2vw, 24px);
  left: 16px;
  z-index: 2;
  width: clamp(80px, 22vw, 110px);
  margin: 0;
}
.hero__video-card {
  display: block;
  padding: 0;
  margin: 0;
  background: none;
  border: 0;
  cursor: pointer;
  width: 100%;
  font: inherit;
  color: inherit;
}
.hero__video-cover {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  background: #14181d;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 14px 28px -14px rgba(20, 24, 29, 0.55);
  transition: transform .2s ease, box-shadow .2s ease;
}
.hero__video-card:hover .hero__video-cover,
.hero__video-card:focus-visible .hero__video-cover {
  transform: translateY(-2px);
  box-shadow: 0 20px 36px -16px rgba(20, 24, 29, 0.65);
}
.hero__video-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}
.hero__video-play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform .2s ease, background .2s ease;
}
.hero__video-play svg { width: 14px; height: 14px; margin-left: 2px; fill: currentColor; }
.hero__video-card:hover .hero__video-play {
  background: rgba(255, 255, 255, 0.32);
  transform: translate(-50%, -50%) scale(1.06);
}

@media (min-width: 1024px) {
  .hero__video {
    top: 28px;
    right: clamp(24px, 3vw, 56px);
    left: auto;
    width: 156px;
  }
  .hero__video-cover { border-radius: 16px; box-shadow: 0 18px 40px -18px rgba(20, 24, 29, 0.5); }
  .hero__video-play { width: 48px; height: 48px; }
  .hero__video-play svg { width: 18px; height: 18px; }
}

@media (min-width: 1280px) {
  .hero__video {
    top: 36px;
    right: clamp(40px, 4vw, 80px);
    width: 172px;
  }
  .hero__video-play { width: 52px; height: 52px; }
  .hero__video-play svg { width: 20px; height: 20px; }
}

/* ---- slider nav ---- */
.cases__nav {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  justify-content: flex-end;
}
.slider-btn {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-card);
  color: var(--ink);
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease, background .15s ease, transform .15s ease;
}
.slider-btn svg { width: 18px; height: 18px; }
.slider-btn:hover {
  border-color: var(--ink);
}
.slider-btn:active { transform: scale(.96); }
.slider-btn[disabled] {
  opacity: .35;
  cursor: not-allowed;
  pointer-events: none;
}

/* ---- breakpoints ---- */
@media (min-width: 768px) {
  .cases { padding: 80px 0 88px; }
  .case-card { width: 260px; }
  .cases__track { gap: 18px; }
}
@media (min-width: 1024px) {
  .cases { padding: 96px 0 104px; }
  .case-card { width: 280px; border-radius: 20px; }
  .case-card__metric { font-size: 16px; }
  .case-card__sub { font-size: 12.5px; }
  .case-card__body { padding: 16px 16px 18px; }
  .cases__track { gap: 20px; }
  .slider-btn { width: 48px; height: 48px; }
}
@media (min-width: 1280px) {
  .case-card { width: 296px; }
}

/* ============================================================
   Section · Как мы работаем (process) - dark journal layout
   ============================================================ */
.process {
  position: relative;
  padding: 72px 0 80px;
  background: var(--ink);
  color: #f6f5f0;
  overflow: hidden;
}
/* мягкое радиальное свечение в правом верхнем углу для глубины */
.process::before {
  content: "";
  position: absolute;
  top: -120px;
  right: -100px;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle at center, rgba(216, 188, 130, 0.16) 0%, transparent 65%);
  pointer-events: none;
}

.process__head {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  max-width: 760px;
  margin-bottom: 48px;
}
.process .section-pill {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: rgba(246, 245, 240, 0.78);
}
.process__title {
  font-size: clamp(30px, 3.6vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 800;
  color: #f6f5f0;
  text-wrap: balance;
}
.process__sub {
  font-size: clamp(14px, 1.15vw, 17px);
  line-height: 1.55;
  color: rgba(246, 245, 240, 0.65);
  max-width: 60ch;
}

.process__steps {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin: 0 0 48px;
  padding: 0;
  list-style: none;
}

/* «полосы» - каждый шаг отделён вертикальным/горизонтальным сепаратором */
/* шаг = вертикальный стек: visual → cifra → title → text.
   Через flex-order не зависим от порядка в HTML. */
.step {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* слот под cutout-картинку - сверху шага, не перекрывает цифру */
.step__visual {
  order: 1;
  width: 80px;
  height: 80px;
  background-repeat: no-repeat;
  background-position: left center;
  background-size: contain;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.5));
  transition: transform .25s ease;
}
.step:hover .step__visual { transform: translateY(-2px) scale(1.04); }
/* семантическая привязка: каждой картинке свой шаг по смыслу */
.step:nth-child(1) .step__visual { background-image: url('../assets/img/11.webp'); }
.step:nth-child(2) .step__visual { background-image: url('../assets/img/55.webp'); }
.step:nth-child(3) .step__visual { background-image: url('../assets/img/44.webp'); }
.step:nth-child(4) .step__visual { background-image: url('../assets/img/33.webp'); }
.step:nth-child(5) .step__visual { background-image: url('../assets/img/22.webp'); }

.step__num {
  order: 2;
  font-size: 56px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.05em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(246, 245, 240, 0.28);
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  transition: -webkit-text-stroke-color .25s ease, color .25s ease;
}
.step:hover .step__num,
.step:focus-within .step__num {
  color: rgba(246, 245, 240, 0.95);
  -webkit-text-stroke-color: transparent;
}

.step__title {
  order: 3;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #f6f5f0;
  margin: 4px 0 0;
}
.step__text {
  order: 4;
  font-size: 13.5px;
  color: rgba(246, 245, 240, 0.62);
  line-height: 1.55;
  margin: 0;
}

/* финальная CTA - инверсия (светлая на тёмном) */
.process__cta {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
}
.process__btn {
  width: 100%;
  max-width: 420px;
  min-height: 64px;
  font-size: 17px;
  background: #f6f5f0;
  color: var(--ink);
  box-shadow: 0 16px 36px -18px rgba(0, 0, 0, .6);
}
.process__btn:hover {
  background: #ffffff;
  color: var(--ink);
}
.process__cta-note {
  font-size: 13px;
  color: rgba(246, 245, 240, 0.55);
}

/* ---- breakpoints ---- */
@media (min-width: 768px) {
  .process { padding: 96px 0 104px; }
  .process__head { margin-bottom: 64px; }
  .process__steps {
    grid-template-columns: repeat(5, 1fr);
    gap: 0;
  }
  .step {
    padding: 0 22px;
    border-right: 1px solid rgba(246, 245, 240, 0.08);
    gap: 16px;
  }
  .step:first-child { padding-left: 0; }
  .step:last-child { padding-right: 0; border-right: 0; }
  .step__visual { width: 88px; height: 88px; border-radius: 18px; }
  .step__num { font-size: 64px; }
  .process__btn { max-width: 460px; min-height: 68px; font-size: 18px; }
}

@media (min-width: 1024px) {
  .process { padding: 120px 0 128px; }
  .process__head { margin-bottom: 80px; }
  .step { padding: 0 26px; gap: 18px; }
  .step__visual { width: 96px; height: 96px; border-radius: 20px; }
  .step__num { font-size: 76px; }
  .step__title { font-size: 18px; }
  .step__text { font-size: 14px; }
  .process__btn { max-width: 480px; min-height: 72px; }
}

@media (min-width: 1280px) {
  .step { padding: 0 32px; }
  .step__visual { width: 108px; height: 108px; }
  .step__num { font-size: 88px; }
}

/* ============================================================
   Section · Не только новостройки (services)
   Командное фото на фоне + 7% off-white tint + плавный fade сверху/снизу.
   Сетка 3×2 карточек поверх. Идёт после тёмного process.
   ============================================================ */
.services {
  padding: 64px 0 72px;
  background: var(--bg);
}

.services__head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  max-width: 760px;
  margin-bottom: 36px;
}
.services__title {
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 800;
  color: var(--ink);
  text-wrap: balance;
}
.services__sub {
  font-size: clamp(14px, 1.1vw, 17px);
  line-height: 1.55;
  color: var(--ink-soft);
}

/* ---- grid ---- */
.services__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 0 0 32px;
}

/* ---- card · liquid glass ---- */
.service-card {
  position: relative;
  padding: 22px 20px 20px;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: var(--radius-md);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.5) inset,
    0 18px 44px -22px rgba(20, 24, 29, 0.35);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}
.service-card:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.55);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.6) inset,
    0 24px 52px -22px rgba(20, 24, 29, 0.45);
}

.service-card__index {
  position: absolute;
  top: 16px;
  right: 18px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.service-card__index span {
  color: var(--ink-muted);
  font-weight: 600;
}

.service-card__icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.service-card__icon svg { width: 22px; height: 22px; }

.service-card__title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-top: 2px;
}
.service-card__text {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-soft);
  flex: 1;
}
.service-card__cta {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.5);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.005em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color .15s ease, gap .15s ease;
}
.service-card__cta:hover {
  color: var(--accent-ink);
  gap: 10px;
}

/* ---- extras (доп.услуги строкой) ---- */
.services__extras {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px 0 4px;
  border-top: 1px solid var(--line-soft);
}
.services__extras-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--ink);
}
.services__extras-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  color: var(--ink-soft);
  letter-spacing: -0.005em;
}
.chip::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--ink);
}

.services__note {
  margin-top: 20px;
  font-size: 13.5px;
  color: var(--ink-muted);
  line-height: 1.55;
}
.services__note-link {
  font-weight: 700;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  transition: border-color .15s ease;
}
.services__note-link:hover { border-color: var(--ink); }

/* ---- breakpoints ---- */
@media (min-width: 640px) {
  .services__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
}
@media (min-width: 768px) {
  .services { padding: 80px 0 88px; }
  .services__head { margin-bottom: 48px; }
  .service-card { padding: 24px 22px 22px; gap: 12px; }
  .service-card__title { font-size: 18px; }
  .service-card__text { font-size: 14px; }
  .services__extras { padding-top: 24px; }
}
@media (min-width: 1024px) {
  .services { padding: 96px 0 104px; }
  .services__head { margin-bottom: 56px; }
  .services__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 40px;
  }
  .service-card { padding: 28px 24px 24px; gap: 14px; min-height: 280px; }
  .service-card__icon { width: 48px; height: 48px; }
  .service-card__icon svg { width: 24px; height: 24px; }
  .service-card__title { font-size: 19px; }
  .service-card__text { font-size: 14px; }
  .service-card__cta { font-size: 13.5px; padding-top: 14px; }
  .services__extras { padding-top: 28px; flex-direction: row; align-items: center; gap: 16px; flex-wrap: wrap; }
  .services__extras-list { flex: 1; }
}
@media (min-width: 1280px) {
  .service-card { padding: 30px 26px 26px; }
}

/* ============================================================
   Мобайл: process + services → два разных слайдера
   process - immersive (1 шаг на экран, mandatory snap по центру)
   services - quick-scan (1.4 карточки в кадре, proximity snap к началу)
   ============================================================ */
@media (max-width: 767px) {

  /* ---- PROCESS · immersive slider ---- */
  .process { padding: 56px 0 64px; }
  .process__head { margin-bottom: 24px; gap: 10px; }
  .process__title { font-size: 26px; line-height: 1.1; }
  .process__sub { font-size: 13.5px; line-height: 1.55; }

  .process__steps {
    display: flex;
    flex-wrap: nowrap;
    grid-template-columns: none;
    gap: 14px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 4px 24px 24px;
    margin: 0 calc(-1 * var(--gutter)) 24px;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .process__steps::-webkit-scrollbar { display: none; }

  .step {
    flex: 0 0 84%;
    min-width: 0;
    scroll-snap-align: center;
    padding: 22px 20px 24px;
    gap: 12px;
    background: rgba(246, 245, 240, 0.035);
    border: 1px solid rgba(246, 245, 240, 0.10);
    border-radius: 20px;
  }
  .step__visual { width: 72px; height: 72px; border-radius: 16px; }
  .step__num { font-size: 56px; }
  .step__title { font-size: 16px; }
  .step__text { font-size: 13px; line-height: 1.5; }

  .process__cta { margin-top: 8px; gap: 8px; }
  .process__btn { min-height: 56px; font-size: 16px; max-width: 100%; }
  .process__cta-note { font-size: 12px; }

  /* ---- SERVICES · quick-scan peek slider ---- */
  .services { padding: 56px 0 36px; }
  .services__head { margin-bottom: 22px; gap: 10px; }
  .services__title { font-size: 26px; line-height: 1.1; }
  .services__sub { font-size: 13.5px; line-height: 1.55; }

  .services__grid {
    display: flex;
    flex-wrap: nowrap;
    grid-template-columns: none;
    gap: 12px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scroll-behavior: smooth;
    padding: 4px 24px 20px;
    margin: 0 calc(-1 * var(--gutter)) 20px;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .services__grid::-webkit-scrollbar { display: none; }

  .service-card {
    flex: 0 0 72%;
    min-width: 0;
    scroll-snap-align: start;
    padding: 20px 18px 18px;
    gap: 10px;
    min-height: 240px;
  }
  .service-card__index { top: 14px; right: 14px; font-size: 11.5px; }
  .service-card__icon { width: 40px; height: 40px; border-radius: 10px; }
  .service-card__icon svg { width: 20px; height: 20px; }
  .service-card__title { font-size: 15.5px; }
  .service-card__text { font-size: 13px; line-height: 1.5; }
  .service-card__cta { font-size: 12.5px; padding-top: 10px; }

  /* extras / note компактнее */
  .services__extras { padding-top: 16px; gap: 12px; }
  .services__extras-label { font-size: 12.5px; }

  /* extras-list - двухрядный peek-слайдер: 2 строки чипов, листаем вправо.
     Note ниже остаётся статичным блоком. */
  .services__extras-list {
    display: grid;
    grid-auto-flow: column;
    grid-template-rows: repeat(2, auto);
    grid-auto-columns: max-content;
    gap: 8px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scroll-behavior: smooth;
    padding: 2px 24px 4px;
    margin: 0 calc(-1 * var(--gutter));
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .services__extras-list::-webkit-scrollbar { display: none; }
  .chip { font-size: 12.5px; padding: 7px 12px; white-space: nowrap; scroll-snap-align: start; }
  .services__note { margin-top: 4px; font-size: 13px; }
}

/* ============================================================
   Section · Проверьте нас (proof)
   Мини-блок соц-пруфа: прямой номер + мессенджеры + 4 площадки.
   Идёт между services и quiz, сохраняет белый фон services.
   ============================================================ */
.proof {
  padding: 56px 0 72px;
  background: var(--bg);
  border-top: 1px solid var(--line-soft);
}
.proof__head {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
  max-width: 720px;
}
.proof__title {
  margin: 0;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.proof__sub {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-muted);
}

.proof__grid {
  display: block;
}

/* ---- places: 4 карточки - editorial layout (kicker сверху, имя крупно снизу) ---- */
.proof__places {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.place {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto 1fr;
  column-gap: 14px;
  row-gap: 6px;
  padding: 16px 18px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 14px;
  height: 100%;
  text-decoration: none;
  transition: border-color .18s ease, background .18s ease, transform .15s ease;
}
.place:hover {
  border-color: var(--ink);
  background: var(--bg);
  transform: translateY(-1px);
}
.place__tag {
  grid-column: 1;
  grid-row: 1;
  align-self: start;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.place__name {
  grid-column: 1;
  grid-row: 2;
  align-self: end;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--ink);
}
.place__arrow {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--ink-muted);
  transition: color .18s ease, background .18s ease, transform .18s ease;
}
.place__arrow svg { width: 16px; height: 16px; display: block; }
.place:hover .place__arrow {
  color: var(--ink);
  background: var(--bg-soft);
  transform: translateX(2px);
}

/* ---- breakpoints ---- */
@media (min-width: 600px) {
  .proof__places { grid-template-columns: 1fr 1fr; gap: 10px; }
}
@media (min-width: 768px) {
  .proof { padding: 72px 0 88px; }
  .proof__head { margin-bottom: 40px; gap: 14px; }
  .proof__title { font-size: 34px; }
  .proof__sub { font-size: 15.5px; }
  .place { padding: 18px 20px; }
  .place__name { font-size: 19px; }
}
@media (min-width: 1024px) {
  .proof { padding: 88px 0 104px; }
  .proof__head { margin-bottom: 48px; }
  .proof__title { font-size: 38px; }
  .proof__places { grid-template-columns: repeat(4, 1fr); gap: 12px; }
  .place { padding: 22px 24px; }
  .place__name { font-size: 20px; }
}
@media (min-width: 1280px) {
  .proof__places { gap: 16px; }
  .proof__title { font-size: 42px; }
  .place__name { font-size: 21px; }
}

/* ---- мобайл: компактнее ---- */
@media (max-width: 767px) {
  .proof { padding: 40px 0 48px; }
  .proof__head { margin-bottom: 24px; gap: 10px; }
  .proof__title { font-size: 22px; line-height: 1.15; }
  .proof__sub { font-size: 13.5px; }
  .place { padding: 14px 16px; column-gap: 12px; row-gap: 4px; border-radius: 12px; }
  .place__tag { font-size: 10px; letter-spacing: 0.08em; }
  .place__name { font-size: 16px; }
  .place__arrow { width: 28px; height: 28px; }
  .place__arrow svg { width: 14px; height: 14px; }
}

/* ============================================================
   Section · Квиз + финал
   Единая карточка: эксперт (статика) + флоу 5 шагов + финал.
   Шаги фиксированной min-height - нет layout-shift при кликах.
   ============================================================ */
.quiz {
  position: relative;
  padding: 56px 0 72px;
  background: var(--bg-soft);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

/* honeypot - за пределами экрана, не display:none */
.hp {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.quiz__head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  max-width: 760px;
  margin-bottom: 28px;
}
.quiz__title {
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 800;
  color: var(--ink);
  text-wrap: balance;
}
.quiz__sub {
  font-size: clamp(14px, 1.1vw, 17px);
  line-height: 1.55;
  color: var(--ink-soft);
}

/* ---- Карточка квиза (единый блок) ---- */
.quiz-card {
  display: grid;
  grid-template-columns: 1fr;
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

/* ---- Эксперт ---- */
.quiz-expert {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 10px;
  padding: 8px 12px;
  background: var(--bg);
  border-bottom: 1px solid var(--line-soft);
}
.quiz-expert__avatar {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--bg-soft);
  position: relative;
  box-shadow:
    inset 0 0 0 1px rgba(20, 24, 29, 0.06),
    0 6px 14px -8px rgba(20, 24, 29, 0.35);
}
.quiz-expert__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  display: block;
}
.quiz-expert__initials { display: none; }
.quiz-expert__heading { flex: 1; min-width: 0; }
.quiz-expert__name {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.005em;
  color: var(--ink);
  line-height: 1.2;
}
.quiz-expert__role {
  font-size: 10.5px;
  color: var(--ink-muted);
  line-height: 1.3;
  margin-top: 1px;
}
.quiz-expert__quote,
.quiz-expert__facts { display: none; }

/* ---- Флоу ---- */
.quiz-flow {
  display: flex;
  flex-direction: column;
  padding: 12px 14px 16px;
  gap: 12px;
}

.quiz-flow__progress {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.quiz-flow__progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 11px;
  letter-spacing: 0.01em;
}
.quiz-flow__progress-step { font-weight: 600; color: var(--ink); }
.quiz-flow__progress-pct  { font-variant-numeric: tabular-nums; color: var(--ink-muted); }
.quiz-flow__progress-track {
  position: relative;
  height: 3px;
  background: var(--line-soft);
  border-radius: 999px;
  overflow: hidden;
}
.quiz-flow__progress-fill {
  height: 100%;
  width: 20%;
  background: var(--accent-ink);
  border-radius: 999px;
  transition: width .3s ease;
}

/* ---- Шаги: фиксированная min-height чтобы не прыгало ---- */
.quiz-flow__viewport {
  position: relative;
}
.step-q { display: none; }
.step-q[data-active] {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: auto;
}
.step-q__title {
  font-size: 17px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.step-q__hint {
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.45;
}
.step-q__options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.step-q__option {
  appearance: none;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 6px;
  min-height: 48px;
  min-width: 0;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.005em;
  text-align: center;
  line-height: 1.2;
  word-break: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.step-q__option::after {
  content: "→";
  color: var(--ink-muted);
  font-weight: 700;
  transition: color .15s ease, transform .15s ease;
  display: none;
}
.step-q__option:hover {
  border-color: var(--accent-ink);
  background: var(--accent-ink);
  color: #fff;
}
.step-q__option:hover::after { color: #fff; transform: translateX(2px); }
.step-q__option[data-selected] {
  background: var(--accent-ink);
  border-color: var(--accent-ink);
  color: #fff;
}
.step-q__option[data-selected]::after { color: #fff; }

/* ---- Финал ---- */
.step-q--final[data-active] {
  min-height: auto;
  gap: 12px;
}

.final-summary {
  padding: 8px 10px;
  background: var(--bg);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
}
.final-summary__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}
.final-summary__label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.final-summary__edit {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--ink-muted);
  text-underline-offset: 3px;
  cursor: pointer;
  transition: text-decoration-color .15s ease;
}
.final-summary__edit:hover { text-decoration-color: var(--ink); }
.final-summary__list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.summary-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 8px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 10.5px;
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1.35;
}
.summary-chip__label {
  color: var(--ink-muted);
  font-weight: 500;
}
@media (min-width: 640px) {
  .summary-chip { padding: 5px 10px; font-size: 12px; gap: 6px; }
  .final-summary { padding: 12px 14px; border-radius: 12px; }
  .final-summary__label { font-size: 11px; }
  .final-summary__edit { font-size: 12px; }
  .final-summary__list { gap: 6px; }
}

/* ---- Форма внутри финала (без своей рамки - она внутри карточки) ---- */
.quiz-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 0;
  border: 0;
}
.field__label {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink-muted);
  text-transform: uppercase;
}
.field--messenger .field__label { text-transform: none; color: var(--ink); }
.field__input {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  letter-spacing: -0.005em;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.field__input::placeholder { color: var(--ink-muted); }
.field__input:hover { border-color: var(--ink-muted); }
.field__input:focus {
  outline: none;
  border-color: var(--ink);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px rgba(20, 24, 29, 0.08);
}
.field__hint {
  font-size: 12px;
  line-height: 1.45;
  color: var(--ink-muted);
}

.field--messenger {
  gap: 8px;
  padding: 10px 12px 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.field--messenger .field__label {
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.field__choices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.choice { position: relative; cursor: pointer; }
.choice__input {
  position: absolute;
  opacity: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.choice__box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 8px;
  min-height: 44px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.005em;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.choice__icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  transition: color .15s ease;
}
.choice__icon svg { width: 20px; height: 20px; }
.choice__icon img { display: block; width: 22px; height: 22px; object-fit: contain; }
.choice:hover .choice__box { border-color: var(--ink-muted); }
.choice__input:focus-visible + .choice__box {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(20, 24, 29, 0.08);
}
.choice__input:checked + .choice__box {
  background: var(--accent-ink);
  border-color: var(--accent-ink);
  color: #fff;
}
.choice__input:checked + .choice__box .choice__icon { color: #fff; }

.consent {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
}
.consent__row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}
.consent__input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: -1px;
  pointer-events: none;
}
.consent__box {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  border: 1.5px solid var(--line);
  border-radius: 6px;
  background: var(--bg-card);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.consent__box svg { width: 13px; height: 13px; }
.consent__row:hover .consent__box { border-color: var(--ink-muted); }
.consent__input:focus-visible + .consent__box {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(20, 24, 29, 0.08);
}
.consent__input:checked + .consent__box {
  background: var(--accent-ink);
  border-color: var(--accent-ink);
  color: #fff;
}
.consent__text {
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--ink-soft);
}
.consent__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  padding-left: 32px;
  margin: 0;
  font-size: 12px;
  color: var(--ink-muted);
}
.consent__link {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--ink-muted);
  text-underline-offset: 3px;
  cursor: pointer;
  letter-spacing: -0.005em;
  transition: text-decoration-color .15s ease, color .15s ease;
}
.consent__link:hover { text-decoration-color: var(--ink); color: var(--ink); }

.quiz-form__submit { width: 100%; margin-top: 4px; }
.quiz-form__note {
  font-size: 12.5px;
  color: var(--ink-muted);
  text-align: center;
  line-height: 1.5;
}

/* ---- Nav: Назад ---- */
.quiz-flow__nav {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
}
.quiz-flow__back {
  appearance: none;
  background: none;
  border: 0;
  padding: 4px 8px 4px 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-muted);
  cursor: pointer;
  transition: color .15s ease;
}
.quiz-flow__back svg { width: 14px; height: 14px; }
.quiz-flow__back:hover { color: var(--ink); }
.quiz-flow__back:disabled { opacity: 0.35; cursor: not-allowed; }

/* ---- Breakpoints ---- */
@media (min-width: 640px) {
  .step-q__options {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .step-q__options--districts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .step-q[data-active] { min-height: 400px; gap: 14px; }
  .step-q__title { font-size: 20px; }
  .step-q__hint { font-size: 13px; }
  .step-q__option {
    border-radius: 12px;
    padding: 14px 16px;
    min-height: 54px;
    font-size: 14.5px;
    text-align: left;
    justify-content: space-between;
    gap: 12px;
  }
  .step-q__option::after { display: inline; }
  .step-q__options--districts .step-q__option {
    text-align: center;
    justify-content: center;
  }
  .step-q__options--districts .step-q__option::after { display: none; }
}

@media (min-width: 768px) {
  .quiz { padding: 80px 0 96px; }
  .quiz__head { margin-bottom: 36px; }
  .quiz-flow { padding: 22px 22px 22px; gap: 18px; }
  .step-q__title { font-size: 22px; }
  .step-q__hint { font-size: 14px; }
  .step-q__option { font-size: 15px; min-height: 58px; padding: 16px 18px; }
  .quiz-form { gap: 16px; }
  .field { gap: 8px; }
  .field__label {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--ink);
    text-transform: none;
  }
  .field-row { grid-template-columns: 1fr 1fr; gap: 14px; }
  .field__input { font-size: 16px; min-height: 56px; padding: 14px 16px; border-radius: 12px; }
  .field--messenger { padding: 14px 16px; }
  .field--messenger .field__label { font-size: 16px; }
  .choice__box { min-height: 56px; font-size: 14.5px; padding: 12px 14px; gap: 10px; border-radius: 12px; }
  .consent { padding: 14px 14px 12px; border-radius: 12px; }
  .consent__row { gap: 12px; }
  .consent__text { font-size: 12.5px; line-height: 1.5; }
}

@media (min-width: 1024px) {
  .quiz { padding: 96px 0 112px; }
  .quiz__head { margin-bottom: 44px; }
  .quiz-card { grid-template-columns: 320px 1fr; }

  .quiz-expert {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "avatar heading"
      "quote  quote"
      "facts  facts";
    column-gap: 16px;
    row-gap: 22px;
    align-items: center;
    align-content: start;
    padding: 32px 28px;
    border-bottom: 0;
    border-right: 1px solid var(--line-soft);
  }
  .quiz-expert__avatar {
    grid-area: avatar;
    width: 76px;
    height: 76px;
    align-self: center;
    box-shadow:
      inset 0 0 0 1px rgba(20, 24, 29, 0.06),
      0 18px 36px -18px rgba(20, 24, 29, 0.45);
  }
  .quiz-expert__heading {
    grid-area: heading;
    flex: 0 0 auto;
    min-width: 0;
  }
  .quiz-expert__name { font-size: 17px; }
  .quiz-expert__role { font-size: 12.5px; margin-top: 4px; line-height: 1.5; }

  .quiz-expert__quote {
    grid-area: quote;
    display: block;
    position: relative;
    margin: 0;
    padding: 22px 0 0;
    border-top: 1px solid var(--line-soft);
    font-size: 14px;
    line-height: 1.55;
    color: var(--ink-soft);
    font-style: normal;
  }
  .quiz-expert__quote::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 0;
    width: 28px;
    height: 2px;
    background: var(--ink);
  }

  .quiz-expert__facts {
    grid-area: facts;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 22px;
    border-top: 1px solid var(--line-soft);
  }
  .quiz-expert__facts li {
    display: flex;
    align-items: baseline;
    gap: 12px;
  }
  .expert-fact__num {
    flex: 0 0 auto;
    min-width: 56px;
    font-weight: 800;
    font-size: 15px;
    color: var(--ink);
    letter-spacing: -0.01em;
    font-variant-numeric: tabular-nums;
  }
  .expert-fact__label {
    font-size: 12.5px;
    color: var(--ink-muted);
    line-height: 1.5;
  }

  .quiz-flow { padding: 28px 32px 28px; gap: 22px; }
  .step-q[data-active] { min-height: 440px; gap: 18px; }
  .step-q__title { font-size: 24px; }
  .step-q__hint { font-size: 14.5px; max-width: 60ch; }
  .step-q__option { font-size: 15px; min-height: 60px; }
  .field__input { min-height: 60px; padding: 16px 18px; }
  .choice__box { min-height: 60px; font-size: 15px; padding: 14px 16px; }
  .quiz-form__submit { min-height: 68px; font-size: 18px; }
}

@media (min-width: 1280px) {
  .quiz-card { grid-template-columns: 340px 1fr; }
  .quiz-flow { padding: 32px 36px 32px; }
}

/* ============================================================
   Quiz modal - открывается по клику на любой CTA с href="#quiz".
   Клонирует .quiz-card из секции и показывает поверх.
   ============================================================ */
.quiz-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.quiz-modal[data-open] {
  display: flex;
  flex-direction: column;
  animation: quizModalFade .2s ease both;
}
.quiz-modal[data-open] .quiz-modal__dialog { margin: auto; }
.quiz-modal[data-final][data-open] .quiz-modal__dialog { margin: 16px auto; }
@keyframes quizModalFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.quiz-modal__overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 24, 29, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: pointer;
}

.quiz-modal__dialog {
  position: relative;
  z-index: 1;
  width: calc(100% - 24px);
  max-width: 1120px;
  margin: 16px auto;
  background: var(--bg);
  border-radius: 22px;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  animation: quizModalRise .25s ease both;
}
@keyframes quizModalRise {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.quiz-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-card);
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: border-color .15s ease, transform .15s ease;
}
.quiz-modal__close:hover {
  border-color: var(--ink);
  transform: scale(1.06);
}
.quiz-modal__close svg { width: 18px; height: 18px; }

.quiz-modal__content {
  padding: 20px 16px 24px;
}
.quiz-modal__content .quiz-card {
  margin: 0;
}

body.is-quiz-modal-open { overflow: hidden; }

@media (min-width: 768px) {
  .quiz-modal__dialog { margin: 32px auto; }
  .quiz-modal__content { padding: 28px 28px 32px; }
  .quiz-modal__close { top: 18px; right: 18px; width: 44px; height: 44px; }
}
@media (min-width: 1024px) {
  .quiz-modal__dialog { margin: 48px auto; }
  .quiz-modal__content { padding: 36px 40px 40px; }
}

/* ============================================================
   Case modal - карусель кейса
   Полноэкранный лайтбокс с тёмным бэкдропом. Закрывается по X,
   по бэкдропу, по Escape и свайпу вниз. body получает is-case-modal-open
   чтобы заблокировать прокрутку страницы под модалкой.
   ============================================================ */
.case-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: stretch;
  justify-content: center;
}
.case-modal[data-open] { display: flex; }
.case-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 12, 16, 0.92);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  cursor: zoom-out;
}
.case-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 760px);
  margin: auto;
  padding: 56px 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-sizing: border-box;
}
.case-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  border-radius: 999px;
  cursor: pointer;
  z-index: 3;
  transition: background .15s ease, transform .15s ease;
}
.case-modal__close:hover { background: rgba(255,255,255,0.22); transform: scale(1.05); }
.case-modal__close svg { width: 22px; height: 22px; }

.case-modal__viewport {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: #0a0c10;
  touch-action: pan-y;
  user-select: none;
}
.case-modal__track {
  display: flex;
  width: 100%;
  transition: transform .28s cubic-bezier(.4, .0, .2, 1);
  will-change: transform;
}
.case-modal__slide {
  flex: 0 0 100%;
  width: 100%;
  display: grid;
  place-items: center;
  background: #0a0c10;
}
.case-modal__img {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(100vh - 180px);
  object-fit: contain;
  -webkit-user-drag: none;
  pointer-events: none;
}

.case-modal__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;
  border-radius: 999px;
  cursor: pointer;
  z-index: 2;
  transition: background .15s ease, opacity .15s ease;
}
.case-modal__nav:hover { background: rgba(0,0,0,0.78); }
.case-modal__nav[disabled] { opacity: .35; cursor: default; }
.case-modal__nav--prev { left: 16px; }
.case-modal__nav--next { right: 16px; }
.case-modal__nav svg { width: 22px; height: 22px; }

.case-modal__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 4px;
  color: rgba(255,255,255,0.78);
}
.case-modal__counter {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}
.case-modal__dots {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  justify-content: center;
}
.case-modal__dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.32);
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}
.case-modal__dot[data-active] { background: #fff; transform: scale(1.2); }

body.is-case-modal-open { overflow: hidden; }

@media (max-width: 520px) {
  .case-modal__dialog { padding: 52px 8px 14px; }
  .case-modal__nav { width: 38px; height: 38px; }
  .case-modal__nav--prev { left: 10px; }
  .case-modal__nav--next { right: 10px; }
  .case-modal__img { max-height: calc(100vh - 160px); }
}
@media (min-width: 1024px) {
  .case-modal__dialog { width: min(100%, 820px); padding: 64px 16px 20px; }
  .case-modal__close { top: 20px; right: 20px; width: 48px; height: 48px; }
}

/* ============================================================
   Видео-модалка (попап видеоотзыва)
   Открывается по клику на hero__video. Включает звук, controls.
   На мобайле ≈ fullscreen, на ПК - центрированный вертикальный плеер.
   ============================================================ */
.video-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: env(safe-area-inset-top) 16px env(safe-area-inset-bottom);
}
.video-modal[data-open] { display: flex; }

.video-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 10, 14, 0.92);
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.video-modal__dialog {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 520px;
  max-height: 100%;
  pointer-events: none;
}

.video-modal__media {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 24px);
  max-height: calc(100svh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 24px);
  width: auto;
  height: auto;
  background: #000;
  border-radius: 0;
  box-shadow: 0 30px 80px -30px rgba(0,0,0,0.6);
  pointer-events: auto;
  outline: none;
}

.video-modal__close {
  position: absolute;
  top: 0;
  right: 0;
  transform: translate(8px, -8px);
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  cursor: pointer;
  z-index: 2;
  pointer-events: auto;
  box-shadow: 0 10px 28px -10px rgba(0, 0, 0, 0.5);
  transition: transform .15s ease, background .15s ease;
}
.video-modal__close svg { width: 22px; height: 22px; }
.video-modal__close:hover { background: #fff; transform: translate(8px, -8px) scale(1.05); }
.video-modal__close:active { transform: translate(8px, -8px) scale(0.96); }

body.is-video-modal-open { overflow: hidden; }

/* ПК: видео центрировано, скруглено, плотная кнопка закрытия */
@media (min-width: 768px) {
  .video-modal { padding: 32px; }
  .video-modal__dialog { max-width: 420px; }
  .video-modal__media {
    border-radius: 16px;
    max-height: calc(100vh - 64px);
    max-height: calc(100svh - 64px);
  }
  .video-modal__close {
    width: 48px;
    height: 48px;
    transform: translate(14px, -14px);
  }
  .video-modal__close:hover { transform: translate(14px, -14px) scale(1.05); }
  .video-modal__close:active { transform: translate(14px, -14px) scale(0.96); }
}

@media (min-width: 1280px) {
  .video-modal__dialog { max-width: 460px; }
}

/* мелкий мобайл: плотнее, кнопка чуть наружу */
@media (max-width: 520px) {
  .video-modal { padding: 12px; padding-top: calc(env(safe-area-inset-top) + 12px); padding-bottom: calc(env(safe-area-inset-bottom) + 12px); }
  .video-modal__close {
    width: 42px;
    height: 42px;
    transform: translate(2px, -2px);
  }
  .video-modal__close:hover { transform: translate(2px, -2px) scale(1.05); }
  .video-modal__close:active { transform: translate(2px, -2px) scale(0.96); }
}

/* ============================================================
   PAGE · Thank You - отдельная композиция, не повторяет hero.
   Узкая центрированная панель + вертикальный таймлайн.
   ============================================================ */
.thanks {
  background: var(--bg);
  padding: 56px 0 72px;
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  display: flex;
  align-items: center;
}
.thanks__panel {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}
.thanks__check {
  width: 80px;
  height: 80px;
  border-radius: 999px;
  background: var(--accent-ink);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 18px 32px -16px rgba(20, 24, 29, 0.45);
}
.thanks__check svg { width: 36px; height: 36px; }
.thanks__eyebrow {
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 700;
}
.thanks__title {
  font-size: clamp(28px, 4.4vw, 40px);
  line-height: 1.06;
  letter-spacing: -0.025em;
  font-weight: 800;
  color: var(--ink);
  text-wrap: balance;
}
.thanks__sub {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 54ch;
}

.thanks__timeline {
  list-style: none;
  padding: 0;
  margin: 8px 0 4px;
  width: 100%;
  display: flex;
  flex-direction: column;
}
.thanks__timeline li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line-soft);
}
.thanks__timeline li:first-child { padding-top: 4px; }
.thanks__timeline li:last-child { border-bottom: 0; }
.thanks__step {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--accent-ink);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  margin-top: 1px;
}
.thanks__timeline h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.thanks__timeline p {
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.5;
  margin: 0;
}

.thanks__cta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin-top: 6px;
}
.thanks__cta .btn { width: 100%; }

.thanks__footnote {
  font-size: 12.5px;
  color: var(--ink-muted);
  line-height: 1.55;
  margin-top: 2px;
}

@media (min-width: 640px) {
  .thanks { padding: 72px 0 96px; }
  .thanks__panel { gap: 22px; }
  .thanks__check { width: 96px; height: 96px; }
  .thanks__check svg { width: 42px; height: 42px; }
  .thanks__cta { flex-direction: row; }
  .thanks__cta .btn { flex: 1; min-width: 0; }
}
@media (min-width: 1024px) {
  .thanks { padding: 96px 0 120px; }
  .thanks__sub { font-size: 16px; }
  .thanks__timeline h3 { font-size: 16px; }
  .thanks__timeline p { font-size: 14px; }
}

/* кнопка-призрак для линка "на главную" */
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  min-height: 52px;
  padding: 0 22px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 14.5px;
}
.btn--ghost:hover {
  border-color: var(--ink);
  background: var(--bg-card);
  transform: translateY(-1px);
}

/* ============================================================
   Footer (тёмная завершающая секция, ритм после светлого квиза)
   ============================================================ */
.site-footer {
  background: var(--ink);
  color: rgba(246, 245, 240, 0.82);
  padding: 56px 0 28px;
}
.site-footer__inner { display: flex; flex-direction: column; gap: 40px; }
.site-footer__top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
}
.site-footer .brand { color: #f6f5f0; }
.site-footer .brand__mark { background: #f6f5f0; color: var(--ink); }
.site-footer__lead {
  margin-top: 14px;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(246, 245, 240, 0.62);
  max-width: 46ch;
}
.site-footer__cta {
  margin-top: 18px;
  width: fit-content;
  min-height: 48px;
  padding: 0 22px;
  background: #f6f5f0;
  color: var(--ink);
  border-radius: 12px;
  font-size: 14px;
  box-shadow: 0 14px 30px -16px rgba(0,0,0,0.55);
}
.site-footer__cta:hover { background: #fff; }

.site-footer__title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(246, 245, 240, 0.55);
  margin: 0 0 14px;
}
.site-footer__title--social { margin-top: 22px; }

.site-footer__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14px;
  line-height: 1.5;
}
.site-footer__list li { color: rgba(246, 245, 240, 0.82); }
.site-footer__phone {
  display: block;
  font-size: 17px;
  font-weight: 700;
  color: #f6f5f0;
  letter-spacing: -0.01em;
}
.site-footer__hint {
  display: block;
  font-size: 12.5px;
  color: rgba(246, 245, 240, 0.5);
  margin-top: 2px;
  line-height: 1.5;
}
.site-footer__link {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 14px;
  text-align: left;
  color: rgba(246, 245, 240, 0.82);
  cursor: pointer;
  border-bottom: 1px solid rgba(246, 245, 240, 0.15);
  letter-spacing: -0.005em;
  transition: color .15s ease, border-color .15s ease;
}
.site-footer__link:hover { color: #f6f5f0; border-color: rgba(246, 245, 240, 0.6); }

.site-footer__messengers {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}
.msg--dark {
  background: transparent;
  border-color: transparent;
  color: #f6f5f0;
}
.msg--dark:hover { background: transparent; border-color: transparent; }

.site-footer__legal {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
}
.site-footer__legal > div { display: flex; flex-direction: column; gap: 2px; }
.site-footer__legal dt {
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(246, 245, 240, 0.45);
}
.site-footer__legal dd {
  margin: 0;
  font-size: 14px;
  color: #f6f5f0;
  letter-spacing: -0.005em;
  font-variant-numeric: tabular-nums;
}

.site-footer__socials {
  display: flex;
  gap: 8px;
}
.site-footer__socials a {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0;
  color: #f6f5f0;
  background: transparent;
  padding: 0;
  transition: transform .15s ease;
}
.site-footer__socials svg { width: 17px; height: 17px; }
.site-footer__socials img { display: block; width: 100%; height: 100%; object-fit: contain; }
.site-footer__socials a:hover { transform: translateY(-1px); }

.site-footer__bottom {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.site-footer__copy { font-size: 13px; color: rgba(246, 245, 240, 0.65); }
.site-footer__note { font-size: 12px; color: rgba(246, 245, 240, 0.42); line-height: 1.6; max-width: 96ch; }

@media (min-width: 768px) {
  .site-footer { padding: 72px 0 32px; }
  .site-footer__top { grid-template-columns: 1.4fr 1fr 1fr; gap: 40px 36px; }
  .site-footer__brand { grid-column: 1 / -1; }
}
@media (min-width: 1024px) {
  .site-footer { padding: 88px 0 36px; }
  .site-footer__top { grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 48px 40px; }
  .site-footer__brand { grid-column: auto; }
  .site-footer__bottom { flex-direction: row; align-items: flex-start; gap: 32px; }
  .site-footer__copy { flex: 0 0 auto; }
  .site-footer__note { flex: 1; }
}

/* ============================================================
   Doc-modal (Политика / Согласие / Соглашение)
   ============================================================ */
.doc-modal {
  position: fixed;
  inset: 0;
  z-index: 250;
  display: none;
  align-items: stretch;
  justify-content: center;
  padding: 0;
}
.doc-modal[data-open] { display: flex; }
.doc-modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(15, 19, 25, 0.62);
  border: 0; padding: 0; margin: 0; cursor: pointer;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.doc-modal__dialog {
  position: relative;
  background: var(--bg-card);
  width: 100%;
  max-width: 760px;
  margin: auto;
  display: flex;
  flex-direction: column;
  max-height: 100vh;
  max-height: 100svh;
  box-shadow: 0 30px 80px -30px rgba(0,0,0,0.5);
}
.doc-modal__head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 16px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--line-soft);
}
.doc-modal__title {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--ink);
  flex: 1;
}
.doc-modal__close {
  flex: 0 0 auto;
  width: 38px; height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-card);
  color: var(--ink);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: border-color .15s ease, transform .15s ease;
}
.doc-modal__close svg { width: 18px; height: 18px; }
.doc-modal__close:hover { border-color: var(--ink); transform: scale(1.04); }

.doc-modal__body {
  padding: 18px 22px 28px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
}
.doc {
  font-size: 14px;
  line-height: 1.62;
  color: var(--ink-soft);
}
.doc__meta {
  font-size: 12px;
  color: var(--ink-muted);
  letter-spacing: 0.02em;
  margin-bottom: 18px;
}
.doc h3 {
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: -0.005em;
  color: var(--ink);
  margin: 22px 0 8px;
}
.doc p { margin: 0 0 10px; }

body.is-doc-modal-open { overflow: hidden; }

@media (min-width: 768px) {
  .doc-modal { padding: 32px; }
  .doc-modal__dialog { max-height: calc(100vh - 64px); border-radius: 18px; overflow: hidden; }
  .doc-modal__head { padding: 24px 28px 18px; }
  .doc-modal__title { font-size: 22px; }
  .doc-modal__body { padding: 22px 28px 32px; }
  .doc { font-size: 14.5px; }
  .doc h3 { font-size: 15px; margin-top: 24px; }
}

/* ============================================================
   Cookie-bar (мягкий, по LEGAL 5.2-A)
   ============================================================ */
.cookie-bar {
  position: fixed;
  z-index: 180;
  left: 16px;
  right: 16px;
  bottom: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  max-width: 600px;
  margin: 0 auto;
  background: var(--bg-card);
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 24px 48px -20px rgba(20, 24, 29, 0.45);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cookie-bar[hidden] { display: none; }
.cookie-bar__text {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-soft);
}
.cookie-bar__link {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
  cursor: pointer;
}
.cookie-bar__link:hover { text-decoration-color: var(--ink); }
.cookie-bar__btn {
  align-self: stretch;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  background: var(--accent-ink);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}
.cookie-bar__btn:hover { background: var(--accent-ink-hover); transform: translateY(-1px); }

@media (min-width: 640px) {
  .cookie-bar {
    flex-direction: row;
    align-items: center;
    gap: 18px;
    padding: 14px 16px 14px 20px;
  }
  .cookie-bar__btn { align-self: center; min-width: 140px; }
}

/* ============================================================
   A11y / focus
   ============================================================ */
:where(a, button, .btn, .msg, .slider-btn, .quiz-modal__close, .case-modal__close, .case-modal__nav, .case-modal__dot, .video-modal__close, .ch-btn, .doc-modal__close, .site-footer__link, .cookie-bar__btn, .cookie-bar__link):focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}
