/* Стили сайта: общие для главной (index.html) и руководства (guide.html). */

/* Шрифт Inter — со своего сайта (landing/fonts/, вариативный, лицензия OFL — fonts/OFL.txt), не с Google
   Fonts: посетитель не отдаёт свой IP третьей стороне, а страница не зависит от чужого сервера.
   Браузер качает только нужные подмножества (unicode-range): для русской страницы — кириллицу и латиницу. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(fonts/inter-cyrillic-ext-wght-normal.woff2) format("woff2"); unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(fonts/inter-cyrillic-wght-normal.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-ext-wght-normal.woff2) format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(fonts/inter-latin-wght-normal.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; }
/* ============================================================
   Палитра — те же токены, что в Narrata и Narrata Studio:
   тёмный нейтральный фон, синий акцент по умолчанию (#3b82f6),
   индиго логотипа (#5b5bf0) для градиентных акцентов.
   Сайт держит один стиль (тёмный) — как и сама программа.
   ============================================================ */
:root {
  --bg: #09090b;
  --bg-soft: #0c0c10;
  --panel: #111113;
  --card: #18181b;
  --card-hover: #1c1c20;
  --line: #27272a;
  --line-strong: #3f3f46;
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --faint: #71717a;
  --accent: #3b82f6;
  --accent-2: #5b5bf0;
  --accent-3: #8b5cf6;
  --accent-soft: rgba(91, 91, 240, .16);
  --ok: #34d399;
  --radius: 20px;
  --radius-sm: 12px;
  --container: 1120px;
  --ease: cubic-bezier(.16, 1, .3, 1);
}
/* На широких мониторах узкая колонка в 1120px тонет в пустом чёрном поле по бокам — весь сайт (не
   только hero) выглядит мельче, чем должен. Раздвигаем контейнер в два шага для широких/очень широких
   экранов — шрифты и картинки внутри (clamp с vw) сами вырастут следом, отдельно их трогать не нужно. */
@media (min-width: 1440px) { :root { --container: 1240px; } }
@media (min-width: 1800px) { :root { --container: 1360px; } }

/* Пока язык не определён и тексты не подставлены — страница скрыта,
   чтобы не мелькнуть русским текстом иностранному посетителю. Снимается
   маленьким скриптом в конце body сразу после первого рендера текста. */
html.i18n-boot body { visibility: hidden; }

* { box-sizing: border-box; }
/* overflow-x: hidden — на html, а не на body: на body это ломает position: sticky в шапке
   (любой предок с overflow, отличным от visible, перестаёт быть «просто предком» для sticky —
   он сам становится границей прилипания). На html такого эффекта нет, он и так корень прокрутки. */
