/* ---------- Шрифт Inter (лежит в проекте, папка fonts/, лицензия OFL) ---------- */
/* Переменный шрифт с двумя осями: насыщенность (wght) и оптический размер (opsz).
   При opsz 32 это Inter Display — начертание для крупных заголовков.
   Файлы: кириллица, латиница и отдельный крошечный файл со знаком ₽ */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-rub.woff2") format("woff2");
  unicode-range: U+20BD;
}

/* ---------- Цвета, шрифт, движение (меняются в одном месте) ---------- */
:root {
  --bg: #000000;        /* основной фон: чёрный */
  --panel: #161617;     /* чуть светлее: фон отдельных блоков */
  --bubble: #2C2C2E;    /* пузыри переписки */
  --line: #3A3A3C;      /* тонкие линии и рамки */
  --muted: #A1A1A6;     /* второстепенный текст */
  --text: #F5F5F7;      /* основной текст: почти белый */
  --white: #FFFFFF;
  --paid: #30D158;      /* единственный цветной акцент: сумма оплаты */

  /* Inter, а пока он грузится (или если не загрузился) — системный шрифт */
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);   /* мягкое замедление в конце */
  --gutter: clamp(20px, 5vw, 48px);
  --max: 1080px;
  --header-h: 56px;     /* высота закреплённой шапки */

  /* Размер телефона */
  --phone-w: 300px;
  --phone-h: 620px;
}

/* ---------- Общие настройки ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Фон «за пределами» страницы (при оттягивании вниз) — как у подвала, без чёрной полосы */
html {
  background: var(--panel);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 19px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* Заголовки: Inter Display (оптический размер 32), насыщенность 900,
   плотный интервал — крупно и плотно, как в журнальной вёрстке */
h1, h2, h3 {
  font-variation-settings: "opsz" 32;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  margin: 0;
}

p {
  margin: 0;
}

/* Тег i на сайте — только декоративные элементы (точки, галочки, стрелки), без курсива */
i {
  font-style: normal;
}

a:focus-visible {
  outline: 3px solid var(--white);
  outline-offset: 4px;
}

/* Служебные правила Lenis (плавный скролл) */
html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

/* ---------- Шапка: матовая полупрозрачная полоса, закреплена сверху ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  /* Полупрозрачный тёмно-серый: контент под шапкой просвечивает размытым */
  background: rgba(22, 22, 23, 0.55);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  /* Тонкая, едва заметная линия снизу */
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Если браузер не умеет размывать фон — делаем шапку плотнее, чтобы текст читался */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .topbar {
    background: rgba(22, 22, 23, 0.94);
  }
}

/* Три колонки: пустая слева, логотип по центру, кнопка справа */
.topbar-inner {
  max-width: var(--max);
  height: var(--header-h);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.topbar .logo {
  grid-column: 2;
}

.topbar-button {
  grid-column: 3;
  justify-self: end;
  padding: 6px 16px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
}

.topbar-button:hover {
  background: var(--white);
}

/* Как только страницу прокрутили, кнопка плавно прячется; в самом верху — возвращается */
.topbar-button {
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

.topbar-button.is-hidden {
  opacity: 0;
  transform: translate3d(0, -6px, 0);
  visibility: hidden;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .topbar-button {
    transition: none;
  }
}

/* Логотип: Inter Display 900, как заголовки. Волну по буквам рисует скрипт */
.logo {
  display: inline-flex;
  justify-content: center;
  font-family: var(--font);
  font-size: 24px;
  font-variation-settings: "opsz" 32;   /* Inter Display */
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--text);
  text-decoration: none;
}

/* Слово внутри логотипа (буквы делит скрипт, только если разрешены анимации).
   Буквы чуть серебристые, чтобы по ним была видна пробегающая белая полоса света */
.logo {
  position: relative;
  height: 1em;
  align-items: flex-end;
}

.logo-word {
  display: inline-flex;
  flex: none;
  align-items: baseline;
  transform-origin: center;
  background-image: linear-gradient(105deg,
    #D8D8DE 0%, #D8D8DE 44%, #FFFFFF 48%, #FFFFFF 52%, #D8D8DE 56%, #D8D8DE 100%);
  background-size: 300% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.logo-word span {
  display: block;
}

/* Полоса света проходит по буквам слева направо, слово на мгновение чуть светится */
.logo-word.is-gleaming {
  animation: logo-gleam 1.1s ease-in-out;
}

@keyframes logo-gleam {
  0% {
    background-position: 100% 0;
    filter: drop-shadow(0 0 0 rgba(255, 255, 255, 0));
  }
  50% {
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.35));
  }
  100% {
    background-position: 0% 0;
    filter: drop-shadow(0 0 0 rgba(255, 255, 255, 0));
  }
}

/* Dock: буквы плавно меняют размер вслед за курсором и плавно возвращаются */
.logo-word.is-docking span {
  transition: font-size 0.18s ease-out;
}

/* Искра: крошечная четырёхлучевая звёздочка, вспыхивает и гаснет с поворотом */
.logo-spark {
  position: absolute;
  width: 9px;
  height: 9px;
  margin: -4.5px 0 0 -4.5px;
  background: #FFFFFF;
  clip-path: polygon(50% 0, 58% 42%, 100% 50%, 58% 58%, 50% 100%, 42% 58%, 0 50%, 42% 42%);
  filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.9));
  pointer-events: none;
  animation: logo-spark 0.8s ease-out forwards;
}

@keyframes logo-spark {
  0% {
    opacity: 0;
    transform: scale(0) rotate(0deg);
  }
  35% {
    opacity: 1;
    transform: scale(1) rotate(45deg);
  }
  100% {
    opacity: 0;
    transform: scale(0.2) rotate(90deg);
  }
}

/* ---------- Кнопки: белые на чёрном ---------- */
.button {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-size: 17px;
  font-weight: 500;
  text-decoration: none;
}

.button:hover {
  background: var(--white);
}

/* Кнопки в Телеграм: белая пилюля с иконкой бумажного самолётика.
   При наведении чуть увеличиваются, под ними проявляется мягкое свечение.
   Для увеличения используется свойство scale, а не transform, —
   чтобы не мешать анимациям появления и скрытия кнопки */
.tg-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  isolation: isolate; /* тень остаётся под кнопкой, а не уходит под фон блока */
}

.tg-icon {
  flex: none;
  width: 18px;
  height: 18px;
  margin-left: -2px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.topbar-button .tg-icon {
  width: 14px;
  height: 14px;
  margin-left: -3px;
}

.topbar-button.tg-button {
  gap: 6px;
}

/* Полёт самолётика: улетает вправо-вверх и тает, затем влетает слева снизу на место */
@keyframes plane-fly {
  0% {
    transform: translate3d(0, 0, 0);
    opacity: 1;
    animation-timing-function: cubic-bezier(0.5, 0, 0.9, 0.5);
  }
  45% {
    transform: translate3d(16px, -16px, 0);
    opacity: 0;
  }
  46% {
    transform: translate3d(-16px, 16px, 0);
    opacity: 0;
    animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  }
  100% {
    transform: translate3d(0, 0, 0);
    opacity: 1;
  }
}

/* С мышью — при наведении; на телефоне скрипт ставит класс is-flying один раз */
@media (hover: hover) {
  .motion .tg-button:hover .tg-icon {
    animation: plane-fly 0.6s both;
  }
}

.motion .tg-button.is-flying .tg-icon {
  animation: plane-fly 0.6s both;
}

/* Тень — отдельный слой: плавно меняется только его прозрачность */
.tg-button::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  box-shadow: 0 8px 28px rgba(255, 255, 255, 0.22);
  opacity: 0;
  pointer-events: none;
}

