/* ==========================================================================
   МагИИ — landing stylesheet
   Токены: magii-design-system.md. Меню/подвал: порт с kenai-landing.
   Правило проекта: никаких свечений/glow — только чистые переходы.
   ========================================================================== */

:root {
  --bg: #000000;
  --bg-2: #0F1115;
  --surface: #16181D;
  --border: #26292F;
  --text: #F5F6F8;
  --text-2: #8E939C;
  --accent: #007BFF;
  --success: #3ECF8E;
  --font-heading: 'Lexend', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  --radius: 12px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --header-h: 88px;
  /* меню живёт на --bg-2; секции — на чёрном или глубоком синем */
  --menu-bg: #0F1115;
  --bg-blue: #030710;
  /* высота телефона: максимум 651px (ширина 320), но всегда вписывается в экран */
  --phone-h: min(651px, calc(100svh - 160px));
}

/* ---------- base ---------- */

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

/* [hidden] должен побеждать наши же display: flex/inline-flex
   (иначе скрытые через JS элементы формы остаются на экране) */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--font-heading); line-height: 1.2; }
h1 { font-weight: 700; font-size: clamp(2rem, 4.6vw, 3.4rem); letter-spacing: -0.01em; }
h2 { font-weight: 600; font-size: clamp(1.6rem, 3.4vw, 2.4rem); }
h3 { font-weight: 500; font-size: 1.15rem; }

/* height: auto обязателен — у картинок проставлены атрибуты width/height
   (это подсказка браузеру о пропорциях, без неё скачет вёрстка при загрузке).
   Атрибут height иначе работает как жёсткая высота там, где CSS задаёт
   только ширину, и картинка растягивается */
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

section[id], main[id], article[id] { scroll-margin-top: var(--header-h); }

.section { padding: 96px 0; }
.section--alt { background: var(--bg-blue); }

.section-head { text-align: center; max-width: 760px; margin: 0 auto 56px; }
.section-head--left { text-align: left; margin-left: 0; }
/* типографический акцент секции: маленький синий надзаголовок вместо декоративных линий */
.eyebrow {
  color: var(--accent);
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.section-sub { color: var(--text-2); margin-top: 16px; font-size: 17px; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: #2b90ff; }
.btn--ghost { background: rgba(255, 255, 255, 0.08); color: var(--text); }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.14); }
.btn--small { padding: 9px 18px; font-size: 14px; }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- header (порт KenAI) ---------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--menu-bg);
  transform: translateY(-100%);
  visibility: hidden;
  transition: transform 0.45s var(--ease-out), visibility 0.45s;
}
.site-header--visible { transform: translateY(0); visibility: visible; }

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}
.site-header .logo img { height: 40px; width: auto; transition: transform 0.2s ease; }
.site-header .logo:hover img { transform: scale(1.05); }

.header-cta { display: flex; align-items: center; gap: 12px; }

.site-nav { display: flex; align-items: center; gap: 2px; }
@media (min-width: 1081px) {
  .site-nav { margin-left: auto; margin-right: 28px; }
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 13px;
  border: none;
  background: none;
  border-radius: var(--radius);
  color: var(--text-2);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.nav-link:hover { color: var(--text); background: rgba(255, 255, 255, 0.07); text-decoration: none; }
.nav-link[aria-current] { color: var(--text); }
.nav-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.nav-caret { font-size: 10px; opacity: 0.6; transition: transform 0.2s ease; }
.nav-item--dropdown:hover .nav-caret,
.nav-item--dropdown.open .nav-caret { transform: rotate(180deg); }

.nav-item--dropdown { position: relative; }

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

.dropdown {
  position: absolute;
  left: 0;
  top: 100%;
  padding-top: 10px;
  display: none;
  z-index: 60;
}
.nav-item--dropdown:hover .dropdown,
.nav-item--dropdown:focus-within .dropdown,
.nav-item--dropdown.open .dropdown { display: block; }

.dropdown__panel {
  min-width: 220px;
  background: var(--menu-bg);
  border-radius: var(--radius);
  padding: 8px;
  animation: dropIn 0.22s ease backwards;
}
.dropdown__panel a {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--text);
  font-size: 14.5px;
  font-weight: 400;
  line-height: 1.4;
}
.dropdown__panel a:hover { background: rgba(255, 255, 255, 0.07); text-decoration: none; }

.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
}
.nav-burger span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.nav-burger:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.site-header.nav-open .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-header.nav-open .nav-burger span:nth-child(2) { opacity: 0; }
.site-header.nav-open .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 100px 0 70px;
}

