/* ============================================================
   DentPark — лендинг по имплантологии
   Направление: клинический модернизм
   ============================================================ */

/* --- Шрифты. Самохостинг, сабсеты, unicode-range ---------- */

@font-face {
  font-family: 'Serif4';
  src: url('../fonts/serif-cyrillic.sub.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+2116;
}
@font-face {
  font-family: 'Serif4';
  src: url('../fonts/serif-latin.sub.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F, U+2212;
}
@font-face {
  font-family: 'Serif4';
  src: url('../fonts/serif-latin-ext.sub.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+1E00-1E9F, U+2020, U+20A0-20AB;
}

@font-face {
  font-family: 'Comm';
  src: url('../fonts/comm-cyrillic.sub.woff2') format('woff2');
  font-weight: 400 700; font-style: normal; font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+2116;
}
@font-face {
  font-family: 'Comm';
  src: url('../fonts/comm-latin.sub.woff2') format('woff2');
  font-weight: 400 700; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F, U+2212;
}
@font-face {
  font-family: 'Comm';
  src: url('../fonts/comm-latin-ext.sub.woff2') format('woff2');
  font-weight: 400 700; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+1E00-1E9F, U+2020, U+20A0-20AB;
}

/* --- Токены ----------------------------------------------- */

:root {
  /* ── База. Тёплые нейтрали, не стерильный белый ──────────── */
  --paper:      #faf7f0;
  --paper-deep: #f3eee2;
  --cream:      #fdf5e4;   /* тёплое поле — разбивает череду светлых секций */
  --surface:    #ffffff;

  /* Чернила с зелёным подтоном: чистый серый рядом с зеленью выглядит грязным */
  --ink:        #17251c;
  --ink-soft:   #46524a;
  /* 5.2:1 на --paper и 4.8:1 на --paper-deep. Считать надо по тёмному
     из двух фонов: #767b71 давал 4.09, #6b7066 — 4.38, оба не проходили. */
  --ink-mute:   #626b64;
  --line:       #e3ddcd;
  --line-soft:  #efeade;

  /* ── Глубокая зелень. Фон тёмных секций вместо почти-чёрного:
        цвет остаётся фирменным, а секция читается насыщенной ── */
  --forest:     #143024;
  --forest-2:   #1c412f;
  --forest-3:   #2a5a41;
  --on-dark:    #eef5ea;
  --on-dark-2:  #a9bdaf;

  /* ── Фирменный цвет клиники, взят из main.css сайта ──────── */
  --lime:       #a8cc38;
  --lime-deep:  #85ab1c;
  --lime-text:  #46600f;   /* контрастный вариант для текста */
  --lime-wash:  #edf4d7;
  --lime-soft:  #dcebb4;

  /* ── Второй акцент, тоже с их сайта. Внимание, а не действие ── */
  --amber:      #ffbc20;
  --amber-soft: #fff2d2;
  --amber-text: #7a5200;

  /* Типографика */
  --f-display: 'Serif4', Georgia, 'Times New Roman', serif;
  --f-text:    'Comm', 'Segoe UI', system-ui, sans-serif;

  --t-hero: clamp(2.1rem, 7.4vw, 4.4rem);
  --t-h2:   clamp(1.7rem, 5vw, 2.9rem);
  --t-h3:   clamp(1.2rem, 3vw, 1.5rem);
  --t-lede: clamp(1.0625rem, 2.4vw, 1.3125rem);
  --t-body: 1.0625rem;          /* 17px — минимум для аудитории 45–65 */
  --t-small: 0.9375rem;         /* 15px — нижняя граница, ниже не опускаться */

  /* Ритм */
  --gut: clamp(1.25rem, 5vw, 2.5rem);
  --sec: clamp(3.5rem, 9vw, 7rem);
  /* До 1920 включительно — 76rem, как было. Дальше контейнер растёт,
     иначе на сверхшироких он занимает меньше половины экрана и вся
     страница читается прижатой влево. */
  --max: clamp(76rem, 62vw, 88rem);
  /* ширина контента без полей — для полноширинных сеток */
  --maxc: calc(var(--max) - var(--gut) * 2);

  /* Скругления крупнее прежних 4/10/20: мягкая геометрия — то,
     что сегодня отличает современный интерфейс от вёрстки 2018-го */
  --r-s: 8px;
  --r-m: 16px;
  --r-l: 28px;
  --r-xl: 36px;

  /* Тени с зелёным подтоном под цвет фона, а не серые */
  --sh-soft: 0 1px 2px rgba(20,48,36,.05), 0 10px 28px -14px rgba(20,48,36,.22);
  --sh-lift: 0 2px 4px rgba(20,48,36,.06), 0 28px 56px -22px rgba(20,48,36,.32);
  --sh-lime: 0 2px 4px rgba(20,48,36,.08), 0 20px 40px -18px rgba(133,171,28,.55);

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* --- Сброс ------------------------------------------------ */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--f-text);
  font-size: var(--t-body);
  line-height: 1.62;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Место под липкую панель: она fixed и высотой ~72px, без этого
   отступа последние 72px футера уходят под неё. */
@media (max-width: 899px) {
  body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
}

/* Едва заметное зерно — снимает пластиковую плоскость фона */
body::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none; z-index: 1;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

img, svg, video { display: block; max-width: 100%; }
/* Атрибуты width/height браузер применяет как CSS-подсказку. Без height:auto
   у video высота остаётся жёсткой и aspect-ratio не работает. */
img, video { height: auto; }

/* атрибут hidden должен побеждать авторские display-правила */
[hidden] { display: none !important; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--lime-deep);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection { background: var(--lime); color: var(--ink); }

/* --- Типографика ------------------------------------------ */

h1, h2, h3 {
  font-family: var(--f-display);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -.018em;
  text-wrap: balance;
}

h1 { font-size: var(--t-hero); }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); line-height: 1.2; letter-spacing: -.01em; }

p { text-wrap: pretty; }

.eyebrow {
  font-family: var(--f-text);
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--ink-mute);
  display: flex; align-items: center; gap: .625rem;
}
.eyebrow::before {
  content: ''; width: 1.75rem; height: 2px;
  background: var(--lime); flex: none;
}

.lede {
  font-size: var(--t-lede);
  line-height: 1.5;
  color: var(--ink-soft);
}

/* Акцентная подчёркивающая засечка под ценой в заголовке.
   Не подчёркивание браузера — рисуется под базовой линией. */
.mark {
  position: relative;
  white-space: nowrap;
}
.mark::after {
  content: '';
  position: absolute;
  left: -.06em; right: -.06em; bottom: .04em;
  height: .22em;
  background: var(--lime);
  opacity: .55;
  z-index: -1;
  border-radius: 2px;
}

.num { font-variant-numeric: tabular-nums; }