/* Щипок не меняет масштаб страницы (meta viewport + touch-action): страница сама адаптивная. */
html { scroll-behavior: smooth; overflow-x: hidden; touch-action: pan-x pan-y; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
body {
  margin: 0;
  /* Опорная точка для .snow (inset:0 на всю высоту страницы, не только окна) — сама по себе ничего
     не меняет: остальные absolute-слои уже позиционируются от своих локальных контейнеров (.hero,
     .sc-imgwrap и т. п.), а не от body. */
  position: relative;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* Классы вроде .stat-row задают свой display: flex — без этого правила [hidden] на них не работал бы. */
[hidden] { display: none !important; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
@media (max-width: 480px) { .container { padding: 0 16px; } }
.icon { width: 1em; height: 1em; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Пропустить к содержимому — для тех, кто ходит с клавиатуры */
.skip-link {
  position: fixed; top: -60px; left: 16px; z-index: 100;
  background: var(--accent-2); color: #fff; padding: 10px 16px; border-radius: 10px;
  font-weight: 600; font-size: 14px; transition: top .2s var(--ease);
}
.skip-link:focus { top: 16px; }

/* ---------- фон: медленно плавающие цветные пятна ---------- */
/* --parallax-y пишет wireParallax в app.js по скроллу: фон смещается медленнее контента, отсюда
   ощущение глубины. Важно: не transform — .ambient зафиксирован ровно по размеру окна (position:fixed),
   и сдвиг transform обнажал бы пустой край сверху (там, откуда блок «уехал»). Вместо сдвига блок
   растягивается вверх (top уходит в минус, bottom остаётся на 0) — он не покидает свои границы, а
   становится больше их, так что перекрывает экран целиком при любом значении параллакса. */
.ambient { position: fixed; top: calc(-1 * var(--parallax-y, 0px)); right: 0; bottom: 0; left: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.ambient span {
  position: absolute; border-radius: 50%; filter: blur(90px); opacity: .16;
  animation: drift 22s ease-in-out infinite;
}
.ambient span:nth-child(1) { width: 560px; height: 560px; top: -180px; left: -120px; background: radial-gradient(circle, var(--accent-2), transparent 70%); }
.ambient span:nth-child(2) { width: 520px; height: 520px; top: 20%; right: -220px; background: radial-gradient(circle, var(--accent-3), transparent 70%); animation-delay: -7s; animation-duration: 26s; }
.ambient span:nth-child(3) { width: 480px; height: 480px; bottom: -220px; left: 25%; background: radial-gradient(circle, var(--accent), transparent 70%); animation-delay: -14s; animation-duration: 30s; }
@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -40px) scale(1.08); }
  66% { transform: translate(-25px, 25px) scale(0.96); }
}
@media (prefers-reduced-motion: reduce) { .ambient span { animation: none; } }

/* Снег — Studio → «Настройки» → «Снег на сайте» (studio-data/landing.json → SITE.snow, landing/app.js: wireSnow).
   Сама анимация не проверяет prefers-reduced-motion: JS не создаёт ни одной частицы, если он включён.
   position: absolute, не fixed: снег должен скроллиться вместе со страницей, как её собственный слой,
   а не висеть поверх экрана отдельным параллаксом — резало глаз при прокрутке. Работает на всю высоту
   документа (inset:0 от body, см. выше), а не только на первый экран. */
.snow { position: absolute; inset: 0; z-index: 70; overflow: hidden; pointer-events: none; }
/* Частицы уже разбросаны JS по всей высоте страницы (top: 0–100%) и падают на небольшое локальное
   расстояние (--fall), а не от верха окна до низа — так снег ровно виден на любой прокрутке, не только
   у самого верха. Плавное появление/исчезание (opacity) прячет момент, когда анимация допрыгивает до
   конца и линейно перескакивает обратно к началу — иначе на коротком пути это было бы заметным рывком. */
.snow span { position: absolute; border-radius: 50%; background: #fff; animation: snow-fall linear infinite; }
@keyframes snow-fall {
  0% { opacity: 0; transform: translate(0, 0); }
  15% { opacity: var(--o, .6); }
  85% { opacity: var(--o, .6); }
  100% { opacity: 0; transform: translate(var(--drift, 0), var(--fall, 90px)); }
}
@media (max-width: 720px) { .ambient span { filter: blur(60px); opacity: .12; } }

/* Курсор-реактивное свечение за заголовком — тонкая деталь, выключается на тач-устройствах.
   Слой лежит на всю ширину секции (а не контейнера): раньше он кончался в 20 % за краем контейнера,
   и на широких экранах градиент обрезался вертикальной кромкой. Снизу — мягкое затухание маской,
   чтобы у нижней границы секции тоже не было среза. */
.hero { position: relative; overflow: hidden; }
/* Обрезаем только по горизонтали (иначе свечение даёт горизонтальную прокрутку): по вертикали свечение
   значка (.hero-mark-glow, ниже краёв секции из-за размытия) раньше срезалось ровной линией по низу hero —
   теперь мягко гаснет над строкой доверия. Старые браузеры без overflow: clip остаются с hidden. */
@supports (overflow: clip) { .hero { overflow-x: clip; overflow-y: visible; } }
.cursor-glow {
  position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(480px circle at var(--gx, 50%) var(--gy, 30%), rgba(91,91,240,.18), transparent 60%);
  -webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent); mask-image: linear-gradient(to bottom, #000 60%, transparent);
  transition: opacity .4s ease;
}
.hero > .container { z-index: 1; width: 100%; }
.has-hover .cursor-glow { opacity: 1; }

/* ---------- прогресс прокрутки ---------- */
.scroll-progress { position: fixed; top: 0; left: 0; height: 2px; background: linear-gradient(90deg, var(--accent-2), var(--accent-3)); z-index: 60; width: 0%; transition: width .1s linear; }

/* ---------- подсказка «прокрутите вниз» ---------- */
.scroll-hint {
  position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 9px;
  opacity: .65; transition: opacity .4s ease, transform .3s ease;
}
.scroll-hint:hover { opacity: 1; transform: translateX(-50%) translateY(2px); }
.scroll-hint.hidden { opacity: 0; pointer-events: none; }
.scroll-hint-mouse { width: 22px; height: 36px; border: 2px solid rgba(255, 255, 255, .35); border-radius: 999px; position: relative; }
.scroll-hint-dot { position: absolute; top: 6px; left: 50%; width: 4px; height: 8px; margin-left: -2px; border-radius: 999px; background: var(--accent-2); animation: scroll-hint-dot 1.8s ease-in-out infinite; }
@keyframes scroll-hint-dot { 0% { opacity: 1; transform: translateY(0); } 65% { opacity: 0; transform: translateY(14px); } 100% { opacity: 0; transform: translateY(0); } }
@media (max-width: 900px) { .scroll-hint { display: none; } }
@media (prefers-reduced-motion: reduce) { .scroll-hint-dot { animation: none; opacity: 1; } }

/* ---------- шапка ---------- */
/* Шапка стоит вверху страницы и при прокрутке уезжает вместе с ней — не закрывает текст.
   Вернуться наверх — круглая кнопка .to-top внизу справа. */
header.site {
  position: relative; z-index: 50;
  width: calc(100% - 28px); max-width: 980px; margin: 14px auto 0; border-radius: 18px;
  background: rgba(9, 9, 11, .7); backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid rgba(255,255,255,.08); transition: box-shadow .3s ease, background .3s ease;
}
header.site.scrolled { box-shadow: 0 10px 40px rgba(0,0,0,.45); background: rgba(9,9,11,.86); }
.nav-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; }
.brand { display: flex; align-items: center; gap: 9px; }
.logo-mark { width: 30px; height: 30px; border-radius: 9px; overflow: hidden; flex: none; }
.brand-name { font-weight: 700; letter-spacing: -.01em; font-size: 16px; }
.nav-links { display: none; align-items: center; gap: 4px; }
/* Строка ссылок — с 900px: уже на 780–899 (планшет Android вертикально — 800px) она не влезала даже
   сжатой, «Скачать» уезжала за край и страница ездила вбок. Там шапка как на телефоне. */
@media (min-width: 900px) { .nav-links { display: flex; } }
.nav-links a { font-size: 13.5px; color: var(--muted); padding: 8px 12px; border-radius: 9px; transition: color .2s ease, background .2s ease; }
.nav-links a:hover, .nav-links a.active { color: var(--text); background: rgba(255,255,255,.05); }
.nav-right { display: flex; align-items: center; gap: 8px; }
@media (max-width: 380px) {
  header.site { width: calc(100% - 16px); margin-top: 8px; border-radius: 16px; }
  .nav-row { padding: 8px 8px 8px 12px; }
  .brand-name { display: none; }
}
/* До 1024px кнопке «Скачать» оставляем только иконку: на телефоне и планшете вертикально (до 900px, полных
   ссылок нет) — меньше толкучки рядом с переключателем языка, а на 900–1023 — чтобы строка ссылок
   поместилась (см. «Узкие окна» ниже). Подпись остаётся в aria-label. */
@media (max-width: 1023px) {
  #navDownload { width: 38px; height: 38px; padding: 0; border-radius: 50%; }
  #navDownload span { display: none; }
}

/* переключатель языка: два сегмента с бегунком */
.lang-switch { position: relative; display: flex; background: rgba(255,255,255,.05); border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px; }
.lang-switch button { position: relative; z-index: 1; width: 34px; height: 24px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .02em; color: var(--faint); transition: color .25s ease; }
.lang-switch button[aria-pressed="true"] { color: #fff; }
.lang-thumb { position: absolute; top: 3px; left: 3px; width: 34px; height: 24px; border-radius: 999px; background: linear-gradient(135deg, var(--accent-2), var(--accent-3)); transition: transform .28s var(--ease); }
.lang-switch[data-lang="en"] .lang-thumb { transform: translateX(34px); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  /* Чуть квадратнее пилюли — скруглённый прямоугольник, не полная капсула; бейдж и переключатель
     языка (RU/EN) остаются пилюлями намеренно — это статус/переключатель, а не кнопка действия. */
  height: 38px; padding: 0 18px; border-radius: 12px; font-size: 13.5px; font-weight: 600;
  white-space: nowrap; transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease), border-color .25s ease;
  border: 1px solid transparent;
}
.btn .icon { width: 15px; height: 15px; }
.btn-primary { position: relative; overflow: hidden; color: #fff; background: linear-gradient(135deg, var(--accent-2), var(--accent-3)); box-shadow: 0 0 0 0 rgba(91,91,240,0), 0 6px 20px rgba(91,91,240,.28); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(91,91,240,.4); }
.btn-primary:active { transform: translateY(0); }
.btn-primary[aria-busy="true"] { opacity: .7; pointer-events: none; }
/* Блик, пробегающий по кнопке при наведении — тонкая полировка, недорогая по коду. */
.btn-primary::after {
  content: ''; position: absolute; top: 0; left: -75%; width: 45%; height: 100%;
  background: linear-gradient(115deg, transparent, rgba(255,255,255,.4), transparent);
  transform: skewX(-20deg); pointer-events: none; transition: left .65s ease;
}
.btn-primary:hover::after { left: 130%; }
@media (prefers-reduced-motion: reduce) { .btn-primary::after { transition: none; left: -75%; } }
.btn-glass { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.12); color: var(--text); }
.btn-glass:hover { background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.22); transform: translateY(-2px); }
.btn-ghost { color: var(--muted); }
.btn-ghost:hover { color: var(--text); }
.btn-sm { height: 32px; padding: 0 13px; font-size: 12.5px; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ---------- секции ---------- */
section { position: relative; z-index: 1; }
.eyebrow { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--accent-2); text-transform: uppercase; margin-bottom: 14px; }
h2.title { font-size: clamp(28px, 4.4vw, 44px); font-weight: 800; letter-spacing: -.02em; line-height: 1.08; margin: 0 0 14px; }
.lead { font-size: 17px; color: var(--muted); font-weight: 400; line-height: 1.6; max-width: 620px; }
.section-head { text-align: center; margin: 0 auto 48px; max-width: 640px; }
.section-head .lead { margin: 0 auto; }

/* reveal on scroll — лёгкий scale вдобавок к подъёму: элемент не просто едет вверх, а слегка
   «раскрывается», это и даёт более дорогое ощущение, чем чистый translateY. */
.reveal { opacity: 0; transform: translateY(28px) scale(.97); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.visible { opacity: 1; transform: translateY(0) scale(1); }
.reveal.d1 { transition-delay: .08s; } .reveal.d2 { transition-delay: .16s; } .reveal.d3 { transition-delay: .24s; } .reveal.d4 { transition-delay: .32s; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- HERO ---------- */
/* Шапка теперь sticky и занимает своё место в потоке (раньше была fixed и не занимала места) —
   здесь только зазор до неё, а не полная высота шапки. */
/* Секция заезжает под плавающую шапку (её высота с отступом — --head): иначе подсветка за курсором
   обрезалась ровной кромкой по низу шапки, а над ней оставалась тёмная полоса. */
.hero { --head: 80px; margin-top: calc(-1 * var(--head)); padding: calc(100px + var(--head)) 0 40px; text-align: center; }
@media (max-width: 640px) { .hero { --head: 70px; padding: calc(64px + var(--head)) 0 8px; } }
@media (max-width: 380px) { .hero { padding: calc(56px + var(--head)) 0 8px; } }
/* Раньше hero тёк сверху вниз и хвостом переходил в скриншот программы — теперь справа значок программы
   (.hero-mark), а демонстрация интерфейса — в секции «Скриншоты» ниже. Больше НЕ растягиваем hero на
   весь экран (min-height: 100vh раньше держал следующую секцию, «Доверие», за пределами первого
   экрана целиком) — высота теперь по содержимому, чуть плотнее сверху, чтобы «Доверие» было видно
   сразу, без прокрутки. */
@media (min-width: 901px) {
  .hero { padding: calc(44px + var(--head)) 0 20px; }
}
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px 6px 9px; border-radius: 999px;
  /* Залитая индиго-плашка вместо нейтрального контура — по образцу референса. */
  background: rgba(91,91,240,.14); border: 1px solid rgba(91,91,240,.3); font-size: 12px; color: var(--muted);
  /* Компактная однострочная плашка: обычный пробел внутри «уже доступна» иначе может перенестись сам
     по себе на вторую строку, стоит месту чуть сжаться — превращая плашку в две неровные строки. */
  white-space: nowrap;
}
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(52,211,153,.5); animation: pulse-dot 2.2s ease-in-out infinite; }
@keyframes pulse-dot { 0%,100% { box-shadow: 0 0 0 0 rgba(52,211,153,.45); } 50% { box-shadow: 0 0 0 5px rgba(52,211,153,0); } }
.badge b { color: var(--text); font-weight: 700; }
.skel { display: inline-block; width: 46px; height: 11px; border-radius: 5px; background: linear-gradient(90deg, rgba(255,255,255,.06), rgba(255,255,255,.15), rgba(255,255,255,.06)); background-size: 200% 100%; animation: shimmer 1.4s ease-in-out infinite; vertical-align: middle; }
@keyframes shimmer { to { background-position: -200% 0; } }

.hero h1 {
  position: relative; font-size: clamp(40px, 8vw, 84px); font-weight: 800; letter-spacing: -.03em; line-height: 1.03;
  margin: 14px 0 14px;
}
.hero h1 span { display: block; }
/* Первая строка — «Narrata», сам бренд — заметно крупнее остального заголовка, как заголовок-плашка
   над строкой-подписью (см. референс): не отдельный элемент разметки, просто первый span покрупнее. */
.hero h1 span:first-child { font-size: 1.45em; }
.hero h1 .grad {
  background: linear-gradient(135deg, #fff 10%, var(--accent-2) 55%, var(--accent-3) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero .lead { font-size: clamp(16px, 2.2vw, 19px); max-width: 640px; margin: 0 auto 24px; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; margin-bottom: 10px; }
.hero-req { font-size: 12.5px; color: var(--faint); letter-spacing: .01em; }
.hero-req .sep { margin: 0 8px; opacity: .5; }
/* Кнопки на телефоне — в столбик и во всю ширину, легче попасть пальцем. */
@media (max-width: 460px) {
  .hero-cta { flex-direction: column; align-items: stretch; gap: 10px; }
  .hero-cta .btn { width: 100%; }
  .hero-req { line-height: 1.6; }
}

/* Текст слева, светящийся значок справа (вариант B) — на мобильном схлопывается обратно в один столбец. */
.hero-top { display: flex; align-items: flex-start; gap: clamp(24px, 5vw, 64px); text-align: left; }
.hero-copy { flex: 1 1 560px; min-width: 0; }
.hero-copy .lead { margin-left: 0; margin-right: 0; }
.hero-copy .hero-cta { justify-content: flex-start; }

/* В две колонки заголовок уже не на всю ширину контейнера — без уменьшения он не влезает в свои
   3 строки и сам собой переносится ещё раз, отсюда и «рваный» вид. Сжимаем размер под новую колонку,
   чтобы каждая строка укладывалась в одну строку, а масштаб заголовка совпадал с референсом. */
@media (min-width: 901px) {
  .hero-copy h1 { font-size: clamp(34px, 4.3vw, 84px); }
}

/* Правая колонка: значок, под ним плашка версии и живая строка со звёздами/скачиваниями — снова
   вместе, друг под другом, как и было изначально (только крупнее — см. .hero-mark ниже). */
.hero-side { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: clamp(16px, 3vw, 36px); }
.hero-side .stat-row { justify-content: center; margin: 0; }

.hero-mark {
  /* Крупнее, чем в самой первой версии: значок — главный визуальный объект hero. */
  position: relative; width: clamp(220px, 27vw, 440px); aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  /* Лёгкое «отплывание» от курсора — JS пишет --float-x/--float-y кадр за кадром (wireHeroMarkFloat
     в app.js, lerp в rAF-цикле). Плавность даёт сам lerp — CSS-transition здесь не нужен и даже вредит:
     он бы переигрывал кривую на каждое новое значение переменной поверх уже плавного JS-движения. */
  transform: translate(var(--float-x, 0px), var(--float-y, 0px));
}
.hero-mark-glow {
  position: absolute; inset: -25%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(91, 91, 240, .55), rgba(139, 92, 246, .28) 45%, transparent 72%);
  filter: blur(46px);
  animation: hero-mark-pulse 3.6s ease-in-out infinite;
}
/* Статика вместо видео: PNG с настоящей альфой, никаких масок/блендов под неё не нужно — край сам по
   себе прозрачный, чем и снимает всю возню, что была с чёрным фоном видео (см. историю правок ниже).
   Левитация — на самой картинке, не на .hero-mark: контейнер уже занят JS-смещением от курсора
   (--float-x/--float-y), а тут отдельный, независимый transform, оба складываются без конфликта. */
.hero-mark-img { position: relative; width: 100%; height: 100%; object-fit: contain; pointer-events: none; animation: hero-mark-levitate 6s ease-in-out infinite; }
@keyframes hero-mark-pulse { 0%, 100% { opacity: .5; transform: scale(.92); } 50% { opacity: .85; transform: scale(1.05); } }
@keyframes hero-mark-levitate { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-14px) rotate(-1.5deg); } }
@media (prefers-reduced-motion: reduce) { .hero-mark-glow, .hero-mark-img { animation: none; } }