/* две колонки: текст слева, телефон справа — мокап виден сразу, без прокрутки */
.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 64px;
  align-items: center;
  text-align: left;
}
.hero h1 { font-size: clamp(1.9rem, 3.4vw, 2.8rem); }
/* строка-уточнение под заголовком */
.hero__for {
  color: var(--accent);
  font-family: var(--font-heading);
  font-size: 15.5px;
  font-weight: 500;
  margin-top: 16px;
}
.hero__sub { color: var(--text-2); font-size: clamp(16px, 2vw, 19px); max-width: 640px; margin: 22px 0 0; }
.hero__cta { display: flex; gap: 14px; justify-content: flex-start; margin-top: 36px; flex-wrap: wrap; }

@keyframes heroIn {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero h1      { animation: heroIn 0.7s var(--ease-out) 0.1s both; }
.hero__for    { animation: heroIn 0.7s var(--ease-out) 0.2s both; }
.hero__sub    { animation: heroIn 0.7s var(--ease-out) 0.3s both; }
.hero__cta    { animation: heroIn 0.7s var(--ease-out) 0.42s both; }
.hero__phone  { animation: heroIn 0.8s var(--ease-out) 0.56s both; }

/* рамка телефона hero: слайды лежат стопкой и сменяются кроссфейдом */
.phone {
  position: relative;
  width: calc(var(--phone-h) * 1329 / 2706);
  aspect-ratio: 1329 / 2706;
  margin: 0 auto;
}
.phone__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 0.45s ease, transform 0.45s var(--ease-out);
}
.phone__img.is-active { opacity: 1; transform: scale(1); }


/* ---------- 2. схемы МагИИ (было/стало) ---------- */

.transform { background: var(--bg); }
.transform__track { height: 320vh; }
.transform__stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  /* верхний отступ — под фиксированную шапку, заголовок не ложится на схему */
  padding: calc(var(--header-h) + 10px) 24px 14px;
  overflow: hidden;
  /* производные от прогресса --p (0..1), пишется скриптом */
  --wipe: clamp(0, calc((var(--p, 0) - 0.25) / 0.5), 1);
  --caption: clamp(0, calc((var(--p, 0) - 0.78) / 0.14), 1);
}
.transform__head { text-align: center; }
.transform__titles { position: relative; display: grid; }
.transform__title {
  grid-area: 1 / 1;
  transition: none;
  font-size: clamp(1.35rem, 2.6vw, 1.9rem);
}
/* резкий кроссфейд, чтобы заголовки не накладывались в середине перехода */
.transform__title--before { opacity: clamp(0, calc(1 - var(--wipe) * 2.4), 1); }
.transform__title--after { opacity: clamp(0, calc((var(--wipe) - 0.58) * 2.4), 1); }

.transform__canvas {
  position: relative;
  width: min(1024px, 70vw);
  flex: 1;
  min-height: 0;
  /* ограничение по высоте — чтобы схема не упиралась в края экрана */
  max-height: 56svh;
}
.transform__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.transform__img--after {
  /* PNG прозрачный — чёрная подложка, чтобы сквозь него не просвечивала схема «до» */
  background: var(--bg);
  clip-path: inset(0 calc((1 - var(--wipe)) * 100%) 0 0);
}
.transform__seam {
  position: absolute;
  top: 4%;
  bottom: 4%;
  left: calc(var(--wipe) * 100%);
  width: 1px;
  background: var(--border);
  opacity: calc(var(--wipe) * (1 - var(--wipe)) * 4); /* видна только в середине перехода */
}

/* подпись стоит в потоке сразу под схемой */
.transform__caption {
  margin-top: 6px;
  text-align: center;
  font-family: var(--font-heading);
  font-size: clamp(1.05rem, 2vw, 1.4rem);
  color: var(--text-2);
  opacity: var(--caption);
  transform: translateY(calc((1 - var(--caption)) * 14px));
}
.transform__caption strong { color: var(--text); font-weight: 600; }

/* ---------- 3. профессиональные сценарии ---------- */