/* --- Раскладка -------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gut);
}

.section { padding-block: var(--sec); position: relative; z-index: 2; }

/* --- Кнопки ----------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .625rem;
  min-height: 56px;                    /* палец, а не курсор */
  padding: .875rem 1.75rem;
  border-radius: var(--r-m);
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: -.005em;
  text-decoration: none;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease),
              background-color .18s var(--ease);
}

.btn--primary {
  background: var(--lime);
  color: var(--ink);
  box-shadow: var(--sh-lime);
}
.btn--primary:hover { background: var(--lime-deep); transform: translateY(-2px); }
.btn--primary:active { transform: translateY(0); }

.btn--ghost {
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}
.btn--ghost:hover { border-color: var(--ink-mute); transform: translateY(-2px); }

.btn__sub {
  display: block;
  font-size: .8125rem;
  font-weight: 500;
  color: var(--ink-mute);
  letter-spacing: 0;
}

/* ============================================================
   ШАПКА
   ============================================================ */

.topbar {
  position: relative; z-index: 10;
  padding-block: 1rem;
}
.topbar__in {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
}
.topbar__logo { height: 34px; width: auto; }

.topbar__phone {
  display: inline-flex; align-items: center; gap: .5rem;
  min-height: 44px;               /* палец, а не курсор */
  font-weight: 600; text-decoration: none;
  font-size: 1.0625rem;
  white-space: nowrap;
}
.topbar__phone svg { flex: none; color: var(--lime-deep); }
.topbar__phone span { border-bottom: 1.5px solid var(--lime); padding-bottom: 1px; }

.topbar__hours {
  display: none;
  font-size: var(--t-small); color: var(--ink-mute);
}

/* ============================================================
   ПЕРВЫЙ ЭКРАН
   ============================================================ */

.hero { position: relative; z-index: 2; padding-bottom: 0; }

.hero__media {
  --bleed: 1;            /* контракт для tools/audit.js: должно доходить до края */
  position: relative;
  isolation: isolate;
  margin-inline: calc(var(--gut) * -1);
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--paper-deep);
}
.hero__media img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 18%;
  /* единый грейд на все фото клиники */
  filter: saturate(.9) contrast(1.05);
}
/* Растворяем низ фото в бумагу, чтобы карточка садилась без шва */
.hero__media::after {
  content: '';
  position: absolute; inset: auto 0 0 0; height: 58%;
  background: linear-gradient(to bottom, transparent, var(--paper) 78%);
}

.hero__body {
  position: relative;
  margin-top: -2.25rem;
}

.hero h1 { margin-block: .875rem 1.125rem; }

/* Внутри заголовка — смена гарнитуры и кегля.
   Серифная фраза о результате, гротеск с ценой под ней. */
.h1__price {
  display: block;
  margin-top: .46em;
  font-family: var(--f-text);
  font-weight: 600;
  font-size: .455em;
  line-height: 1.3;
  letter-spacing: -.012em;
  color: var(--ink-soft);
}
.h1__price .mark { color: var(--ink); }

.hero__lede { max-width: 34ch; margin-bottom: 1.75rem; }

.hero__actions {
  display: flex; flex-direction: column; gap: .75rem;
  align-items: stretch;
}

.hero__note {
  margin-top: 1rem;
  font-size: var(--t-small);
  color: var(--ink-mute);
  display: flex; align-items: flex-start; gap: .5rem;
}
.hero__note svg { flex: none; margin-top: .2em; color: var(--lime-deep); }

/* --- Плашка доверия. Перекрывает низ первого экрана. ------- */

.trust {
  list-style: none; padding: 0;
  margin-top: clamp(2.5rem, 7vw, 4rem);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-top: 3px solid var(--lime);
  border-radius: var(--r-m);
  overflow: hidden;
  box-shadow: var(--sh-soft);
}
.trust li {
  background: var(--surface);
  padding: 1.125rem 1rem;
}
.trust b {
  display: block;
  color: var(--forest);
  font-family: var(--f-display);
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.02em;
  margin-bottom: .3rem;
}
.trust span {
  display: block;
  font-size: var(--t-small);
  line-height: 1.35;
  color: var(--ink-mute);
}

/* ============================================================
   СБОРКА ИМПЛАНТА — объясняет, из чего складывается цена
   ============================================================ */

.build { background: var(--cream); position: relative; z-index: 2; }

.build__head { max-width: 46ch; margin-bottom: clamp(2rem, 5vw, 3rem); }
.build__head h2 { margin-block: .75rem .75rem; }

.build__grid {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
}

/* --- Сцена ------------------------------------------------ */

.stage {
  position: relative;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-l);
  box-shadow: var(--sh-soft);
  overflow: hidden;
  /* тон подложки взят из угла рендера — шва по краю кадра не видно */
  background: #f7f2ea;
}

/* Кадры лежат стопкой и перекрещиваются по прозрачности.
   Пропорция задана на контейнере, чтобы не прыгала вёрстка. */
.stage__frames {
  position: relative;
  aspect-ratio: 800 / 1072;
  max-height: 66vh;
  margin-inline: auto;
}
.stage__frames .frame {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity .55s var(--ease);
}
.stage__frames .frame.is-on { opacity: 1; }

/* --- Шаги ------------------------------------------------- */

.steps { display: flex; flex-direction: column; gap: .5rem; }

.step {
  display: grid;
  grid-template-columns: 2.25rem 1fr auto;
  align-items: center;
  gap: .875rem;
  width: 100%;
  padding: .875rem 1rem;
  min-height: 56px;
  text-align: left;
  border: 1.5px solid transparent;
  border-radius: var(--r-m);
  background: transparent;
  transition: background-color .2s var(--ease), border-color .2s var(--ease);
}
.step:hover { background: var(--surface); }

.step__n {
  display: grid; place-items: center;
  width: 2.25rem; height: 2.25rem;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  font-size: .875rem; font-weight: 600;
  color: var(--ink-mute);
  transition: all .25s var(--ease);
}
.step__t { font-weight: 600; letter-spacing: -.008em; }
.step__d {
  display: block;
  font-size: var(--t-small); font-weight: 400;
  color: var(--ink-mute);
  margin-top: .1rem;
}
.step__p {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: .9375rem;
  color: var(--ink-soft);
  white-space: nowrap;
}

.step[aria-current='true'] {
  background: var(--lime-wash);
  border-color: var(--lime);
  box-shadow: var(--sh-soft);
}
.step[aria-current='true'] .step__n {
  background: var(--lime); border-color: var(--lime); color: var(--ink);
}

.step--done .step__n { border-color: var(--lime); color: var(--lime-text); }

/* --- Итог ------------------------------------------------- */