/* Эффект наведения — только там, где есть мышь: на телефоне он «залипал» бы после касания */
@media (hover: hover) {
  .tg-button:hover::after {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .tg-button {
    transition: scale 0.25s var(--ease), opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
  }

  .motion .tg-button.reveal {
    transition: scale 0.25s var(--ease), opacity 0.5s var(--ease), transform 0.6s var(--ease);
  }

  .tg-button::after {
    transition: opacity 0.25s ease;
  }

  @media (hover: hover) {
    .tg-button:hover {
      scale: 1.04;
    }
  }
}

/* ---------- Первый экран ---------- */
/* На всю высоту окна (минус шапка), содержимое по центру */
/* Первый экран во всю ширину окна: фон-постер тянется от края до края,
   а ширину текста ограничивают сами заголовок и подзаголовок */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  margin: 0 auto;
  padding: 48px var(--gutter) 112px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* Ссылка «Подробнее ›»: просто текст, без кнопки */
/* ---------- Фон первого экрана: чёрно-белый постер ---------- */
/* Текст и стрелка лежат над фоном */
.hero h1,
.hero .lead,
.hero .more,
.hero .hero-actions {
  position: relative;
  z-index: 1;
}

.hero .scroll-hint {
  z-index: 1;
}

/* Статичный чёрно-серый градиент — запасной фон первого экрана
   (без WebGL или если анимации отключены). Когда работает 3D, его заменяет
   живой градиент из coin3d.js, а точки и орбиты рисует тот же шейдер */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 55% 45% at 50% 45%, rgba(90, 90, 90, 0.35) 0%, rgba(58, 58, 58, 0.18) 45%, rgba(0, 0, 0, 0) 75%),
    radial-gradient(ellipse 40% 35% at 22% 70%, rgba(58, 58, 58, 0.25) 0%, rgba(0, 0, 0, 0) 70%),
    radial-gradient(ellipse 40% 35% at 80% 30%, rgba(31, 31, 31, 0.6) 0%, rgba(0, 0, 0, 0) 70%),
    #000000;
}

.hero.is-3d .hero-bg {
  background: #000000;
}

.hero.is-3d .hero-bg::before,
.hero.is-3d .hero-orbits {
  display: none;
}

/* Едва заметная сетка мелких точек; к краям экрана растворяется */
.hero-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.22) 1px, transparent 1.5px);
  background-size: 24px 24px;
  background-position: center;
  opacity: 0.45;
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 50% 45%, #000 20%, transparent 100%);
  mask-image: radial-gradient(ellipse 75% 70% at 50% 45%, #000 20%, transparent 100%);
}

/* Две тонкие орбиты: дуги через весь экран сверху и снизу.
   SVG растянут на весь экран, а толщина линии остаётся 1px */
.hero-orbits {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-orbits ellipse {
  fill: none;
  stroke: rgba(255, 255, 255, 0.16);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

/* Монеты с ₽. По умолчанию — статичные картинки, стоят на своих орбитах.
   Когда загрузится 3D (coin3d.js), их сменяет один canvas на весь первый экран,
   в котором обе монеты плывут по орбитам */
.hero-coin {
  position: absolute;
  filter: drop-shadow(0 4px 14px rgba(255, 255, 255, 0.14));   /* мягкое свечение, как у 3D */
}

.coin-bottom {
  left: 76%;
  top: 79.8%;
  width: 56px;
  height: 56px;
  margin: -28px 0 0 -28px;
}

.coin-top {
  left: 17.9%;
  top: 9.7%;
  width: 42px;
  height: 42px;
  margin: -21px 0 0 -21px;
}

.hero.is-3d .hero-coin {
  display: none;
}

.coins-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.more {
  margin-top: 28px;
  font-size: clamp(17px, 1.8vw, 21px);
  color: var(--muted);
  text-decoration: none;
}

.more:hover {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Стрелка вниз у нижнего края первого экрана — это кнопка.
   Сама кнопка 44×44 (удобно попасть пальцем), стрелка внутри маленькая */
.scroll-hint {
  position: absolute;
  bottom: 24px;
  left: 50%;
  width: 44px;
  height: 44px;
  margin-left: -22px;
  padding: 0;
  display: grid;
  place-items: center;
  background: none;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s ease;
}

/* При наведении стрелка светлеет */
.scroll-hint:hover {
  color: var(--white);
}

.scroll-hint:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 2px;
}

/* Сама стрелка: уголок из двух тонких линий */
.scroll-hint-arrow {
  width: 14px;
  height: 14px;
  margin-top: -8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.7;
}

.scroll-hint:hover .scroll-hint-arrow {
  opacity: 1;
}

/* Лёгкое покачивание вниз — намёк, что страницу можно листать */
.motion .scroll-hint-arrow {
  animation: hint 2.2s ease-in-out infinite;
}

.motion .scroll-hint:hover .scroll-hint-arrow {
  animation-play-state: paused;
}

@keyframes hint {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(45deg); opacity: 0.4; }
  50%      { transform: translate3d(0, 8px, 0) rotate(45deg); opacity: 0.9; }
}

/* Без Lenis (или если он не загрузился) якорь учитывает шапку и прокручивает плавно */
#pain {
  scroll-margin-top: var(--header-h);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

.hero h1 {
  max-width: 11em;
  font-size: clamp(48px, 10vw, 128px);
  line-height: 0.95;
}

.lead {
  max-width: 32em;
  margin: 28px auto 0;
  font-size: clamp(19px, 2.2vw, 24px);
  line-height: 1.45;
  color: var(--muted);
}

/* ---------- Телефон с перепиской (внутри блока «Сейчас оплата выглядит так») ---------- */
.story {
  display: grid;
  place-items: center;
  margin-bottom: clamp(64px, 9vw, 112px);
}

.stage {
  position: relative;
}

/* Корпус телефона, нарисованный на CSS */
.phone {
  width: var(--phone-w);
  height: var(--phone-h);
  padding: 11px;
  background: #1C1C1E;
  border-radius: 54px;
  box-shadow: inset 0 0 0 1.5px #48484A;
}

.screen {
  position: relative;
  height: 100%;
  padding: 52px 14px 16px;
  background: var(--bg);
  border-radius: 44px;
  overflow: hidden;
}

/* Вырез под камеру */
.camera {
  position: absolute;
  top: 12px;
  left: 50%;
  width: 84px;
  height: 26px;
  margin-left: -42px;
  background: #1C1C1E;
  border-radius: 999px;
}

.phone-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 4px 12px;
  border-bottom: 1px solid var(--bubble);
  font-size: 15px;
  line-height: 1.3;
}

.phone-head small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bubble);
  font-weight: 600;
}

.chat {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 16px;
  opacity: 0.25;
  transition: opacity 1s var(--ease);
}

/* Пузырь сообщения (используется и в блоке «боль») */
.msg {
  max-width: 82%;
  padding: 9px 14px;
  border-radius: 20px;
  font-size: 15px;
  line-height: 1.4;
}

.msg.in {
  align-self: flex-start;
  background: var(--bubble);
  color: var(--text);
}

.msg.out {
  align-self: flex-end;
  background: var(--text);
  color: var(--bg);
}

/* Крупное уведомление об оплате поверх телефона */
.notice-pos {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(440px, calc(100vw - 32px));
  transform: translate(-50%, calc(var(--phone-h) / -2 + 40px));
}

.notice {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 4px 14px;
  padding: 20px 22px;
  background: #1C1C1E;
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}

.notice-check {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--text);
}

/* Галочка внутри круга */
.notice-check::after {
  content: "";
  position: absolute;
  left: 14px;
  top: 9px;
  width: 10px;
  height: 17px;
  border: solid var(--bg);
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}

.notice-body b {
  display: block;
  font-size: 19px;
  font-weight: 600;
}

.notice-body span {
  display: block;
  font-size: 14px;
  line-height: 1.35;
  color: var(--muted);
}

.notice-sum {
  grid-column: 1 / -1;
  margin-top: 10px;
  font-size: clamp(40px, 9vw, 56px);
  font-weight: 900;
  line-height: 1;
  color: var(--paid);
}

/* ---------- Анимации (только если они включены: класс motion на <html>) ---------- */

/* Сообщения появляются по очереди */
.motion .chat .msg {
  opacity: 0;
  transform: translate3d(0, 16px, 0) scale(0.96);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.motion .chat .msg.in {
  transform-origin: 0 100%;
}

.motion .chat .msg.out {
  transform-origin: 100% 100%;
}

.motion .chat .msg.shown {
  opacity: 1;
  transform: none;
}

.motion .story:not(.climax) .chat {
  opacity: 1;
}

/* Сброс чата перед новым циклом — без анимации */
.motion .chat.no-anim,
.motion .chat.no-anim .msg {
  transition: none;
}

/* Копия старой переписки, которая растворяется поверх новой */
.chat-ghost {
  position: absolute;
  pointer-events: none;
  transition: opacity 0.8s ease-out;
}

/* Уведомление выезжает сверху и увеличивается */
.motion .notice {
  opacity: 0;
  transform: translate3d(0, -40px, 0) scale(0.82);
  transition: opacity 1s var(--ease), transform 1.2s var(--ease);
}

.motion .story.climax .notice {
  opacity: 1;
  transform: none;
}

/* Заголовки проявляются по словам с подъёмом */
.word {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding: 0.12em 0.04em 0.16em;
  margin: -0.12em -0.04em -0.16em;
}

.word > span {
  display: inline-block;
}

.motion .word > span {
  opacity: 0;
  transform: translate3d(0, 105%, 0);
  transition: opacity 0.5s var(--ease), transform 0.6s var(--ease);
}

.motion .is-visible .word > span {
  opacity: 1;
  transform: none;
}

/* Остальные блоки плавно поднимаются */
.motion .reveal {
  opacity: 0;
  transform: translate3d(0, 24px, 0);
  transition: opacity 0.5s var(--ease), transform 0.6s var(--ease);
}

.motion .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Общие блоки ---------- */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(96px, 14vw, 176px) var(--gutter);
}

