/* Mobile View — landing site styles. Self-contained, no external fonts/CDNs. */
:root {
  color-scheme: light dark;
  --bg: #f6f7fb;
  --bg2: #eef0f8;
  --card: #ffffff;
  --text: #161a2b;
  --muted: #5b6478;
  --soft: #eef0f6;
  --line: #e5e8f1;
  --accent: #4f46e5;
  --accent2: #7c6ff5;
  --accent-soft: #eef0ff;
  --ok: #16a34a;
  --shadow: 0 18px 50px rgba(79, 70, 229, .18);
  --radius: 18px;
}
/* Набор тёмных переменных (повторяется для авто- и ручного режима). */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d0f16;
  --bg2: #11141f;
  --card: #161a25;
  --text: #e9ecf5;
  --muted: #9aa3b8;
  --soft: #1b2030;
  --line: #283044;
  --accent: #8b8bf5;
  --accent2: #a78bfa;
  --accent-soft: #1b2034;
  --shadow: 0 18px 50px rgba(0, 0, 0, .5);
}
:root[data-theme="light"] { color-scheme: light; }
/* Авто-тёмная по системе — только если пользователь не выбрал светлую вручную. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d0f16;
    --bg2: #11141f;
    --card: #161a25;
    --text: #e9ecf5;
    --muted: #9aa3b8;
    --soft: #1b2030;
    --line: #283044;
    --accent: #8b8bf5;
    --accent2: #a78bfa;
    --accent-soft: #1b2034;
    --shadow: 0 18px 50px rgba(0, 0, 0, .5);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
.container { max-width: 1080px; margin: 0 auto; padding: 0 22px; }

/* ---- Header / nav ---- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-in { display: flex; align-items: center; gap: 18px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.nav-links { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.nav-links a {
  color: var(--muted); font-size: 14.5px; font-weight: 500;
  padding: 8px 12px; border-radius: 9px;
}
.nav-links a:hover { color: var(--text); background: var(--soft); text-decoration: none; }
.nav-links a { white-space: nowrap; }
/* Кнопки в навбаре: перебиваем общий серый цвет ссылок навигации. */
.nav-links a.btn-primary { color: #fff; }
.nav-links a.btn-primary:hover { color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent2)); }
.nav-links a.btn-ghost { color: var(--text); }
.lang { border: 1px solid var(--line); }

/* Переключатель языка (popup с флагами) */
.lang-switch { position: relative; flex: none; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 38px; padding: 0 10px; border-radius: 10px; cursor: pointer;
  background: var(--card); border: 1px solid var(--line); color: var(--text);
  font: inherit; font-size: 13px; font-weight: 600;
}
.lang-btn:hover { background: var(--soft); }
.lang-flag {
  width: 21px; height: 15px; border-radius: 2px; display: block;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.08);
}
.lang-short { letter-spacing: .02em; }
.lang-chev { width: 12px; height: 12px; opacity: .7; transition: transform .15s ease; }
.lang-switch.is-open .lang-chev { transform: rotate(180deg); }
.lang-menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 60;
  min-width: 220px; padding: 6px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--line);
  box-shadow: 0 16px 40px rgba(0,0,0,.14);
  display: none;
  flex-direction: column; gap: 2px;
}
.lang-switch.is-open > .lang-menu { display: flex; }
.lang-menu[hidden] { display: none !important; }
.lang-option {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 8px;
  color: var(--text); font-size: 14px; font-weight: 500; text-decoration: none;
}
.lang-option:hover { background: var(--soft); text-decoration: none; }
.lang-option.is-active { background: var(--accent-soft); color: var(--accent); }
.lang-name { white-space: nowrap; }

/* Бургер для мобильной навигации (на десктопе скрыт). */
.burger {
  display: none; margin-left: auto; flex: none;
  width: 42px; height: 42px; align-items: center; justify-content: center;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  color: var(--text); cursor: pointer;
}
.burger:hover { background: var(--soft); }
/* Переключатель темы в шапке (вставляется скриптом nav.js). */
.themebtn {
  flex: none; margin-left: 8px;
  width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  color: var(--text); cursor: pointer;
}
.themebtn:hover { background: var(--soft); }
.themebtn svg { width: 18px; height: 18px; }
/* Показываем нужную иконку: луна — в светлой теме (клик → тёмная), солнце — в тёмной. */
.themebtn .i-sun { display: none; }
.themebtn .i-moon { display: block; }
:root[data-theme="dark"] .themebtn .i-sun { display: block; }
:root[data-theme="dark"] .themebtn .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .themebtn .i-sun { display: block; }
  :root:not([data-theme="light"]) .themebtn .i-moon { display: none; }
}
.btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  font-weight: 600; font-size: 14.5px; padding: 9px 16px; border-radius: 10px;
  border: 1px solid transparent; transition: transform .12s ease, box-shadow .2s ease, background .2s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary {
  color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 8px 20px rgba(79, 70, 229, .3);
}
.btn-primary:hover { box-shadow: 0 12px 26px rgba(79, 70, 229, .4); }
.btn-ghost { color: var(--text); background: var(--card); border-color: var(--line); }
.btn-ghost:hover { background: var(--soft); }
.btn-lg { padding: 13px 24px; font-size: 16px; border-radius: 12px; }