.sum {
  margin-top: 1rem;
  padding: 1.25rem;
  border-radius: var(--r-m);
  background: var(--forest);
  color: var(--on-dark);
  display: flex; align-items: baseline;
  justify-content: space-between; gap: 1rem;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.sum.is-on { opacity: 1; transform: none; }
.sum__l { font-size: var(--t-small); color: var(--on-dark-2); }
.sum__v {
  font-family: var(--f-display);
  font-size: 1.75rem; font-weight: 600;
  letter-spacing: -.02em;
  white-space: nowrap;
}
.sum__v em { font-style: normal; color: var(--lime); }

.build__replay {
  margin-top: 1rem;
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: var(--t-small); font-weight: 600;
  color: var(--ink-mute);
  min-height: 44px;
}
.build__replay:hover { color: var(--ink); }
.build__replay svg { transition: transform .4s var(--ease); }
.build__replay:hover svg { transform: rotate(-180deg); }

.build__foot {
  margin-top: clamp(1.5rem, 4vw, 2rem);
  font-size: var(--t-small);
  color: var(--ink-mute);
  max-width: 34rem;
}

/* ============================================================
   ЦЕНА, ТРИ УРОВНЯ
   Не три равные карточки: средний уровень — доминанта,
   боковые держатся типографикой, без коробок.
   ============================================================ */

.tiers { position: relative; z-index: 2; }
.tiers__head { max-width: 46ch; margin-bottom: clamp(2rem, 5vw, 3.25rem); }
.tiers__head h2 { margin-block: .75rem .875rem; }

.tiers__grid { display: grid; gap: 1rem; }

.tier {
  --tone: var(--ink);
  --tone-text: var(--ink);
  position: relative;
  padding: 1.75rem 1.5rem;
  border-top: 3px solid var(--tone);
}
/* Премиум получает глубокую зелень, средний — фирменный лайм.
   Цвет здесь работает как навигация по уровням, а не как украшение. */
.tier:nth-child(3) { --tone: var(--forest-3); --tone-text: var(--forest-2); }
.tier--pick        { --tone: var(--lime);     --tone-text: var(--lime-text); }

.tier__lvl {
  color: var(--tone-text);
  font-family: var(--f-display);
  font-size: 1.5rem; font-weight: 600;
  letter-spacing: -.015em;
  margin-bottom: .875rem;
}

.tier__brands { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.tier__brands li {
  font-weight: 600; font-size: 1.0625rem;
  line-height: 1.35;
}
.tier__brands li + li { margin-top: .2rem; }
.tier__brands span {
  display: inline-block;
  font-weight: 400; font-size: .8125rem;
  color: var(--ink-mute);
  margin-left: .25rem;
}

.tier__price {
  font-family: var(--f-display);
  font-size: 1.375rem; font-weight: 600;
  line-height: 1; letter-spacing: -.02em;
  display: flex; align-items: baseline; gap: .35rem;
}
.tier__price b { font-size: 2.5rem; font-weight: 600; }
.tier__from { font-family: var(--f-text); font-size: 1rem; font-weight: 500; color: var(--ink-mute); }

.tier__unit {
  font-size: var(--t-small); color: var(--ink-mute);
  margin-top: .375rem; margin-bottom: 1.375rem;
}

.tier__inc { list-style: none; padding: 0; margin: 0 0 1.25rem; }
.tier__inc li {
  position: relative;
  padding-left: 1.5rem;
  font-size: var(--t-small);
  line-height: 1.5;
}
.tier__inc li + li { margin-top: .3rem; }
.tier__inc li::before {
  content: '';
  position: absolute; left: 0; top: .48em;
  width: 10px; height: 6px;
  border-left: 2px solid var(--tone);
  border-bottom: 2px solid var(--tone);
  transform: rotate(-45deg);
}

.tier__why {
  font-size: var(--t-small);
  line-height: 1.55;
  color: var(--ink-mute);
  padding-top: 1.125rem;
  border-top: 1px solid var(--line-soft);
}

/* --- доминанта --- */

.tier--pick {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--lime);
  border-radius: 0 0 var(--r-l) var(--r-l);
  box-shadow: var(--sh-lift);
  padding: 2.25rem 1.75rem 2rem;
}
.tier--pick .tier__price b { font-size: 3rem; }

.tier__tag {
  position: absolute;
  top: 0; left: 1.75rem;
  transform: translateY(-50%);
  padding: .3rem .75rem;
  background: var(--lime);
  color: var(--ink);
  border-radius: 999px;
  font-size: .8125rem; font-weight: 600;
  letter-spacing: .01em;
  white-space: nowrap;
}

/* --- мелкий шрифт под таблицей --- */

.tiers__fine {
  margin-top: clamp(1.75rem, 4vw, 2.5rem);
  /* В ch, а не в rem: латиница уже кириллицы, и при 34rem румынская
     строка выходила ~83 знака против ~71 у русской. 50ch держит обе
     в норме 45–75. */
  max-width: 50ch;
  font-size: var(--t-small);
  line-height: 1.6;
  color: var(--ink-mute);
}
.tiers__fine b { color: var(--ink-soft); font-weight: 600; }

/* --- три входа в квиз --- */

.seg {
  margin-top: clamp(2rem, 5vw, 3rem);
  padding-top: clamp(1.75rem, 4vw, 2.25rem);
  border-top: 1px solid var(--line);
}
.seg__t { font-weight: 600; margin-bottom: 1rem; }
.seg__row { display: grid; gap: .625rem; }

.seg__b {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  min-height: 58px;
  padding: .875rem 1.25rem;
  text-align: left;
  font-size: 1.0625rem; font-weight: 600;
  background: var(--lime-wash);
  border: 1.5px solid var(--lime-soft);
  border-radius: var(--r-m);
  transition: border-color .18s var(--ease), transform .18s var(--ease),
              box-shadow .18s var(--ease), background-color .18s var(--ease);
}
.seg__b:hover { background: var(--surface); }
.seg__b svg { flex: none; color: var(--lime-deep); transition: transform .22s var(--ease); }
.seg__b:hover {
  border-color: var(--lime);
  transform: translateY(-2px);
  box-shadow: var(--sh-soft);
}
.seg__b:hover svg { transform: translateX(4px); }

/* ============================================================
   СЛОТЫ ПОД КОНТЕНТ ОТ КЛИНИКИ
   Видимые, но оформленные: место занято, видно что прислать.
   Убираются вместе с классом slot, когда контент приходит.
   ============================================================ */

.slot {
  border: 1.5px dashed var(--line);
  border-radius: var(--r-m);
  background:
    repeating-linear-gradient(-45deg,
      transparent 0 10px,
      rgba(101,106,97,.035) 10px 20px);
  color: var(--ink-mute);
}

.slot__mark {
  display: grid; justify-items: center; align-content: center;
  gap: .5rem;
  height: 100%;
  padding: 1.5rem 1.25rem;
  text-align: center;
}
.slot__mark svg { color: var(--ink-mute); opacity: .55; }
.slot__mark b { font-size: var(--t-small); color: var(--ink-soft); }
.slot__mark span { font-size: .8125rem; line-height: 1.45; max-width: 34ch; }

.slot__mark--row {
  grid-auto-flow: column;
  justify-items: start; align-items: center;
  justify-content: start;
  text-align: left;
  padding: 1rem 1.125rem;
}
.slot__mark--row span { max-width: none; }

/* строчный слот — на месте будущего текста */
.slot--inline {
  display: inline-block;
  padding: .1em .5em;
  border-width: 1px;
  border-radius: var(--r-s);
  background: none;
  font-style: normal;
  color: var(--ink-mute);
}

/* ============================================================
   3. ВРАЧ
   ============================================================ */

.doc { background: var(--paper-deep); position: relative; z-index: 2; }
.doc__head { max-width: 46ch; margin-bottom: clamp(2rem, 5vw, 3rem); }
.doc__head h2 { margin-block: .75rem .875rem; }

.doc__grid { display: grid; gap: 1rem; }

.doc__photo {
  margin: 0;
  border-radius: var(--r-l);
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
}
/* Кадрирован под 9:16 — ту же пропорцию, что у видео рядом.
   Подгонять 4:5 под 9:16 через object-fit нельзя: это не обрезка
   по бокам, а увеличение, у врача срезало макушку. */
.doc__photo img {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  filter: saturate(.9) contrast(1.05);   /* единый грейд со всеми фото клиники */
}

.doc__card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-l);
  padding: clamp(1.375rem, 4vw, 2rem);
  box-shadow: var(--sh-soft);
}