/* Заголовки разделов заметно меньше главного заголовка */
.section h2 {
  max-width: 16em;
  margin: 0 auto clamp(48px, 7vw, 80px);
  font-size: clamp(36px, 5.5vw, 64px);
  text-align: center;
}

/* Блок «Что вы получаете» во всю ширину; карточки внутри — на сером фоне */
.offer {
  max-width: none;
}

.offer > * {
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Боль ---------- */
/* Отступ сверху поменьше: после «Подробнее ›» заголовок и телефон помещаются в экран целиком */
.pain {
  padding-top: clamp(40px, 5vw, 64px);
}

/* Карточки: цитата из переписки и одна строка о том, чем это мешает */
.pain-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.pain-list li {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  padding: 24px;
  background: var(--panel);
  border-radius: 24px;
}

.pain-list .msg {
  font-size: 15px;
}

.pain-list li > p:last-child {
  font-size: 17px;
  line-height: 1.4;
  color: var(--text);
}

/* ---------- Что вы получаете: три крупные карточки ---------- */
.offer-cards {
  list-style: none;
  margin-top: 0;
  margin-bottom: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.offer-card {
  display: flex;
  flex-direction: column;
  padding: 16px 16px 40px;
  background: var(--panel);
  border-radius: 28px;
}

.offer-card h3 {
  margin: 36px 0 12px;
  padding: 0 20px;
  font-size: clamp(28px, 2.8vw, 36px);
}

.offer-card p {
  padding: 0 20px;
  font-size: 19px;
  line-height: 1.45;
  color: var(--muted);
}

/* ---------- Живые виджеты в карточках ---------- */
/* Общая «витрина»: чёрное окно со скруглением, внутри — мини-интерфейс */
.widget {
  position: relative;
  height: 300px;
  overflow: hidden;
  border-radius: 20px;
  background: var(--bg);
  font-size: 13px;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
  -webkit-user-select: none;
  user-select: none;
}

.widget p,
.widget ul {
  margin: 0;
  padding: 0;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
  list-style: none;
}

/* --- 1. Сайт: окно браузера, срезанное снизу --- */
.browser {
  position: absolute;
  top: 24px;
  left: 50%;
  bottom: 0;
  width: calc(100% - 36px);
  max-width: 340px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  border-radius: 12px 12px 0 0;
  background: var(--bubble);
  overflow: hidden;
}

.browser-bar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 34px;
  padding: 0 10px;
}

.browser-dots {
  display: flex;
  gap: 5px;
}

.browser-dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #5A5A5E;
}

/* Адресная строка: названия сайтов сменяются вместе с превью */
.browser-address {
  position: relative;
  flex: 1;
  height: 20px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 10.5px;
  color: var(--muted);
}

.browser-address span {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
}

.browser-address span.is-active {
  opacity: 1;
}

.demo-tag {
  flex: none;
  padding: 2px 7px;
  border: 1px solid #5A5A5E;
  border-radius: 999px;
  font-size: 10px;
  line-height: 1.3;
  color: var(--muted);
}

.browser-view {
  position: relative;
  flex: 1;
}

/* Превью сайтов лежат друг на друге, видно только активное */
.demo {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 16px 16px 0;
  opacity: 0;
  pointer-events: none;
}

.demo.is-active {
  opacity: 1;
}

.d-title {
  font-weight: 700;
  letter-spacing: -0.02em;
}

.d-text {
  margin-top: 4px;
  font-size: 11.5px;
  opacity: 0.6;
}

.d-btn {
  margin-top: auto;
  margin-bottom: 18px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
}

/* Демо 1: онлайн-школа — светлый сайт, крупный жирный заголовок */
.demo-school {
  background: var(--white);
  color: var(--bg);
}

.d-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  align-self: stretch;
  margin-bottom: 16px;
  font-size: 12px;
}

.d-menu {
  display: flex;
  gap: 6px;
}

.d-menu i {
  width: 18px;
  height: 3px;
  border-radius: 2px;
  background: currentColor;
  opacity: 0.25;
}

.demo-school .d-title {
  font-size: 21px;
  line-height: 1.05;
}

.d-tariffs {
  display: flex;
  gap: 8px;
  align-self: stretch;
  margin-top: 14px;
}

.d-tariffs span {
  flex: 1;
  padding: 8px 10px;
  border-radius: 10px;
  background: #F0F0F2;
}

.d-tariffs small {
  display: block;
  font-size: 10px;
  opacity: 0.6;
}

.d-tariffs b {
  font-size: 13px;
}

.demo-school .d-btn {
  background: var(--bg);
  color: var(--white);
}

/* Демо 2: психолог — мягкий серый сайт с выбором времени */
.demo-psy {
  background: #E8E8ED;
  color: var(--bg);
}

.d-person {
  display: flex;
  align-items: center;
  gap: 10px;
}

.d-avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--white);
  font-weight: 600;
}

.d-person b,
.d-person small {
  display: block;
}

.d-person small {
  font-size: 10.5px;
  opacity: 0.6;
}

.demo-psy .d-text {
  margin-top: 14px;
}

.d-slots {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  align-self: stretch;
  margin-top: 10px;
}

.d-slots span {
  padding: 6px 0;
  border-radius: 8px;
  background: var(--white);
  font-size: 11px;
  text-align: center;
}

.d-slots .is-picked {
  background: var(--bg);
  color: var(--white);
}

.demo-psy .d-btn {
  align-self: stretch;
  border-radius: 10px;
  background: var(--bg);
  color: var(--white);
  text-align: center;
}

/* Демо 3: салон красоты — тёмный сайт с тонким шрифтом с засечками */
.demo-beauty {
  background: #1C1C1E;
  color: var(--text);
}

.demo-beauty .d-title {
  font-size: 20px;
}

.d-services {
  align-self: stretch;
  margin-top: 12px !important;
}

.d-services li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 11.5px;
}

.d-services b {
  font-weight: 600;
}

.demo-beauty .d-btn {
  border: 1px solid var(--text);
}

/* --- 2. Оплата: мини-форма --- */
.pay,
.pay-done {
  position: absolute;
  top: 50%;
  left: 50%;
  width: calc(100% - 40px);
  max-width: 300px;
  transform: translate(-50%, -50%);
}