/* ---- Hero ---- */
.hero { padding: 72px 0 48px; position: relative; overflow: visible; }
.hero::before {
  content: ""; position: absolute; inset: -40% 30% auto -10%; height: 520px;
  background: radial-gradient(closest-side, rgba(124, 111, 245, .25), transparent 70%);
  filter: blur(20px); z-index: 0; pointer-events: none;
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
/* Hero pill — liquid glass capsule (Apple-like specular + rim light). */
@property --pill-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}
.pill {
  --pill-fg: #3b3f8f;
  position: relative;
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  margin: 0 0 20px;
  padding: 1.5px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  isolation: isolate;
  vertical-align: top;
  -webkit-font-smoothing: antialiased;
  filter: drop-shadow(0 10px 24px rgba(99, 102, 241, .14));
  animation: pillFloat 7.2s ease-in-out infinite;
}
.pill-aura {
  position: absolute;
  inset: -10px -14px;
  border-radius: 999px;
  background:
    radial-gradient(closest-side, rgba(129, 140, 248, .26), transparent 72%),
    radial-gradient(closest-side at 80% 30%, rgba(255, 255, 255, .38), transparent 60%);
  filter: blur(12px);
  opacity: .8;
  z-index: 0;
  pointer-events: none;
  animation: pillAura 5.8s ease-in-out infinite;
}
.pill-rim {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  z-index: 1;
  pointer-events: none;
  background: conic-gradient(
    from var(--pill-angle),
    rgba(255, 255, 255, .22) 0%,
    rgba(165, 180, 252, .75) 14%,
    rgba(255, 255, 255, .92) 24%,
    rgba(129, 140, 248, .7) 40%,
    rgba(255, 255, 255, .18) 54%,
    rgba(199, 210, 254, .8) 70%,
    rgba(255, 255, 255, .88) 80%,
    rgba(99, 102, 241, .62) 92%,
    rgba(255, 255, 255, .22) 100%
  );
  animation: pillRimSpin 7.5s linear infinite;
}
.pill-glass {
  position: absolute;
  inset: 1.5px;
  border-radius: inherit;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .78) 0%, rgba(255, 255, 255, .38) 42%, rgba(245, 246, 255, .55) 100%);
  -webkit-backdrop-filter: blur(18px) saturate(1.6);
  backdrop-filter: blur(18px) saturate(1.6);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .95),
    inset 0 -1px 0 rgba(79, 70, 229, .08),
    inset 0 0 0 1px rgba(255, 255, 255, .35);
}
.pill-shine {
  position: absolute;
  inset: 1.5px;
  border-radius: inherit;
  z-index: 3;
  pointer-events: none;
  overflow: hidden;
}
.pill-shine::before {
  content: "";
  position: absolute;
  top: -20%;
  left: 0;
  width: 42%;
  height: 140%;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(255, 255, 255, .12) 38%,
    rgba(255, 255, 255, .78) 50%,
    rgba(255, 255, 255, .12) 62%,
    transparent 100%
  );
  transform: translateX(-160%) skewX(-22deg);
  animation: pillSweep 5.2s cubic-bezier(.4, 0, .2, 1) infinite;
}
/* Full-width top specular — not a nested mini-pill (avoids visible left/right ends). */
.pill-shine::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 52%;
  border-radius: 0;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, .72) 0%,
    rgba(255, 255, 255, .28) 42%,
    rgba(255, 255, 255, 0) 100%
  );
  opacity: .88;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent 0%,
    #000 16%,
    #000 84%,
    transparent 100%
  );
  mask-image: linear-gradient(
    90deg,
    transparent 0%,
    #000 16%,
    #000 84%,
    transparent 100%
  );
}
.pill-text {
  position: relative;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .02em;
  line-height: 1.25;
  color: var(--pill-fg);
  white-space: nowrap;
  max-width: 100%;
}
:root[data-theme="dark"] .pill {
  --pill-fg: #efeaff;
  filter: drop-shadow(0 12px 28px rgba(124, 111, 245, .35));
}
:root[data-theme="dark"] .pill-glass {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .18) 0%, rgba(40, 44, 70, .72) 45%, rgba(28, 32, 54, .82) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .28),
    inset 0 -1px 0 rgba(0, 0, 0, .35),
    inset 0 0 0 1px rgba(255, 255, 255, .08);
}
:root[data-theme="dark"] .pill-shine::before {
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(255, 255, 255, .08) 35%,
    rgba(255, 255, 255, .7) 50%,
    rgba(255, 255, 255, .08) 65%,
    transparent 100%
  );
}
:root[data-theme="dark"] .pill-shine::after {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, .38) 0%,
    rgba(255, 255, 255, .12) 45%,
    rgba(255, 255, 255, 0) 100%
  );
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .pill {
    --pill-fg: #efeaff;
    filter: drop-shadow(0 12px 28px rgba(124, 111, 245, .35));
  }
  :root:not([data-theme="light"]) .pill-glass {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, .18) 0%, rgba(40, 44, 70, .72) 45%, rgba(28, 32, 54, .82) 100%);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, .28),
      inset 0 -1px 0 rgba(0, 0, 0, .35),
      inset 0 0 0 1px rgba(255, 255, 255, .08);
  }
  :root:not([data-theme="light"]) .pill-shine::before {
    background: linear-gradient(
      105deg,
      transparent 0%,
      rgba(255, 255, 255, .08) 35%,
      rgba(255, 255, 255, .7) 50%,
      rgba(255, 255, 255, .08) 65%,
      transparent 100%
    );
  }
  :root:not([data-theme="light"]) .pill-shine::after {
    background: linear-gradient(
      180deg,
      rgba(255, 255, 255, .38) 0%,
      rgba(255, 255, 255, .12) 45%,
      rgba(255, 255, 255, 0) 100%
    );
  }
}
@keyframes pillRimSpin {
  to { --pill-angle: 360deg; }
}
@keyframes pillSweep {
  0%, 48% { transform: translateX(-160%) skewX(-22deg); opacity: 0; }
  56% { opacity: 1; }
  78% { transform: translateX(280%) skewX(-22deg); opacity: .95; }
  86%, 100% { transform: translateX(280%) skewX(-22deg); opacity: 0; }
}
@keyframes pillAura {
  0%, 100% { opacity: .62; transform: scale(1); }
  50% { opacity: .88; transform: scale(1.03); }
}
@keyframes pillFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-1.5px); }
}
@media (max-width: 560px) {
  .pill-text { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) {
  .pill,
  .pill-aura,
  .pill-rim,
  .pill-shine::before {
    animation: none !important;
  }
  .pill-rim { background: linear-gradient(135deg, #a78bfa, #fff, #6366f1, #c4b5fd); }
  .pill-shine::before { transform: translateX(40%) skewX(-22deg); opacity: .45; }
}

.hero h1 { font-size: clamp(32px, 5vw, 50px); line-height: 1.08; margin: 0 0 18px; letter-spacing: -.02em; font-weight: 800; }
.hero h1 .grad { background: linear-gradient(120deg, var(--accent), var(--accent2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 18px; color: var(--muted); margin: 0 0 28px; max-width: 36ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero-note { font-size: 13px; color: var(--muted); margin-top: 14px; }
/* Ряд бейджей (Chrome Web Store + Featured) */
.badges-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 18px; }
/* Кастомный бейдж Chrome Web Store — на CSS-переменных, сам подстраивается под тему */
.cws-badge {
  display: inline-flex; align-items: center; gap: 11px;
  width: 250px; box-sizing: border-box; /* фикс. ширина — не плывёт от языка */
  height: 54px; padding: 0 14px 0 9px; /* меньше слева — контент ближе к краю */
  background: var(--card); border: 1px solid #1a73e8; border-radius: 10px; /* светлая тема — синий Google */
  text-decoration: none; transition: transform .12s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}
.cws-badge:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0,0,0,.12); text-decoration: none; }
.cws-badge:hover .cws-title, .cws-badge:hover .cws-meta { text-decoration: none; } /* без подчёркивания текста на hover */
.cws-ico { flex: none; width: 34px; height: 34px; line-height: 0; }
.cws-ico svg { width: 100%; height: 100%; display: block; }
.cws-txt { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.cws-title { font-size: 13px; font-weight: 700; color: var(--text); letter-spacing: -.01em; }
.cws-meta { font-size: 12px; color: var(--muted); margin-top: 2px; white-space: nowrap; }
.cws-stars { color: #f59e0b; font-weight: 700; }
/* Лоадер числа пользователей: три полосочки мерцают поочерёдно, пока не пришли свежие
   данные из /api/cws-stats. Цвет наследуется (currentColor = --muted), подходит обеим темам. */
.cws-load { display: inline-flex; align-items: center; gap: 3px; vertical-align: middle; }
.cws-load i {
  width: 7px; height: 3px; border-radius: 2px; background: currentColor;
  opacity: .28; animation: cwsLoadPulse 1s ease-in-out infinite;
}
.cws-load i:nth-child(2) { animation-delay: .16s; }
.cws-load i:nth-child(3) { animation-delay: .32s; }
@keyframes cwsLoadPulse { 0%, 60%, 100% { opacity: .28; } 30% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .cws-load i { animation: none; opacity: .5; } }
/* В тёмной теме — без бордера, фон с «хромовым» сине-синим оттенком */
:root[data-theme="dark"] .cws-badge:not(.cws-featured) { border-color: transparent; background: #16233f; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .cws-badge:not(.cws-featured) { border-color: transparent; background: #16233f; }
}

/* Featured — тот же размер/форма, зелёный trust-сигнал (как бейдж в сторе) */
.cws-badge.cws-featured {
  border-color: color-mix(in srgb, var(--ok) 55%, #86efac);
  background:
    linear-gradient(180deg, rgba(255,255,255,.72), rgba(255,255,255,.35)),
    linear-gradient(135deg, #f0fdf4, #ecfdf5);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.85);
}
.cws-badge.cws-featured:hover {
  box-shadow: 0 8px 22px rgba(22, 163, 74, .18), inset 0 1px 0 rgba(255,255,255,.85);
}
.cws-featured .cws-feat-ico {
  color: #188038; /* официальный зелёный Featured из CWS */
  filter: drop-shadow(0 1px 4px rgba(24, 128, 56, .22));
}
.cws-featured .cws-title {
  color: #14532d;
  letter-spacing: -.015em;
}
.cws-featured .cws-meta {
  color: #3f7a55;
  font-weight: 500;
}
:root[data-theme="dark"] .cws-badge.cws-featured {
  border-color: transparent;
  background:
    linear-gradient(180deg, rgba(52, 211, 153, .08), transparent 55%),
    #12251a;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
:root[data-theme="dark"] .cws-badge.cws-featured:hover {
  box-shadow: 0 8px 22px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255,255,255,.05);
}
:root[data-theme="dark"] .cws-featured .cws-feat-ico { color: #34d399; }
:root[data-theme="dark"] .cws-featured .cws-title { color: #34d399; }
:root[data-theme="dark"] .cws-featured .cws-meta { color: #fff; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .cws-badge.cws-featured {
    border-color: transparent;
    background:
      linear-gradient(180deg, rgba(52, 211, 153, .08), transparent 55%),
      #12251a;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
  }
  :root:not([data-theme="light"]) .cws-badge.cws-featured:hover {
    box-shadow: 0 8px 22px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255,255,255,.05);
  }
  :root:not([data-theme="light"]) .cws-featured .cws-feat-ico { color: #34d399; }
  :root:not([data-theme="light"]) .cws-featured .cws-title { color: #34d399; }
  :root:not([data-theme="light"]) .cws-featured .cws-meta { color: #fff; }
}

/* ---- Hero visual: монитор + анимированный телефон ---- */
.hero-visual { display: flex; justify-content: center; }

/* Десктопный монитор компьютера */
.monitor { width: min(100%, 460px); }
.monitor-screen {
  padding: 12px; border-radius: 22px;
  background: linear-gradient(160deg, #262b3a, #14171f);
  box-shadow: var(--shadow), inset 0 0 0 2px rgba(255,255,255,.05);
}
.mon-glass {
  position: relative; aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden;
  background:
    radial-gradient(120% 90% at 80% 0%, rgba(124,111,245,.45), transparent 55%),
    radial-gradient(120% 90% at 0% 100%, rgba(79,70,229,.4), transparent 55%),
    linear-gradient(160deg, #0e1424, #131a2e);
}
/* Лёгкая «шапка браузера» внутри монитора */
.mon-chrome {
  position: absolute; top: 0; left: 0; right: 0; height: 26px; z-index: 1;
  display: flex; align-items: center; padding: 0 12px;
  background: rgba(255,255,255,.06); backdrop-filter: blur(4px);
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.mon-dots { display: flex; gap: 6px; }
.mon-dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.35); }
.mon-dots i:nth-child(1) { background: #ff5f57; }
.mon-dots i:nth-child(2) { background: #febc2e; }
.mon-dots i:nth-child(3) { background: #28c840; }

/* Сцена, по которой ездит телефон */
.dp-stage { position: absolute; inset: 0; }

/* Указатель мыши, «тянущий» телефон */
.dp-cursor {
  position: absolute; width: 16px; height: 16px; z-index: 4;
  left: var(--curx, 55%); top: var(--cury, 55%);
  transition: left var(--move, 2.4s) cubic-bezier(.65, 0, .25, 1),
              top  var(--move, 2.4s) cubic-bezier(.65, 0, .25, 1);
  pointer-events: none;
  background: no-repeat center/contain
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M1 1l5.5 13 2-5.5L14 6 1 1z" fill="white" stroke="rgba(0,0,0,.55)" stroke-width="1" stroke-linejoin="round"/></svg>');
  filter: drop-shadow(0 2px 3px rgba(0,0,0,.4));
}

/* Сам телефон. Позиция — центр (--cx,--cy) в % сцены, плюс поворот --rot.
   Рамка и геометрия экрана задаются переменными --it/--ib/--il/--ir (insets). */
.dp-phone {
  position: absolute; z-index: 3;
  left: var(--cx, 80%); top: var(--cy, 54%);
  width: var(--pw, 17%);
  aspect-ratio: var(--par, 457 / 939);
  /* Позиция задаётся left/top (в % монитора), а transform только центрирует
     телефон в этой точке и поворачивает его. */
  transform: translate(-50%, -50%) rotate(var(--rot, 0deg));
  transform-origin: center;
  transition: left var(--move, 2.4s) cubic-bezier(.65, 0, .25, 1),
              top  var(--move, 2.4s) cubic-bezier(.65, 0, .25, 1),
              transform var(--move, 2.4s) cubic-bezier(.65, 0, .25, 1);
  will-change: left, top, transform;
  filter: drop-shadow(0 16px 26px rgba(0,0,0,.5));
}
.dp-screen {
  position: absolute;
  top: var(--it, 1.6%); bottom: var(--ib, 1.6%);
  left: var(--il, 4.2%); right: var(--ir, 4.4%);
  /* Небольшой радиус: углы экрана уходят под рамку, видимое скругление даёт сам
     вырез рамки. Большой радиус оставлял дырки в углах (особенно у iPhone 11). */
  border-radius: 6% / 3%; overflow: hidden;
  background: linear-gradient(170deg, #5b63f0 0%, #8a7bf6 45%, #b693f3 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
}
.dp-logo {
  width: 44%; height: auto; border-radius: 22%;
  box-shadow: 0 8px 20px rgba(0,0,0,.3);
  /* Контр-вращение, чтобы лого оставалось вертикальным при повороте телефона. */
  transform: rotate(var(--lrot, 0deg));
  transition: transform var(--move, 2.4s) cubic-bezier(.65, 0, .25, 1);
}
/* Все три рамки лежат в DOM одновременно (предзагружены). Переключаем не src,
   а видимость через opacity — поэтому смена рамки не вызывает перерисовку/мигание. */
.dp-frame {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; transition: opacity .3s ease;
  pointer-events: none; /* клики проходят сквозь рамку к точкам на экране */
}
.dp-frame.on { opacity: 1; }

/* Точки-индикаторы под лого (только в мобильном статичном виде) */
.dp-dots { display: flex; gap: 9px; z-index: 2; }
.dp-dot {
  width: 9px; height: 9px; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
  background: rgba(255, 255, 255, .5);
  transition: background .3s ease, transform .3s ease;
}
.dp-dot:hover { background: rgba(255, 255, 255, .8); }
.dp-dot.on { background: #fff; transform: scale(1.35); }

/* Монитор: ножка и подставка */
.monitor-stand {
  width: 90px; height: 28px; margin: 0 auto;
  background: linear-gradient(#2a3042, #171b27);
}
.monitor-base {
  width: 180px; height: 12px; margin: -2px auto 0; border-radius: 0 0 10px 10px;
  background: linear-gradient(#222838, #161a26);
  box-shadow: 0 10px 22px rgba(0,0,0,.25);
}

/* Мобильный статичный вид — по умолчанию скрыт (показывается в @media ниже).
   Контейнер — фиксированная область (aspect-ratio по самому высокому кадру),
   телефон центрируется абсолютно внутри неё. Поэтому смена рамки не меняет
   размер области и не «дёргает» остальную страницу. */
.hero-mobile {
  display: none; position: relative; margin: 0 auto;
  width: min(70%, 220px); aspect-ratio: 12 / 25;
}
.hero-mobile .dp-phone {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 100%; filter: drop-shadow(0 16px 30px rgba(0,0,0,.3));
}

/* ---- Sections ---- */
section.block { padding: 56px 0; }
.block.block-tight { padding-bottom: 0; } /* убираем нижний отступ — сближаем с соседним блоком */
.block.block-tighttop { padding-top: 28px; } /* мобайл: вдвое меньше верхний отступ */
@media (min-width: 861px) { .block.block-tighttop { padding-top: 0; } } /* десктоп: без верхнего отступа */
.section-head { text-align: center; max-width: 640px; margin: 0 auto 36px; }
.section-head h2 { font-size: clamp(24px, 3.4vw, 34px); margin: 0 0 12px; letter-spacing: -.01em; font-weight: 800; }
.section-head p { color: var(--muted); font-size: 17px; margin: 0; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: 12.5px; font-weight: 700; color: var(--accent); margin: 0 0 10px; }

/* ---- Voices carousel (compact panel under hero / after CWS) ---- */
.voices-wrap {
  position: relative;
  z-index: 1;
  margin-top: 22px;
}
.voices-panel {
  max-width: 540px; /* ~вдвое уже полной ширины контейнера */
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px 14px 10px;
  box-shadow: 0 8px 24px rgba(22, 26, 43, .05);
  overflow: hidden;
}
:root[data-theme="dark"] .voices-panel {
  box-shadow: 0 10px 28px rgba(0, 0, 0, .32);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .voices-panel {
    box-shadow: 0 10px 28px rgba(0, 0, 0, .32);
  }
}
.voices-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.voices-label {
  margin: 0;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.voices-dots { display: flex; align-items: center; gap: 6px; }
.voices-dot {
  width: 6px; height: 6px; padding: 0; border: 0; border-radius: 50%;
  background: color-mix(in srgb, var(--muted) 38%, transparent);
  cursor: pointer; transition: transform .2s ease, background .2s ease, width .2s ease;
}
.voices-dot:hover { background: color-mix(in srgb, var(--muted) 65%, transparent); }
.voices-dot.on {
  width: 14px; border-radius: 999px;
  background: var(--accent);
}
.voices-stage {
  display: grid;
  min-height: 0;
}
.voice {
  grid-area: 1 / 1;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity .4s ease, transform .4s ease, visibility .4s;
  pointer-events: none;
}
.voice.is-on {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
}
.voice-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
  flex-wrap: nowrap;
}
.voice-avatar {
  --voice-ring: color-mix(in srgb, var(--accent) 55%, #c4b5fd);
  --voice-ring-hot: color-mix(in srgb, var(--accent2) 35%, #fff);
  --voice-ring-soft: color-mix(in srgb, var(--accent) 40%, transparent);
  --voice-glow: color-mix(in srgb, var(--accent) 22%, transparent);
  position: relative;
  z-index: 0;
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--muted);
  background: var(--card);
  border: none;
  overflow: visible;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 18%, var(--line));
}
.voice-avatar img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--card) 70%, transparent);
}
.voice-avatar::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  background: conic-gradient(
    from 210deg,
    transparent 0deg 38deg,
    var(--voice-ring-soft) 58deg,
    var(--voice-ring) 78deg,
    var(--voice-ring-hot) 92deg,
    #ffffff 98deg,
    var(--voice-ring-hot) 106deg,
    var(--voice-ring) 122deg,
    transparent 148deg 218deg,
    color-mix(in srgb, var(--accent) 28%, transparent) 242deg,
    var(--voice-ring-soft) 262deg,
    color-mix(in srgb, var(--accent2) 45%, transparent) 278deg,
    transparent 308deg 360deg
  );
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 1.8px), #000 calc(100% - 0.9px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 1.8px), #000 calc(100% - 0.9px));
}
.voice-avatar::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  z-index: -2;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    circle at 50% 45%,
    var(--voice-glow) 0%,
    color-mix(in srgb, var(--accent2) 10%, transparent) 42%,
    transparent 72%
  );
  transition: opacity .35s ease;
}
.voice.is-on .voice-avatar::before {
  opacity: 1;
  animation: voiceShineOrbit 3.6s linear infinite;
}
.voice.is-on .voice-avatar::after {
  opacity: 1;
  animation: voiceGlowPulse 3.6s ease-in-out infinite;
}
.voices-panel:hover .voice.is-on .voice-avatar::before,
.voices-panel:hover .voice.is-on .voice-avatar::after {
  animation-play-state: paused;
}
@keyframes voiceShineOrbit {
  to { transform: rotate(360deg); }
}
@keyframes voiceGlowPulse {
  0%, 100% { opacity: .72; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.04); }
}
:root[data-theme="dark"] .voice-avatar {
  --voice-ring: color-mix(in srgb, var(--accent2) 70%, #e9d5ff);
  --voice-ring-hot: color-mix(in srgb, #ffffff 70%, var(--accent2));
  --voice-ring-soft: color-mix(in srgb, var(--accent) 55%, transparent);
  --voice-glow: color-mix(in srgb, var(--accent) 34%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 28%, var(--line));
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .voice-avatar {
    --voice-ring: color-mix(in srgb, var(--accent2) 70%, #e9d5ff);
    --voice-ring-hot: color-mix(in srgb, #ffffff 70%, var(--accent2));
    --voice-ring-soft: color-mix(in srgb, var(--accent) 55%, transparent);
    --voice-glow: color-mix(in srgb, var(--accent) 34%, transparent);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 28%, var(--line));
  }
}
.voice-who { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.voice-name {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--text);
  line-height: 1.2;
}
.voice-meta {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.3;
}
.voice-country {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  padding: 4px 8px 4px 6px;
  border-radius: 999px;
  background: var(--soft);
  border: 1px solid var(--line);
  line-height: 1;
  flex: none;
  max-width: 46%;
}
.voice-flag {
  width: 15px;
  height: 11px;
  display: block;
  flex: none;
  border-radius: 2px;
  object-fit: cover;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--text) 10%, transparent);
}
.voice-country-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.voice-body {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.45;
  letter-spacing: -.01em;
  color: var(--text);
}
.voices-bar {
  margin-top: 9px;
  height: 1.5px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.voices-bar > i {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transform-origin: left center;
}
.voices-bar > i.is-run {
  animation-name: voicesBar;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}
@keyframes voicesBar {
  from { width: 0%; }
  to { width: 100%; }
}
@media (max-width: 700px) {
  .voices-wrap { margin-top: 18px; }
  .voices-panel { max-width: none; padding: 10px 12px 9px; border-radius: 12px; }
  .voice-country { max-width: none; }
  .voice-head { gap: 8px; flex-wrap: wrap; }
  .voice-body { font-size: 13px; line-height: 1.45; }
}
@media (prefers-reduced-motion: reduce) {
  .voice { transition: none; transform: none; }
  .voices-bar > i.is-run { animation: none; width: 100%; }
  .voice.is-on .voice-avatar::before,
  .voice.is-on .voice-avatar::after {
    animation: none;
  }
  .voice.is-on .voice-avatar::before {
    opacity: .9;
    transform: none;
    background: conic-gradient(
      from 200deg,
      transparent 0deg 60deg,
      var(--voice-ring-soft) 80deg,
      var(--voice-ring-hot) 100deg,
      transparent 130deg 360deg
    );
  }
  .voice.is-on .voice-avatar::after { opacity: .75; transform: none; }
}

/* ---- Audience cards ---- */
.cards3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.acard {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px; text-align: center;
}
.acard .ic {
  width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center; font-size: 26px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 15%, var(--card)), color-mix(in srgb, var(--accent2) 24%, var(--card)));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 16%, transparent), 0 6px 16px rgba(79, 70, 229, .10);
  transition: transform .3s cubic-bezier(.22, .61, .36, 1);
}
.acard h3 { margin: 0 0 8px; font-size: 18px; font-weight: 700; }
.acard p { margin: 0; color: var(--muted); font-size: 14.5px; }

/* ВАРИАНТ 1 блока аудиторий: цветные «персона»-карточки (каждая со своим акцентом --c) */
.v-personas .acard { overflow: hidden; display: flex; flex-direction: column; }
.v-personas .acard::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--c);
}
.v-personas .acard .ic {
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--c) 20%, var(--card)),
    color-mix(in srgb, var(--c) 40%, var(--card)));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 32%, transparent),
    0 6px 16px color-mix(in srgb, var(--c) 22%, transparent);
}
.v-personas .acard::after {
  background: radial-gradient(130% 90% at 0% 0%, color-mix(in srgb, var(--c) 14%, transparent), transparent 58%);
}
.v-personas .acard:hover {
  border-color: color-mix(in srgb, var(--c) 45%, var(--line));
  box-shadow: 0 16px 36px color-mix(in srgb, var(--c) 18%, transparent);
}
.v-personas .acard:nth-child(1) { --c: #4285F4; } /* Разработчики — синий */
.v-personas .acard:nth-child(2) { --c: #a855f7; } /* Дизайнеры — фиолетовый */
.v-personas .acard:nth-child(3) { --c: #22c55e; } /* Все остальные — зелёный */
/* Ряд иконок инструментов в карточке — подкрашены в цвет самой карточки (--c) */
.acard-tools { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: auto; padding-top: 16px; }
.acard-tools .ti {
  width: 20px; height: 20px; opacity: .82;
  background-color: var(--c, #8a8aa0);
  -webkit-mask: var(--m) center / contain no-repeat;
          mask: var(--m) center / contain no-repeat;
  transition: opacity .2s ease, transform .2s ease;
}
.acard:hover .acard-tools .ti { opacity: 1; }

/* ===== Блок use-cases: 3D-карусель из реальных рамок телефонов (десктоп) + плитки (мобайл) ===== */
.uc-stage { position: relative; height: 660px; max-width: 860px; margin: 8px auto 0; perspective: 2400px; overflow: hidden; }
.uc-phone {
  position: absolute; top: 39%; left: 50%; height: 430px; padding: 0; border: 0; background: none; cursor: pointer;
  transform: translate(-50%, -50%);
  transition: none; will-change: transform, opacity, filter;
}
/* Зеркальное отражение телефона на «полу» (клон содержимого, перевёрнут и затухает) */
.uc-reflect {
  position: absolute; left: 0; top: 100%; width: 100%; height: 100%;
  transform: scaleY(-1); transform-origin: center; pointer-events: none;
  /* маска в локальных координатах: после переворота плотная у телефона, гаснет книзу */
  -webkit-mask: linear-gradient(to bottom, transparent 64%, rgba(0,0,0,.45));
          mask: linear-gradient(to bottom, transparent 64%, rgba(0,0,0,.45));
}
/* Соотношение сторон и индивидуальные отступы экрана под каждую рамку (экран чуть больше окна
   и меньше скруглён — чтобы не было «дырок» в углах и просвета страницы) */
.uc-phone.p16 { aspect-ratio: 1350 / 2760; --st: 1.9%; --sb: 1.9%; --sl: 4.6%; --sr: 4.6%; --srad: 20px; }
.uc-phone.s8  { aspect-ratio: 3280 / 7200; --st: 8.1%; --sb: 8.1%; --sl: 5.4%; --sr: 5.4%; --srad: 11px; }
.uc-phone.xs  { aspect-ratio: 3044 / 5936; --st: 4.0%; --sb: 4.2%; --sl: 8.4%; --sr: 8.4%; --srad: 20px; }
/* Тёмный «экран» с текстом — за рамкой, просвечивает сквозь прозрачное окно PNG */
.uc-phone .uc-screen {
  position: absolute; top: var(--st); right: var(--sr); bottom: var(--sb); left: var(--sl);
  border-radius: var(--srad); overflow: hidden; z-index: 1;
  /* Фирменный фиолетовый, фиксированный (не зависит от светлой/тёмной темы) */
  --p1: #7c5cf0; --p2: #a855f7;
  background:
    radial-gradient(95% 55% at 50% 16%, color-mix(in srgb, var(--p1) 60%, transparent), transparent 72%),
    radial-gradient(85% 50% at 50% 108%, color-mix(in srgb, var(--p2) 50%, transparent), transparent 70%),
    linear-gradient(160deg, #5b40c8 0%, #3a2a86 38%, #1c1740 72%, #120f24 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 13px;
  padding: 13% 12%; text-align: center;
}
.uc-phone .uc-frame { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; z-index: 2; pointer-events: none; }
.uc-screen .ic {
  width: 58px; height: 58px; display: flex; align-items: center; justify-content: center; font-size: 50px;
  background: none; box-shadow: none; border-radius: 0;
}
.uc-screen .t { font-size: 18px; font-weight: 800; color: #fff; line-height: 1.2; }
.uc-screen .d { font-size: 13.5px; line-height: 1.5; color: rgba(255,255,255,.74); }
.uc-screen .d strong { color: #fff; }
/* Передний — крупный и яркий; боковые — затемнены и в отдалении (3D) */
/* Позиции телефонов на «колесе» задаёт JS (assets/usecase.js) покадрово */

.uc-mobile { display: none; }
@media (max-width: 860px) {
  .uc-stage { display: none; }
  .uc-mobile { display: grid; }
}

/* ---- Features grid ---- */
.featbg { background: var(--bg2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.fcard {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 22px;
}
.fcard .ic {
  width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  font-size: 22px; margin-bottom: 14px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 16%, var(--card)), color-mix(in srgb, var(--accent2) 26%, var(--card)));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 16%, transparent), 0 6px 16px rgba(79, 70, 229, .10);
  transition: transform .3s cubic-bezier(.22, .61, .36, 1);
}
.fcard h3 { margin: 0 0 6px; font-size: 16.5px; font-weight: 700; }
.fcard p { margin: 0; color: var(--muted); font-size: 14px; }

/* ВАРИАНТ A блока фич: список «иконка слева», 2 колонки, без коробок */
.v-featlist { grid-template-columns: repeat(2, 1fr); gap: 6px 40px; }
.v-featlist .fcard {
  background: transparent; border: 0; border-radius: 0; padding: 16px 2px;
  display: grid; grid-template-columns: auto 1fr; column-gap: 16px; row-gap: 4px; align-items: start;
}
.v-featlist .fcard + .fcard { } /* без разделителей — только воздух */
.v-featlist .fcard .ic { grid-row: 1 / span 2; margin: 0; }
.v-featlist .fcard h3 { grid-column: 2; margin: 2px 0 0; }
.v-featlist .fcard p { grid-column: 2; }
/* у списка убираем «подъём» и тень карточки — двигается только иконка */
.v-featlist .fcard:hover { transform: none; box-shadow: none; border-color: transparent; }
.v-featlist .fcard:hover::after { opacity: 0; }

/* Выделенная карточка 2.0 «до 5 устройств» — сверху, во всю ширину, фирменный
   фиолетовый градиент; меняется по теме (переменные ниже), белый текст. */
:root { --feat-hero-1: #6d65f0; --feat-hero-2: #8b7ff7; }
:root[data-theme="dark"] { --feat-hero-1: #5b52e0; --feat-hero-2: #7a70f0; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --feat-hero-1: #5b52e0; --feat-hero-2: #7a70f0; }
}
.feat-hero {
  grid-column: 1 / -1; margin: 0 0 12px; position: relative; overflow: hidden;
  width: fit-content; max-width: 100%; justify-self: center;
  display: flex; align-items: center; gap: 22px; padding: 24px 28px; border-radius: 18px;
  background: linear-gradient(135deg, var(--feat-hero-1), var(--feat-hero-2));
  box-shadow: 0 22px 50px -20px color-mix(in srgb, var(--feat-hero-1) 82%, transparent);
}
.feat-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .55;
  background: radial-gradient(120% 150% at 93% -10%, rgba(255,255,255,.24), transparent 55%);
}
.feat-hero .ic {
  flex: none; width: 60px; height: 60px; border-radius: 16px; margin: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 34px; font-weight: 800; color: #fff; line-height: 1;
  background: rgba(255,255,255,.16); box-shadow: inset 0 0 0 1px rgba(255,255,255,.24);
}
/* Стеклянный 3D-значок (картинка) вместо плашки с цифрой */
.feat-hero .ic-glass { width: 64px; height: 64px; background: none; box-shadow: none; border-radius: 0; }
.feat-hero .ic-glass img { display: block; width: 100%; height: 100%; }
.feat-hero-tx { position: relative; z-index: 1; }
.feat-hero h3 {
  margin: 0 0 5px; font-size: 20px; font-weight: 800; color: #fff;
  display: flex; align-items: center; gap: 11px; flex-wrap: wrap;
}
.feat-hero p { margin: 0; font-size: 14.5px; line-height: 1.5; color: rgba(255,255,255,.94); max-width: 72ch; }
.feat-hero-badge {
  font-size: 12px; font-weight: 700; letter-spacing: .03em; color: #f2dea0; white-space: nowrap;
  background: rgba(255,255,255,.22); border: 1px solid rgba(255,255,255,.34); padding: 3px 11px; border-radius: 999px;
}

/* Карточка 3.0 Workspace — форма как у 2.0, фон как доска Workspace:
   светлая тема сайта → sky, тёмная → slate; оба с точечной сеткой, без «мыла» по краям. */
:root {
  --feat-v3-fg: #0f172a;
  --feat-v3-muted: rgba(15, 23, 42, .78);
  --feat-v3-bg:
    radial-gradient(rgba(30, 64, 175, .14) 1.05px, transparent 1.45px) 0 0 / 22px 22px,
    linear-gradient(165deg, #e0f2fe 0%, #bfdbfe 48%, #93c5fd 100%);
  --feat-v3-shadow: 0 14px 28px -16px rgba(37, 99, 235, .38);
  --feat-v3-badge-bg: rgba(255, 255, 255, .55);
  --feat-v3-badge-bd: rgba(30, 64, 175, .22);
  --feat-v3-badge-fg: #1e3a8a;
}
:root[data-theme="dark"] {
  --feat-v3-fg: #f1f5f9;
  --feat-v3-muted: rgba(226, 232, 240, .86);
  --feat-v3-bg:
    radial-gradient(rgba(255, 255, 255, .10) 1.05px, transparent 1.45px) 0 0 / 22px 22px,
    linear-gradient(165deg, #3f4b5f 0%, #2a3344 46%, #1a222e 100%);
  --feat-v3-shadow: 0 14px 28px -16px rgba(0, 0, 0, .55);
  --feat-v3-badge-bg: rgba(255, 255, 255, .12);
  --feat-v3-badge-bd: rgba(255, 255, 255, .22);
  --feat-v3-badge-fg: #f2dea0;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --feat-v3-fg: #f1f5f9;
    --feat-v3-muted: rgba(226, 232, 240, .86);
    --feat-v3-bg:
      radial-gradient(rgba(255, 255, 255, .10) 1.05px, transparent 1.45px) 0 0 / 22px 22px,
      linear-gradient(165deg, #3f4b5f 0%, #2a3344 46%, #1a222e 100%);
    --feat-v3-shadow: 0 14px 28px -16px rgba(0, 0, 0, .55);
    --feat-v3-badge-bg: rgba(255, 255, 255, .12);
    --feat-v3-badge-bd: rgba(255, 255, 255, .22);
    --feat-v3-badge-fg: #f2dea0;
  }
}
.feat-hero-v3 {
  background: var(--feat-v3-bg);
  box-shadow: var(--feat-v3-shadow);
}
.feat-hero-v3::after { display: none; }
.feat-hero-v3 h3 { color: var(--feat-v3-fg); }
.feat-hero-v3 p { color: var(--feat-v3-muted); }
.feat-hero-v3 .feat-hero-badge {
  color: var(--feat-v3-badge-fg);
  background: var(--feat-v3-badge-bg);
  border-color: var(--feat-v3-badge-bd);
}
.feat-hero-v3 .ic-mode {
  width: 78px; height: 44px;
  background: none; box-shadow: none; border-radius: 0;
  display: flex; align-items: center; justify-content: center;
}
/* Декоративный Classic ↔ Workspace toggle — нативные крупные размеры
   (без transform: scale, из‑за него на больших экранах мылится). */
.feat-hero-v3 .mode-tog {
  display: inline-block; margin: 0; padding: 0; border: 0;
  background: transparent; border-radius: 999px; line-height: 0;
  pointer-events: none; cursor: default; user-select: none;
  transform: none;
}
.feat-hero-v3 .mode-tog-track {
  position: relative; display: block; overflow: hidden;
  width: 68px; height: 37px; border-radius: 999px;
  background: linear-gradient(180deg, #3d455a 0%, #2a3142 100%);
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, .5),
    inset 0 -1px 0 rgba(255, 255, 255, .06),
    0 0 0 1px rgba(255, 255, 255, .08);
  transition: background .45s ease, box-shadow .45s ease;
}
.feat-hero-v3 .mode-tog-glow {
  position: absolute; inset: 0;
  background: radial-gradient(circle at 70% 50%, rgba(167, 139, 250, .32), transparent 62%);
  opacity: 0; pointer-events: none; transition: opacity .45s ease;
}
.feat-hero-v3 .mode-tog.is-workspace .mode-tog-track {
  background: linear-gradient(135deg, #5146e8 0%, #6d65f0 42%, #9b7dff 100%);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, .28),
    inset 0 -1px 1px rgba(40, 30, 120, .25),
    0 0 0 1px rgba(167, 139, 250, .35),
    0 0 8px rgba(109, 101, 240, .28);
}
.feat-hero-v3 .mode-tog.is-workspace .mode-tog-glow { opacity: .45; }
:root[data-theme="dark"] .feat-hero-v3 .mode-tog.is-workspace .mode-tog-track {
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, .22),
    inset 0 -1px 1px rgba(40, 30, 120, .28),
    0 0 0 1px rgba(167, 139, 250, .28);
}
:root[data-theme="dark"] .feat-hero-v3 .mode-tog.is-workspace .mode-tog-glow { opacity: .18; }
:root[data-theme="dark"] .feat-hero-v3 .mode-tog-thumb {
  box-shadow:
    0 1px 3px rgba(0, 0, 0, .45),
    0 0 0 1px rgba(255, 255, 255, .4);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .feat-hero-v3 .mode-tog.is-workspace .mode-tog-track {
    box-shadow:
      inset 0 1px 1px rgba(255, 255, 255, .22),
      inset 0 -1px 1px rgba(40, 30, 120, .28),
      0 0 0 1px rgba(167, 139, 250, .28);
  }
  :root:not([data-theme="light"]) .feat-hero-v3 .mode-tog.is-workspace .mode-tog-glow { opacity: .18; }
  :root:not([data-theme="light"]) .feat-hero-v3 .mode-tog-thumb {
    box-shadow:
      0 1px 3px rgba(0, 0, 0, .45),
      0 0 0 1px rgba(255, 255, 255, .4);
  }
}
.feat-hero-v3 .mode-tog-shine {
  position: absolute; top: 0; left: 0; width: 46%; height: 100%;
  background: linear-gradient(100deg, transparent 0%, rgba(255,255,255,.08) 40%, rgba(255,255,255,.42) 50%, rgba(255,255,255,.08) 60%, transparent 100%);
  transform: translateX(-140%) skewX(-18deg);
  animation: modeTogShine 3.6s cubic-bezier(.4, 0, .2, 1) infinite;
  pointer-events: none; z-index: 1;
}
@keyframes modeTogShine {
  0%, 55% { transform: translateX(-140%) skewX(-18deg); opacity: 0; }
  62% { opacity: 1; }
  82% { transform: translateX(260%) skewX(-18deg); opacity: .9; }
  100% { transform: translateX(260%) skewX(-18deg); opacity: 0; }
}
.feat-hero-v3 .mode-tog-marks {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
}
.feat-hero-v3 .mode-tog-mark {
  position: absolute; top: 50%; width: 11px; height: 14px;
  transform: translateY(-50%); opacity: .35; transition: opacity .45s ease;
}
.feat-hero-v3 .mode-tog-mark-c {
  left: 11px; opacity: .55;
  box-shadow: inset 0 0 0 1.8px rgba(255,255,255,.8);
  border-radius: 2.2px;
}
.feat-hero-v3 .mode-tog-mark-w {
  right: 9px; width: 14px; height: 14px; opacity: .3;
  background:
    radial-gradient(circle at 25% 30%, rgba(255,255,255,.95) 0 1.7px, transparent 1.9px),
    radial-gradient(circle at 75% 30%, rgba(255,255,255,.95) 0 1.7px, transparent 1.9px),
    radial-gradient(circle at 25% 75%, rgba(255,255,255,.95) 0 1.7px, transparent 1.9px),
    radial-gradient(circle at 75% 75%, rgba(255,255,255,.95) 0 1.7px, transparent 1.9px);
}
.feat-hero-v3 .mode-tog.is-workspace .mode-tog-mark-c { opacity: .25; }
.feat-hero-v3 .mode-tog.is-workspace .mode-tog-mark-w { opacity: .75; }
.feat-hero-v3 .mode-tog-thumb {
  position: absolute; top: 3px; left: 3px; z-index: 2;
  width: 31px; height: 31px; border-radius: 50%; overflow: hidden;
  transform: translateX(1px) rotate(0deg);
  background: transparent;
  box-shadow:
    0 1px 4px rgba(0, 0, 0, .45),
    0 0 0 1px rgba(255, 255, 255, .4);
  transition:
    transform .68s cubic-bezier(.22, 1.15, .36, 1),
    box-shadow .45s ease;
}
.feat-hero-v3 .mode-tog.is-workspace .mode-tog-thumb {
  transform: translateX(31px) rotate(360deg);
  box-shadow:
    0 1px 4px rgba(40, 30, 110, .4),
    0 0 6px rgba(167, 139, 250, .28),
    0 0 0 1px rgba(255, 255, 255, .45);
}
:root[data-theme="dark"] .feat-hero-v3 .mode-tog.is-workspace .mode-tog-thumb {
  box-shadow:
    0 1px 3px rgba(0, 0, 0, .45),
    0 0 0 1px rgba(255, 255, 255, .4);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .feat-hero-v3 .mode-tog.is-workspace .mode-tog-thumb {
    box-shadow:
      0 1px 3px rgba(0, 0, 0, .45),
      0 0 0 1px rgba(255, 255, 255, .4);
  }
}
.feat-hero-v3 .mode-tog-core {
  position: absolute; inset: 0; border-radius: 50%;
  background:
    radial-gradient(circle at 28% 24%, rgba(255,255,255,.95) 0%, rgba(255,255,255,.35) 16%, transparent 38%),
    radial-gradient(circle at 72% 78%, rgba(90, 70, 220, .55) 0%, transparent 42%),
    linear-gradient(150deg, #c4d0ff 0%, #8b9cf5 28%, #6d65f0 58%, #4f46e5 100%);
}
.feat-hero-v3 .mode-tog-glyph {
  position: absolute; left: 50%; top: 50%; z-index: 1;
  width: 15px; height: 15px;
  transform: translate(-50%, -50%);
}
.feat-hero-v3 .mode-tog-glyph::before,
.feat-hero-v3 .mode-tog-glyph::after {
  content: ""; position: absolute; background: rgba(255,255,255,.96);
}
.feat-hero-v3 .mode-tog-glyph::before {
  left: 0; top: 1.5px; width: 9px; height: 11px; border-radius: 1.8px;
}
.feat-hero-v3 .mode-tog-glyph::after {
  right: 0; bottom: 0; width: 5.5px; height: 9px; border-radius: 1.6px; opacity: .92;
}
.feat-hero-v3 .mode-tog-lens {
  position: absolute; inset: 0; border-radius: 50%; pointer-events: none; z-index: 2;
  background:
    radial-gradient(circle at 30% 26%, rgba(255,255,255,.78) 0%, rgba(255,255,255,.2) 26%, transparent 48%),
    linear-gradient(180deg, rgba(255,255,255,.2) 0%, transparent 40%, rgba(40, 30, 100, .14) 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.4);
}
@media (prefers-reduced-motion: reduce) {
  .feat-hero-v3 .mode-tog-shine { animation: none; opacity: 0; }
  .feat-hero-v3 .mode-tog-thumb,
  .feat-hero-v3 .mode-tog-track,
  .feat-hero-v3 .mode-tog-glow,
  .feat-hero-v3 .mode-tog-mark { transition: none; }
}

@media (max-width: 560px) {
  /* Значок и заголовок — в одну строку (заголовок не переносится),
     капсула «Новое в 2.0» — на своей строке, текст — на всю ширину. */
  .feat-hero {
    display: grid; grid-template-columns: auto 1fr; align-items: center;
    column-gap: 13px; row-gap: 10px; padding: 20px;
  }
  .feat-hero .ic { width: 48px; height: 48px; font-size: 27px; }
  .feat-hero .ic-glass { width: 66px; height: 66px; }
  .feat-hero-v3 .ic-mode { width: 66px; height: 38px; }
  .feat-hero-v3 .mode-tog-track { width: 58px; height: 32px; }
  .feat-hero-v3 .mode-tog-thumb { width: 26px; height: 26px; top: 3px; left: 3px; }
  .feat-hero-v3 .mode-tog.is-workspace .mode-tog-thumb { transform: translateX(26px) rotate(360deg); }
  .feat-hero-v3 .mode-tog-mark { width: 9px; height: 12px; }
  .feat-hero-v3 .mode-tog-mark-c { left: 9px; }
  .feat-hero-v3 .mode-tog-mark-w { right: 8px; width: 12px; height: 12px; }
  .feat-hero-v3 .mode-tog-glyph { width: 13px; height: 13px; }
  .feat-hero-v3 .mode-tog-glyph::before { width: 8px; height: 9px; }
  .feat-hero-v3 .mode-tog-glyph::after { width: 4.5px; height: 7.5px; }
  .feat-hero-tx { display: contents; }
  .feat-hero h3, .feat-hero p { position: relative; z-index: 1; }
  .feat-hero h3 { grid-column: 2; display: block; margin: 0; font-size: clamp(14px, 4.8vw, 18px); }
  .feat-hero-title { white-space: nowrap; }
  .feat-hero-badge { display: block; width: max-content; margin-top: 7px; }
  .feat-hero p { grid-column: 1 / -1; }
}

/* YouTube-встраивание в рамку демо (ленивое, по клику из video.js) */
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }

/* ---- Steps ---- */
.steps { max-width: 760px; margin: 0 auto; display: grid; gap: 16px; }
.step {
  display: grid; grid-template-columns: 46px 1fr; gap: 18px; align-items: start;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px;
}
.step .num {
  width: 40px; height: 40px; border-radius: 12px; flex: none;
  background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 17px;
}
.step h3 { margin: 0 0 4px; font-size: 17px; font-weight: 700; }
.step p { margin: 0; color: var(--muted); font-size: 14.5px; }

/* ---- CTA band ---- */
.cta {
  background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff;
  border-radius: 22px; padding: 44px 30px; text-align: center; box-shadow: var(--shadow);
}
.cta h2 { margin: 0 0 10px; font-size: clamp(24px, 3.4vw, 32px); font-weight: 800; }
.cta p { margin: 0 0 22px; opacity: .92; font-size: 17px; }
.cta .btn-ghost { background: rgba(255,255,255,.16); color: #fff; border-color: rgba(255,255,255,.3); }
.cta .btn-ghost:hover { background: rgba(255,255,255,.26); }
/* Telegram community card */
.cta-tg { background: linear-gradient(135deg, #2aabee, #229ed9); }
.btn-tg { display: inline-flex; align-items: center; gap: 9px; }
.btn-tg svg { width: 20px; height: 20px; }
/* Chrome CTA card */
.cta-chrome { background: linear-gradient(135deg, #4285F4 0%, #34A853 40%, #FBBC05 62%, #EA4335 100%); }
.cta-chrome h2, .cta-chrome p { text-shadow: 0 1px 3px rgba(0,0,0,.32); }
.btn-chrome { display: inline-flex; align-items: center; gap: 9px; text-shadow: 0 1px 2px rgba(0,0,0,.32); }
.btn-chrome svg { width: 22px; height: 22px; }

/* ---- Welcome banner (install page) ---- */
.welcome { text-align: center; padding: 64px 0 20px; }
.welcome .check { width: 66px; height: 66px; border-radius: 50%; background: var(--ok); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 34px; margin: 0 auto 20px; box-shadow: 0 10px 30px rgba(22,163,74,.35); }
.welcome h1 { font-size: clamp(28px, 4vw, 40px); margin: 0 0 12px; font-weight: 800; }
.welcome p { color: var(--muted); font-size: 18px; margin: 0 auto; max-width: 44ch; }

/* ---- Tips / callout ---- */
.callout { background: var(--accent-soft); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; display: flex; gap: 14px; align-items: flex-start; }
.callout .ic { font-size: 22px; }
.callout p { margin: 0; font-size: 14.5px; }

/* ---- UI-значки расширения (для шагов на странице «Как пользоваться») ----
   Чип повторяет вид кнопки в панели, чтобы шаги совпадали с реальным интерфейсом. */
.uikey {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  height: 24px; min-width: 24px; padding: 0 6px; vertical-align: middle; margin: 0 2px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--card);
  color: var(--text); font-size: 14px; line-height: 1; font-weight: 600;
  box-shadow: 0 1px 2px rgba(0,0,0,.05);
}
.uikey svg { width: 16px; height: 16px; display: block; }
.uikey img { width: 18px; height: 18px; border-radius: 5px; }
.uikey.tx { font-size: 12.5px; color: var(--muted); }

/* Легенда панели: значок + подпись */
.legend { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 22px; max-width: 760px; margin: 0 auto; }
.legend .row { display: flex; align-items: center; gap: 12px; }
.legend .row b { font-weight: 700; font-size: 14.5px; }
.legend .row span { color: var(--muted); font-size: 13.5px; }
@media (max-width: 600px) { .legend { grid-template-columns: 1fr; } }

/* Клавиши-капсулы для раздела горячих клавиш. */
.keys { display: inline-flex; align-items: center; gap: 4px; flex: none; }
kbd, .kbd {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 24px; padding: 0 7px; vertical-align: middle;
  border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 7px;
  background: var(--card); color: var(--text);
  font: 600 12.5px/1 ui-monospace, Menlo, Consolas, monospace;
}
.keys i { color: var(--muted); font-style: normal; font-size: 12.5px; }

/* ---- Privacy article ---- */
.article { max-width: 800px; margin: 0 auto; }
.article h2 { font-size: 21px; margin: 30px 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.article h3 { font-size: 16px; margin: 20px 0 6px; }
.article p, .article li { color: var(--text); }
.article .muted { color: var(--muted); }
.article ul { padding-left: 22px; }
.article code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; background: var(--soft); padding: 1px 6px; border-radius: 5px; }
.perm { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin: 10px 0; }
.perm .pname { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; font-weight: 600; color: var(--accent); background: var(--accent-soft); padding: 2px 8px; border-radius: 6px; }

/* ---- Footer ---- */
footer.site { border-top: 1px solid var(--line); margin-top: 20px; padding: 36px 0; color: var(--muted); font-size: 14px; }
.foot-in { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.foot-links { display: flex; flex-wrap: wrap; gap: 18px; }
.foot-links a { color: var(--muted); }
.foot-brand { display: flex; align-items: center; gap: 9px; color: var(--text); font-weight: 600; }
.foot-brand img { width: 24px; height: 24px; border-radius: 6px; }
.disclaimer { margin-top: 14px; font-size: 12.5px; color: var(--muted); }

/* ---- Responsive ---- */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .hero-visual { order: -1; }
  /* На узких экранах прячем монитор и показываем мобильный статичный телефон. */
  .monitor { display: none; }
  .hero-mobile { display: block; }
  .cards3, .features { grid-template-columns: 1fr; }
  .nav-links .hide-sm { display: none; }
}
/* На узких экранах навигация прячется в бургер-меню (выпадающая панель). */
@media (max-width: 680px) {
  .nav-in { gap: 10px; }
  .burger { display: inline-flex; }
  /* На мобильной шапке группируем переключатель темы с бургером справа. */
  .themebtn { margin-left: auto; }
  .themebtn + .burger { margin-left: 8px; }
  .nav-links {
    position: absolute; top: calc(100% + 8px); right: 14px; left: 14px;
    flex-direction: column; align-items: stretch; gap: 4px; margin-left: 0;
    background: var(--card); border: 1px solid var(--line); border-radius: 14px;
    padding: 10px; box-shadow: var(--shadow); display: none;
  }
  .nav.open .nav-links { display: flex; }
  /* В раскрытом меню показываем пункты, но не опции языка (ими управляет .lang-menu). */
  .nav.open .nav-links > a:not(.btn):not(.lang) { display: block; }
  .nav-links a { white-space: nowrap; padding: 11px 13px; border-radius: 10px; font-size: 15px; color: var(--text); }
  .nav-links a:hover { background: var(--soft); }
  .nav-links .lang { text-align: center; }
  .nav-links .lang-switch { width: 100%; }
  .nav-links .lang-btn { width: 100%; justify-content: center; height: 44px; }
  .nav-links .lang-menu {
    position: static; margin-top: 6px; min-width: 0; width: 100%;
    box-shadow: none;
  }
  .nav-links .lang-menu[hidden] { display: none !important; }
  .nav-links .lang-switch.is-open > .lang-menu { display: flex; }
  .nav-links .btn { width: 100%; justify-content: center; padding: 12px; font-size: 15px; margin-top: 2px; }
  .brand { font-size: 15.5px; }
  .brand img { width: 26px; height: 26px; }
}
@media (max-width: 520px) {
  .hero { padding: 48px 0 24px; }
}

/* =====================================================================
   Микро-анимации и hover-эффекты (лёгкие, без перегруза)
   ===================================================================== */

/* --- Карточки: подъём + акцентная подсветка при наведении --- */
.acard, .fcard, .step {
  position: relative; isolation: isolate;
  transition: transform .3s cubic-bezier(.22, .61, .36, 1), box-shadow .3s ease, border-color .3s ease;
}
/* Мягкий градиентный отблеск в углу — появляется на hover. */
.acard::after, .fcard::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1;
  background: radial-gradient(130% 90% at 0% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 58%);
  opacity: 0; transition: opacity .3s ease;
}
.acard:hover, .fcard:hover {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--accent) 38%, var(--line));
  box-shadow: 0 16px 36px rgba(79, 70, 229, .14);
}
.acard:hover::after, .fcard:hover::after { opacity: 1; }
.acard:hover .ic, .fcard:hover .ic { transform: translateY(-2px) scale(1.07) rotate(-3deg); }
.step:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 30%, var(--line));
  box-shadow: 0 12px 28px rgba(79, 70, 229, .10);
}

/* --- Кнопки: лёгкое усиление при наведении (поверх существующего lift) --- */
.btn-ghost:hover { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }

/* --- «Дыхание» градиентного пятна в hero --- */
.hero::before { animation: heroFloat 14s ease-in-out infinite; }
@keyframes heroFloat {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: .9; }
  50% { transform: translate(4%, 6%) scale(1.08); opacity: 1; }
}

/* --- Появление при скролле (включается классом .reveal-on из <head>) --- */
.reveal-on .section-head:not(.in),
.reveal-on .acard:not(.in),
.reveal-on .fcard:not(.in),
.reveal-on .step:not(.in),
.reveal-on .cta:not(.in),
.reveal-on .voices-panel:not(.in),
.reveal-on .hero-visual:not(.in),
.reveal-on .hero-text > *:not(.in) { opacity: 0; }

.reveal-on .section-head.in,
.reveal-on .acard.in,
.reveal-on .fcard.in,
.reveal-on .step.in,
.reveal-on .cta.in,
.reveal-on .voices-panel.in,
.reveal-on .hero-visual.in,
.reveal-on .hero-text > *.in {
  animation: revealUp .65s cubic-bezier(.22, .61, .36, 1) backwards;
}
@keyframes revealUp { from { opacity: 0; transform: translateY(20px); } }

/* Уважаем настройку «уменьшить движение»: отключаем все анимации/трансформы. */
@media (prefers-reduced-motion: reduce) {
  .acard, .fcard, .step, .acard .ic, .fcard .ic { transition: none; }
  .acard:hover, .fcard:hover, .step:hover, .acard:hover .ic, .fcard:hover .ic { transform: none; }
  .hero::before { animation: none; }
}

/* Cookie consent banner */
.cookiebar {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 200;
  max-width: 560px; margin: 0 auto;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0,0,0,.18); padding: 16px 18px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px;
  opacity: 0; transform: translateY(12px);
  transition: opacity .3s ease, transform .3s ease;
}
.cookiebar.in { opacity: 1; transform: none; }
.cookiebar-txt { margin: 0; flex: 1 1 260px; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.cookiebar-txt a { color: var(--accent); text-decoration: none; }
.cookiebar-txt a:hover { text-decoration: underline; }
.cookiebar-btns { display: flex; gap: 8px; margin-left: auto; }
.cookiebar .btn { padding: 8px 16px; font-size: 13.5px; justify-content: center; }
@media (max-width: 480px) {
  .cookiebar-btns { width: 100%; }
  .cookiebar-btns .btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .cookiebar { transition: none; opacity: 1; transform: none; }
}

/* ---- Demo video (self-hosted, click-to-play, responsive) ---- */
#demo { position: relative; overflow: hidden; }
.video-wrap { max-width: 940px; margin: 6px auto 0; position: relative; }
/* Фирменная наклонная полоса позади видео — тон меняется от темы через var(--accent) */
.video-wrap::before {
  content: ""; position: absolute; z-index: 0; pointer-events: none;
  left: -50vw; right: -50vw; top: 50%; height: 118%;
  transform: translateY(-50%) rotate(-5deg);
  background: linear-gradient(120deg,
    color-mix(in srgb, var(--accent) 26%, transparent),
    color-mix(in srgb, var(--accent2) 14%, transparent));
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 20%, #000 80%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 20%, #000 80%, transparent);
}
/* Точечная текстура поверх полосы — как в hero и баннерах */
.video-wrap::after {
  content: ""; position: absolute; z-index: 0; pointer-events: none;
  left: -50vw; right: -50vw; top: 50%; height: 118%;
  transform: translateY(-50%) rotate(-5deg);
  background-image: radial-gradient(color-mix(in srgb, var(--accent) 38%, transparent) 1.3px, transparent 1.3px);
  background-size: 22px 22px; opacity: .4;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 20%, #000 80%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 20%, #000 80%, transparent);
}
.video-frame {
  position: relative; z-index: 1; aspect-ratio: 16 / 9; border-radius: var(--radius);
  overflow: hidden; cursor: pointer; background: #0b0d14;
  border: 1px solid var(--line); box-shadow: var(--shadow);
  transition: box-shadow .3s ease, transform .3s ease;
}
.video-frame:hover { box-shadow: 0 26px 64px rgba(79, 70, 229, .28); transform: translateY(-2px); }
.video-frame.playing { cursor: default; }
.video-frame.playing:hover { transform: none; box-shadow: var(--shadow); }
.video-el {
  width: 100%; height: 100%; object-fit: contain; display: block; background: #000;
  transition: transform .6s ease, filter .3s ease;
}
.video-frame:hover .video-el { transform: scale(1.04); filter: brightness(.9); }
.video-frame.playing .video-el { transform: none; filter: none; }
.video-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 86px; height: 86px; border: 0; padding: 0; border-radius: 50%;
  -webkit-appearance: none; appearance: none; cursor: pointer; font: inherit;
  display: flex; align-items: center; justify-content: center; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 14px 38px rgba(79, 70, 229, .55);
  transition: transform .25s ease, box-shadow .25s ease;
}
.video-play.hide { display: none; }
.video-play::before {
  content: ""; position: absolute; inset: -10px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .35); opacity: .6;
}
.video-play svg { width: 34px; height: 34px; margin-left: 5px; }
.video-frame:hover .video-play { transform: translate(-50%, -50%) scale(1.08); box-shadow: 0 18px 46px rgba(79, 70, 229, .65); }
.video-frame:focus-within { outline: 3px solid var(--accent); outline-offset: 3px; }
@media (max-width: 560px) {
  .video-play { width: 62px; height: 62px; }
  .video-play svg { width: 25px; height: 25px; }
  .video-wrap::before, .video-wrap::after {
    left: -50vw; right: -50vw; height: 112%; transform: translateY(-50%) rotate(-4deg);
  }
}

/* ---- Contact: плавающая кнопка + модалка с формой ---- */
.cf-fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 60;
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 18px; border: 0; border-radius: 999px; cursor: pointer;
  font: inherit; font-size: 15px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 12px 30px rgba(79, 70, 229, .45);
  transition: transform .2s ease, box-shadow .2s ease;
}
.cf-fab:hover { transform: translateY(-2px); box-shadow: 0 16px 38px rgba(79, 70, 229, .55); }
.cf-fab svg { width: 20px; height: 20px; }

.cf-overlay {
  position: fixed; inset: 0; z-index: 70; display: flex;
  align-items: center; justify-content: center; padding: 18px;
  background: rgba(10, 12, 20, .55); backdrop-filter: blur(3px);
  opacity: 0; visibility: hidden; transition: opacity .22s ease, visibility .22s ease;
}
.cf-overlay.on { opacity: 1; visibility: visible; }
.cf-modal {
  position: relative; width: 100%; max-width: 440px; max-height: 92vh; overflow-y: auto;
  background: var(--card); color: var(--text);
  border: 1px solid var(--line); border-radius: 20px;
  box-shadow: 0 30px 80px rgba(10, 12, 40, .5);
  padding: 26px 24px 24px; transform: translateY(14px) scale(.98);
  transition: transform .24s cubic-bezier(.2, .8, .2, 1);
}
.cf-overlay.on .cf-modal { transform: translateY(0) scale(1); }
.cf-x {
  position: absolute; top: 12px; right: 14px; width: 34px; height: 34px;
  border: 0; border-radius: 50%; background: var(--soft); color: var(--muted);
  font-size: 22px; line-height: 1; cursor: pointer; transition: background .2s, color .2s;
}
.cf-x:hover { background: var(--accent-soft); color: var(--accent); }
.cf-title { margin: 0 0 4px; font-size: 21px; font-weight: 800; letter-spacing: -.01em; }
.cf-sub { margin: 0 0 18px; font-size: 14px; color: var(--muted); }
.cf-field { display: block; margin-bottom: 13px; }
.cf-field > span { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.cf-field input, .cf-field select, .cf-field textarea {
  width: 100%; box-sizing: border-box; font: inherit; font-size: 15px; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: 11px;
  padding: 11px 13px; transition: border-color .2s, box-shadow .2s;
}
.cf-field textarea { resize: vertical; min-height: 92px; }
.cf-field input:focus, .cf-field select:focus, .cf-field textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
.cf-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.cf-err { color: #e11d48; font-size: 13.5px; margin: 2px 0 10px; }
.cf-send {
  position: relative; overflow: hidden;
  width: 100%; margin-top: 4px; padding: 13px 18px; border: 0; border-radius: 12px;
  font: inherit; font-size: 15.5px; font-weight: 700; color: #fff; cursor: pointer;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 10px 26px rgba(79, 70, 229, .4); transition: transform .15s, box-shadow .2s, opacity .2s;
}
.cf-send:hover { transform: translateY(-1px); box-shadow: 0 14px 32px rgba(79, 70, 229, .5); }
.cf-send:disabled { opacity: .85; cursor: default; transform: none; }
.cf-send.loading::after {
  content: ""; position: absolute; left: -40%; bottom: 0; height: 3px; width: 40%;
  background: rgba(255, 255, 255, .95); border-radius: 3px; animation: cfbar 1.05s ease-in-out infinite;
}
@keyframes cfbar { 0% { left: -40%; } 100% { left: 100%; } }
.cf-ok { text-align: center; padding: 18px 6px 8px; }
.cf-ok-ic {
  width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 32px; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 12px 30px rgba(79, 70, 229, .45);
}
.cf-ok h3 { margin: 0 0 6px; font-size: 20px; font-weight: 800; }
.cf-ok p { margin: 0; color: var(--muted); font-size: 14.5px; }
.cf-attach { display: flex; align-items: center; gap: 10px; }
.cf-attach-btn {
  font: inherit; font-size: 14px; font-weight: 600; color: var(--accent); cursor: pointer;
  background: var(--accent-soft); border: 1px solid var(--line); border-radius: 10px; padding: 9px 14px;
  transition: background .2s, opacity .2s;
}
.cf-attach-btn:hover { background: color-mix(in srgb, var(--accent) 16%, var(--accent-soft)); }
.cf-attach-btn:disabled { opacity: .5; cursor: default; }
.cf-attach-hint { font-size: 12.5px; color: var(--muted); }
.cf-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.cf-thumb { position: relative; width: 64px; height: 64px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.cf-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cf-thumb button {
  position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border: 0; border-radius: 50%;
  background: rgba(0, 0, 0, .6); color: #fff; font-size: 14px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
@media (max-width: 560px) {
  .cf-fab span { display: none; }
  .cf-fab { padding: 14px; right: 16px; bottom: 16px; }
}

/* ---- Uninstall privacy float: fab + panel (scale/fade, no height reflow) ---- */
.uf-priv {
  --uf-priv-w: min(400px, calc(100vw - 28px));
  --uf-fab: 48px;
  position: fixed;
  z-index: 55;
  left: 16px;
  top: 50%;
  width: 0;
  height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  overflow: visible;
  pointer-events: none;
}
@media (min-width: 900px) {
  .uf-priv { left: 22px; }
}

/* Collapsed shield — always a fixed square on the left */
.uf-priv-fab {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2;
  width: var(--uf-fab);
  height: var(--uf-fab);
  margin: 0;
  padding: 0;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--line) 75%, var(--accent) 25%);
  background:
    linear-gradient(165deg, color-mix(in srgb, var(--card) 88%, #fff) 0%, var(--card) 100%);
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
  backdrop-filter: blur(18px) saturate(1.35);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .55) inset,
    0 10px 28px rgba(22, 26, 43, .1),
    0 2px 8px rgba(79, 70, 229, .1);
  color: var(--accent);
  cursor: pointer;
  display: grid;
  place-items: center;
  pointer-events: auto;
  transform: translateY(-50%);
  transition: opacity .28s ease, transform .4s cubic-bezier(.22, 1, .36, 1), visibility 0s linear 0s;
}
.uf-priv-fab:hover {
  background:
    linear-gradient(165deg, color-mix(in srgb, var(--accent-soft) 40%, var(--card)) 0%, var(--card) 100%);
}
.uf-priv-fab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.uf-priv:not(.is-open) .uf-priv-fab {
  animation: ufPrivPulse 2.4s ease-in-out infinite;
}
.uf-priv.is-open .uf-priv-fab {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-50%) scale(.86);
  animation: none;
  transition:
    opacity .22s ease,
    transform .35s ease,
    visibility 0s linear .22s;
}
.uf-priv-fab .uf-priv-ico {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--accent-soft) 80%, #fff), var(--accent-soft));
  border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--line));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55);
}
.uf-priv-fab .uf-priv-ico svg { width: 18px; height: 18px; display: block; }
@keyframes ufPrivPulse {
  0%, 100% { box-shadow: 0 1px 0 rgba(255, 255, 255, .55) inset, 0 10px 28px rgba(22, 26, 43, .1), 0 0 0 0 transparent; }
  50% { box-shadow: 0 1px 0 rgba(255, 255, 255, .55) inset, 0 10px 28px rgba(22, 26, 43, .1), 0 0 0 8px color-mix(in srgb, var(--accent) 14%, transparent); }
}

/* Card — always full natural size; only scale + fade (no width/height tween) */
.uf-priv-panel {
  --uf-panel-bg:
    linear-gradient(165deg, color-mix(in srgb, var(--card) 88%, #fff) 0%, var(--card) 100%);
  --uf-panel-shadow:
    0 1px 0 rgba(255, 255, 255, .55) inset,
    0 18px 48px rgba(22, 26, 43, .14),
    0 4px 14px rgba(79, 70, 229, .1);
  position: absolute;
  left: 0;
  top: 0;
  z-index: 3;
  width: var(--uf-priv-w);
  max-width: var(--uf-priv-w);
  max-height: min(72vh, 520px);
  overflow-x: hidden;
  overflow-y: auto;
  box-sizing: border-box;
  padding: 18px 18px 16px;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--line) 75%, var(--accent) 25%);
  background: var(--uf-panel-bg);
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
  backdrop-filter: blur(18px) saturate(1.35);
  box-shadow: var(--uf-panel-shadow);
  color: var(--text);
  transform: translateY(-50%) scale(.92);
  transform-origin: left center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity .38s cubic-bezier(.22, 1, .36, 1),
    transform .48s cubic-bezier(.22, 1, .36, 1),
    visibility 0s linear .48s;
}
.uf-priv-panel::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, var(--accent2), var(--accent));
  opacity: .85;
  pointer-events: none;
}
.uf-priv.is-open .uf-priv-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(-50%) scale(1);
  transition:
    opacity .42s cubic-bezier(.22, 1, .36, 1),
    transform .52s cubic-bezier(.22, 1, .36, 1),
    visibility 0s linear 0s;
}

:root[data-theme="dark"] .uf-priv-fab,
:root[data-theme="dark"] .uf-priv-panel {
  background:
    linear-gradient(165deg, color-mix(in srgb, var(--card) 92%, #fff 4%) 0%, var(--card) 100%);
}
:root[data-theme="dark"] .uf-priv-fab {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .08) inset,
    0 12px 32px rgba(0, 0, 0, .4);
}
:root[data-theme="dark"] .uf-priv-panel {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .08) inset,
    0 20px 52px rgba(0, 0, 0, .45),
    0 0 0 1px rgba(255, 255, 255, .03);
}
:root[data-theme="dark"] .uf-priv-fab .uf-priv-ico,
:root[data-theme="dark"] .uf-priv-panel .uf-priv-ico {
  background: color-mix(in srgb, var(--accent) 18%, var(--soft));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .uf-priv-fab,
  :root:not([data-theme="light"]) .uf-priv-panel {
    background:
      linear-gradient(165deg, color-mix(in srgb, var(--card) 92%, #fff 4%) 0%, var(--card) 100%);
  }
  :root:not([data-theme="light"]) .uf-priv-fab {
    box-shadow:
      0 1px 0 rgba(255, 255, 255, .08) inset,
      0 12px 32px rgba(0, 0, 0, .4);
  }
  :root:not([data-theme="light"]) .uf-priv-panel {
    box-shadow:
      0 1px 0 rgba(255, 255, 255, .08) inset,
      0 20px 52px rgba(0, 0, 0, .45),
      0 0 0 1px rgba(255, 255, 255, .03);
  }
  :root:not([data-theme="light"]) .uf-priv-fab .uf-priv-ico,
  :root:not([data-theme="light"]) .uf-priv-panel .uf-priv-ico {
    background: color-mix(in srgb, var(--accent) 18%, var(--soft));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
  }
}

.uf-priv-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding-right: 36px;
}
.uf-priv-panel .uf-priv-ico {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: var(--accent);
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--accent-soft) 80%, #fff), var(--accent-soft));
  border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--line));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55);
}
.uf-priv-panel .uf-priv-ico svg { width: 18px; height: 18px; display: block; }
.uf-priv-title {
  margin: 0;
  min-width: 0;
  flex: 1;
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -.015em;
  line-height: 1.3;
  color: var(--text);
}
.uf-priv-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 4;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background .15s ease, color .15s ease;
}
.uf-priv-close:hover {
  background: var(--soft);
  color: var(--text);
}
.uf-priv-close svg { width: 14px; height: 14px; display: block; }
.uf-priv-body {
  margin: 0 0 10px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--muted);
}
.uf-priv-body strong { color: var(--text); font-weight: 600; }
.uf-priv-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 16%, var(--line));
  text-decoration: none;
  transition: background .15s ease, transform .15s ease;
}
.uf-priv-link:hover {
  text-decoration: none;
  background: color-mix(in srgb, var(--accent) 14%, var(--accent-soft));
  transform: translateY(-1px);
}
.uf-priv-link svg {
  width: 14px;
  height: 14px;
  flex: none;
  opacity: .85;
}

@media (max-width: 899px) {
  .uf-priv {
    left: 12px;
    top: auto;
    bottom: 16px;
  }
  .uf-priv-fab {
    top: auto;
    bottom: 0;
    transform: none;
  }
  .uf-priv.is-open .uf-priv-fab {
    transform: scale(.86);
  }
  .uf-priv-panel {
    top: auto;
    bottom: 0;
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
    transform: scale(.94);
    transform-origin: left bottom;
  }
  .uf-priv.is-open .uf-priv-panel {
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .uf-priv-fab,
  .uf-priv-panel {
    transition: opacity .2s ease !important;
  }
  .uf-priv:not(.is-open) .uf-priv-fab {
    animation: none;
  }
  .uf-priv-panel {
    transform: translateY(-50%);
  }
  .uf-priv.is-open .uf-priv-panel {
    transform: translateY(-50%);
  }
  @media (max-width: 899px) {
    .uf-priv-panel,
    .uf-priv.is-open .uf-priv-panel {
      transform: none;
    }
  }
}