.doc__name {
  font-size: clamp(1.375rem, 4vw, 1.75rem);
  margin-bottom: .375rem;
}
.doc__role {
  font-weight: 600;
  color: var(--lime-text);
  margin-bottom: 1.5rem;
}

.doc__facts { margin: 0 0 1.5rem; display: grid; gap: .875rem; }
.doc__facts div {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem;
  padding-bottom: .875rem;
  border-bottom: 1px solid var(--line-soft);
}
.doc__facts div:last-child { border-bottom: 0; padding-bottom: 0; }
.doc__facts dt { font-size: var(--t-small); color: var(--ink-mute); }
.doc__facts dd { margin: 0; font-weight: 600; text-align: right; white-space: nowrap; }
/* Цитата врача: серифом, с лаймовой линейкой слева.
   Читается как реплика человека, а не как ещё один абзац. */
.doc__quote {
  margin: 1.5rem 0 0;
  padding-left: 1.125rem;
  border-left: 3px solid var(--lime);
  font-family: var(--f-display);
  font-size: 1.1875rem;
  line-height: 1.35;
  letter-spacing: -.01em;
  color: var(--ink-soft);
}

.doc__facts dd b {
  font-family: var(--f-display);
  font-size: 1.5rem; font-weight: 600;
  letter-spacing: -.02em;
  color: var(--forest);
  margin-right: .15em;
}

/* Вертикальное видео с телефона — вертикальная рамка.
   Обрезать 9:16 под горизонтальный слот значит потерять треть кадра. */
.doc__video { margin: 0; }
.doc__video video {
  width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: var(--r-l);
  background: var(--forest);
  object-fit: cover;
}
/* На телефоне вертикальный ролик легко занимает весь экран —
   ограничиваем высотой и центруем. */
@media (max-width: 899px) {
  .doc__photo img,
  .doc__video video { max-height: 62vh; width: auto; margin-inline: auto; }
}

.doc__video figcaption {
  margin-top: .75rem;
  max-width: 22rem;
  font-size: var(--t-small);
  line-height: 1.45;
  color: var(--ink-mute);
}

/* --- оснащение: проверенные факты, они держат блок --- */

.doc__eq {
  list-style: none; padding: 0;
  margin-top: clamp(1.5rem, 4vw, 2.25rem);
  display: grid; gap: .75rem;
}
.doc__eq li {
  background: var(--surface);
  padding: 1.125rem 1.25rem;
  border-top: 3px solid var(--amber);
}
.doc__eq b {
  display: block; margin-bottom: .3rem;
  font-size: 1.0625rem; letter-spacing: -.008em;
}
.doc__eq span {
  display: block;
  font-size: var(--t-small); line-height: 1.5;
  color: var(--ink-mute);
}

/* ============================================================
   4. ДО / ПОСЛЕ
   ============================================================ */

.cases { position: relative; z-index: 2; }
.cases__head { max-width: 48ch; margin-bottom: clamp(2rem, 5vw, 3rem); }
.cases__head h2 { margin-block: .75rem .875rem; }

.cases__grid { display: grid; gap: 1.25rem; }

.case {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-top: 3px solid var(--lime);
  border-radius: var(--r-l);
  overflow: hidden;
  box-shadow: var(--sh-soft);
  display: flex; flex-direction: column;
}

.case__media {
  aspect-ratio: 3 / 2;
  border: 0;
  border-bottom: 1.5px dashed var(--line);
  border-radius: 0;
}

.case__facts { margin: 0; padding: 1.25rem; display: grid; gap: .625rem; flex: 1; }
.case__facts div {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: .75rem;
  align-items: baseline;
  padding-bottom: .625rem;
  border-bottom: 1px solid var(--line-soft);
}
.case__facts div:last-child { border-bottom: 0; padding-bottom: 0; }
.case__facts dt { font-size: var(--t-small); color: var(--ink-mute); }
.case__facts dd { margin: 0; font-size: var(--t-small); }

.case__price dt { font-weight: 600; color: var(--ink-soft) !important; }
.case__price dd { font-weight: 600; font-size: 1.0625rem !important; }

/* --- контрольный снимок со сравнением --- */

.xray {
  margin-top: clamp(2rem, 5vw, 3rem);
  padding-top: clamp(1.75rem, 4vw, 2.5rem);
  border-top: 1px solid var(--line);
  display: grid; gap: 1.5rem;
}
.xray h3 { margin-bottom: .625rem; }
.xray p { font-size: var(--t-small); line-height: 1.6; color: var(--ink-mute); max-width: 46ch; }
.xray__note { margin-top: .75rem; font-weight: 600; color: var(--ink-soft) !important; }

.cmp {
  position: relative;
  margin: 0;
  aspect-ratio: 660 / 560;
  border-radius: var(--r-m);
  overflow: hidden;
  background: #14161a;
  touch-action: pan-y;      /* вертикальный скролл страницы не блокируем */
  user-select: none;
}
.cmp img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  pointer-events: none;
}
/* «после» показывается справа от ползунка */
.cmp__b { clip-path: inset(0 0 0 var(--pos)); }

.cmp__lbl {
  position: absolute; top: .75rem;
  padding: .2rem .625rem;
  border-radius: 999px;
  font-size: .8125rem; font-weight: 600;
  background: rgba(10,12,10,.72);
  color: #fff;
  pointer-events: none;
}
.cmp__lbl--a { left: .75rem; }
.cmp__lbl--b { right: .75rem; }