.pro__layout {
  display: grid;
  /* колонка 320px, как у телефона в hero — оба телефона на одной вертикальной оси */
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 64px;
  /* колонка телефона обязана растягиваться на всю высоту ряда,
     иначе sticky-обёртке некуда «ехать» */
  align-items: stretch;
}
.pro__stage-text { position: relative; }
.pro__sticky-text {
  position: sticky;
  /* карточка чуть ниже телефона и с запасом от меню */
  top: max(calc(50vh - var(--phone-h) / 2 + 56px), 132px);
  height: calc(var(--phone-h) - 44px);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: 20px;
  padding: 26px 28px 22px;
}
/* текстовые панели наложены друг на друга и сменяются фейдом */
.pro__texts { display: grid; flex: 1; min-height: 0; overflow: hidden; align-content: start; }
.pro__text {
  grid-area: 1 / 1;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.45s ease, transform 0.45s var(--ease-out);
  pointer-events: none;
}
.pro__text.is-active { opacity: 1; transform: none; pointer-events: auto; }

.pro__text h3 { font-size: 1.5rem; font-weight: 600; margin-bottom: 16px; }
.pro__tag {
  color: var(--text-2);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.bubbles { display: flex; flex-direction: column; gap: 9px; max-width: 560px; }
.bubbles li {
  position: relative;
  background: rgba(15, 17, 21, 0.55); /* полупрозрачный тёмный — мягче на карточке */
  border-radius: 16px 16px 16px 4px;
  padding: 10px 16px;
  font-size: 14.5px;
  width: fit-content;
}
/* пузыри «печатаются» каскадом при активации панели */
.pro__text .bubbles li { opacity: 0; transform: translateY(8px); transition: opacity 0.4s ease, transform 0.4s var(--ease-out); }
.pro__text.is-active .bubbles li { opacity: 1; transform: none; }
.pro__text.is-active .bubbles li:nth-child(1) { transition-delay: 0.05s; }
.pro__text.is-active .bubbles li:nth-child(2) { transition-delay: 0.1s; }
.pro__text.is-active .bubbles li:nth-child(3) { transition-delay: 0.15s; }
.pro__text.is-active .bubbles li:nth-child(4) { transition-delay: 0.2s; }
.pro__text.is-active .bubbles li:nth-child(5) { transition-delay: 0.25s; }
.pro__text.is-active .bubbles li:nth-child(6) { transition-delay: 0.3s; }
.pro__text.is-active .bubbles li:nth-child(7) { transition-delay: 0.35s; }

.pro__phone-inline { display: none; }

/* правая колонка: стопка телефонов в закреплённом окне. Текущий телефон
   стоит на одной оси с карточкой текста и не двигается; при скролле следующий
   выезжает снизу, накрывает его и встаёт на то же место — тогда предыдущий
   скрывается (видимость и сдвиг въезжающего пишет скрипт). */
.pro__phones {
  /* задаёт длину прокрутки секции: по слоту 150vh на каждый телефон —
     чем больше слот, тем медленнее смена телефонов при скролле */
  height: calc(13 * 150vh);
}
.pro__phones-window {
  position: sticky;
  /* геометрия окна повторяет карточку слева: прилипают одновременно,
     телефон стоит на оси карточки и до пиннинга, и после */
  top: max(calc(50vh - var(--phone-h) / 2 + 56px), 132px);
  height: calc(var(--phone-h) - 44px);
}
.pro__phoneblock {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  /* скрипт показывает только текущий и въезжающий телефоны */
  visibility: hidden;
  will-change: transform;
}
.pro__phoneblock:first-child { visibility: visible; }
.pro__phoneblock img {
  width: calc(var(--phone-h) * 1329 / 2706);
}

/* ряд управления: точки и кнопка «пропустить сценарии» */
.pro__controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
  padding-top: 16px;
}
.pro__dots { display: flex; gap: 8px; }
.pro__dots button {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: var(--border);
  cursor: pointer;
  transition: background-color 0.25s ease, transform 0.25s ease;
}
.pro__dots button.is-active { background: var(--accent); transform: scale(1.4); }
.pro__skip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: none;
  color: var(--text-2);
  border: none;
  border-radius: 999px;
  padding: 8px 14px;
  font-family: var(--font-body);
  font-size: 13px;
  cursor: pointer;
  transition: color 0.2s ease;
}
.pro__skip:hover { color: var(--text); }
.pro__skip svg { width: 14px; height: 14px; }