@media (max-width: 900px) {
  .hero-top { flex-direction: column; align-items: center; text-align: center; gap: 16px; }
  /* В столбце flex-basis: 560px — это уже высота, а не ширина: под кнопками оставалась пустота. */
  .hero-copy { flex-basis: auto; }
  .hero-copy .lead { margin-left: auto; margin-right: auto; }
  .hero-copy .hero-cta { justify-content: center; }
  /* На телефоне значок, плашка версии и счётчик скачиваний просто убраны: после нескольких раскладок
     стало ясно, что они там не помогают решению скачать — только занимают узкий экран. Первый экран
     сразу — заголовок, текст и кнопка. На десктопе — боковая колонка, как и была. */
  .hero-side { display: none; }
}

/* живая строка со звёздами/скачиваниями */
.stat-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin: 30px 0 6px; font-size: 12px; color: var(--faint); }
.stat-row .stat { display: inline-flex; align-items: center; gap: 5px; }
.stat-row b { color: var(--muted); font-variant-numeric: tabular-nums; }
.stat-row .icon { width: 12px; height: 12px; color: var(--faint); }

/* Hero + «Доверие» вместе держат минимум экран высотой (min-height: 100vh) — так «Возможности»
   гарантированно не видны на первом экране НА ЛЮБОМ мониторе, а не только на тех, что мы успели
   проверить руками: раньше запас перед следующей секцией был через фиксированный margin в пикселях,
   и на достаточно широком/невысоком экране (например, широкий монитор — заголовок переносится
   меньше строк, hero становится короче) его всё равно не хватало. display: flow-root — своя область
   форматирования: у .hero отрицательный margin-top (уезжает под плавающую шапку), без flow-root он
   «просочился» бы наружу и сдвинул саму .hero-block вверх вместе с высотой на экран. Если контента
   меньше экрана — снизу просто пустое место до следующей секции, не обрезание и не наезд. */