.cmp__bar {
  position: absolute; top: 0; bottom: 0;
  left: var(--pos);
  width: 2px; margin-left: -1px;
  background: var(--lime);
  pointer-events: none;
}
.cmp__bar i {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 2px 10px rgba(0,0,0,.35);
}
/* стрелки на рукоятке */
.cmp__bar i::before, .cmp__bar i::after {
  content: '';
  position: absolute; top: 50%;
  width: 7px; height: 7px;
  border-top: 2px solid var(--ink);
  border-right: 2px solid var(--ink);
}
.cmp__bar i::before { left: 11px;  transform: translateY(-50%) rotate(-135deg); }
.cmp__bar i::after  { right: 11px; transform: translateY(-50%) rotate(45deg); }

/* сам range невидим, но принимает мышь, палец и клавиатуру */
.cmp__in {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  margin: 0; padding: 0;
  opacity: 0; cursor: ew-resize;
  -webkit-appearance: none; appearance: none;
  background: transparent;
}
.cmp__in::-webkit-slider-thumb { -webkit-appearance: none; width: 46px; height: 100%; }
.cmp__in::-moz-range-thumb { width: 46px; height: 100%; border: 0; opacity: 0; }
.cmp__in:focus-visible ~ .cmp__bar i {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

/* ============================================================
   5. ВОПРОСЫ
   Нативный details/summary: клавиатура, скринридер и работа
   без JS достаются бесплатно. name="faq" держит открытым один.
   ============================================================ */

.faq { background: var(--paper-deep); position: relative; z-index: 2; }
.faq__head { max-width: 40ch; margin-bottom: clamp(2rem, 5vw, 3rem); }
.faq__head h2 { margin-block: .75rem .875rem; }

.faq__list {
  display: grid; gap: .625rem;
}

.qa {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-m);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.qa[open] {
  background: var(--surface);
  border-color: var(--lime-soft);
  box-shadow: var(--sh-soft);
}
.qa[open] summary { color: var(--lime-text); }

.qa summary {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  min-height: 64px;
  padding: 1rem 1.25rem;
  font-size: 1.0625rem; font-weight: 600;
  letter-spacing: -.008em;
  line-height: 1.35;
  cursor: pointer;
  list-style: none;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::marker { content: ''; }
.qa summary:hover { color: var(--lime-text); }

/* шеврон */
.qa summary::after {
  content: '';
  flex: none;
  width: 11px; height: 11px;
  margin-right: .25rem;
  border-right: 2.4px solid var(--ink-mute);
  border-bottom: 2.4px solid var(--ink-mute);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform .25s var(--ease), border-color .2s var(--ease);
}
.qa[open] summary::after {
  transform: rotate(-135deg) translate(-2px, -2px);
  border-color: var(--lime-deep);
}

.qa__body {
  padding: 0 1.25rem 1.375rem;
  max-width: 36rem;
  animation: qaIn .28s var(--ease);
}
@keyframes qaIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: none; }
}

.qa__body p + p,
.qa__body ul, .qa__body ol,
.qa__body ul + p, .qa__body ol + p { margin-top: .75rem; }
.qa__body p { color: var(--ink-soft); line-height: 1.6; }
.qa__body b { color: var(--ink); }

.qa__body ul { list-style: none; padding: 0; display: grid; gap: .625rem; }
.qa__body ul li {
  position: relative;
  padding-left: 1.5rem;
  color: var(--ink-soft);
  line-height: 1.55;
}
.qa__body ul li::before {
  content: '';
  position: absolute; left: .1rem; top: .62em;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--lime);
}

.qa__steps {
  list-style: none; padding: 0; margin: 0;
  counter-reset: qs;
  display: grid; gap: .75rem;
}
.qa__steps li {
  counter-increment: qs;
  position: relative;
  padding-left: 2.5rem;
  color: var(--ink-soft);
  line-height: 1.5;
  font-size: var(--t-small);
}
.qa__steps li::before {
  content: counter(qs);
  position: absolute; left: 0; top: -.1em;
  width: 1.75rem; height: 1.75rem;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1.5px solid var(--lime);
  color: var(--lime-text);
  font-size: .8125rem; font-weight: 600;
}

/* заметка-слот внутри ответа читается блоком, а не строкой */
.qa__body .slot--inline {
  display: block;
  margin-top: .875rem;
  padding: .625rem .875rem;
  font-size: var(--t-small);
  line-height: 1.5;
}

/* ============================================================
   КВИЗ — смена ритма: тёмная секция после двух светлых
   ============================================================ */

.quiz {
  position: relative; z-index: 2;
  background: var(--forest);
  background-image:
    radial-gradient(90% 60% at 12% -10%, var(--forest-2) 0%, transparent 60%);
  color: var(--on-dark);
  padding-block: var(--sec);
}

.eyebrow--on-dark { color: var(--on-dark-2); }
.eyebrow--on-dark::before { background: var(--lime); }

.quiz__head { max-width: 42ch; margin-bottom: clamp(2rem, 5vw, 3rem); }
.quiz__head h2 { margin-block: .75rem .875rem; }
.quiz__lede {
  font-size: var(--t-lede); line-height: 1.5;
  color: var(--on-dark-2);
}

.quiz__box {
  scroll-margin-top: 1.5rem;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(168,204,56,.22);
  border-radius: var(--r-l);
  padding: clamp(1.25rem, 4vw, 2.25rem);
  max-width: 44rem;
}

/* --- прогресс --- */

.quiz__top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; margin-bottom: 1.75rem;
}
.qbar {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: .375rem; flex: 1; max-width: 18rem;
}
.qbar li {
  height: 6px; border-radius: 3px;
  background: rgba(255,255,255,.14);
  transition: background-color .35s var(--ease);
}
.qbar li.is-done { background: var(--lime); }

.qcount { font-size: var(--t-small); color: var(--on-dark-2); white-space: nowrap; }
.qcount b { color: var(--lime); font-weight: 600; }

/* --- шаг --- */

.qstep { border: 0; padding: 0; margin: 0; display: none; }
.qstep.is-on { display: block; animation: qin .35s var(--ease); }