/* ---------- 5. что делает МагИИ ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  list-style: none;
}
/* карточка шага в духе cleveris: акцентная засечка, крупный бледный номер, заголовок, текст */
.steps li {
  text-align: left;
  background: var(--surface);
  border-radius: 16px;
  padding: 26px 26px 30px;
  transition: transform 0.25s var(--ease-out), background-color 0.25s ease;
}
/* тонкая засечка, как на cleveris.org: при наведении растягивается на всю ширину */
.steps li::before {
  content: "";
  display: block;
  width: 36px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  margin-bottom: 22px;
  transition: width 0.55s var(--ease-out);
}
.steps li:hover::before { width: 100%; }
.steps li:hover { transform: translateY(-4px); background: #1C1F26; }
.steps__num {
  display: block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 52px;
  line-height: 1;
  color: rgba(0, 123, 255, 0.38);
  margin-bottom: 14px;
  transition: color 0.25s ease;
}
.steps li:hover .steps__num { color: var(--accent); }
.steps h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 8px; }
.steps p { color: var(--text-2); font-size: 14.5px; }

/* ---------- 6. зачем нужен МагИИ ---------- */

.why__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.why__card {
  background: var(--surface);
  border-radius: 16px;
  padding: 30px 26px;
  transition: transform 0.25s var(--ease-out), background-color 0.25s ease;
}
.why__card:hover { transform: translateY(-4px); background: #1C1F26; }
.why__icon { width: 52px; height: 52px; object-fit: contain; margin-bottom: 18px; }
.why__card h3 { margin-bottom: 10px; font-size: 1.08rem; }
.why__card p { color: var(--text-2); font-size: 14.5px; }

/* карточка «собирает себя»: иконка → заголовок → текст */
@keyframes popIn {
  from { opacity: 0; transform: scale(0.6); }
  60% { opacity: 1; transform: scale(1.08); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes riseIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.why__card .why__icon, .why__card h3, .why__card p { opacity: 0; }
.why__card.reveal--in .why__icon { animation: popIn 0.5s var(--ease-out) 0.05s forwards; }
.why__card.reveal--in h3 { animation: riseIn 0.5s var(--ease-out) 0.18s forwards; }
.why__card.reveal--in p { animation: riseIn 0.5s var(--ease-out) 0.3s forwards; }

/* ---------- 7. ключевые возможности ---------- */

/* обозреватель возможностей: слева список с номерами, справа крупная карточка деталей */
.featx {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 48px;
  align-items: start;
}
.featx__list { display: flex; flex-direction: column; }
.featx__btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 15px 18px;
  background: none;
  border: none;
  border-left: 2px solid transparent;
  border-radius: 0 10px 10px 0;
  cursor: pointer;
  text-align: left;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.featx__num {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 17px;
  line-height: 1;
  color: rgba(0, 123, 255, 0.38);
  min-width: 28px;
  transition: color 0.25s ease;
}
.featx__name {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 15.5px;
  color: var(--text-2);
  transition: color 0.2s ease;
}
.featx__btn:hover .featx__name,
.featx__btn:hover .featx__num { color: var(--accent); }
.featx__item.is-active .featx__btn {
  background: rgba(0, 123, 255, 0.1);
  border-left-color: var(--accent);
}
.featx__item.is-active .featx__num { color: var(--accent); }
.featx__item.is-active .featx__name { color: var(--text); }
/* на десктопе описание живёт только в правой панели */
.featx__desc { display: none; }

.featx__panel {
  background: var(--surface);
  border-radius: 20px;
  padding: 42px 44px;
  min-height: 300px;
}
.featx__panel-num {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 56px;
  line-height: 1;
  color: rgba(0, 123, 255, 0.38);
  margin-bottom: 20px;
}
.featx__panel-title { font-size: 1.45rem; font-weight: 600; margin-bottom: 14px; }
.featx__panel-desc { color: var(--text-2); font-size: 15.5px; }

/* ---------- 8. наши клиенты ---------- */

.clients { padding-bottom: 72px; }

.marquee {
  display: flex;
  flex-direction: column;
  gap: 34px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  padding: 10px 0;
}
.marquee__row { overflow: hidden; }
.marquee__track {
  display: flex;
  align-items: center;
  gap: 72px;
  width: max-content;
  padding-right: 72px;
  animation: marquee 90s linear infinite;
}
.marquee__row:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee {
  to { transform: translateX(-50%); }
}
.marquee__track img {
  height: 72px;
  width: auto;
  filter: grayscale(1) brightness(2);
  opacity: 0.95;
  transition: filter 0.3s ease;
}
.marquee__track img:hover { filter: none; }

/* ---------- 9. почему мы ---------- */

.about__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-bottom: 64px;
}
.stat {
  text-align: center;
  background: var(--surface);
  border-radius: 16px;
  padding: 30px 20px;
}
.stat__num {
  display: block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  margin-bottom: 6px;
}
.stat__label { color: var(--text-2); font-size: 14.5px; }

.about__table { margin-bottom: 56px; }
.about__table h3 { text-align: center; font-size: 1.3rem; font-weight: 600; margin-bottom: 26px; }

/* сравнительная таблица: единая карточка на --surface,
   колонка МагИИ — сплошная полоса акцентного синего тона */
.compare {
  background: var(--surface);
  border-radius: 16px;
  padding: 12px;
}
.compare__head,
.compare__row {
  display: grid;
  grid-template-columns: 1fr 1fr 1.25fr 1.25fr;
  gap: 0;
}
.compare__head > div,
.compare__row > div {
  padding: 16px 20px;
}
.compare__head > div {
  color: var(--text-2);
  font-family: var(--font-heading);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.compare__head .compare__magii {
  color: var(--accent);
  background: rgba(0, 123, 255, 0.12);
  border-radius: 12px 12px 0 0;
}
.compare__row { font-size: 14.5px; color: var(--text-2); }
.compare__row:nth-child(odd) > .compare__param,
.compare__row:nth-child(odd) > div:not(.compare__magii) { background: rgba(255, 255, 255, 0.02); }
.compare__param { color: var(--text); font-weight: 500; font-family: var(--font-heading); }
.compare__row .compare__magii {
  background: rgba(0, 123, 255, 0.12);
  color: var(--text);
  font-weight: 600;
}
.compare__row:last-child .compare__magii { border-radius: 0 0 12px 12px; }
/* подписи-ярлыки нужны только в мобильной раскладке */
.compare__row > div::before { content: none; }

.about__pdf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  background: var(--surface);
  border-radius: 16px;
  padding: 28px 32px;
}
.about__pdf h3 { font-size: 1.15rem; margin-bottom: 6px; }
.about__pdf p { color: var(--text-2); font-size: 14.5px; }

/* ---------- 10. цены ---------- */

.pricing__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 420px));
  gap: 26px;
  justify-content: center;
}
.plan {
  background: var(--surface);
  border-radius: 20px;
  padding: 40px 36px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
/* акцентная синяя рамка — допустима, в отличие от серых */
.plan--featured { border: 1px solid var(--accent); }
.plan h3 { font-size: 1.35rem; font-weight: 600; }
.plan__for { color: var(--text-2); font-size: 14.5px; }
.plan__price {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 3.2rem;
  margin-top: 14px;
  line-height: 1;
}
.plan__terms { color: var(--text-2); font-size: 14px; margin-bottom: 20px; }
/* зеркальный въезд карточек */
.plan[data-slide="left"] { transform: translateX(-40px); }
.plan[data-slide="right"] { transform: translateX(40px); }
.plan.reveal--in { transform: none; }

/* ---------- 11. команда ---------- */

.team__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 36px;
}
.member { text-align: center; width: 180px; }
.member img {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  /* портреты вертикальные — прижимаем кадр к верху, чтобы не резало головы */
  object-position: center top;
  margin: 0 auto 16px;
  filter: grayscale(1);
  transition: filter 0.35s ease;
}
.member:hover img { filter: none; }
.member h3 { font-size: 1.02rem; margin-bottom: 4px; }
.member p { color: var(--text-2); font-size: 13.5px; }