.pay {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pay-head small {
  display: block;
  color: var(--muted);
}

.pay-head b {
  display: block;
  margin-top: 2px;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Переключатель «Карта / СБП»: серый «ползунок» сдвигается под выбранный вариант */
.pay-switch {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 3px;
  border-radius: 10px;
  background: var(--bubble);
}

.pay-switch span {
  position: relative;
  padding: 6px 0;
  text-align: center;
  font-weight: 600;
}

.pay-switch .pay-thumb {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc(50% - 3px);
  padding: 0;
  border-radius: 8px;
  background: #636366;
}

.pay-widget.is-sbp .pay-thumb {
  transform: translateX(100%);
}

/* Поле под переключателем: номер карты или подсказка про СБП */
.pay-field {
  position: relative;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
}

.pay-field > span {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
}

.pay-sbp,
.pay-widget.is-sbp .pay-card {
  opacity: 0;
}

.pay-widget.is-sbp .pay-sbp {
  opacity: 1;
}

.pay-card-icon {
  width: 20px;
  height: 14px;
  border: 1.5px solid currentColor;
  border-radius: 3px;
}

/* Кнопка «Оплатить»: при нажатии чуть сжимается, потом показывает загрузку */
.pay-btn {
  position: relative;
  display: grid;
  place-items: center;
  height: 42px;
  border-radius: 999px;
  background: var(--white);
  color: var(--bg);
  font-size: 14px;
  font-weight: 600;
}

.pay-widget.is-pressed .pay-btn {
  transform: scale(0.95);
}

.pay-spinner {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(0, 0, 0, 0.15);
  border-top-color: var(--bg);
  border-radius: 50%;
  opacity: 0;
}

.pay-widget.is-loading .pay-btn-text {
  opacity: 0;
}

.pay-widget.is-loading .pay-spinner {
  opacity: 1;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Итог: галочка и «Оплачено» на месте формы */
.pay-done {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  opacity: 0;
}

.pay-done b {
  margin-top: 14px;
  font-size: 22px;
  letter-spacing: -0.015em;
}

.pay-done-sum {
  font-size: 17px;
  font-weight: 600;
  color: var(--paid);
}

.pay-check {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--text);
}

.pay-check::after {
  content: "";
  position: absolute;
  left: 23px;
  top: 14px;
  width: 15px;
  height: 27px;
  border: solid var(--bg);
  border-width: 0 4px 4px 0;
  transform: rotate(45deg);
}

.pay-widget.is-paid .pay {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.94);
}

.pay-widget.is-paid .pay-done {
  opacity: 1;
}

/* --- 3. CRM-панель: выручка, график, последние заказы --- */
.crm {
  position: absolute;
  top: 22px;
  left: 50%;
  bottom: 0;
  width: calc(100% - 40px);
  max-width: 320px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
}

.crm-top small {
  display: block;
  color: var(--muted);
}

.crm-total {
  display: block;
  margin-top: 2px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Столбики выручки по дням недели; последний — сегодня */
.crm-chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 72px;
  margin: 14px 0 12px;
  padding-bottom: 1px;
  border-bottom: 1px solid var(--line);
}

.crm-chart i {
  flex: 1;
  height: calc(var(--h) * 100%);
  border-radius: 4px 4px 1px 1px;
  background: #48484A;
  transform-origin: bottom;
}

/* Сегодняшний столбик растёт с каждым заказом, поэтому его высота задаётся через масштаб */
.crm-chart .crm-today {
  height: 100%;
  background: var(--text);
  transform: scaleY(var(--h));
}

/* Список заказов: видно три строки, новая въезжает сверху */
.crm-orders {
  position: relative;
  height: calc(3 * 40px);
  overflow: hidden;
}

.crm-orders li {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  column-gap: 8px;
  height: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.crm-orders span {
  font-weight: 600;
}

.crm-orders small {
  grid-row: 2;
  font-size: 10.5px;
  color: var(--muted);
}

.crm-orders b {
  grid-row: 1 / 3;
  grid-column: 2;
  font-weight: 600;
  color: var(--paid);
}

/* ---------- Примеры работ ---------- */
.works-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 20px;
}

/* Карточка проекта: превью слева, описание справа */
.work-card {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  align-items: stretch;
  gap: clamp(24px, 4vw, 56px);
  padding: 16px clamp(16px, 4vw, 56px) 16px 16px;
  background: var(--panel);
  border-radius: 28px;
}

/* Превью тянется на всю высоту карточки */
.work-card .widget {
  height: auto;
  min-height: 360px;
}

.work-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 24px 0;
}

/* Метка: реальный это проект или демо */
.work-tag {
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  color: var(--muted);
}

.work-info h3 {
  margin: 20px 0 20px;
  font-size: clamp(24px, 2.6vw, 32px);
}

.work-done {
  margin: 0 0 32px;
  padding: 0;
  list-style: none;
}

.work-done li {
  position: relative;
  padding: 10px 0 10px 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 17px;
  line-height: 1.4;
  color: var(--muted);
}

/* Галочка перед каждым пунктом */
.work-done li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 15px;
  width: 6px;
  height: 11px;
  border: solid var(--text);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Карточка-приглашение: без фона, только тонкая рамка — не путается с реальным проектом */
.work-next {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: clamp(40px, 6vw, 64px) var(--gutter);
  border: 1px solid var(--line);
  border-radius: 28px;
  text-align: center;
}

.work-next h2 {
  max-width: none;
  margin: 0;
  font-size: clamp(32px, 4.5vw, 52px);
}

.work-next p {
  max-width: 26em;
  font-size: clamp(17px, 1.9vw, 21px);
  line-height: 1.45;
  color: var(--muted);
}

/* Под примерами работ отступ меньше, чтобы финальный блок не отрывался от них */
.works {
  padding-bottom: clamp(48px, 6vw, 80px);
}

/* Финальный блок стоит сразу после предыдущего раздела, снизу — небольшой отступ до подвала */
.final {
  padding-top: 0;
  padding-bottom: clamp(64px, 8vw, 104px);
}

/* Кнопка того же размера, что «Открыть сайт» */
.work-next .tg-button {
  margin-top: 16px;
}

/* Превью проекта: настоящий скриншот сайта внутри мини-браузера */
.work-card .browser {
  max-width: none;   /* в карточке проекта окно браузера на всю ширину превью */
}

.shot-widget .browser-view {
  overflow: hidden;
  background: var(--white);
}

.shot {
  display: block;
  width: 100%;
  height: auto;
}

/* Скриншот плавно едет вниз, задерживается внизу и возвращается наверх.
   Расстояние и время задаёт скрипт: они зависят от размера окна.
   Анимация идёт, только пока превью видно на экране */
.motion .shot {
  animation: shot-scroll var(--shot-time, 20s) ease-in-out infinite;
  animation-play-state: paused;
}

.motion .shot-widget.is-playing .shot {
  animation-play-state: running;
  will-change: transform;
}

/* Навели мышь — прокрутка замирает, можно рассмотреть */
@media (hover: hover) {
  .motion .shot-widget.is-playing:hover .shot {
    animation-play-state: paused;
  }
}

@keyframes shot-scroll {
  0%, 8% {
    transform: translate3d(0, 0, 0);
  }
  72%, 82% {
    transform: translate3d(0, var(--shot-distance, 0px), 0);
  }
  100% {
    transform: translate3d(0, 0, 0);
  }
}

/* ---------- Движение виджетов (только если анимации разрешены) ---------- */
.motion .demo,
.motion .browser-address span {
  transition: opacity 0.6s var(--ease), transform 0.8s var(--ease);
}

.motion .demo {
  transform: translate3d(0, 12px, 0) scale(0.98);
}

.motion .demo.is-active {
  transform: none;
}

.motion .pay-thumb,
.motion .pay-field > span,
.motion .pay-btn-text,
.motion .pay-spinner {
  transition: opacity 0.3s ease, transform 0.45s var(--ease);
}

.motion .pay-btn {
  transition: transform 0.15s ease;
}

.motion .pay,
.motion .pay-done {
  transition: opacity 0.45s var(--ease), transform 0.6s var(--ease);
}

.motion .pay-done {
  transform: translate(-50%, -50%) scale(0.9);
}

.motion .pay-widget.is-paid .pay-done {
  transform: translate(-50%, -50%);
}

/* Столбики вырастают снизу, когда виджет появляется на экране */
.motion .crm-chart i {
  transform: scaleY(0);
  transition: transform 0.9s var(--ease);
}

.motion .crm-widget.is-on .crm-chart i {
  transform: none;
}

.motion .crm-widget.is-on .crm-chart .crm-today {
  transform: scaleY(var(--h));
}

.motion .crm {
  transition: opacity 0.4s ease;
}

.motion .crm-widget.is-resetting .crm {
  opacity: 0;
}

/* Мгновенный сброс без анимации */
.widget.no-anim,
.widget.no-anim * {
  transition: none !important;
}

/* Строка под карточками */
.offer-note {
  margin-top: clamp(40px, 6vw, 64px);
  font-size: clamp(21px, 2.4vw, 28px);
  font-weight: 600;
  letter-spacing: -0.015em;
  text-align: center;
}

/* ---------- Результат: светлый блок для контраста на чёрной странице ---------- */
.result {
  background: var(--text);
  color: var(--bg);
}

.result-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(112px, 16vw, 200px) var(--gutter);
}

.result h2 {
  max-width: 12em;
  font-size: clamp(44px, 8vw, 96px);
  line-height: 0.95;
}

.result-lead {
  max-width: 30em;
  margin: 32px 0 clamp(56px, 8vw, 88px);
  font-size: clamp(19px, 2.2vw, 24px);
  line-height: 1.45;
  color: #515154;
}

.result-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.result-list li {
  padding-top: 20px;
  border-top: 1px solid #C7C7CC;
  font-size: 19px;
  line-height: 1.45;
}

/* ---------- Как проходит работа ---------- */
.steps-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* Каждый шаг — карточка в стиле остальных: крупная цифра сверху, заголовок и текст под ней */
.steps-list li {
  display: flex;
  flex-direction: column;
  min-height: 340px;
  padding: 36px 32px 40px;
  background: var(--panel);
  border-radius: 28px;
}