@keyframes qin {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

.qtitle {
  font-family: var(--f-display);
  font-size: clamp(1.45rem, 4.2vw, 2.05rem);
  font-weight: 600; line-height: 1.14;
  letter-spacing: -.015em;
  padding: 0; margin-bottom: 1.375rem;
  text-wrap: balance;
}

.qopts { display: grid; gap: .625rem; }

.qopt {
  display: flex; align-items: center;
  min-height: 60px;
  padding: .875rem 1.25rem;
  text-align: left;
  font-size: 1.0625rem; font-weight: 500;
  color: var(--on-dark);
  background: rgba(255,255,255,.05);
  border: 1.5px solid rgba(255,255,255,.12);
  border-radius: var(--r-m);
  transition: border-color .18s var(--ease), background-color .18s var(--ease),
              transform .18s var(--ease);
}
.qopt:hover { border-color: var(--lime); background: rgba(168,204,56,.14); transform: translateX(3px); }
.qopt.is-picked { border-color: var(--lime); background: rgba(168,204,56,.18); }

.qhint {
  margin-top: 1rem;
  font-size: var(--t-small);
  color: var(--on-dark-2);
}

.qback {
  display: inline-flex; align-items: center; gap: .5rem;
  margin-top: 1.5rem; min-height: 44px;
  font-size: var(--t-small); font-weight: 600;
  color: var(--on-dark-2);
}
.qback:hover { color: var(--on-dark); }

/* --- пауза расчёта --- */

.qcalc { display: none; padding-block: 2.5rem; text-align: center; }
.qcalc.is-on { display: block; }
.qcalc p { color: var(--on-dark-2); margin-top: 1rem; }
.qcalc__dots { display: inline-flex; gap: .4rem; }
.qcalc__dots i {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--lime);
  animation: qpulse 1.1s var(--ease) infinite;
}
.qcalc__dots i:nth-child(2) { animation-delay: .16s; }
.qcalc__dots i:nth-child(3) { animation-delay: .32s; }

@keyframes qpulse {
  0%, 100% { opacity: .25; transform: scale(.75); }
  40%      { opacity: 1;   transform: scale(1); }
}

/* --- финальная форма --- */

.qget {
  list-style: none; padding: 0;
  margin: 0 0 1.75rem;
  display: grid; gap: .625rem;
}
.qget li {
  position: relative;
  padding-left: 1.75rem;
  font-size: var(--t-small);
  color: var(--on-dark-2);
}
.qget li::before {
  content: '';
  position: absolute; left: 0; top: .42em;
  width: 11px; height: 7px;
  border-left: 2px solid var(--lime);
  border-bottom: 2px solid var(--lime);
  transform: rotate(-45deg);
}