/* ---------- 12. ЧаВо ---------- */

.faq__list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 860px;
  margin: 0 auto;
}

.faq details {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
}
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 15.5px;
  transition: color 0.2s ease;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--accent); }
.plus { position: relative; flex: none; width: 16px; height: 16px; }
.plus::before, .plus::after {
  content: "";
  position: absolute;
  background: var(--text-2);
  transition: transform 0.25s ease;
}
.plus::before { left: 7px; top: 0; width: 2px; height: 16px; }
.plus::after { top: 7px; left: 0; height: 2px; width: 16px; }
.plus { transition: transform 0.25s ease; }
.faq details[open] .plus { transform: rotate(45deg); }

.faq__body { padding: 0 20px 20px; color: var(--text-2); font-size: 14.5px; }
.faq__body p { margin-bottom: 8px; }
.faq__body ul { list-style: disc; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }

/* ---------- 13. контакты + форма ---------- */

.contact__layout {
  display: grid;
  /* компактная форма справа, больше воздуха слева */
  grid-template-columns: minmax(0, 1fr) 440px;
  gap: 80px;
  align-items: start;
}
.contact__info[data-slide="left"] { transform: translateX(-40px); }
.lead-form[data-slide="right"] { transform: translateX(40px); }
.contact__info.reveal--in, .lead-form.reveal--in { transform: none; }