.hero-block { display: flow-root; }
@media (min-width: 901px) { .hero-block { min-height: 100vh; } }

/* ---------- ДОВЕРИЕ: компактная строка фактов сразу под hero ---------- */
.trust-strip { padding: 16px 0 0; }
@media (max-width: 640px) { .trust-strip { padding: 16px 0 0; } }
.trust-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; max-width: var(--container); margin: 0 auto; }
@media (max-width: 860px) { .trust-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .trust-grid { grid-template-columns: 1fr; } }
/* Без своего фона/рамки — карточкой выглядит только сам значок (.trust-icon), текст рядом лежит
   прямо на фоне страницы, без «подложки» под ним (по образцу референса). */
.trust-item { display: flex; align-items: center; gap: 12px; padding: 4px 0; }
.trust-icon { flex: none; width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  background: rgba(91,91,240,.14); border: 1px solid rgba(91,91,240,.2); color: var(--accent-2); }
.trust-icon .icon { width: 16px; height: 16px; }
.trust-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.trust-text b { font-size: 13.5px; font-weight: 650; color: var(--text); }
.trust-text small { font-size: 12px; color: var(--faint); }

/* ---------- FEATURES (bento) ---------- */
.features { padding: 120px 0 40px; }
@media (max-width: 640px) { .features { padding: 72px 0 8px; } }
/* Пять карточек в первом ряду, четыре во втором — но не сеткой (grid держал бы вторую строку в тех
   же 5 колонках, и четвёртая карточка кончалась бы раньше правого края, оставляя пустой хвост).
   Flexbox с flex-grow:1 отдаёт этот «хвост» четырём карточкам второго ряда поровну — они сами
   становятся немного шире и тянутся на всю ширину, единый ритм высоты сохраняется. */
.bento { display: flex; flex-wrap: wrap; gap: 12px; }
.f-card {
  flex: 1 1 calc((100% - 48px) / 5);
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; position: relative; overflow: hidden;
  /* transform — отдельно и быстрее: .35s с длинным хвостом (--ease) был рассчитан на разовое появление
     при скролле, а не на быстрый провод мышкой по сетке карточек — при новом наведении карточка ещё не
     успевала опуститься, отсюда рывки. border/background можно оставить медленнее — их незавершённость
     не так заметна на глаз, как рывок transform. */
  transition: transform .16s ease-out, border-color .35s ease, background .35s ease;
}
/* .f-card ещё и .reveal.dN (стагган появления при скролле) — у того своя transition-delay
   (.08–.32s), и она въедается в transition-property ВСЕХ свойств элемента, включая наш transform,
   причём навсегда, не только при первом появлении. Из-за этого наведение ощущалось с лагом — тем
   заметнее, чем позже была очередь карточки в стаггере. Специфичность та же (.reveal.dN), решает
   порядок в файле — эта запись ниже, значит и побеждает. */
.f-card.reveal { transition-delay: 0s; }
.f-card:hover { transform: translateY(-4px); border-color: rgba(91,91,240,.35); background: var(--card-hover); }
@media (max-width: 900px) { .f-card { flex-basis: calc((100% - 12px) / 2); } }
@media (max-width: 560px) { .bento { gap: 10px; } .f-card { flex-basis: 100%; padding: 20px; } }
.f-icon { width: 38px; height: 38px; border-radius: 12px; display: flex; align-items: center; justify-content: center; margin-bottom: 14px;
  background: linear-gradient(135deg, rgba(91,91,240,.22), rgba(139,92,246,.06)); border: 1px solid rgba(91,91,240,.18); color: var(--accent-2); }