.fld { margin-bottom: 1rem; }
.fld label {
  display: block; margin-bottom: .375rem;
  font-size: var(--t-small); font-weight: 600; color: var(--on-dark-2);
}
.fld input {
  width: 100%;
  min-height: 58px;
  padding: .75rem 1rem;
  font-size: 1.125rem;
  color: var(--on-dark);
  background: rgba(255,255,255,.06);
  border: 1.5px solid rgba(255,255,255,.14);
  border-radius: var(--r-m);
  transition: border-color .18s var(--ease), background-color .18s var(--ease);
}
.fld input:focus { background: rgba(255,255,255,.09); }
.fld input::placeholder { color: #8c9a90; }
.fld input:focus { border-color: var(--lime); outline: none; }
.fld input[aria-invalid='true'] { border-color: #e2725b; }

.fld__err {
  display: none;
  margin-top: .375rem;
  font-size: var(--t-small);
  color: #f0937f;
}
.fld__err.is-on { display: block; }

.chk {
  display: flex; align-items: center; gap: .75rem;
  min-height: 44px;              /* нажимают по лейблу — он и есть цель */
  padding-block: .25rem;
  margin-block: .5rem 1.25rem;
  font-size: var(--t-small); line-height: 1.45;
  color: var(--on-dark-2);
  cursor: pointer;
}
.chk input {
  flex: none;
  width: 24px; height: 24px;
  margin-top: .05em;
  accent-color: var(--lime);
}
.chk a { color: var(--on-dark); text-decoration-color: var(--lime); }

/* honeypot: убран из потока, но не display:none — часть ботов это читает */
.hp {
  position: absolute; left: -9999px;
  width: 1px; height: 1px; overflow: hidden;
}

.qsubmit { width: 100%; }
.qsubmit[disabled] { opacity: .55; pointer-events: none; }

.qnote {
  margin-top: .875rem;
  font-size: var(--t-small);
  color: var(--on-dark-2);
  text-align: center;
}

/* ============================================================
   СТРАНИЦА «СПАСИБО»
   ============================================================ */

.ty { padding-block: clamp(2rem, 6vw, 4rem) var(--sec); }
.ty__in { max-width: 40rem; }

.ty__mark {
  display: grid; place-items: center;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: var(--lime);
  color: var(--ink);
  margin-bottom: 1.5rem;
}
.ty__mark svg { width: 28px; height: 28px; }

.ty h1 { font-size: clamp(2rem, 6.5vw, 3.25rem); }

.ty__when {
  font-size: var(--t-lede);
  line-height: 1.45;
  color: var(--ink-soft);
  margin-top: .875rem;
}

.ty__wa {
  margin-top: clamp(2rem, 5vw, 2.75rem);
  padding: clamp(1.25rem, 4vw, 1.75rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  box-shadow: var(--sh-soft);
}
.ty__wa-t { font-weight: 600; margin-bottom: 1rem; }
.ty__wa-n {
  margin-top: .75rem; text-align: center;
  font-size: var(--t-small); color: var(--ink-mute);
}

.btn--wa {
  width: 100%;
  background: #25d366;
  color: #08340f;
  box-shadow: 0 1px 2px rgba(28,31,27,.08), 0 10px 22px -12px rgba(37,211,102,.8);
}
.btn--wa:hover { background: #1fbb59; transform: translateY(-2px); }

.ty__next { margin-top: var(--sec); }
.ty__next h2 { font-size: clamp(1.375rem, 4vw, 1.875rem); margin-bottom: 1.5rem; }

.ty__steps { list-style: none; padding: 0; margin: 0; counter-reset: s; }
.ty__steps li {
  counter-increment: s;
  position: relative;
  padding: 0 0 1.5rem 3.5rem;
  border-left: 2px solid var(--line);
  margin-left: 1.125rem;
}
.ty__steps li:last-child { border-left-color: transparent; padding-bottom: 0; }
.ty__steps li::before {
  content: counter(s);
  position: absolute; left: -1.1875rem; top: -.1rem;
  width: 2.25rem; height: 2.25rem;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--paper);
  border: 1.5px solid var(--lime);
  color: var(--lime-text);
  font-size: .875rem; font-weight: 600;
}
.ty__steps b { display: block; margin-bottom: .2rem; }
.ty__steps span { color: var(--ink-mute); font-size: var(--t-small); line-height: 1.5; }

.ty__contacts {
  margin-top: var(--sec);
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: var(--t-small);
}
.ty__contacts p + p { margin-top: .375rem; }
.ty__contacts a { font-weight: 600; color: var(--ink); }
.ty__hours { color: var(--ink-mute); }

/* ============================================================
   6. КОНТАКТЫ И ФОРМА
   ============================================================ */

.fin { background: var(--cream); position: relative; z-index: 2; }
.fin__in { display: grid; gap: clamp(2.5rem, 6vw, 4rem); }

.fin__form h2 { margin-bottom: .75rem; }
.fin__form .lede { margin-bottom: 1.75rem; max-width: 34ch; }

/* поля на светлом фоне — переопределяем тёмный вариант из квиза */
.fin__form .fld input {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}
.fin__form .fld input::placeholder { color: var(--ink-mute); }
.fin__form .fld label { color: var(--ink-soft); }
.fin__form .chk { color: var(--ink-soft); }
.fin__form .chk a { color: var(--ink); }
.fin__form .qnote { color: var(--ink-mute); }
.fin__form .fld__err { color: #b4381f; }

.fin__contacts { display: grid; gap: 1.75rem; align-content: start; }
.fin__block h3 {
  font-family: var(--f-text);
  font-size: .8125rem; font-weight: 600;
  letter-spacing: .11em; text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: .625rem;
}

.fin__big {
  display: block;
  font-family: var(--f-display);
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  font-weight: 600; letter-spacing: -.02em;
  text-decoration: none;
}
.fin__big:hover { color: var(--lime-text); }
.fin__sec {
  display: inline-flex; align-items: center;
  min-height: 44px; margin-top: .125rem;
  color: var(--ink-soft); text-decoration: none;
  box-shadow: inset 0 -1.5px 0 var(--line);
}
.fin__sec:hover { border-color: var(--lime); }

.fin__msgs { display: flex; flex-wrap: wrap; gap: .5rem; }
.msg {
  display: inline-flex; align-items: center; gap: .5rem;
  min-height: 48px; padding: .5rem 1rem;
  border-radius: var(--r-m);
  background: var(--surface);
  border: 1.5px solid var(--line);
  font-size: var(--t-small); font-weight: 600;
  text-decoration: none;
  transition: border-color .18s var(--ease), transform .18s var(--ease);
}
.msg svg { width: 20px; height: 20px; }
.msg:hover { transform: translateY(-2px); }
/* Фирменные цвета мессенджеров затемнены до 4.5:1 на белом:
   исходные #128c4a и #1c7fb8 давали 4.31 и 4.40 — не проходили. */
.msg--wa { color: #0c6f38; } .msg--wa:hover { border-color: #25d366; }
.msg--tg { color: #14627f; } .msg--tg:hover { border-color: #29a1dc; }
.msg--vb { color: #634490; } .msg--vb:hover { border-color: #7d5fb2; }

.fin__addr { font-size: 1.0625rem; font-weight: 600; }
.fin__hours { font-size: var(--t-small); color: var(--ink-mute); margin-top: .25rem; }

/* --- карта: фасад, iframe только по клику --- */

.mapbox {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--r-m);
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, #eee9dd 0 40%, #e6e0d1 40% 60%, #eee9dd 60%),
    var(--paper);
  display: grid; place-items: center; gap: .75rem;
  align-content: center;
}
.mapbox::before {
  content: '';
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(0deg, transparent 0 38px, rgba(101,106,97,.09) 38px 40px),
    repeating-linear-gradient(90deg, transparent 0 52px, rgba(101,106,97,.09) 52px 54px);
}
.mapbox__btn, .mapbox__ext { position: relative; }
.mapbox__btn {
  display: inline-flex; align-items: center; gap: .5rem;
  min-height: 52px; padding: .75rem 1.5rem;
  border-radius: var(--r-m);
  background: var(--surface);
  border: 1.5px solid var(--line);
  font-weight: 600;
  box-shadow: var(--sh-soft);
  transition: border-color .18s var(--ease), transform .18s var(--ease);
}
.mapbox__btn:hover { border-color: var(--lime); transform: translateY(-2px); }
.mapbox__btn svg { color: var(--lime-deep); }
.mapbox__ext {
  display: inline-flex; align-items: center;
  min-height: 44px; padding-inline: .5rem;
  font-size: var(--t-small); font-weight: 600;
  color: var(--ink-soft);
  box-shadow: inset 0 -1.5px 0 var(--line);
  text-decoration: none;
}
.mapbox__ext:hover { border-color: var(--lime); }
.mapbox iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.mapbox.is-live::before,
.mapbox.is-live .mapbox__btn,
.mapbox.is-live .mapbox__ext { display: none; }

/* ============================================================
   ФУТЕР
   ============================================================ */

.foot {
  background: var(--forest);
  color: var(--on-dark-2);
  padding-block: clamp(2.5rem, 6vw, 3.5rem);
  position: relative; z-index: 2;
}
.foot__in { display: grid; gap: 1.75rem; }
.foot img { filter: brightness(0) invert(1); opacity: .92; }

.foot__legal { margin-top: 1rem; font-size: var(--t-small); }
.foot__legal .slot--inline { color: var(--on-dark-2); border-color: rgba(255,255,255,.16); }
.foot__addr { margin-top: .5rem; font-size: var(--t-small); }

.foot__links { display: grid; gap: .625rem; align-content: start; }
.foot__links a {
  display: inline-flex; align-items: center;
  min-height: 44px;
  font-size: var(--t-small); font-weight: 600;
  color: var(--on-dark); text-decoration: none;
  box-shadow: inset 0 -1px 0 rgba(255,255,255,.2);
  justify-self: start;
}
.foot__links a:hover { box-shadow: inset 0 -1px 0 var(--lime); }

.foot__note {
  max-width: 44rem;
  font-size: .8125rem; line-height: 1.55;
  color: #93a698;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,.12);
}

/* ============================================================
   ЛИПКАЯ ПАНЕЛЬ (мобильная)
   ============================================================ */

.dock {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: .5rem;
  padding: .5rem .75rem calc(.5rem + env(safe-area-inset-bottom));
  background: rgba(250,248,243,.94);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  transform: translateY(110%);
  transition: transform .32s var(--ease);
}
.dock.is-on { transform: none; }

.dock__ic {
  display: grid; place-items: center;
  width: 52px; height: 52px;
  border-radius: var(--r-m);
  border: 1.5px solid var(--line);
  background: var(--surface);
  text-decoration: none;
}
.dock__ic svg { width: 22px; height: 22px; }
.dock .btn { min-height: 52px; padding-inline: 1rem; }

/* ============================================================
   АДАПТИВ
   ============================================================ */

@media (min-width: 600px) {
  .hero__actions { flex-direction: row; align-items: center; }
  .hero__actions .btn { flex: 0 1 auto; }
  .trust { grid-template-columns: repeat(4, 1fr); }
  .trust li { padding: 1.375rem 1.25rem; }
}

@media (min-width: 900px) {
  :root { --t-body: 1.125rem; }

  .topbar__hours { display: block; }
  .topbar__in { padding-block: .5rem; }

  /* Асимметрия: текст 54%, фото доходит ровно до правого края экрана.
     Сетка на всю ширину: колонки считаются от контентной ширины,
     поэтому полоса прокрутки учтена сама собой. Негативный отступ
     через 100vw этого не умеет — он её включает и промахивается. */
  .hero { padding-top: clamp(2rem, 4vw, 3.5rem); }
  .hero__in {
    max-width: none;
    padding-inline: 0;
    display: grid;
    grid-template-columns:
      minmax(var(--gut), 1fr)
      minmax(0, calc(var(--maxc) * .54))
      minmax(0, calc(var(--maxc) * .46))
      minmax(0, 1fr);
    align-items: center;
  }
  /* фото в разметке идёт первым (так верно на мобильном),
     на десктопе раскладываем по колонкам явно */
  .hero__body  {
    grid-column: 2; grid-row: 1;
    padding-right: clamp(1.5rem, 4vw, 3.5rem);
  }
  .hero__media {
    /* от своей колонки до правого края экрана */
    grid-column: 3 / -1; grid-row: 1;
    aspect-ratio: auto;
    height: clamp(440px, 72vh, 660px);
    margin: 0;
    /* у края экрана скругление снимаем — иначе виден срезанный угол */
    border-radius: var(--r-l) 0 0 var(--r-l);
  }
  .hero__media::after { display: none; }
  .hero__body { margin-top: 0; padding-top: 0; }
  .hero__lede { max-width: 40ch; }

  .trust {
    margin-top: clamp(3rem, 6vw, 4.5rem);
    position: relative;
    z-index: 3;
  }

  .build__grid {
    grid-template-columns: minmax(0, 44fr) minmax(0, 56fr);
    align-items: center;
  }
  .stage__frames { max-height: 72vh; }

  .quiz__in {
    display: grid;
    grid-template-columns: minmax(0, 38fr) minmax(0, 62fr);
    gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
  }
  .quiz__head { margin-bottom: 0; position: sticky; top: 2.5rem; }
  .qopts--pair { grid-template-columns: 1fr 1fr; }

  /* средняя колонка шире и приподнята — асимметрия вместо трёх равных */
  .tiers__grid {
    grid-template-columns: 1fr 1.14fr 1fr;
    align-items: start;
    gap: 1.25rem;
    padding-top: 1.25rem;
  }
  .tier--pick { margin-top: -1.25rem; }
  .seg__row { grid-template-columns: repeat(3, 1fr); }

  /* Врач: портрет — вертикальное видео — карточка фактов.
     Высоту ряда задаёт видео 9:16, портрет тянется до неё
     и кадрируется по ширине: лицо по центру, обрезка не мешает. */
  .doc__grid {
    grid-template-columns: minmax(0, 27fr) minmax(0, 27fr) minmax(0, 46fr);
    gap: 1.25rem;
    align-items: stretch;
  }
  /* Строку задаём явно: в разметке порядок «фото → карточка → видео»,
     а авторазмещение назад по сетке не возвращается и уводит видео вниз. */
  .doc__photo { grid-column: 1; grid-row: 1; align-self: start; }
  .doc__video { grid-column: 2; grid-row: 1; align-self: start; }
  .doc__card  { grid-column: 3; grid-row: 1; align-self: start; }

  .doc__eq { grid-template-columns: repeat(4, 1fr); }
  .doc__eq li { padding: 1.375rem 1.25rem; }

  .cases__grid { grid-template-columns: repeat(3, 1fr); }

  /* вопросы и квиз идут парой: одинаковая раскладка со залипающим
     заголовком, разный фон — светлый, затем тёмный */
  .faq__in {
    display: grid;
    grid-template-columns: minmax(0, 38fr) minmax(0, 62fr);
    gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
  }
  .faq__head { margin-bottom: 0; position: sticky; top: 2.5rem; }
  .qa summary { padding: 1.125rem 1.5rem; font-size: 1.125rem; }
  .qa__body { padding: 0 1.5rem 1.5rem; }

  .fin__in { grid-template-columns: minmax(0, 46fr) minmax(0, 54fr); }
  .fin__contacts { grid-template-columns: 1fr 1fr; gap: 2rem 1.75rem; }
  .fin__block:nth-child(3) { grid-column: 1 / -1; }
  .mapbox { grid-column: 1 / -1; aspect-ratio: 16 / 9; }

  .foot__in {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2rem 3rem;
  }
  .foot__note { grid-column: 1 / -1; }
  .xray {
    grid-template-columns: minmax(0, 38fr) minmax(0, 62fr);
    align-items: center;
    gap: clamp(2rem, 4vw, 3rem);
  }

  .dock { display: none; }
}


/* ------------------------------------------------------------
   Сверхширокие экраны.
   Вынос фото за край — приём для обычного десктопа. Когда
   контейнер занимает меньше половины ширины, фото уезжает
   к краю, а весь остальной контент заканчивается сильно левее:
   правый край страницы получается рваный и всё «клонит» влево.
   Здесь возвращаемся к симметричной раскладке в контейнере.
   ------------------------------------------------------------ */

@media (min-width: 1600px) {
  .hero__in {
    max-width: var(--max);
    margin-inline: auto;
    padding-inline: var(--gut);
    grid-template-columns: minmax(0, 54fr) minmax(0, 46fr);
  }
  .hero__body  { grid-column: 1; }
  .hero__media {
    --bleed: 0;                  /* здесь вынос выключен намеренно */
    grid-column: 2;
    border-radius: var(--r-l);   /* больше не у края — скругление возвращаем */
  }
}

/* ============================================================
   ПОЯВЛЕНИЕ
   Сдержанно: один момент на секцию, а не анимация на каждом
   элементе. Базовая непрозрачность везде 1 — если анимации не
   отработают, контент всё равно виден.
   ============================================================ */

@keyframes riseIn {
  from { opacity: 0; transform: translateY(14px); }
}

/* --- первый экран: каскад по загрузке, без ожидания скролла --- */

.hero__body > * {
  animation: riseIn .62s var(--ease) both;
}
.hero__body > *:nth-child(1) { animation-delay: .04s; }
.hero__body > *:nth-child(2) { animation-delay: .12s; }
.hero__body > *:nth-child(3) { animation-delay: .20s; }
.hero__body > *:nth-child(4) { animation-delay: .28s; }
.hero__body > *:nth-child(5) { animation-delay: .36s; }

/* Фото не трогаем: это кандидат в LCP, анимация непрозрачности
   отодвинула бы момент отрисовки на длительность каскада. */

/* Засечка под ценой дорисовывается после появления заголовка */
.mark::after {
  transform-origin: left center;
  animation: markIn .5s var(--ease) .55s both;
}
@keyframes markIn { from { transform: scaleX(0); } }

/* --- секции: по одному появлению на смысловой блок --- */

.js .reveal { opacity: 0; transform: translateY(16px); }
.js .reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity .6s var(--ease), transform .6s var(--ease);
  transition-delay: calc(var(--i, 0) * 90ms);
}

/* --- счётчик цифр доверия --- */

.trust b { font-variant-numeric: tabular-nums; }

/* ============================================================
   ДОСТУПНОСТЬ
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .from-above, .fade-up { transform: none; }
}

.vh {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; border: 0;
}