/* заголовок внутри левой колонки — форма справа начинается на той же высоте */
.contact__info .section-head { margin-bottom: 30px; }
.contact__lead { font-family: var(--font-heading); font-size: 1.25rem; font-weight: 500; margin-bottom: 28px; max-width: 480px; }
.contact__list { display: flex; flex-direction: column; gap: 16px; margin-bottom: 32px; color: var(--text-2); }
.contact__list li { display: flex; align-items: center; gap: 12px; }
.contact__list svg { width: 18px; height: 18px; flex: none; color: var(--accent); }
.contact__list a { color: var(--text); }
.contact__list a:hover { color: var(--accent); }
/* кнопки контактного блока — колонкой, регистрация на мероприятие сверху */
.contact__btns {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

/* форма в духе мессенджера: без подписей, поля-«пузыри», чипы вместо селекта */
.lead-form {
  background: var(--surface);
  border-radius: 20px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.lead-form__hint { color: var(--text-2); font-size: 14px; margin-bottom: 4px; }
/* имя и должность — в один ряд */
.lead-form__row { display: flex; gap: 12px; }
.lead-form__row input { min-width: 0; }
.lead-form input[type="text"],
.lead-form input[type="email"],
.lead-form input[type="tel"],
.lead-form textarea {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid transparent; /* прозрачная рамка — только чтобы фокус не сдвигал раскладку */
  border-radius: 12px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  padding: 13px 16px;
  transition: border-color 0.2s ease;
}
.lead-form input:focus, .lead-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.lead-form textarea { resize: vertical; }

.lead-form__seg-label {
  display: block;
  color: var(--text-2);
  font-size: 12.5px;
  margin: 4px 0 8px 2px;
}
.lead-form__chips { display: flex; gap: 8px; }
.lead-form__chips label { flex: 1; }
.lead-form__chips input { position: absolute; opacity: 0; pointer-events: none; }
.lead-form__chips span {
  display: block;
  text-align: center;
  padding: 10px 6px;
  border-radius: 10px;
  background: var(--bg-2);
  color: var(--text-2);
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.lead-form__chips span:hover { color: var(--text); }
.lead-form__chips input:checked + span { background: var(--accent); color: #fff; }
.lead-form__chips input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.lead-form__consent { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-2); margin-top: 2px; }
.lead-form__consent input { accent-color: var(--accent); width: 17px; height: 17px; flex: none; }
.lead-form__submit { width: 100%; margin-top: 6px; }
.lead-form__done { color: var(--success); font-size: 15px; text-align: center; padding: 12px 0; }

.lead-form__error { color: #F26D6D; font-size: 14px; text-align: center; }

/* honeypot: поле-ловушка для ботов, людям не видно */
.lead-form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------- footer (порт KenAI) ---------- */

.site-footer {
  background: var(--bg);
  padding: 48px 0 42px;
  color: var(--text-2);
  font-size: 13.5px;
  line-height: 1.7;
}
.foot-flex {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  flex-wrap: wrap;
}
.foot-text { max-width: 380px; }
.foot-logo { height: 26px; width: auto; margin-bottom: 14px; }
.foot-text p { margin-bottom: 6px; }
.foot-text a { color: var(--text-2); text-decoration: underline; }
.foot-text a:hover { color: var(--text); }
.foot-legal { margin-top: 16px; opacity: 0.6; }
.foot-copy { margin-top: 6px; opacity: 0.6; }

.foot-nav { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.foot-nav a { color: var(--text-2); text-decoration: none; }
.foot-nav a:hover { color: var(--text); text-decoration: underline; }
.fn-head {
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.fn-head--gap { margin-top: 12px; }

.foot-side { display: flex; flex-direction: column; gap: 16px; }
.foot-contact a { color: var(--text-2); }
.foot-contact a:hover { color: var(--text); }
.foot-social { display: flex; gap: 10px; }
.foot-social a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease, transform 0.15s ease;
}
.foot-social a:hover { background: var(--accent); transform: translateY(-2px); }

/* ---------- reveal-движок ---------- */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s var(--ease-out);
  transition-delay: var(--reveal-delay, 0s);
  will-change: opacity, transform;
}
.reveal--in { opacity: 1; transform: none; }
/* элементы с собственным transform-состоянием (слайды) — только opacity через .reveal */
.plan.reveal, .contact__info.reveal, .lead-form.reveal { transition: opacity 0.7s ease, transform 0.7s var(--ease-out); }

/* ---------- адаптив ---------- */

@media (max-width: 1024px) {
  .pro__layout { grid-template-columns: minmax(0, 1fr) 320px; gap: 36px; }
  .why__grid { grid-template-columns: repeat(2, 1fr); }
  .featx { grid-template-columns: 1fr; gap: 8px; }
  .featx__panel { display: none; }
  .featx__item { background: var(--surface); border-radius: 12px; margin-bottom: 8px; overflow: hidden; }
  .featx__btn { border-left: none; border-radius: 0; padding: 16px 18px; }
  .featx__item.is-active .featx__btn { background: rgba(0, 123, 255, 0.1); }
  .featx__item.is-active .featx__desc {
    display: block;
    padding: 14px 18px 18px 64px;
    color: var(--text-2);
    font-size: 14.5px;
  }
  .steps { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}

/* меню переключается на бургер раньше, чем контенту станет тесно */
@media (max-width: 1080px) {
  .nav-burger { display: flex; }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--menu-bg);
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px 20px 22px;
  }
  .site-header.nav-open .site-nav { display: flex; }
  .site-nav .nav-link { width: 100%; justify-content: flex-start; }
  .nav-item--dropdown { position: static; }
  .dropdown { position: static; padding-top: 0; }
  .dropdown__panel { min-width: 0; background: transparent; border: none; padding: 0 0 6px 14px; animation: none; }

}

@media (max-width: 880px) {
  .section { padding: 72px 0; }

  /* hero: одна колонка, телефон под текстом, текст компактнее */
  .hero__inner { grid-template-columns: 1fr; gap: 44px; text-align: center; }
  .hero h1 { font-size: 1.45rem; }
  .hero__for { font-size: 13.5px; margin-top: 12px; }
  .hero__sub { font-size: 14.5px; margin: 16px auto 0; }
  .hero__cta { justify-content: center; margin-top: 28px; }
  .phone--hero { width: min(280px, 66vw, calc(var(--phone-h) * 1329 / 2706)); }

  .transform__track { height: 260vh; }
  /* на мобильном картинка низкая: канвас не растягиваем, подпись сразу под схемой —
     заголовок, схема и подпись стоят компактной группой по центру экрана */
  .transform__stage {
    padding: calc(var(--header-h) + 12px) 16px 24px;
    justify-content: center;
    gap: 14px;
  }
  .transform__head { position: static; }
  .transform__canvas {
    flex: none;
    width: 70vw;
    max-height: none;
    aspect-ratio: 3840 / 2160;
  }
  .transform__caption { position: static; margin-top: 2px; }

  /* сценарии: без пиннинга — тексты статичны, телефон под пузырями */
  .pro__layout { grid-template-columns: 1fr; }
  .pro__phones, .pro__controls { display: none; }
  .pro__sticky-text { position: static; padding: 0; background: none; border-radius: 0; height: auto; display: block; }
  .pro__texts { display: block; }
  /* каждый сценарий — та же карточка, что на десктопе; телефон внутри, слева */
  .pro__text {
    opacity: 1;
    transform: none;
    pointer-events: auto;
    background: var(--surface);
    border-radius: 20px;
    padding: 22px 20px;
    margin-bottom: 16px;
  }
  .pro__text .bubbles li { opacity: 1; transform: none; }
  .pro__phone-inline { display: block; width: min(70vw, 300px); margin: 24px 0 0; }

  .steps { grid-template-columns: 1fr; gap: 14px; max-width: 480px; margin: 0 auto; }
  .steps li { padding: 22px 22px 26px; }
  .steps__num { font-size: 44px; }

  .about__stats { grid-template-columns: 1fr; }

  /* таблица сравнения → карточки по параметрам внутри общей карточки */
  .compare { padding: 8px; }
  .compare__head { display: none; }
  .compare__row { display: block; padding: 8px; }
  .compare__row:nth-child(odd) > .compare__param,
  .compare__row:nth-child(odd) > div:not(.compare__magii) { background: transparent; }
  .compare__row + .compare__row { border-top: 1px solid rgba(255, 255, 255, 0.06); }
  .compare__row > div { padding: 10px 12px; }
  .compare__param {
    font-family: var(--font-heading);
    font-size: 1.02rem;
    font-weight: 600;
    padding-bottom: 4px;
  }
  .compare__row > div[data-label]::before {
    content: attr(data-label);
    display: block;
    color: var(--text-2);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 3px;
  }
  .compare__row .compare__magii { border-radius: 10px; }
  .compare__row .compare__magii::before { color: var(--accent); }
  .compare__row:last-child .compare__magii { border-radius: 10px; }
  .pricing__grid { grid-template-columns: minmax(0, 420px); }
  .contact__layout { grid-template-columns: 1fr; gap: 40px; }
  .marquee__track { gap: 44px; padding-right: 44px; }
  .marquee__track img { height: 52px; }
}

@media (max-width: 520px) {
  :root { --header-h: 60px; }
  .site-header .container { height: 60px; }
  .site-header .logo img { height: 30px; }
  .header-cta .btn--ghost { display: none; }
  .header-cta { gap: 8px; }
  .btn--small { padding: 8px 14px; font-size: 13px; }

  .hero { padding: 96px 0 72px; }
  .why__grid { grid-template-columns: 1fr; }
  .featx__item.is-active .featx__desc { padding-left: 18px; }
  .about__pdf { flex-direction: column; align-items: flex-start; }
  .lead-form { padding: 22px; }
}

@media (max-width: 360px) {
  .site-header .logo img { height: 26px; }
  .btn--small { padding: 7px 11px; font-size: 12.5px; }
  .container { padding: 0 16px; }
}

/* ---------- prefers-reduced-motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }

  .reveal,
  .plan[data-slide], .contact__info[data-slide], .lead-form[data-slide] {
    opacity: 1 !important;
    transform: none !important;
  }
  .why__card .why__icon, .why__card h3, .why__card p { opacity: 1 !important; }

  /* схемы: без пиннинга, обе картинки статично */
  .transform__track { height: auto; }
  .transform__stage { position: static; height: auto; padding: 72px 24px 40px; --wipe: 1; --caption: 1; }
  .transform__head, .transform__canvas, .transform__caption { position: static; }
  .transform__canvas { display: grid; gap: 24px; margin: 24px 0 16px; }
  .transform__img { position: static; height: auto; clip-path: none !important; }
  .transform__seam { display: none; }
  .transform__title--before, .transform__title--after { opacity: 1; position: static; }
  .transform__titles { display: flex; flex-direction: column; gap: 4px; }

  .pro__phones, .pro__controls { display: none; }
  .pro__sticky-text { position: static; background: none; padding: 0; height: auto; display: block; }
  .pro__texts { display: block; }
  .pro__text {
    opacity: 1 !important;
    transform: none !important;
    pointer-events: auto;
    background: var(--surface);
    border-radius: 20px;
    padding: 22px 20px;
    margin-bottom: 16px;
  }
  .pro__text .bubbles li { opacity: 1 !important; transform: none !important; }
  .pro__phone-inline { display: block; width: min(70vw, 300px); margin: 24px 0 0; }

  .marquee__track { animation: none !important; flex-wrap: wrap; width: auto; justify-content: center; }
  .marquee { mask-image: none; -webkit-mask-image: none; }
}

/* ---------- legal page (политика конфиденциальности) ---------- */

.legal { padding: 56px 0 96px; }
.legal__inner { max-width: 840px; }

.legal__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-2);
  font-weight: 500;
  margin-bottom: 40px;
  transition: color 0.2s ease;
}
.legal__back:hover { color: var(--text); text-decoration: none; }
.legal__back svg { flex-shrink: 0; }

.legal__head { margin-bottom: 40px; }
.legal h1 { font-size: clamp(1.9rem, 3.8vw, 2.6rem); }
.legal__updated { color: var(--text-2); margin-top: 12px; font-size: 15px; }
.legal__updated--bottom { margin-top: 32px; }

.legal h2 {
  font-size: 1.3rem;
  font-weight: 600;
  margin: 44px 0 16px;
}

.legal p { color: rgba(245, 246, 248, 0.78); margin: 0 0 14px; text-align: justify; }
.legal p strong { color: var(--text); }

.legal__list {
  list-style: disc;
  padding-left: 24px;
  margin: 0 0 14px;
  color: rgba(245, 246, 248, 0.78);
  text-align: justify;
}
.legal__list li { margin-bottom: 8px; }
.legal__list li::marker { color: var(--text-2); }

@media (max-width: 640px) {
  .legal { padding-top: 32px; }
}