.f-icon .icon { width: 18px; height: 18px; }
.f-card h3 { font-size: 16.5px; font-weight: 700; margin: 0 0 6px; letter-spacing: -.01em; }
.f-card p { font-size: 13.5px; line-height: 1.55; color: var(--muted); margin: 0; }

/* ---------- КАК ЭТО РАБОТАЕТ: горизонтальный workflow с номерами и стрелками ---------- */
.workflow { padding: 100px 0 40px; }
@media (max-width: 640px) { .workflow { padding: 60px 0 8px; } }
.workflow-row { display: flex; align-items: flex-start; justify-content: center; max-width: var(--container); margin: 0 auto; }
.workflow-step { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 8px; padding: 0 16px; text-align: left; }
.workflow-num { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-2), var(--accent-3)); color: #fff; font-size: 13px; font-weight: 700; margin-bottom: 2px; }
.workflow-step b { font-size: 15px; font-weight: 650; }
.workflow-step span { font-size: 13px; color: var(--muted); line-height: 1.5; }
.workflow-arrow { flex: none; align-self: flex-start; margin-top: 9px; width: 18px; height: 18px; color: var(--line-strong); }
.workflow-arrow .icon { width: 100%; height: 100%; }
@media (max-width: 780px) {
  .workflow-row { flex-direction: column; align-items: stretch; gap: 18px; }
  .workflow-step { padding: 0; }
  .workflow-arrow { display: none; }
}

/* ---------- ГАЛЕРЕЯ: большой кадр во всю ширину контейнера + плёнка миниатюр ---------- */
.gallery { padding: 120px 0 40px; }
@media (max-width: 640px) { .gallery { padding: 72px 0 8px; } }
.showcase { display: flex; align-items: center; gap: 14px; }
.sc-arrow { flex: none; width: 46px; height: 46px; border-radius: 50%; background: rgba(255,255,255,.05); border: 1px solid var(--line-strong);
  display: flex; align-items: center; justify-content: center; transition: background .2s ease, transform .2s ease; }
.sc-arrow:hover { background: rgba(255,255,255,.1); transform: scale(1.06); }
.sc-arrow .icon { width: 18px; height: 18px; }
@media (max-width: 720px) { .sc-arrow { display: none; } }
.sc-frame { flex: 1; min-width: 0; margin: 0; border-radius: 18px; overflow: hidden; border: 1px solid rgba(255,255,255,.1); background: #0c0c10;
  box-shadow: 0 2px 6px rgba(0,0,0,.2), 0 24px 60px rgba(0,0,0,.45), 0 0 90px rgba(91,91,240,.1); }
.sc-bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: #141417; border-bottom: 1px solid rgba(255,255,255,.06); }
.sc-bar .dots { display: flex; gap: 6px; flex: none; }
.sc-bar .dots i { width: 10px; height: 10px; border-radius: 50%; background: #2c2c31; }
.sc-bar .sc-counter { margin-left: auto; font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.sc-imgwrap { position: relative; width: 100%; aspect-ratio: 1600 / 1000; cursor: zoom-in; overflow: hidden; touch-action: pan-y; }
.sc-imgwrap img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .45s ease; }
.sc-imgwrap img.active { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .sc-imgwrap img { transition: none; } }
.sc-cap { padding: 12px 16px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); min-height: 1.4em; }
@media (max-width: 480px) { .sc-frame { border-radius: 14px; } .sc-bar { padding: 8px 12px; } .sc-cap { padding: 10px 12px; font-size: 12.5px; } }

.thumb-rail { display: flex; align-items: flex-start; gap: 8px; overflow-x: auto; padding: 14px 2px 4px; margin: 0 -2px; scroll-snap-type: x proximity;
  scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.thumb-rail::-webkit-scrollbar { height: 6px; }
.thumb-rail::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 999px; }
.thumb { flex: 1 0 88px; max-width: 120px; aspect-ratio: 1600/1000; align-self: flex-start; scroll-snap-align: center; border-radius: 9px; overflow: hidden; border: 2px solid transparent;
  opacity: .5; cursor: pointer; transition: opacity .2s ease, border-color .2s ease, transform .2s ease; background: none; padding: 0; line-height: 0; }
.thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.thumb:hover { opacity: .85; }
.thumb.active { opacity: 1; border-color: var(--accent-2); }
@media (max-width: 480px) { .thumb { flex-basis: 72px; } }

/* лайтбокс */
.lightbox { position: fixed; inset: 0; z-index: 80; background: rgba(5,5,7,.92); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; padding: 24px; opacity: 0; pointer-events: none; transition: opacity .25s ease; }
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox figure { margin: 0; max-width: min(1100px, 94vw); }
.lightbox img { width: 100%; border-radius: 12px; border: 1px solid rgba(255,255,255,.1); }
.lightbox figcaption { text-align: center; color: var(--muted); font-size: 13px; margin-top: 14px; }
.lightbox .lb-close { position: absolute; top: 20px; right: 20px; width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.08); display: flex; align-items: center; justify-content: center; }
.lightbox .lb-close .icon { width: 18px; height: 18px; }
.lightbox .lb-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; background: rgba(255,255,255,.08); display: flex; align-items: center; justify-content: center; }
.lightbox .lb-arrow.prev { left: 16px; } .lightbox .lb-arrow.next { right: 16px; }
@media (max-width: 640px) { .lightbox .lb-arrow { display: none; } }