.step-num {
  display: block;
  margin-bottom: 64px;
  font-size: 96px;
  font-variation-settings: "opsz" 32;
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: #6E6E73;
}

/* Последний шаг — это и есть первая оплата, поэтому он ярче остальных */
.steps-list li:last-child .step-num {
  color: var(--text);
}

/* Заголовки шагов стоят на одной линии во всех карточках */
.steps-list h3 {
  margin: 0 0 12px;
  font-size: 28px;
}

.steps-list p {
  color: var(--muted);
}

/* Внутренний контейнер подвала выравнивает его по той же сетке, что и остальные блоки */
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ---------- Подвал: мелкий серый текст ---------- */
.footer {
  padding: 0 var(--gutter);
  background: var(--panel);
  color: #86868B;
  font-size: 12px;
  line-height: 1.4;
}

/* Линия сверху ровно по ширине текста */
.footer-inner {
  max-width: calc(var(--max) - 2 * var(--gutter));
  padding-left: 0;
  padding-right: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 16px;
  padding-bottom: 20px;
  border-top: 1px solid var(--line);
}

/* Две строки: время работы и контакты; реквизиты и политика */
.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
}

/* Время работы и статус */
.footer-hours {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 16px;
}

.footer-status {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.footer-status[hidden] {
  display: none;
}

/* Точка статуса: в нерабочее время («Отвечу с …») — серая и неподвижная */
.footer-status::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6E6E73;
}

/* В рабочее время — белая, «в эфире» */
.footer-status.is-online::before {
  background: var(--white);
}

/* От белой точки раз в 2 секунды мягко расходится и тает светлое кольцо.
   Двигаются только масштаб и прозрачность; без анимаций кольца нет */
.motion .footer-status.is-online::after {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.7);
  pointer-events: none;
  animation: live-pulse 2s ease-out infinite;
}

@keyframes live-pulse {
  0% {
    opacity: 0.9;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(3.4);
  }
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a,
.footer-policy {
  color: #86868B;
  text-decoration: none;
}

.footer-links a:hover,
.footer-policy:hover {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Планшеты и телефоны ---------- */
@media (max-width: 860px) {
  /* Подвал в столбик: время работы, контакты, реквизиты, политика */
  .footer-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .steps-list,
  .result-list {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .steps-list {
    gap: 16px;
  }

  .steps-list li {
    min-height: 0;
    padding: 28px 24px 32px;
  }

  /* Карточки идут одна под другой */
  .offer-cards {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .offer-card {
    padding: 12px 12px 32px;
  }

  .offer-card h3 {
    margin-top: 28px;
  }

  /* Карточка проекта: превью сверху, описание снизу */
  .work-card {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 12px 12px 32px;
  }

  .work-card .widget {
    min-height: 0;
    height: 360px;
  }

  .work-info {
    padding: 28px 20px 0;
  }
}

@media (max-width: 640px) {
  :root {
    --phone-w: 280px;
    --phone-h: 580px;
  }

  body {
    font-size: 17px;
  }

  .pain-list {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .step-num {
    font-size: 72px;
  }

  .result-list li {
    font-size: 17px;
  }

  .button {
    display: block;
    text-align: center;
  }

  .work-info .button {
    align-self: stretch;
  }

  /* Кнопки в Телеграм на телефоне во всю ширину, иконка остаётся рядом с текстом */
  .button.tg-button {
    display: flex;
  }

  .work-next .tg-button {
    align-self: stretch;
  }
}

/* ---------- Наведение на карточки: подъём, наклон за курсором, светлый край ----------
   Классы ставит скрипт и только там, где есть мышь и разрешены анимации.
   Наклон задаётся прямо в style карточки, тут — только плавность и ореол */
.tilt {
  position: relative;
}

/* Мягкий светлый ореол по краю карточки, ярче всего рядом с курсором */
.tilt::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  padding: 1.5px;
  border-radius: inherit;
  background: radial-gradient(280px circle at var(--mx, 50%) var(--my, 50%),
    rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.08) 45%, rgba(255, 255, 255, 0) 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.tilt.is-hovered::after {
  opacity: 1;
}

/* Пока курсор над карточкой — наклон следует за ним быстро, при уходе — плавный возврат */
.motion .tilt.is-hovered,
.motion .tilt-phone.is-hovered {
  transition: transform 0.18s ease-out, opacity 0.5s var(--ease) !important;
  transition-delay: 0s !important;
}

.motion .tilt.is-leaving,
.motion .tilt-phone.is-leaving {
  transition: transform 0.7s var(--ease), opacity 0.5s var(--ease) !important;
  transition-delay: 0s !important;
}

/* ---------- Пакеты и цены: карточки тарифов ---------- */
/* Под ценами отступ меньше: дальше сразу финальный блок */
.prices {
  padding-top: clamp(48px, 6vw, 80px);
  padding-bottom: clamp(48px, 6vw, 80px);
}

.price-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.price-card {
  display: flex;
  flex-direction: column;
  padding: 16px 16px 36px;
  background: var(--panel);
  border-radius: 28px;
}

/* Популярный пакет выделен тонкой светлой рамкой */
.price-card.is-featured {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.price-widget {
  height: 220px;
}

/* Текст карточки по центру, как в тарифах Apple */
.price-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  padding: 0 12px;
  text-align: center;
}

/* Метка над названием: «Популярный» — белая, «Скоро» — контурная */
.price-badge {
  margin-top: 28px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

.price-badge.is-soon {
  background: none;
  box-shadow: inset 0 0 0 1px var(--muted);
  color: var(--muted);
}

.price-card h3 {
  margin-top: 28px;
  font-size: clamp(24px, 2.4vw, 28px);
}

/* Если над названием есть метка, отступ меньше — названия встают на одну линию */
.price-badge + h3 {
  margin-top: 10px;
}

.price-value {
  margin-top: 8px;
  font-size: 24px;
  font-weight: 900;
}

/* Описание одной высоты во всех карточках, чтобы кнопки стояли ровно */
.price-desc {
  min-height: 4.35em;
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.45;
  color: var(--muted);
}

.price-card .tg-button {
  margin-top: 16px;
}

/* Что входит: строки, разделённые тонкими линиями */
.price-list {
  align-self: stretch;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.price-list li {
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 15px;
  line-height: 1.4;
}

/* Строка про поддержку и сноска про комиссию */
.price-support {
  margin-top: 32px;
  padding: 16px 24px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 15px;
  line-height: 1.45;
  text-align: center;
}

.price-footnote {
  margin-top: 16px;
  font-size: 12px;
  color: #86868B;
  text-align: center;
}

/* ---------- Тарифы панели заказов ---------- */
/* Над карточками: метка «Запуск скоро» и переключатель «Месяц / Год» */
.plans-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 32px;
}

.plans-head .price-badge {
  margin-top: 0;
  padding: 7px 14px;
  font-size: 14px;
}

/* Переключатель: белая «пилюля» сдвигается под выбранный период */
.plan-switch {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  border-radius: 999px;
  background: var(--bubble);
}

.plan-switch button {
  position: relative;
  z-index: 1;
  padding: 8px 18px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.3s var(--ease);
}

.plan-switch button[aria-pressed="true"] {
  color: var(--bg);
}

.plan-switch button:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 2px;
}

.plan-thumb {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 4px);
  border-radius: 999px;
  background: var(--text);
  transition: transform 0.45s var(--ease);
}

.plans.is-year .plan-thumb {
  transform: translateX(100%);
}

.plan-off {
  font-variant-numeric: tabular-nums;
}

/* Цены за месяц и за год: видна одна пара, без скрипта — месячная */
.plan-year,
.plans.is-year .plan-month {
  display: none;
}

.plans.is-year .plan-year {
  display: inline;
}

/* Карточки без виджета: названия на одной линии, даже если над одним есть метка */
.plan-card {
  padding-top: 4px;
}

.plan-card h3 {
  margin-top: calc(28px + 12px * 1.4 + 6px + 10px);
}

.plan-card .price-badge + h3 {
  margin-top: 10px;
}

.plan-card .price-desc {
  min-height: 2.9em;
}

/* Длинная надпись на кнопке: чуть мельче, чтобы умещалась в две строки */
.plan-card .tg-button {
  padding: 12px 18px;
  font-size: 15px;
  line-height: 1.3;
  text-align: center;
}

@media (min-width: 861px) and (max-width: 1000px) {
  .plan-card .tg-button {
    padding: 10px 14px;
    font-size: 14px;
  }
}

/* Смена периода: цена мягко проявляется снизу */
@keyframes plan-swap {
  from {
    opacity: 0;
    transform: translate3d(0, 6px, 0);
  }
}

.motion .plans.is-swapping .price-value,
.motion .plans.is-swapping .price-desc {
  animation: plan-swap 0.45s var(--ease);
}

@media (prefers-reduced-motion: reduce) {
  .plan-thumb,
  .plan-switch button {
    transition: none;
  }
}

/* --- Мини-страница внутри браузера (виджеты тарифов) --- */
.mini-page {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 14px 16px;
  background: var(--white);
  color: var(--bg);
}

.mini-line {
  width: 70%;
  height: 6px;
  margin-bottom: 6px;
  border-radius: 3px;
  background: #E5E5EA;
}

.mini-line.is-short {
  width: 45%;
}

.mini-title {
  margin-top: 6px !important;
  font-size: 15px !important;
  font-weight: 700;
}

.mini-text {
  font-size: 12px !important;
  opacity: 0.6;
}

.mini-btn {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 110px;
  height: 30px;
  margin-top: 10px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--white);
  font-size: 12px;
  font-weight: 600;
}

/* Подпись поверх виджета: «Оплата подключена», «Новая оплата» */
.widget-note {
  position: absolute;
  left: 50%;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--bubble);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transform: translate3d(-50%, 0, 0);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.widget-note b {
  color: var(--paid);
}

.note-check {
  position: relative;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--text);
}

.note-check::after {
  content: "";
  position: absolute;
  left: 5.5px;
  top: 3px;
  width: 4px;
  height: 7px;
  border: solid var(--bg);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}

/* Виджет 1: пунктирное место под кнопку, кнопка встаёт в него */
.plug-slot {
  position: relative;
  margin-top: 10px;
  border-radius: 999px;
}

.plug-slot::before {
  content: "";
  position: absolute;
  inset: -4px;
  border: 1.5px dashed #AEAEB2;
  border-radius: 999px;
  opacity: 0;
}

.plug-btn {
  margin-top: 0;
}

.plug-note {
  bottom: 14px;
}

/* Виджеты 2 и 3: истории «Сайт → Оплата» и «Сайт → Оплата → CRM» — одна серия, общие стили */
/* Индикатор шагов: текущий шаг яркий, остальные приглушены */
.flow-steps {
  position: absolute;
  top: 14px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
}

.flow-steps span,
.flow-steps i {
  opacity: 0.35;
}

.flow-steps i {
  font-style: normal;
  font-weight: 400;
}

.flow-widget[data-step="1"] [data-label="1"],
.flow-widget[data-step="2"] [data-label="2"],
.flow-widget[data-step="3"] [data-label="3"] {
  opacity: 1;
}

/* Сцена под индикатором; экраны лежат друг на друге и срезаны снизу */
.flow-stage {
  position: absolute;
  top: 44px;
  left: 50%;
  bottom: 0;
  width: calc(100% - 32px);
  max-width: 340px;
  transform: translateX(-50%);
}

.flow-screen {
  position: absolute;
  inset: 0;
  border-radius: 12px 12px 0 0;
  overflow: hidden;
}

/* Мини-сайт */
.flow-site {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 14px;
  background: var(--white);
  color: var(--bg);
}

.fb-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.fb-head b {
  width: 42px;
  height: 8px;
  border-radius: 4px;
  background: var(--bg);
}

.fb-head span {
  display: flex;
  gap: 5px;
}

.fb-head i {
  width: 14px;
  height: 3px;
  border-radius: 2px;
  background: #C7C7CC;
}

.fb-title p {
  font-size: 15px !important;
  font-weight: 700;
}

.fb-title span {
  display: block;
  width: 60%;
  height: 5px;
  margin-top: 6px;
  border-radius: 3px;
  background: #E5E5EA;
}

.fb-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px;
  border-radius: 10px;
  background: #F0F0F2;
}

.fb-product small {
  display: block;
  font-size: 10.5px;
  opacity: 0.6;
}

.fb-product b {
  font-size: 13px;
}

.fb-pay {
  position: relative;
}

.fb-btn {
  display: grid;
  place-items: center;
  min-width: 92px;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--white);
  font-size: 11.5px;
  font-weight: 600;
}