/* ---------- ЗАГРУЗКА / CTA ---------- */
/* ---------- ПЛАНЫ ---------- */
.rm-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
@media (max-width: 900px) { .rm-grid { grid-template-columns: 1fr; } }
.rm-col { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.rm-col-head { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 14.5px; margin-bottom: 14px; }
.rm-col-head .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.rm-col-head .count { margin-left: auto; color: var(--faint); font-weight: 500; font-size: 13px; }
.rm-col[data-status="planned"] .dot { background: var(--faint); }
.rm-col[data-status="progress"] .dot { background: var(--accent-2); box-shadow: 0 0 0 4px var(--accent-soft); }
.rm-col[data-status="done"] .dot { background: var(--ok); }
.rm-item { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 13px 14px; margin-top: 10px; transition: border-color .25s ease, transform .25s var(--ease); }
.rm-item:first-of-type { margin-top: 0; }
.rm-item:hover { border-color: rgba(91,91,240,.35); transform: translateY(-2px); }
.rm-item h3 { font-size: 14.5px; font-weight: 650; margin: 0; line-height: 1.35; }
.rm-item p { font-size: 13px; line-height: 1.55; color: var(--muted); margin: 6px 0 0; }
.rm-item a { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; font-size: 12.5px; color: var(--accent-2); text-decoration: none; }
.rm-item a:hover { text-decoration: underline; }
.rm-item a .icon { width: 13px; height: 13px; }
.rm-col[data-status="done"] .rm-item h3 { color: var(--muted); }
.rm-empty { color: var(--faint); font-size: 13px; margin: 0; }
.rm-foot { text-align: center; margin: 22px 0 0; color: var(--faint); font-size: 13px; display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; align-items: center; }
.rm-foot a { display: inline-flex; align-items: center; gap: 6px; color: var(--accent-2); text-decoration: none; font-weight: 600; }
.rm-foot a:hover { text-decoration: underline; }
.rm-foot .icon { width: 15px; height: 15px; }

.download { padding: 120px 0 60px; }
@media (max-width: 640px) { .download { padding: 72px 0 40px; } }
/* Шире прежнего и в две колонки на десктопе — самый сильный CTA страницы, а не просто центральная
   карточка: слева повод скачать и сами кнопки, справа требования, чтобы решение принималось сразу. */
.cta-card { position: relative; max-width: 960px; margin: 0 auto; text-align: center; padding: 38px 44px 34px; border-radius: 28px; background: var(--card); overflow: hidden; }
@media (max-width: 480px) { .cta-card { padding: 32px 20px; border-radius: 22px; } }
.dl-cols { display: grid; grid-template-columns: 1.15fr .85fr; gap: 32px; align-items: start; text-align: left; }
@media (max-width: 780px) { .dl-cols { grid-template-columns: 1fr; gap: 28px; text-align: center; } }
.dl-main .download-grid { justify-content: flex-start; }
@media (max-width: 780px) { .dl-main .download-grid { justify-content: center; } }
.dl-main .fine-print { text-align: left; }
@media (max-width: 780px) { .dl-main .fine-print { text-align: center; } }
.dl-req-label { display: block; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--faint); margin-bottom: 10px; }
.dl-req .req-grid { max-width: none; margin: 0; }
.dl-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.dl-links a { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); transition: color .2s ease; }
.dl-links a:hover { color: var(--text); }
.dl-links .icon { width: 14px; height: 14px; }
.dl-links small { color: var(--faint); font-variant-numeric: tabular-nums; }
.dl-closed { text-align: center; margin-top: 10px; }
@property --cta-angle { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.cta-card::before { content: ''; position: absolute; inset: 0; border-radius: 28px; padding: 2px; pointer-events: none;
  background: conic-gradient(from var(--cta-angle), rgba(91,91,240,.22) 0deg, rgba(91,91,240,.9) 55deg, #e4e4ff 95deg, rgba(139,92,246,1) 115deg, rgba(91,91,240,.45) 170deg, rgba(91,91,240,.22) 230deg, rgba(91,91,240,.22) 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: cta-border-spin 7s linear infinite, cta-border-pulse 2.6s ease-in-out infinite; }
@keyframes cta-border-spin { to { --cta-angle: 360deg; } }
/* filter вместо box-shadow: drop-shadow повторяет форму уже замаскированного кольца (тонкая рамка), а
   box-shadow лёг бы на весь прямоугольник псевдоэлемента ещё до маски — светилось бы не там. */
@keyframes cta-border-pulse {
  0%, 100% { filter: drop-shadow(0 0 3px rgba(139,92,246,.4)); }
  50% { filter: drop-shadow(0 0 10px rgba(139,92,246,.85)); }
}
@media (prefers-reduced-motion: reduce) { .cta-card::before { animation: none; filter: none; } }
.cta-card h2 { margin-top: 0; }
.cta-card .lead { margin: 0 0 18px; }
@media (max-width: 780px) { .cta-card .lead { margin: 0 auto 18px; } }
.download-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-bottom: 10px; }
.dl-btn { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-radius: 16px; min-width: 230px; text-align: left; }
@media (max-width: 480px) { .download-grid { flex-direction: column; } .dl-btn { min-width: 0; width: 100%; } }
.dl-btn .platform-icon { width: 30px; height: 30px; flex: none; }
.dl-btn .dl-text b { display: block; font-size: 14.5px; }
.dl-btn .dl-text small { display: block; font-size: 11.5px; color: rgba(255,255,255,.75); margin-top: 2px; }
.dl-btn.btn-glass .dl-text small { color: var(--faint); }
/* Минимальные требования — две тихие карточки под кнопками, читаются одним взглядом. */
.req-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 560px; margin: 26px auto 0; text-align: left; }
@media (max-width: 480px) { .req-grid { grid-template-columns: 1fr; } }
/* Без своей рамки/фона — просто два столбца текста под общим заголовком «Минимальные требования»,
   по образцу референса: не отдельная карточка на платформу, а единый компактный список. */
.req-card { padding: 0; }
.req-head { font-size: 12.5px; font-weight: 650; color: var(--text); margin-bottom: 6px; }
.req-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.req-card li { font-size: 12px; color: var(--faint); padding-left: 14px; position: relative; }
.req-card li::before { content: ''; position: absolute; left: 0; top: .55em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent-2); }
.fine-print { font-size: 12px; color: var(--faint); margin-top: 18px; }
.fine-print a { color: var(--muted); border-bottom: 1px dotted var(--line-strong); }
.fine-print a:hover { color: var(--text); }
/* Ссылки поддержки переехали в шапку (значок-сердце с выпадающим списком) — карточка загрузки
   ими больше не занята, см. .support-menu ниже. */

/* ---------- шапка: значок «Поддержать» с выпадающим списком ---------- */
.support-menu { position: relative; }
.support-menu summary { list-style: none; }
.support-menu summary::-webkit-details-marker { display: none; }
.support-menu[open] summary { color: var(--text); background: rgba(255,255,255,.09); }
.support-menu[open] summary .icon { color: #f472b6; }
.support-dropdown {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 60; min-width: 220px;
  display: flex; flex-direction: column; gap: 2px; padding: 8px;
  background: rgba(20,20,23,.96); backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid rgba(255,255,255,.1); border-radius: 14px; box-shadow: 0 20px 50px rgba(0,0,0,.5);
}
.support-dropdown a { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 9px; font-size: 13px; color: var(--muted); transition: color .2s ease, background .2s ease; }
.support-dropdown a:hover { color: #f472b6; background: rgba(244,114,182,.1); }
.support-dropdown .icon { width: 14px; height: 14px; flex: none; }
@media (max-width: 380px) { .support-dropdown { right: -40px; } }

/* ---------- FOOTER ---------- */
footer { padding: 40px 0 32px; border-top: 1px solid var(--line); }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
@media (max-width: 560px) { .foot-row { flex-direction: column; text-align: center; gap: 16px; } .foot-links { justify-content: center; } }
.foot-brand { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 13.5px; font-weight: 600; }
.foot-brand .logo-mark { width: 24px; height: 24px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 18px; }
.foot-links a { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--faint); transition: color .2s ease; }
.foot-links a:hover { color: var(--text); }
.foot-links .icon { width: 14px; height: 14px; }
.foot-copy { font-size: 12px; color: var(--faint); }

/* ---------- кнопка «Наверх»: появляется, когда страницу прокрутили вниз ----------
   Не position: fixed — на части мобильных браузеров fixed-элемент считает ширину от «истинного» вьюпорта
   и справа обрезается. Обёртка нулевой высоты прилипает к низу экрана (sticky),
   а кнопка внутри неё стоит абсолютно — ширина берётся от самой страницы. */
.to-top-dock { position: sticky; bottom: 0; height: 0; z-index: 55; pointer-events: none; }
.to-top {
  position: absolute; right: calc(20px + env(safe-area-inset-right)); bottom: calc(20px + env(safe-area-inset-bottom));
  width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: var(--text); background: rgba(24, 24, 27, .82); border: 1px solid var(--line-strong); cursor: pointer;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 8px 26px rgba(0,0,0,.45);
  opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .25s ease, transform .25s var(--ease), background .2s ease, border-color .2s ease;
}
.to-top.visible { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--accent-2); border-color: var(--accent-2); }
.to-top .icon { width: 20px; height: 20px; transform: rotate(-90deg); }
@media (max-width: 480px) { .to-top { width: 42px; height: 42px; right: calc(14px + env(safe-area-inset-right)); bottom: calc(14px + env(safe-area-inset-bottom)); } }

/* ---------- значок «Руководство» в шапке: на узких экранах, где нет строки ссылок ---------- */
.nav-guide, .icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; color: var(--muted); background: rgba(255,255,255,.05); border: 1px solid var(--line-strong); transition: color .2s ease, background .2s ease; cursor: pointer; }
.nav-guide:hover, .icon-btn:hover { color: var(--text); background: rgba(255,255,255,.09); }
.nav-guide .icon, .icon-btn .icon { width: 17px; height: 17px; }
@media (min-width: 1024px) { .nav-guide { display: none; } }
/* Узкие окна и планшеты горизонтально: 900–1023px. Полной строке ссылок нужно ~875px (с «Планами» ~950),
   а шапке тут достаётся меньше. Здесь шапка плотнее: ссылки ближе, «GitHub» — только внизу страницы,
   «Руководство» на главной — иконкой книги рядом с языком (на остальных страницах книги нет — там ссылка
   остаётся). */
@media (min-width: 900px) and (max-width: 1023px) {
  .nav-links a { padding: 8px 9px; }
  .nav-links a[data-link="github"], .nav-links a.nav-link-guide { display: none; }
  .nav-guide { display: inline-flex; }
}

/* ---------- страница руководства (guide.html) ---------- */
.guide { padding-top: 48px; padding-bottom: 72px; }
.guide-head { margin-bottom: 32px; }
.guide-back { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--faint); margin-bottom: 18px; transition: color .2s ease; }
.guide-back:hover { color: var(--text); }
.guide-head h1 { font-size: clamp(30px, 5vw, 48px); font-weight: 800; letter-spacing: -.02em; line-height: 1.08; margin: 0 0 10px; }
.guide-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 40px; align-items: start; }
.guide-nav { position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow-y: auto; scrollbar-width: thin; }
.guide-search { display: flex; align-items: center; gap: 8px; padding: 0 12px; margin-bottom: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; color: var(--faint); }
.guide-search:focus-within { border-color: rgba(91,91,240,.55); }
.guide-search input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: var(--text); font: inherit; font-size: 13.5px; padding: 10px 0; }
.guide-toc { display: flex; flex-direction: column; gap: 2px; }
.guide-toc a { display: block; padding: 8px 12px; border-radius: 9px; border-left: 2px solid transparent; transition: background .2s ease, border-color .2s ease; }
.guide-toc a b { display: block; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.guide-toc a small { display: block; font-size: 11.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.guide-toc a:hover { background: rgba(255,255,255,.04); }
.guide-toc a.active { background: var(--accent-soft); border-left-color: var(--accent-2); }
.guide-toc a.active b { color: var(--text); }
.guide-section { scroll-margin-top: 24px; padding: 28px 30px; margin-bottom: 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.guide-section h2 { font-size: 22px; font-weight: 700; letter-spacing: -.01em; margin: 0 0 14px; }
/* Пункты соглашения читаются подряд, один за другим — карточки можно поставить теснее, чем разделы
   руководства (те самостоятельнее, между ними уместнее пауза). */
.license-page .guide-section { margin-bottom: 8px; }
.guide-body { color: #d4d4d8; font-size: 15px; line-height: 1.7; }
.guide-body p { margin: 0 0 12px; }
.guide-body p:last-child { margin-bottom: 0; }
.guide-body strong { color: var(--text); font-weight: 600; }
.guide-body a { color: #a5b4fc; text-decoration: underline; text-underline-offset: 2px; }
.guide-body ul, .guide-body ol { margin: 0 0 12px; padding-left: 22px; }
.guide-body li { margin: 4px 0; }
.guide-body code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .88em; background: rgba(255,255,255,.07); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; }
.guide-body table { width: 100%; border-collapse: collapse; margin: 0 0 12px; font-size: 14px; display: block; overflow-x: auto; }
.guide-body th, .guide-body td { border: 1px solid var(--line); padding: 7px 10px; text-align: left; vertical-align: top; }
.guide-body th { background: rgba(255,255,255,.04); color: var(--text); font-weight: 600; }
.guide-empty { color: var(--faint); text-align: center; padding: 40px 0; }
.guide-note { color: var(--faint); font-size: 13px; margin-top: 24px; }
/* Узкий экран: оглавление — над текстом, ряд прокручиваемых вбок разделов. */
@media (max-width: 860px) {
  .guide { padding-top: 28px; }
  .guide-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .guide-nav { position: static; max-height: none; overflow: visible; }
  .guide-toc { flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 4px; scrollbar-width: none; }
  .guide-toc a { flex: none; border-left: 0; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; }
  .guide-toc a small { display: none; }
  .guide-toc a b { font-size: 13px; white-space: nowrap; }
  .guide-section { padding: 20px 18px; border-radius: 16px; }
  .guide-body { font-size: 14.5px; }
}

/* ---------- страница «Что нового» (changelog.html) ---------- */
.change-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 14px; margin-bottom: 14px; }
.change-head h2 { margin: 0; font-size: 26px; letter-spacing: -.02em; }
.change-current { padding: 3px 11px; border-radius: 999px; font-size: 12px; font-weight: 600; color: #34d399; background: rgba(52,211,153,.12); border: 1px solid rgba(52,211,153,.35); align-self: center; }
.change-date { margin-left: auto; font-size: 13px; color: var(--faint); }
.guide-body h3.change-kind { display: inline-flex; align-items: center; gap: 8px; margin: 18px 0 8px; padding: 4px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; letter-spacing: .02em; color: #d4d4d8; background: rgba(255,255,255,.05); border: 1px solid var(--line); }
.guide-body h3.change-kind:first-child { margin-top: 0; }
.guide-body h3.change-kind::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #a1a1aa; }
.change-kind.kind-new { color: #c7c7ff; border-color: rgba(139,139,255,.35); } .change-kind.kind-new::before { background: #8b8bff; }
.change-kind.kind-fix { color: #a7f3d0; border-color: rgba(52,211,153,.35); } .change-kind.kind-fix::before { background: #34d399; }
.change-kind.kind-improve { color: #fde68a; border-color: rgba(251,191,36,.35); } .change-kind.kind-improve::before { background: #fbbf24; }
.change-kind.kind-design { color: #fbcfe8; border-color: rgba(244,114,182,.35); } .change-kind.kind-design::before { background: #f472b6; }
.change-kind.kind-other::before { background: #71717a; }
.guide-body ul + h3.change-kind { margin-top: 20px; }
/* Плашка версии на главной — ссылка на «Что нового» этой версии. */
a.badge { transition: border-color .2s ease, background .2s ease; }
a.badge:hover { border-color: rgba(139,139,255,.45); background: rgba(91,91,240,.1); }
.badge .more { color: #c7c7ff; font-weight: 600; }
.badge .more::before { content: "·"; margin: 0 6px 0 2px; color: var(--faint); font-weight: 400; }

/* ---------- «Для кого»: четыре карточки в ряд ---------- */
.audience { padding: 0 0 8px; }
.aud-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; max-width: var(--container); margin: 0 auto; }
.aud-card { display: flex; flex-direction: column; gap: 8px; padding: 22px 20px; border-radius: var(--radius-sm); background: var(--card); border: 1px solid var(--line); transition: border-color .25s ease, transform .16s ease-out; }
/* Тот же утёкший transition-delay от .reveal.dN, что и у .f-card — см. комментарий там. */
.aud-card.reveal { transition-delay: 0s; }
.aud-card:hover { border-color: rgba(91,91,240,.35); transform: translateY(-3px); }
.aud-card .icon { width: 22px; height: 22px; color: var(--accent-2); }
.aud-card b { font-size: 15px; font-weight: 600; }
.aud-card span { font-size: 13.5px; color: var(--muted); line-height: 1.5; }
@media (max-width: 900px) { .aud-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .aud-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- частые вопросы ---------- */
.faq-list { max-width: 920px; margin: 0 auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; align-items: start; }
@media (max-width: 720px) { .faq-list { grid-template-columns: 1fr; max-width: 640px; } }
.faq-item { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); transition: border-color .25s ease; }
.faq-item[open] { border-color: rgba(91,91,240,.35); }
.faq-item summary { display: flex; align-items: center; gap: 12px; padding: 16px 20px; cursor: pointer; font-size: 15px; font-weight: 600; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; margin-left: auto; font-size: 20px; font-weight: 400; color: var(--faint); transition: transform .25s var(--ease); }
.faq-item[open] summary::after { transform: rotate(45deg); color: var(--accent-2); }
.faq-item summary:hover { color: var(--text); }
.faq-item p { margin: 0; padding: 0 20px 18px; font-size: 14px; line-height: 1.6; color: var(--muted); }

/* ---------- ТЕЛЕФОН: своя, более простая композиция ----------
   Не уменьшенная копия десктопа: меньше декора (без плавающих пятен, подсветки за курсором, бегущей
   рамки и бликов — на телефоне их всё равно не видно, а батарею они едят), спокойнее hero и плотные
   карточки «значок слева — текст справа» вместо высоких плиток. Блок в конце файла намеренно: правила
   выше задают десктоп, здесь — только то, чем телефон от него отличается. */
@media (max-width: 640px) {
  /* декор */
  .ambient span:nth-child(n+2) { display: none; }
  .ambient span { animation: none; opacity: .1; }
  .cursor-glow, .scroll-progress { display: none; }
  .btn-primary::after { display: none; }
  .badge .dot { animation: none; }
  .cta-card::before { animation: none; filter: none; background: linear-gradient(135deg, rgba(91,91,240,.7), rgba(139,92,246,.35)); }
  .f-card:hover, .aud-card:hover, .rm-item:hover, .btn-primary:hover, .btn-glass:hover { transform: none; }

  /* hero: заголовок скромнее, кнопки сразу на первом экране */
  .hero { padding: calc(36px + var(--head)) 0 4px; }
  .hero h1 { font-size: 30px; line-height: 1.1; margin: 8px 0 12px; }
  .hero h1 span:first-child { font-size: 1.55em; margin-bottom: 4px; }
  .hero .lead { font-size: 15px; line-height: 1.55; margin-bottom: 20px; }
  .hero-req { font-size: 12px; }

  /* строка доверия — две колонки, мелко */
  .trust-strip { padding: 20px 0 0; }
  .trust-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 10px; }
  .trust-item { gap: 9px; align-items: flex-start; }
  .trust-icon { width: 30px; height: 30px; border-radius: 9px; }
  .trust-icon .icon { width: 14px; height: 14px; }
  .trust-text b { font-size: 12.5px; line-height: 1.3; }
  .trust-text small { font-size: 11.5px; }

  /* заголовки секций */
  .features, .gallery { padding: 56px 0 4px; }
  .workflow { padding: 48px 0 4px; }
  .download { padding: 56px 0 32px; }
  .section-head { margin-bottom: 24px; }
  .eyebrow { font-size: 11px; margin-bottom: 10px; }
  h2.title { font-size: 25px; margin-bottom: 10px; }
  .lead { font-size: 15px; line-height: 1.55; }

  /* возможности и «для кого» — плотный список: значок слева, текст справа */
  .bento { gap: 8px; }
  .f-card { display: grid; grid-template-columns: 34px minmax(0, 1fr); column-gap: 14px; align-items: start; padding: 14px 16px; border-radius: 14px; }
  .f-icon { grid-row: span 2; width: 34px; height: 34px; border-radius: 10px; margin: 0; }
  .f-icon .icon { width: 16px; height: 16px; }
  .f-card h3 { font-size: 15px; margin: 1px 0 3px; }
  .f-card p { font-size: 13px; line-height: 1.5; }
  .aud-grid { gap: 8px; }
  .aud-card { display: grid; grid-template-columns: 22px minmax(0, 1fr); column-gap: 14px; row-gap: 3px; padding: 14px 16px; border-radius: 14px; }
  .aud-card .icon { grid-row: span 2; margin-top: 1px; }
  .aud-card b { font-size: 14.5px; }
  .aud-card span { font-size: 13px; }

  /* шаги — номер слева, без лишнего воздуха */
  .workflow-row { gap: 14px; }
  .workflow-step { display: grid; grid-template-columns: 30px minmax(0, 1fr); column-gap: 14px; row-gap: 2px; }
  .workflow-num { grid-row: span 2; width: 30px; height: 30px; font-size: 12px; margin: 0; }
  .workflow-step b { font-size: 14.5px; }

  /* галерея: без «окна программы» с точками — просто кадр */
  .sc-bar .dots { display: none; }

  /* вопросы и загрузка */
  .faq-list { gap: 8px; }
  .faq-item summary { padding: 14px 16px; font-size: 14.5px; }
  .faq-item p { padding: 0 16px 14px; font-size: 13.5px; }
  .cta-card { padding: 26px 18px; border-radius: 20px; }
  .cta-card::before { border-radius: 20px; }
  .dl-cols { gap: 22px; }
  footer { padding: 28px 0 24px; }
}