.fb-btn > span {
  grid-area: 1 / 1;
}

.fb-spinner {
  width: 13px;
  height: 13px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: var(--white);
  border-radius: 50%;
  opacity: 0;
}

.fb-done {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  opacity: 0;
}

/* Галочка «Оплачено» */
.fb-check {
  width: 5px;
  height: 9px;
  margin: -2px 1px 0;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}

/* Курсор: белый с чёрным контуром, чтобы был виден на светлом сайте */
.flow-cursor {
  position: absolute;
  left: 58%;
  top: 55%;
  width: 14px;
  height: 18px;
  fill: var(--white);
  stroke: var(--bg);
  stroke-width: 1.2;
  stroke-linejoin: round;
  opacity: 0;
  transform-origin: 2px 2px;
}

/* Панель заказов */
.flow-crm {
  padding: 14px 16px;
  background: #1C1C1E;
}

.flow-crm > small {
  display: block;
  color: var(--muted);
}

.flow-total {
  display: block;
  margin-top: 2px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Видно две строки; новый заказ въезжает сверху, нижний уходит */
.flow-orders-view {
  height: 72px;
  margin-top: 10px;
  overflow: hidden;
}

.flow-orders {
  margin: 0 !important;
}

.flow-orders li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 36px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.flow-orders span {
  font-weight: 600;
}

.flow-orders small {
  display: block;
  font-size: 10.5px;
  font-weight: 400;
  color: var(--muted);
}

.flow-orders b {
  font-weight: 600;
  color: var(--paid);
}

/* Состояния кнопки и уведомления. Без префикса .motion: так финальный кадр
   «Старта» (классы is-paid и is-noticed в разметке) виден и без анимаций */
.flow-widget.is-loading .fb-label,
.flow-widget.is-paid .fb-label {
  opacity: 0;
}

.flow-widget.is-paid .fb-done {
  opacity: 1;
}

.flow-note {
  top: 10px;
}

.flow-widget:not(.is-noticed) .flow-note {
  opacity: 0;
  transform: translate3d(-50%, -10px, 0);
}

/* Пока уведомление на экране, шапка и заголовок сайта под ним приглушены */
.flow-widget.is-noticed .fb-head,
.flow-widget.is-noticed .fb-title {
  opacity: 0.2;
}

/* Экраны: на шагах 1–2 виден сайт, на шаге 3 — панель (без анимаций — сразу панель) */
.flow-widget[data-step="3"] .flow-site,
.flow-widget:not([data-step="3"]) .flow-crm {
  opacity: 0;
}

/* --- Движение истории (только если анимации разрешены) --- */
.motion .flow-steps span,
.motion .flow-steps i {
  transition: opacity 0.4s ease;
}

.motion .flow-screen {
  transition: opacity 0.5s ease, transform 0.6s var(--ease);
}

.motion .flow-widget[data-step="3"] .flow-site {
  transform: translate3d(-16px, 0, 0);
}

.motion .flow-widget:not([data-step="3"]) .flow-crm {
  transform: translate3d(16px, 0, 0);
}

/* Шаг 1: блоки сайта появляются по очереди */
.motion .flow-block {
  opacity: 0;
  transform: translate3d(0, 10px, 0);
  transition: opacity 0.45s ease, transform 0.6s var(--ease);
}

.motion .flow-block.is-in {
  opacity: 1;
  transform: none;
}

/* Шаг 2: курсор подлетает и нажимает, кнопка показывает загрузку и «Оплачено» */
.motion .flow-cursor {
  transform: translate3d(36px, 34px, 0);
  transition: opacity 0.3s ease, transform 0.6s var(--ease);
}

.motion .flow-widget.is-pointing .flow-cursor {
  opacity: 1;
  transform: none;
}

.motion .flow-widget.is-clicking .flow-cursor {
  transform: scale(0.82);
  transition-duration: 0.12s;
}

.motion .fb-btn {
  transition: transform 0.15s ease;
}

.motion .flow-widget.is-clicking .fb-btn {
  transform: scale(0.94);
}

.motion .fb-btn > span {
  transition: opacity 0.3s ease;
}

.motion .flow-widget.is-loading .fb-spinner {
  opacity: 1;
  animation: spin 0.7s linear infinite;
}

/* Загрузка гаснет и не накладывается на «Оплачено» */
.motion .flow-widget.is-paid .fb-spinner {
  opacity: 0;
}

/* Уведомление о новой оплате въезжает сверху */
.motion .flow-note {
  transition: opacity 0.4s ease, transform 0.6s var(--ease);
}

/* Шаг 3: список сдвинут на строку вверх, новый заказ въезжает сверху */
.motion .flow-orders {
  transform: translate3d(0, -36px, 0);
  transition: transform 0.6s var(--ease);
}

.motion .flow-orders li:first-child {
  opacity: 0;
  transition: opacity 0.4s ease 0.1s;
}

.motion .flow-widget.is-ordered .flow-orders {
  transform: none;
}

.motion .flow-widget.is-ordered .flow-orders li:first-child {
  opacity: 1;
}

/* Конец цикла: сцена плавно гаснет и начинается заново */
.motion .flow-stage {
  transition: opacity 0.35s ease;
}

.motion .flow-widget.is-resetting .flow-stage {
  opacity: 0;
}

/* Без анимаций (и без JavaScript) показываем итоговое состояние */
html:not(.motion) .plug-slot::before {
  opacity: 0;
}

/* --- Движение виджетов тарифов --- */
.motion .plug-btn,
.motion .plug-slot::before,
.motion .widget-note {
  transition: opacity 0.4s ease, transform 0.6s var(--ease);
}

/* 1. До подключения: пунктир виден, кнопки и подписи нет */
.motion .plug-slot::before {
  opacity: 1;
}

.motion .plug-btn {
  opacity: 0;
  transform: translate3d(0, -28px, 0) scale(0.9);
}

.motion .plug-widget.is-connected .plug-btn {
  opacity: 1;
  transform: none;
}

.motion .plug-widget.is-connected .plug-slot::before {
  opacity: 0;
}

.motion .plug-note {
  opacity: 0;
}

.motion .plug-note {
  transform: translate3d(-50%, 10px, 0);
}

.motion .plug-widget.is-done .plug-note {
  opacity: 1;
  transform: translate3d(-50%, 0, 0);
}

@media (max-width: 860px) {
  .price-cards {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .price-card {
    padding: 12px 12px 32px;
  }

  .price-desc {
    min-height: 0;
  }

  .price-support {
    border-radius: 20px;
  }
}

@media (max-width: 640px) {
  .price-card .tg-button {
    align-self: stretch;
  }
}

/* ---------- Страница документа (политика обработки данных) ---------- */
.doc {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(48px, 7vw, 88px) var(--gutter) clamp(64px, 8vw, 104px);
  font-size: 17px;
  line-height: 1.6;
  color: var(--muted);
}

.doc-back {
  display: inline-block;
  margin-bottom: 24px;
  font-size: 15px;
  color: var(--muted);
  text-decoration: none;
}

.doc-back:hover {
  color: var(--text);
}

.doc h1 {
  font-size: clamp(32px, 5vw, 48px);
  color: var(--text);
}

.doc-date {
  margin-top: 12px;
  font-size: 15px;
}

.doc h2 {
  margin: 48px 0 16px;
  font-size: clamp(21px, 2.4vw, 24px);
  line-height: 1.2;
  color: var(--text);
}

.doc p + p {
  margin-top: 12px;
}

.doc ul {
  margin: 12px 0;
  padding-left: 1.2em;
}

.doc li + li {
  margin-top: 6px;
}

.doc b {
  color: var(--text);
  font-weight: 600;
}

.doc p a,
.doc-table a {
  color: var(--text);
  text-underline-offset: 3px;
}

.doc ol {
  margin: 12px 0;
  padding-left: 1.4em;
}

.doc ol li + li {
  margin-top: 6px;
}

/* Таблицы в документах: на телефоне прокручиваются вбок внутри своей рамки */
.doc-table-wrap {
  margin: 16px 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.doc-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.45;
}

.doc-table th,
.doc-table td {
  padding: 10px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.doc-table tr:last-child td {
  border-bottom: 0;
}

.doc-table th {
  color: var(--text);
  font-weight: 600;
  background: var(--panel);
}

/* Ссылки на документы в подвале */
.footer-docs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

/* «Перейти к содержимому» — первая ссылка на странице, видна только при переходе с клавиатуры */
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

main:focus {
  outline: none;
}

.doc-table-wrap:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

/* ---------- Стекло в стиле iOS (Liquid Glass): шапка и карточки ---------- */
/* Полупрозрачная заливка с мягким бликом сверху, размытие фона с усилением насыщенности,
   тонкая кромка: светлее сверху-слева, темнее снизу-справа.
   В браузерах на Chromium на компьютере добавляется лёгкое преломление (SVG-фильтр,
   класс glass-refract ставит скрипт); в остальных — просто размытие */
:root {
  --glass-blur: blur(20px) saturate(180%);
}

/* На телефонах размытие слабее — чтобы прокрутка не тормозила */
@media (hover: none), (max-width: 860px) {
  :root {
    --glass-blur: blur(10px) saturate(150%);
  }
}

.glass-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.pain-list li,
.offer-card,
.work-card,
.price-card,
.steps-list li,
.work-next {
  position: relative;
  border: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0) 28%),
    rgba(255, 255, 255, 0.045);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 14px 36px rgba(0, 0, 0, 0.35);
}

/* Кромка стекла: тонкая рамка с градиентом поверх края карточки */
.pain-list li::before,
.offer-card::before,
.work-card::before,
.price-card::before,
.steps-list li::before,
.work-next::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(135deg,
    rgba(255, 255, 255, 0.45) 0%,
    rgba(255, 255, 255, 0.14) 28%,
    rgba(255, 255, 255, 0.04) 58%,
    rgba(0, 0, 0, 0.45) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

/* Популярный тариф — кромка ярче */
.price-card.is-featured {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 14px 36px rgba(0, 0, 0, 0.35);
}

.price-card.is-featured::before {
  background: linear-gradient(135deg,
    rgba(255, 255, 255, 0.75) 0%,
    rgba(255, 255, 255, 0.28) 30%,
    rgba(255, 255, 255, 0.1) 60%,
    rgba(0, 0, 0, 0.4) 100%);
}

/* Шапка — тоже стекло: блик по верхнему краю и светлая линия снизу */
.topbar {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.01) 100%),
    rgba(22, 22, 23, 0.45);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Преломление: SVG-фильтр перед размытием */
.glass-refract .pain-list li,
.glass-refract .offer-card,
.glass-refract .work-card,
.glass-refract .price-card,
.glass-refract .steps-list li,
.glass-refract .work-next,
.glass-refract .topbar {
  -webkit-backdrop-filter: url(#glass-refraction) var(--glass-blur);
  backdrop-filter: url(#glass-refraction) var(--glass-blur);
}

/* Мягкие светлые пятна за блоками с карточками — стеклу есть что преломлять */
.pain,
.offer,
.works,
.prices,
.steps,
.final {
  position: relative;
  isolation: isolate;
}

.pain::before,
.offer::before,
.works::before,
.prices::before,
.steps::before,
.final::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.pain::before {
  background:
    radial-gradient(38% 22% at 18% 72%, rgba(255, 255, 255, 0.10), transparent 70%),
    radial-gradient(30% 18% at 84% 86%, rgba(255, 255, 255, 0.08), transparent 70%);
}

.offer::before {
  background:
    radial-gradient(26% 38% at 24% 45%, rgba(255, 255, 255, 0.11), transparent 70%),
    radial-gradient(24% 34% at 78% 60%, rgba(255, 255, 255, 0.09), transparent 70%);
}

.works::before {
  background:
    radial-gradient(30% 40% at 30% 55%, rgba(255, 255, 255, 0.10), transparent 70%),
    radial-gradient(22% 30% at 82% 40%, rgba(255, 255, 255, 0.07), transparent 70%);
}

.prices::before {
  background:
    radial-gradient(24% 30% at 50% 40%, rgba(255, 255, 255, 0.10), transparent 70%),
    radial-gradient(20% 26% at 12% 70%, rgba(255, 255, 255, 0.07), transparent 70%),
    radial-gradient(20% 26% at 88% 70%, rgba(255, 255, 255, 0.07), transparent 70%);
}

.steps::before {
  background:
    radial-gradient(28% 40% at 20% 60%, rgba(255, 255, 255, 0.09), transparent 70%),
    radial-gradient(28% 40% at 80% 50%, rgba(255, 255, 255, 0.08), transparent 70%);
}

.final::before {
  background: radial-gradient(40% 60% at 50% 45%, rgba(255, 255, 255, 0.08), transparent 70%);
}

/* ---------- Шапка на узких телефонах (до 380 px) ---------- */
/* Логотип и кнопка «Обсудить» чуть компактнее, чтобы между ними был воздух */
@media (max-width: 380px) {
  .logo {
    font-size: 21px;
  }

  .topbar-button.tg-button {
    gap: 5px;
    padding: 6px 12px;
    font-size: 13px;
  }
}

/* ---------- Единая типографика крупного текста ---------- */
/* Всё крупное — как заголовок «Пакеты и цены»: Inter Display (оптический размер 32),
   жирность 900, плотный интервал. Цифры моноширинные, чтобы счётчики и суммы
   не «прыгали» при анимации. Мелкий текст — обычный Inter с нормальным интервалом */
.logo,
.notice-sum,
.price-value,
.pay-head b,
.pay-done b,
.crm-total,
.flow-total,
.d-title,
.step-num,
.offer-note {
  font-family: var(--font);
  font-style: normal;
  font-variation-settings: "opsz" 32;
  font-weight: 900;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

/* Моноширинные цифры и у мелких сумм, которые меняются в анимации */
.widget,
.notice,
.price-card {
  font-variant-numeric: tabular-nums;
}

/* ===================== Новая структура страницы ===================== */

/* ---------- Шапка: разделы слева, логотип по центру, справа — «Войти в панель» ---------- */
/* Шапка на всю ширину окна: разделы у левого края, «Войти» — у правого, с одинаковым отступом */
.topbar-inner {
  max-width: none;
}

/* Разделы и «Войти» — на одинаковом отступе от краёв (поля .topbar-inner) */
.topbar-nav {
  grid-column: 1;
  justify-self: start;
  display: flex;
  gap: 28px;
  font-size: 15px;
}

/* Чисто белый, чуть плотнее и с воздухом между буквами — пункты читаются шире */
.topbar-nav a,
.topbar-login {
  color: var(--white);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.topbar-right {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
}

.topbar-login {
  font-size: 15px;
  white-space: nowrap;
}

/* Тонкая белая линия под словом: при наведении вырастает слева направо,
   у раздела, который сейчас на экране (aria-current), — видна всегда */
.topbar-nav a span,
.topbar-login span {
  position: relative;
  display: inline-block;
  padding: 4px 0;
}

.topbar-nav a span::after,
.topbar-login span::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--white);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.2s ease;
}

.topbar-nav a:hover span::after,
.topbar-nav a:focus-visible span::after,
.topbar-nav a[aria-current] span::after,
.topbar-login:hover span::after,
.topbar-login:focus-visible span::after {
  transform: scaleX(1);
}

/* Кнопка-меню и «Войти в панель» внутри меню — только на узких экранах */
.menu-toggle,
.topbar-nav-login {
  display: none;
}

/* На узких экранах разделы — в выпадающем меню под шапкой, логотип остаётся по центру */
@media (max-width: 900px) {
  .menu-toggle {
    grid-column: 1;
    justify-self: start;
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    margin-left: -10px;
    border: 0;
    border-radius: 999px;
    background: none;
    color: var(--text);
    cursor: pointer;
  }

  .menu-toggle:focus-visible {
    outline: 2px solid var(--text);
    outline-offset: 2px;
  }

  /* Две полоски; в открытом меню сходятся в крестик */
  .menu-icon {
    position: relative;
    width: 18px;
    height: 10px;
  }

  .menu-icon i {
    position: absolute;
    left: 0;
    width: 100%;
    height: 1.5px;
    border-radius: 1px;
    background: currentColor;
    transition: transform 0.2s ease;
  }

  .menu-icon i:first-child { top: 0; }
  .menu-icon i:last-child { bottom: 0; }

  .menu-open .menu-icon i:first-child { transform: translate3d(0, 4.25px, 0) rotate(45deg); }
  .menu-open .menu-icon i:last-child { transform: translate3d(0, -4.25px, 0) rotate(-45deg); }

  /* Меню: плотная тёмная панель под шапкой (вложенное размытие браузеры не рисуют) */
  .topbar-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    justify-self: stretch;   /* иначе в сетке шапки меню сжимается по ширине текста */
    flex-direction: column;
    gap: 0;
    padding: 8px var(--gutter) 16px;
    background: #161617;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 17px;
    opacity: 0;
    transform: translate3d(0, -8px, 0);
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
  }

  .menu-open .topbar-nav {
    opacity: 1;
    transform: none;
    visibility: visible;
    pointer-events: auto;
  }

  .topbar-nav a {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .topbar-nav a:last-child {
    border-bottom: 0;
  }

  .topbar-nav-login {
    display: block;
  }

  /* «Войти в панель» на телефоне — в меню, справа в шапке пусто */
  .topbar-right {
    display: none;
  }
}

/* Уменьшение движения: линия и меню появляются сразу, без анимации */
@media (prefers-reduced-motion: reduce) {
  .topbar-nav a span::after,
  .topbar-login span::after,
  .topbar-nav,
  .menu-icon i {
    transition: none;
  }
}

/* ---------- Первый экран: две кнопки ---------- */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
}

/* «Панель Arkline»: сплошная тёмная пилюля без прозрачности и размытия; размер и скругление — как у «Обсудить проект» */
.button-ghost {
  background: #111111;
  box-shadow: inset 0 0 0 1px #2a2a2a;
  color: var(--white);
  transition: background-color 0.2s ease;
}

.button-ghost:hover {
  background: #1c1c1c;
}

@media (prefers-reduced-motion: reduce) {
  .button-ghost {
    transition: none;
  }
}

/* «Обсудить проект» и «Панель Arkline» — одной ширины (на телефоне обе во всю ширину) */
.hero-actions .button {
  min-width: 232px;
  justify-content: center;
  text-align: center;
}

@media (max-width: 640px) {
  .hero-actions {
    flex-direction: column;
    align-self: stretch;
  }
}

/* ---------- Как это работает: 4 шага ---------- */
.steps-4 {
  grid-template-columns: repeat(4, 1fr);
}

.steps-4 li {
  min-height: 300px;
  padding: 32px 26px 36px;
}

.steps-4 .step-num {
  margin-bottom: 48px;
}

.steps-4 h3 {
  font-size: 24px;
}

@media (max-width: 1000px) {
  .steps-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .steps-4 {
    grid-template-columns: 1fr;
  }

  .steps-4 li {
    min-height: 0;
  }

  .steps-4 .step-num {
    margin-bottom: 24px;
  }
}

/* ---------- Услуги под ключ: две карточки ---------- */
.price-cards-2 {
  grid-template-columns: repeat(2, minmax(0, 380px));
  justify-content: center;
}

@media (max-width: 860px) {
  .price-cards-2 {
    grid-template-columns: 1fr;
  }
}

/* ---------- Панель Arkline: снимки демо-бизнеса и что она умеет ---------- */
.section-lead {
  max-width: 620px;
  margin: -12px auto 40px;
  color: var(--muted);
  text-align: center;
}

/* Главная панели — крупно, заказы и ссылка на оплату — рядом под ней */
.panel-shots {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.panel-shot:first-child {
  grid-column: 1 / -1;
}

.panel-shot .widget {
  height: auto;
  background: none;
}

/* Рамка браузера у снимков панели — во всю ширину карточки, а не маленький виджет */
.panel-shot .browser {
  position: relative;
  top: auto;
  left: auto;
  width: 100%;
  max-width: none;
  transform: none;
  border-radius: 14px;
}

.panel-shot .browser-view {
  background: #000;
}

.panel-shot img {
  display: block;
  width: 100%;
  height: auto;
}

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

.panel-features h3,
.security-list h3 {
  margin: 0;
  font-size: 20px;
}

.panel-features p,
.security-list p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

@media (max-width: 640px) {
  .panel-shots {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1000px) {

  .panel-features {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .panel-features {
    grid-template-columns: 1fr;
  }
}

/* ---------- Безопасность и законы ---------- */
.security-list {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 1000px) {
  .security-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .security-list {
    grid-template-columns: 1fr;
  }
}

/* ---------- Вопросы: раскрывающиеся ответы ---------- */
.faq-list {
  display: grid;
  gap: 12px;
  max-width: 760px;
  margin: 0 auto;
}

.faq-item {
  border-radius: 20px;
  background: var(--panel);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

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

/* Плюс, который поворачивается в крестик */
.faq-item summary::after {
  content: "+";
  flex: none;
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
  color: var(--muted);
  transition: transform 0.3s var(--ease);
}

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

.faq-item summary:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 2px;
  border-radius: 20px;
}

.faq-item p {
  margin: 0;
  padding: 0 24px 22px;
  color: var(--muted);
  line-height: 1.55;
}

@media (prefers-reduced-motion: reduce) {
  .faq-item summary::after {
    transition: none;
  }
}
