/* Сайт NSD — «тихая надёжность». Сначала телефон (от 320 px), затем 480 · 768 · 1024 · 1280.
   Цвета и темы — в /site/theme.css (общие с личным кабинетом). Анимируются только transform и opacity. */

/* ===== ШРИФТЫ (свои файлы: политика безопасности сайта не пускает чужие) ===== */
@font-face { font-family: "Unbounded"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(/site/fonts/unbounded-cyrillic-600-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Unbounded"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(/site/fonts/unbounded-latin-600-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; }
@font-face { font-family: "Unbounded"; font-style: normal; font-weight: 700; font-display: swap;
  src: url(/site/fonts/unbounded-cyrillic-700-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Unbounded"; font-style: normal; font-weight: 700; font-display: swap;
  src: url(/site/fonts/unbounded-latin-700-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; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/site/fonts/inter-cyrillic-400-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: 400; font-display: swap;
  src: url(/site/fonts/inter-latin-400-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; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap;
  src: url(/site/fonts/inter-cyrillic-500-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: 500; font-display: swap;
  src: url(/site/fonts/inter-latin-500-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; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(/site/fonts/inter-cyrillic-600-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: 600; font-display: swap;
  src: url(/site/fonts/inter-latin-600-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; }

/* ===== ШКАЛЫ ===== */
:root {
  --font-display: "Unbounded", "Segoe UI", system-ui, sans-serif;
  --font-text: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --fs-h1: clamp(2.1rem, 1.3rem + 4vw, 4.5rem);
  --fs-h2: clamp(1.6rem, 1.15rem + 2.2vw, 3rem);
  --fs-h3: 1.125rem;
  --fs-body: clamp(1rem, .95rem + .2vw, 1.125rem);
  --fs-small: .875rem;
  --fs-caption: .8125rem;
  --gutter: 16px;
  --section: clamp(64px, 10vw, 128px);
  --r-btn: 12px; --r-field: 16px; --r-card: 20px; --r-phone: 32px;
  --ease: cubic-bezier(.2,.7,.2,1);
  --glass: color-mix(in srgb, var(--surface) 62%, transparent);
  --shadow-card: 0 1px 0 rgb(255 255 255 / .05) inset, 0 20px 40px -20px rgb(0 0 0 / .6);
}
[data-theme="light"] { --shadow-card: 0 1px 0 rgb(255 255 255 / .8) inset, 0 18px 40px -22px rgb(30 40 90 / .25); }
@media (min-width: 480px) { :root { --gutter: 24px; } }
@media (min-width: 1024px) { :root { --gutter: 32px; } }

/* ===== ОСНОВА ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; scrollbar-color: var(--line-2) transparent; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-text); font-size: var(--fs-body); line-height: 1.6;
  background: var(--bg); color: var(--text); min-height: 100dvh; overflow-x: hidden;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul, ol { list-style: none; }
h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; text-wrap: balance; }
p { text-wrap: pretty; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
::selection { background: color-mix(in srgb, var(--accent) 35%, transparent); }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
.container.narrow { max-width: 760px; }
.ico {
  width: 1.2em; height: 1.2em; fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0;
}
.skip {
  position: fixed; left: 12px; top: 12px; z-index: 300; padding: .6em 1em; border-radius: var(--r-btn);
  background: var(--accent); color: #fff; transform: translateY(-160%); transition: transform .2s var(--ease);
}
.skip:focus { transform: none; }
.grad-text {
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}

/* ===== КНОПКИ ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 44px; padding: .7em 1.25em; border-radius: var(--r-btn);
  font-weight: 600; font-size: .9375rem; line-height: 1.1; white-space: nowrap; user-select: none;
  border: 1px solid transparent; position: relative; overflow: hidden; cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s ease, background-color .2s, border-color .2s, color .2s, opacity .2s;
}
.btn .ico { width: 1.15em; height: 1.15em; }
.btn:active { transform: scale(.97); }
.btn:focus-visible, .icon-btn:focus-visible, .burger:focus-visible, summary:focus-visible,
.tabs button:focus-visible, .app:focus-visible, .nav a:focus-visible, .footer-col a:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px;
}
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.btn.loading { color: transparent; pointer-events: none; }
.btn.loading::before {
  content: ""; position: absolute; width: 1.1em; height: 1.1em; border-radius: 50%;
  border: 2px solid rgb(255 255 255 / .35); border-top-color: #fff; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.btn-primary { background: #4f6bf0; background: var(--grad); color: #fff; box-shadow: 0 6px 24px -8px var(--glow-a); }
.btn-primary::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgb(255 255 255 / .28) 50%, transparent 65%);
  transform: translateX(-110%); transition: transform .6s ease;
}
.btn-ghost { background: var(--card); border-color: var(--line-2); color: var(--text); }
.btn-outline { background: transparent; border-color: var(--line-2); color: var(--text); }
.btn-light { background: #f4f6fb; color: #121a33; box-shadow: 0 10px 30px -10px rgb(0 0 0 / .5); }
.btn-lg { min-height: 52px; padding: .9em 1.6em; font-size: 1rem; border-radius: 14px; }
.btn-sm { min-height: 36px; padding: .45em .95em; font-size: .8125rem; border-radius: 10px; }
@media (hover: hover) {
  .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 32px -8px var(--glow-a); }
  .btn-primary:hover::after { transform: translateX(110%); }
  .btn-ghost:hover { background: var(--card-hover); border-color: var(--accent); }
  .btn-outline:hover { border-color: var(--accent); background: var(--accent-soft); }
  .btn-light:hover { transform: translateY(-2px); }
}

/* ===== ШАПКА ===== */
.header {
  position: sticky; top: 0; z-index: 100; border-bottom: 1px solid transparent;
  transition: background-color .3s ease, border-color .3s ease;
}
.header.scrolled {
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-color: var(--line);
}
.header-inner { display: flex; align-items: center; gap: .75rem; height: 64px; }
.brand { display: flex; align-items: center; gap: .55rem; font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; flex-shrink: 0; letter-spacing: -.01em; }
.brand img { border-radius: 7px; }

.nav { display: none; }
.header-actions { display: flex; align-items: center; gap: .5rem; margin-left: auto; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 11px; border: 1px solid var(--line); background: var(--card);
  display: flex; align-items: center; justify-content: center; color: var(--text-2);
  transition: color .2s, background-color .2s, transform .2s var(--ease);
}
.header-cta { display: none; }
#login, #cabinet { display: none; }
#cabinet[hidden], #login[hidden] { display: none !important; }
.burger {
  display: flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 40px; height: 40px; border-radius: 11px; border: 1px solid var(--line); background: var(--card);
}
.burger span { display: block; width: 18px; height: 1.5px; border-radius: 2px; background: var(--text); margin: 0 auto; transition: transform .25s var(--ease), opacity .2s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(3.25px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { transform: translateY(-3.25px) rotate(-45deg); }
@media (hover: hover) {
  .icon-btn:hover { color: var(--text); background: var(--card-hover); }
}

/* Меню на телефоне — на весь экран под шапкой */
.nav.open {
  display: flex; flex-direction: column; gap: .25rem; position: fixed; inset: 64px 0 0; z-index: 99;
  padding: 1rem var(--gutter) 2rem; background: color-mix(in srgb, var(--bg) 97%, transparent);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); overflow-y: auto;
  animation: menu-in .25s var(--ease) both;
}
.nav.open a { padding: .95rem 1rem; border-radius: var(--r-field); font-size: 1.0625rem; color: var(--text); }
.nav.open a:not(.btn):hover { background: var(--card); }
.nav.open .nav-cta { margin-top: .75rem; min-height: 52px; }
@keyframes menu-in { from { opacity: 0; transform: translateY(-8px); } }

@media (min-width: 480px) {
  #login, #cabinet { display: inline-flex; }
}
@media (min-width: 768px) {
  .header-cta { display: inline-flex; }
}
@media (min-width: 1024px) {
  .burger, .header-cta { display: none; }
  .nav {
    display: flex; align-items: center; gap: .15rem; margin-left: auto;
  }
  .header-actions { margin-left: .5rem; }
  .nav a:not(.btn) {
    padding: .5em .8em; border-radius: 10px; font-size: .9rem; font-weight: 500; color: var(--text-2);
    position: relative; transition: color .2s;
  }
  .nav a:not(.btn)::after {
    content: ""; position: absolute; left: .8em; right: .8em; bottom: 4px; height: 2px; border-radius: 2px;
    background: var(--grad); transform: scaleX(0); transition: transform .3s var(--ease);
  }
  .nav a:not(.btn):hover, .nav a.active { color: var(--text); }
  .nav a:not(.btn):hover::after, .nav a.active::after { transform: scaleX(1); }
  .nav-cta { margin-left: .5rem; min-height: 40px; padding: .55em 1.1em; font-size: .875rem; }
}

/* ===== ПЕРВЫЙ ЭКРАН ===== */
.hero { position: relative; overflow: hidden; padding: clamp(24px, 6vw, 72px) 0 clamp(48px, 7vw, 88px); isolation: isolate; }
.glow { position: absolute; z-index: -1; border-radius: 50%; pointer-events: none; filter: blur(10px); will-change: transform; }
.glow-a { width: 70vmax; height: 70vmax; left: -30vmax; top: -34vmax; background: radial-gradient(circle, var(--glow-a), transparent 62%); }
.glow-b { width: 60vmax; height: 60vmax; right: -30vmax; top: 10vmax; background: radial-gradient(circle, var(--glow-b), transparent 62%); }
.hero::before {  /* тонкая сетка точек, гаснет к краям */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
  background-image: radial-gradient(circle, var(--line) 1px, transparent 1.2px); background-size: 32px 32px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
}
.hero-grid { display: grid; gap: 40px; align-items: center; }
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.hero-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  display: inline-flex; align-items: center; gap: .5em; padding: .4em .85em; border-radius: 999px;
  font-size: var(--fs-caption); font-weight: 500; color: var(--text-2);
  background: var(--card); border: 1px solid var(--line-2);
}
.hero-title {
  font-family: var(--font-display); font-size: var(--fs-h1); line-height: 1.05; letter-spacing: -.03em; font-weight: 700;
}
.hero-lead { max-width: 34em; color: var(--text-2); font-size: clamp(1.0625rem, 1rem + .35vw, 1.25rem); line-height: 1.55; }
.hero-actions { display: flex; flex-direction: column; gap: 12px; width: 100%; }
.hero-actions .btn { width: 100%; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--text-2); font-size: var(--fs-small); }
.hero-trust li { display: inline-flex; align-items: center; gap: .45em; }
.hero-trust .ico { color: var(--ok); stroke-width: 2.4; width: 1em; height: 1em; }

.hero-visual { position: relative; display: flex; justify-content: center; padding: 8px 0 24px; }
.float-card {
  position: absolute; display: none; align-items: center; gap: .55em; padding: .65em .95em;
  border-radius: 14px; font-size: var(--fs-caption); font-weight: 600; color: var(--text);
  background: var(--glass); border: 1px solid var(--line-2); box-shadow: var(--shadow-card);
  backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  animation: float 6s ease-in-out infinite;
}
.float-card .ico { color: var(--accent); }
/* Карточки привязаны к телефону и лежат над пустыми местами его экрана:
   справа — у шапки чата, слева — над пустой верхней частью переписки (сообщения прижаты к низу) */
.phone-wrap { position: relative; }
.fc-1 { left: -44px; top: 132px; }
.fc-2 { right: -40px; top: 76px; animation-delay: -3s; }
@keyframes float { 50% { transform: translateY(-10px); } }

@media (min-width: 480px) {
  .hero-actions { flex-direction: row; flex-wrap: wrap; width: auto; }
  .hero-actions .btn { width: auto; }
  .float-card { display: inline-flex; }
}
@media (min-width: 1024px) {
  .hero { padding-top: 56px; }
  .hero-grid { grid-template-columns: 7fr 5fr; gap: 48px; min-height: min(680px, calc(100svh - 64px - 140px)); }
  .hero-visual { padding: 0; }
}

/* ===== ТЕЛЕФОН (живой макет бота и приложения) ===== */
.phone {
  --ph-bg: #0e1526; --ph-bubble: #1a2440; --ph-me: #3b5bdb; --ph-text: #e6ebf5; --ph-muted: #8f9bbd;
  position: relative; width: min(300px, 82vw); aspect-ratio: 9 / 18.5; border-radius: var(--r-phone);
  padding: 14px; background: linear-gradient(160deg, #1b2440, #0a0f1d);
  border: 1px solid rgb(255 255 255 / .12); color: var(--ph-text);
  box-shadow: 0 0 0 6px rgb(255 255 255 / .03), 0 40px 80px -30px rgb(0 0 0 / .7), 0 0 120px -40px var(--glow-a);
  font-size: 13px; line-height: 1.45; overflow: hidden;
}
.phone::before {  /* экран */
  content: ""; position: absolute; inset: 8px; border-radius: calc(var(--r-phone) - 8px);
  background: radial-gradient(120% 80% at 50% 0%, #152044 0%, var(--ph-bg) 60%); z-index: 0;
}
.phone > * { position: relative; z-index: 1; }
.phone-notch { width: 34%; height: 18px; margin: -2px auto 10px; border-radius: 0 0 12px 12px; background: #05080f; }
.phone-bar { display: flex; align-items: center; gap: 8px; padding: 0 6px 10px; border-bottom: 1px solid rgb(255 255 255 / .06); }
.phone-bar b { font-family: var(--font-display); font-size: 13px; }
.phone-bar small { color: var(--ph-muted); font-size: 11px; }
.phone-avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #1f2a4d; }
.scene {
  position: absolute; left: 14px; right: 14px; top: 78px; bottom: 44px; z-index: 1;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; padding: 0 4px;
  opacity: 0; transform: translateY(12px) scale(.98); transition: opacity .5s var(--ease), transform .5s var(--ease);
  pointer-events: none;
}
.scene.on { opacity: 1; transform: none; }
.msg { max-width: 86%; padding: 8px 11px; border-radius: 14px; background: var(--ph-bubble); position: relative; }
.msg.me { align-self: flex-end; background: var(--ph-me); border-bottom-right-radius: 4px; }
.msg.bot { border-bottom-left-radius: 4px; }
.msg-time { display: block; text-align: right; font-size: 10px; color: var(--ph-muted); margin-top: 2px; }
.msg-link { display: block; margin-top: 6px; padding: 6px 8px; border-radius: 8px; background: rgb(0 0 0 / .25); font: 11px/1.3 ui-monospace, Consolas, monospace; color: #9fb4ff; }
.kb { display: grid; gap: 6px; }
.kb-btn { display: block; padding: 8px; border-radius: 10px; text-align: center; font-weight: 600; font-size: 12px; background: rgb(255 255 255 / .07); border: 1px solid rgb(255 255 255 / .06); }
.kb-btn.hot { background: #1f9d55; border-color: transparent; }
.scene.on .kb-btn.hot { animation: tap 3.2s ease-in-out .9s both; }
@keyframes tap { 0%, 30% { transform: none; } 38% { transform: scale(.95); filter: brightness(1.25); } 46%, 100% { transform: none; } }
.scene-app { justify-content: center; align-items: center; text-align: center; gap: 10px; }
.app-power {
  width: 112px; height: 112px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 8px;
  background: radial-gradient(circle at 50% 35%, #2fd27a, #14904c); color: #fff;
  box-shadow: 0 0 0 10px rgb(34 197 94 / .12), 0 0 0 22px rgb(34 197 94 / .06), 0 18px 40px -10px rgb(34 197 94 / .6);
}
.app-power .ico { width: 44px; height: 44px; stroke-width: 2.2; }
.scene-app.on .app-power { animation: power 2.4s ease-out both; }
@keyframes power { 0% { transform: scale(.85); filter: grayscale(1) brightness(.7); } 30% { transform: scale(1.04); filter: none; } 45%, 100% { transform: none; } }
.app-state { font-family: var(--font-display); font-size: 17px; }
.app-timer { font-variant-numeric: tabular-nums; color: var(--ph-muted); font-size: 12px; }
.app-server { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 9px 12px; border-radius: 12px; background: rgb(255 255 255 / .06); font-size: 12px; width: 100%; }
.app-server img { border-radius: 3px; }
.app-ping { margin-left: auto; color: #4ade80; font-weight: 600; }
.phone-dots { position: absolute; left: 0; right: 0; bottom: 18px; display: flex; justify-content: center; gap: 6px; }
.phone-dots i { width: 6px; height: 6px; border-radius: 3px; background: rgb(255 255 255 / .2); transition: width .3s var(--ease), background-color .3s; }
.phone-dots i.on { width: 18px; background: #fff; }

/* ===== ПОЛОСА ЦИФР ===== */
.stats {
  display: grid; grid-template-columns: 1fr 1fr; margin-top: clamp(32px, 5vw, 56px);
  border: 1px solid var(--line); border-radius: var(--r-card); background: var(--card); overflow: hidden;
}
.stat { display: flex; flex-direction: column; gap: 4px; padding: 20px 16px; position: relative; }
.stat:nth-child(odd)::after { content: ""; position: absolute; right: 0; top: 18%; bottom: 18%; width: 1px; background: var(--line); }
.stat:nth-child(-n+2)::before { content: ""; position: absolute; left: 12%; right: 12%; bottom: 0; height: 1px; background: var(--line); }
.stat b { font-family: var(--font-display); font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat span { font-size: var(--fs-caption); color: var(--muted); }
@media (min-width: 768px) {
  .stats { grid-template-columns: repeat(4, 1fr); }
  .stat { padding: 26px 28px; }
  .stat::before { display: none; }
  .stat:not(:last-child)::after { content: ""; position: absolute; right: 0; top: 22%; bottom: 22%; width: 1px; background: var(--line); }
}

/* ===== СЕКЦИИ ===== */
.section { padding: var(--section) 0; }
.section-alt { background: var(--bg-alt); }
.eyebrow { font-size: var(--fs-caption); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
[data-theme="light"] .eyebrow { color: color-mix(in srgb, var(--accent) 72%, #000); }
[data-accent="mono"] .eyebrow { color: var(--text-2); }
.section-title { font-family: var(--font-display); font-size: var(--fs-h2); line-height: 1.15; letter-spacing: -.025em; max-width: 18em; margin-bottom: 16px; }
.section-lead { color: var(--text-2); max-width: 36em; margin-bottom: clamp(28px, 4vw, 48px); }
.note-line { font-size: var(--fs-small); color: var(--muted); margin-top: 24px; max-width: 60em; }
.note-line a, .faq a, .how-step a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent); }

/* ===== КАК ЭТО РАБОТАЕТ ===== */
.how-grid { display: grid; gap: 32px; margin-top: clamp(24px, 4vw, 48px); }
.how-steps {
  display: grid; grid-auto-flow: column; grid-auto-columns: 84%; gap: 12px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; margin: 0 calc(-1 * var(--gutter));
  padding-left: var(--gutter); padding-right: var(--gutter); scroll-padding: 0 var(--gutter); scrollbar-width: none;
}
.how-steps::-webkit-scrollbar { display: none; }
.how-step {
  scroll-snap-align: start; padding: 24px; border-radius: var(--r-card);
  background: var(--card); border: 1px solid var(--line); transition: border-color .3s, background-color .3s, opacity .3s;
}
.how-num { align-self: flex-start; display: inline-block; font-family: var(--font-display); font-size: .875rem; font-weight: 700; color: var(--accent); margin-bottom: 14px; padding: .25em .6em; border-radius: 8px; background: var(--accent-soft); }
.how-step h3 { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; margin-bottom: 8px; letter-spacing: -.01em; }
.how-step p { color: var(--text-2); font-size: var(--fs-small); line-height: 1.6; }
.how-visual { display: none; }
@media (min-width: 1024px) {
  .how-grid { grid-template-columns: 7fr 5fr; gap: 64px; align-items: start; }
  .how-steps { grid-auto-flow: row; grid-auto-columns: auto; overflow: visible; margin: 0; padding: 0; gap: 0; }
  .how-step {
    min-height: 62vh; display: flex; flex-direction: column; justify-content: center;
    background: none; border: none; border-left: 2px solid var(--line); border-radius: 0; padding: 0 0 0 40px; opacity: .38;
  }
  .how-step.current { opacity: 1; border-left-color: var(--accent); }
  .how-step h3 { font-size: clamp(1.5rem, 1rem + 1.2vw, 2rem); }
  .how-step p { font-size: var(--fs-body); max-width: 30em; }
  .how-visual { display: flex; justify-content: center; position: sticky; top: calc(50vh - 290px); height: 580px; align-items: center; }
  .phone-sticky { width: 280px; }
}

/* ===== ПРЕИМУЩЕСТВА ===== */
.features { display: grid; gap: 12px; }
.feature {
  position: relative; overflow: hidden; padding: 24px; border-radius: var(--r-card);
  background: var(--card); border: 1px solid var(--line);
  transition: transform .35s var(--ease), border-color .3s, background-color .3s;
}
.feature::before {  /* свет за курсором (site.js ставит --mx/--my) */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(360px circle at var(--mx, 0) var(--my, 0), var(--glow-a), transparent 60%);
}
.tile {
  width: 48px; height: 48px; border-radius: 14px; flex-shrink: 0; margin-bottom: 20px;
  display: flex; align-items: center; justify-content: center; color: var(--accent);
  background: var(--accent-soft); border: 1px solid var(--accent-line);
}
.tile-sm { width: 40px; height: 40px; border-radius: 12px; margin-bottom: 0; }
.feature h3 { font-size: var(--fs-h3); font-weight: 600; margin-bottom: 8px; position: relative; }
.feature p { color: var(--text-2); font-size: var(--fs-small); line-height: 1.6; position: relative; max-width: 34em; }
@media (hover: hover) {
  .feature:hover { transform: translateY(-3px); border-color: var(--accent-line); background: var(--card-hover); }
  .feature:hover::before { opacity: .7; }
}
@media (min-width: 768px) { .features { grid-template-columns: 1fr 1fr; gap: 16px; } .feature { padding: 28px; } }
@media (min-width: 1024px) {
  .features { grid-template-columns: repeat(3, 1fr); }
  .feature-wide { grid-column: span 2; }
  .feature-wide:last-child { grid-column: 1 / -1; }
  .feature-wide .tile { margin-bottom: 28px; }
}

/* ===== СЕРВЕРЫ ===== */
.servers { display: grid; gap: 16px; }
@media (min-width: 768px) { .servers { grid-template-columns: 1fr 1fr; } }
.server {
  padding: 24px; border-radius: var(--r-card); background: var(--card); border: 1px solid var(--line);
  animation: rise .5s var(--ease) both; transition: border-color .3s;
}
@media (hover: hover) { .server:hover { border-color: var(--accent-line); } }
.server.skeleton { min-height: 230px; position: relative; overflow: hidden; animation: none; }
.server.skeleton::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--text) 6%, transparent), transparent);
  animation: shimmer 1.4s ease-in-out infinite;
}
@keyframes shimmer { to { transform: translateX(100%); } }
.server-head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.server-head h3 { font-size: var(--fs-h3); font-weight: 600; }
.server-head span { font-size: var(--fs-caption); color: var(--muted); }
.server-flag { width: 40px; height: 30px; border-radius: 6px; object-fit: cover; }
.server-flag-text { font-size: 1.75rem; line-height: 1; }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 16px 0; margin-bottom: 16px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.metric { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.metric b { font-size: 1.0625rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.metric span { font-size: var(--fs-caption); color: var(--muted); }
.live { display: flex; align-items: center; gap: .45em; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex-shrink: 0; }
.dot.ok { background: var(--ok); animation: ping 2.4s ease-out infinite; }
.dot.bad { background: var(--danger); }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgb(34 197 94 / .55); } 70%, 100% { box-shadow: 0 0 0 8px rgb(34 197 94 / 0); } }
.history { display: flex; gap: 3px; align-items: flex-end; }
.hbar { flex: 1; min-width: 3px; height: 30px; border-radius: 3px; transform-origin: bottom; transition: transform .15s; }
.hbar.good { background: color-mix(in srgb, var(--ok) 70%, transparent); }
.hbar.warn { background: color-mix(in srgb, var(--warn) 75%, transparent); }
.hbar.bad { background: color-mix(in srgb, var(--danger) 75%, transparent); }
.hbar.none { background: var(--line-2); }
@media (hover: hover) { .hbar:hover { transform: scaleY(1.15); } }
.history-legend { display: flex; justify-content: space-between; margin-top: 8px; font-size: .75rem; color: var(--muted); }
.servers-empty { padding: 24px; border-radius: var(--r-card); border: 1px dashed var(--line-2); color: var(--muted); }

/* ===== ТАРИФЫ ===== */
.pricing { display: grid; gap: 16px; align-items: stretch; }
@media (min-width: 768px) { .pricing { grid-template-columns: repeat(3, 1fr); } }
.price-card {
  position: relative; display: flex; flex-direction: column; gap: 6px; padding: 28px 24px 24px;
  border-radius: var(--r-card); background: var(--card); border: 1px solid var(--line);
  transition: transform .35s var(--ease), border-color .3s;
}
.price-card.featured {
  background: var(--glass); border-color: var(--accent-line); box-shadow: var(--shadow-card), 0 30px 80px -40px var(--glow-a);
  backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
}
@media (min-width: 768px) { .price-card.featured { transform: translateY(-12px); } }
.price-badge {
  position: absolute; top: -12px; left: 24px; padding: .3em .75em; border-radius: 999px;
  font-size: .75rem; font-weight: 600; color: #fff; background: var(--grad);
}
.price-title { font-size: 1rem; font-weight: 600; color: var(--text-2); }
.price-sum { font-family: var(--font-display); font-size: clamp(2rem, 1.6rem + 1.4vw, 2.6rem); font-weight: 700; letter-spacing: -.03em; line-height: 1.1; margin-top: 4px; }
.price-note { font-size: var(--fs-small); color: var(--muted); }
.price-save { color: var(--ok); font-weight: 600; }
.price-list { display: grid; gap: 8px; margin: 18px 0 22px; padding-top: 18px; border-top: 1px solid var(--line); font-size: var(--fs-small); color: var(--text-2); }
.price-list li { display: flex; gap: .55em; align-items: flex-start; }
.price-list .ico { color: var(--ok); stroke-width: 2.4; width: 1.05em; height: 1.05em; margin-top: .2em; }
.price-card .btn { margin-top: auto; width: 100%; }
@media (hover: hover) {
  .price-card:hover { border-color: var(--accent-line); }
  .price-card:not(.featured):hover { transform: translateY(-3px); }
}

/* ===== ИНСТРУКЦИИ ===== */
.guide-box { padding: 20px; border-radius: var(--r-card); background: var(--card); border: 1px solid var(--line); }
@media (min-width: 768px) { .guide-box { padding: 36px; } }
.tabs {
  position: relative; display: flex; gap: 2px; padding: 4px; margin-bottom: 28px; border-radius: 14px;
  background: color-mix(in srgb, var(--text) 4%, transparent); border: 1px solid var(--line);
  overflow-x: auto; scrollbar-width: none; max-width: 100%;
}
.tabs::-webkit-scrollbar { display: none; }
@media (min-width: 480px) { .tabs { display: inline-flex; } }
.tabs button { position: relative; z-index: 1; padding: .6em 1em; border-radius: 10px; font-size: .875rem; font-weight: 500; color: var(--muted); white-space: nowrap; transition: color .2s; min-height: 40px; }
.tabs button[aria-selected="true"] { color: var(--text); }
.tab-glider { position: absolute; top: 0; left: 0; z-index: 0; border-radius: 10px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: 0 4px 14px -6px var(--shadow); transition: transform .3s var(--ease), width .3s var(--ease); pointer-events: none; }
.guide-list { display: grid; gap: 28px; }
.guide-list.switch { animation: tab-switch .3s var(--ease) both; }
@keyframes tab-switch { from { opacity: 0; transform: translateX(-10px); } }
.guide-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.guide-step h3 { font-size: var(--fs-h3); font-weight: 600; }
.step-num { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; background: var(--grad); color: #fff; font-size: .8125rem; font-weight: 700; }
.guide-step p { color: var(--text-2); font-size: var(--fs-small); line-height: 1.7; }
.guide-step p + p { margin-top: 6px; }
.apps { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.app {
  display: flex; flex-direction: column; gap: 2px; padding: .7em 1.1em; border-radius: 12px; min-width: 140px;
  background: var(--card); border: 1px solid var(--line-2); font-size: .875rem; transition: border-color .2s, transform .25s var(--ease), background-color .2s;
}
.app b { color: var(--text); font-weight: 600; }
.app span { font-size: .75rem; color: var(--muted); }
@media (hover: hover) { .app:hover { border-color: var(--accent); transform: translateY(-2px); background: var(--card-hover); } }
.hint { font-size: var(--fs-caption); color: var(--muted); margin: 4px 0; display: block; }
.manual { font-size: var(--fs-caption) !important; color: var(--muted) !important; margin-top: 8px; }
.sub-box { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; margin: 8px 0; }
.qr { border-radius: 14px; background: #fff; padding: 6px; }
.sub-main { flex: 1; min-width: 0; }
.copy-row { display: flex; gap: 8px; margin: 8px 0; }
.input { flex: 1; min-width: 0; min-height: 40px; padding: .55em .9em; border-radius: 12px; background: color-mix(in srgb, var(--text) 4%, transparent); border: 1px solid var(--line-2); color: var(--text-2); font: .8125rem ui-monospace, Consolas, monospace; }
.input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.import { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.notice { padding: .8em 1em; border-radius: 12px; font-size: var(--fs-small); color: var(--warn); background: color-mix(in srgb, var(--warn) 9%, transparent); border: 1px solid color-mix(in srgb, var(--warn) 28%, transparent); }
.tips { display: grid; gap: 12px; margin-top: 16px; }
@media (min-width: 768px) { .tips { grid-template-columns: 1fr 1fr; gap: 16px; } }
.tip { display: flex; gap: 16px; align-items: flex-start; padding: 20px; border-radius: var(--r-card); background: var(--card); border: 1px solid var(--line); }
.tip h3 { font-size: 1rem; font-weight: 600; margin-bottom: 4px; }
.tip p { font-size: var(--fs-small); color: var(--text-2); }

/* ===== ВОПРОСЫ ===== */
.faq-grid { display: grid; gap: 28px; }
.faq-side .btn { margin-top: 4px; }
@media (min-width: 1024px) {
  .faq-grid { grid-template-columns: 4fr 7fr; gap: 64px; align-items: start; }
  .faq-side { position: sticky; top: 100px; }
}
.faq { display: grid; gap: 8px; }
details { border-radius: var(--r-field); background: var(--card); border: 1px solid var(--line); transition: border-color .25s, background-color .25s; }
details[open] { border-color: var(--accent-line); background: var(--card-hover); }
summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 56px;
  padding: 14px 20px; cursor: pointer; list-style: none; font-weight: 500; border-radius: var(--r-field);
}
summary::-webkit-details-marker { display: none; }
summary .ico { color: var(--muted); transition: transform .3s var(--ease), color .2s; }
details[open] summary .ico { transform: rotate(90deg); color: var(--accent); }
details > p { padding: 0 20px 18px; font-size: var(--fs-small); color: var(--text-2); line-height: 1.7; }
@media (hover: hover) { details:not([open]):hover { border-color: var(--line-2); } }

/* ===== ФИНАЛЬНЫЙ ПРИЗЫВ ===== */
.cta { padding: 0 0 var(--section); }
.section-alt + .cta { padding-top: var(--section); background: var(--bg); }
.cta-card {
  position: relative; overflow: hidden; isolation: isolate; text-align: center;
  padding: clamp(40px, 7vw, 88px) clamp(20px, 5vw, 64px); border-radius: 28px;
  background: linear-gradient(135deg, #3048c8, #5a2bd6 60%, #2a2f8f); color: #fff;
}
.cta-card::before {  /* медленно плывущий свет */
  content: ""; position: absolute; inset: -40%; z-index: -1;
  background: radial-gradient(circle at 30% 30%, rgb(255 255 255 / .22), transparent 40%), radial-gradient(circle at 75% 70%, rgb(120 200 255 / .25), transparent 40%);
  animation: drift 18s ease-in-out infinite alternate;
}
@keyframes drift { to { transform: translate(8%, -6%) rotate(8deg); } }
.cta-card h2 { font-family: var(--font-display); font-size: var(--fs-h2); letter-spacing: -.025em; margin-bottom: 14px; }
.cta-card p { max-width: 32em; margin: 0 auto 28px; color: rgb(255 255 255 / .86); }

/* Кнопка внизу экрана на телефоне */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 55%, transparent);
  transform: translateY(110%); transition: transform .35s var(--ease);
}
.sticky-cta .btn { width: 100%; }
.sticky-cta.on { transform: none; }
@media (min-width: 768px) { .sticky-cta { display: none; } }

/* ===== ПОДВАЛ ===== */
.footer { border-top: 1px solid var(--line); padding: 56px 0 calc(32px + env(safe-area-inset-bottom)); }
.footer-grid { display: grid; gap: 32px; margin-bottom: 40px; grid-template-columns: 1fr 1fr; }
.footer-brand { grid-column: 1 / -1; }
.footer-support { grid-column: 1 / -1; }
@media (min-width: 1024px) {
  .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1.2fr 1.4fr; }
  .footer-brand, .footer-support { grid-column: auto; }
}
.footer-brand .brand { margin-bottom: 12px; }
.footer-brand p { font-size: var(--fs-small); color: var(--muted); max-width: 280px; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col b { font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.footer-col a, .footer-col .link { font-size: var(--fs-small); color: var(--text-2); text-align: left; padding: 0; transition: color .2s; }
.footer-col a:hover, .footer-col .link:hover { color: var(--text); }
.footer-support ul { display: grid; gap: 8px; font-size: var(--fs-small); color: var(--text-2); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; padding-top: 20px; border-top: 1px solid var(--line); font-size: var(--fs-caption); color: var(--muted); }

/* ===== СООБЩЕНИЕ, ПРОГРЕСС ===== */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 200; transform: translateX(-50%);
  width: max-content; max-width: calc(100vw - 2 * var(--gutter)); padding: 14px 20px; border-radius: var(--r-field);
  background: var(--surface); border: 1px solid var(--line-2); box-shadow: 0 16px 40px rgb(0 0 0 / .45);
  font-size: var(--fs-small); text-align: center; animation: rise .3s var(--ease) both;
}
.toast a { color: var(--accent); text-decoration: underline; }
.progress-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 200; height: 2px; background: var(--grad); transform-origin: left; transform: scaleX(0); pointer-events: none; }

/* ===== ДОКУМЕНТЫ (/terms, /privacy) ===== */
.doc-body { min-height: 100vh; background: var(--bg); }
.doc-body .header-inner { justify-content: space-between; }
.doc { padding-top: 48px; padding-bottom: 64px; }
.doc h1 { font-family: var(--font-display); font-size: clamp(1.6rem, 1.2rem + 2vw, 2.4rem); letter-spacing: -.02em; margin-bottom: 8px; }
.doc h2 { font-size: 1.125rem; font-weight: 600; margin: 32px 0 10px; }
.doc p { color: var(--text-2); font-size: var(--fs-small); line-height: 1.75; margin-bottom: 10px; }
.doc .doc-date { color: var(--muted); font-size: var(--fs-caption); }
.doc-links { margin-top: 48px !important; padding-top: 24px; border-top: 1px solid var(--line); }
.doc a { color: var(--accent); }

.guide-step .hint a, .note-line a, .faq a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

/* Страницы помощи и статуса */
.doc code { font-size: .92em; padding: 1px 6px; border-radius: 6px; background: var(--card); border: 1px solid var(--line); overflow-wrap: anywhere; }
.doc b { color: var(--text); }
.doc-note { margin: 16px 0; padding: 12px 16px; border-left: 3px solid var(--accent); border-radius: 0 12px 12px 0; background: var(--card); color: var(--text-2); font-size: var(--fs-small); line-height: 1.7; }
.doc-list { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 8px; }
.doc-list a { display: block; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); text-decoration: none; }
.doc-list a:hover { background: var(--card-hover); border-color: var(--line-2); }
.status-all { font-weight: 600; color: var(--text) !important; font-size: 1rem !important; padding: 14px 16px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.status-card { margin-top: 20px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.status-card h2 { margin: 0 0 12px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.status-card h2 span { font-size: var(--fs-small); font-weight: 500; color: var(--text-2); }
.status-bars { display: grid; grid-template-columns: repeat(30, 1fr); gap: 3px; height: 32px; }
.status-bars i { border-radius: 3px; background: var(--faint); }
.status-bars .up-ok { background: #2fbf71; }
.status-bars .up-warn { background: #e0a526; }
.status-bars .up-bad { background: #e5484d; }
.mail-form { display: grid; gap: 10px; max-width: 420px; margin: 24px 0; }
.mail-form label { font-size: var(--fs-small); color: var(--text-2); }
.mail-form input { width: 100%; box-sizing: border-box; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--card); color: var(--text); font: inherit; }
.mail-form input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.mail-form #mail-code-row { display: grid; gap: 10px; }
.mail-form #mail-code-row[hidden] { display: none; }
.mail-form .btn { justify-self: start; margin-top: 6px; }

/* ===== ПОЯВЛЕНИЕ ПРИ ПРОКРУТКЕ ===== */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.reveal.visible { opacity: 1; transform: none; }
.hero-copy > * { animation: rise .6s var(--ease) both; }
.hero-copy > :nth-child(2) { animation-delay: .06s; }
.hero-copy > :nth-child(3) { animation-delay: .12s; }
.hero-copy > :nth-child(4) { animation-delay: .18s; }
.hero-copy > :nth-child(5) { animation-delay: .24s; }
.hero-visual { animation: rise .8s .2s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }

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

/* Переключатель языка в шапке — только на широком экране (на телефоне он в подвале) */
.lang-switch { display: none; }
@media (min-width: 900px) { .lang-switch { display: inline-flex; } }

/* ===== ГРАФИКИ ЗА СУТКИ (работа серверов, подключено людей) ===== */
.server.timeline { margin-bottom: 16px; }
.tl-state { display: flex; align-items: center; gap: .55em; margin: -6px 0 18px; font-size: var(--fs-small); color: var(--muted); }
.tl-block + .tl-block { margin-top: 22px; }
.tl-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.tl-top b { font-size: var(--fs-small); font-weight: 600; }
.tl-top span { font-size: var(--fs-caption); color: var(--muted); font-variant-numeric: tabular-nums; }
.tl-chart { position: relative; height: 110px; touch-action: pan-y; cursor: crosshair; }
.tl-chart svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.tl-line { fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.tl-area { opacity: .22; }
.tl-chart.conn .tl-area { opacity: .28; }
.tl-base { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.tl-cross { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line-2); transform: translateX(-.5px); pointer-events: none; }
.tl-dot { position: absolute; width: 10px; height: 10px; border-radius: 50%; transform: translate(-50%, -50%);
  box-shadow: 0 0 0 2px var(--card); pointer-events: none; }
.tl-tip { position: absolute; top: -34px; transform: translateX(-50%); padding: 5px 10px; border-radius: 8px; white-space: nowrap;
  font-size: var(--fs-caption); background: var(--surface); border: 1px solid var(--line-2); color: var(--text); pointer-events: none;
  box-shadow: 0 8px 20px -10px rgb(0 0 0 / .5); }
.tl-axis { display: flex; justify-content: space-between; margin-top: 6px; font-size: .75rem; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ===== Живой чат в телефоне: набор текста, «печатает…», всплывающие кнопки ===== */
.scene .msg, .scene .kb { transition: opacity .28s var(--ease), transform .32s var(--ease); }
.scene .msg.pending, .scene .kb.pending { opacity: 0; transform: translateY(8px) scale(.96); }
.msg.typing::after { content: ""; display: inline-block; width: 2px; height: 1em; margin-left: 2px; vertical-align: -2px;
  background: currentColor; border-radius: 1px; animation: caret .75s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.msg .fade-in { animation: msg-fade .35s var(--ease) both; }
@keyframes msg-fade { from { opacity: 0; transform: translateY(3px); } }
.typing-dots { display: inline-flex; align-self: flex-start; gap: 4px; padding: 11px 13px; animation: msg-fade .25s var(--ease) both; }
.typing-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--ph-muted); animation: tdot 1s ease-in-out infinite; }
.typing-dots i:nth-child(2) { animation-delay: .15s; }
.typing-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes tdot { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-4px); opacity: 1; } }
.scene .kb.pop .kb-btn { animation: kb-pop .4s var(--ease) backwards; }
.scene.on .kb.pop .kb-btn.hot { animation: kb-pop .4s var(--ease) backwards, tap 3.2s ease-in-out .9s both; }
@keyframes kb-pop { from { opacity: 0; transform: translateY(10px) scale(.92); } }
.phone-bar small { transition: color .2s; }
@media (prefers-reduced-motion: reduce) { .msg.typing::after, .typing-dots i { animation: none; } }

/* ===== 3D-телефон: появляется с разворота, покачивается в пространстве, на компьютере поворачивается за мышью,
   по стеклу пробегает блик, плашки парят перед ним на разной глубине, под ним — мягкая тень ===== */
.hero-visual .phone-wrap {
  transform: perspective(1100px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transform-style: preserve-3d; transition: transform .8s cubic-bezier(.2,.7,.2,1);
}
.phone { animation: phone-in 1.1s var(--ease) .25s backwards, phone-sway 10s ease-in-out 1.35s infinite;
  box-shadow: 0 0 0 6px rgb(255 255 255 / .03), inset 0 1px 0 rgb(255 255 255 / .22), inset 0 -3px 8px rgb(0 0 0 / .55),
    inset 3px 0 6px rgb(255 255 255 / .04), 0 40px 80px -30px rgb(0 0 0 / .75), 0 0 120px -40px var(--glow-a); }
@keyframes phone-in { from { opacity: 0; transform: perspective(1200px) rotateY(-30deg) rotateX(16deg) translateY(40px) scale(.9); } }
@keyframes phone-sway {
  0%, 100% { transform: perspective(1200px) rotateY(-8deg) rotateX(5deg) translateY(0); }
  50% { transform: perspective(1200px) rotateY(8deg) rotateX(-3deg) translateY(-12px); }
}
.phone::after {  /* блик на стекле */
  content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: 3; pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, rgb(255 255 255 / .13) 47%, rgb(255 255 255 / .03) 53%, transparent 65%);
  background-size: 300% 100%; background-position: 120% 0; mix-blend-mode: screen; animation: glare 7s ease-in-out 1.6s infinite;
}
@keyframes glare { 0%, 55% { background-position: 120% 0; } 85%, 100% { background-position: -40% 0; } }
.fc-1 { transform: translateZ(80px); }
.fc-2 { transform: translateZ(55px); }
.float-card { animation-name: fc-float; }
@keyframes fc-float { 50% { translate: 0 -12px; } }
/* Кнопки на корпусе */
.hero-visual .phone-wrap::before, .hero-visual .phone-wrap::after {
  content: ""; position: absolute; width: 3px; border-radius: 2px; background: linear-gradient(#2a3557, #121a30);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .18); pointer-events: none; z-index: 0;
}
.hero-visual .phone-wrap::before { right: -3px; top: 150px; height: 56px; }
.hero-visual .phone-wrap::after { left: -3px; top: 120px; height: 84px; }
/* Тень под телефоном «дышит» в такт покачиванию */
.hero-visual::after {
  content: ""; position: absolute; left: 50%; bottom: 0; width: 230px; height: 28px; margin-left: -115px; border-radius: 50%;
  background: radial-gradient(closest-side, rgb(0 0 0 / .55), transparent); filter: blur(6px); pointer-events: none;
  animation: floor-breathe 10s ease-in-out 1.35s infinite;
}
@keyframes floor-breathe { 50% { transform: scale(.82); opacity: .65; } }

/* ===== Экран «Подключено к NSD»: маршрут с пакетами, подключение, пульс щита, живая скорость ===== */
.scene-app.enhanced { gap: 8px; }
.scene-app.enhanced .app-power { width: 96px; height: 96px; margin: 6px 0 4px; position: relative; }
.app-route { display: flex; align-items: center; width: 100%; padding: 0 4px; }
.rt-node { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: rgb(255 255 255 / .06); border: 1px solid rgb(255 255 255 / .1); transition: border-color .4s, box-shadow .4s; }
.rt-node img { width: 20px; height: 20px; }
.rt-nsd { width: 46px; height: 46px; background: radial-gradient(circle at 50% 35%, #24408f, #0d1530); }
.rt-nsd img { width: 28px; height: 28px; }
.rt-line { position: relative; flex: 1; height: 6px; margin: 0 5px; overflow: hidden; }
.rt-line::before { content: ""; position: absolute; left: 0; right: 0; top: 2px; height: 2px; border-radius: 1px; background: rgb(255 255 255 / .12); transition: background .4s; }
.rt-line i { position: absolute; top: 0; left: -8px; width: 6px; height: 6px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 8px #4ade80; opacity: 0; }
.app-route-labels { display: flex; justify-content: space-between; width: 100%; padding: 0 2px; margin-top: -4px; font-size: 10px; color: var(--ph-muted); }
.rt-brand { font-weight: 700; color: var(--ph-text); }
.app-speeds { display: flex; justify-content: space-between; width: 100%; padding: 0 4px; font-size: 11px; color: var(--ph-muted); font-variant-numeric: tabular-nums; }
/* Подключение: кольцо крутится, линия мерцает, кнопка серая */
.scene-app.connecting .app-power { filter: grayscale(.9) brightness(.75); animation: none; }
.scene-app.connecting .app-power::after { content: ""; position: absolute; inset: -8px; border-radius: 50%;
  border: 3px solid transparent; border-top-color: #4ade80; border-right-color: rgb(74 222 128 / .4); animation: ring-spin .8s linear infinite; }
.scene-app.connecting .rt-line::before { background: linear-gradient(90deg, transparent, rgb(74 222 128 / .7), transparent); background-size: 200% 100%; animation: line-scan 1s linear infinite; }
.scene-app.connecting .app-state { color: var(--ph-muted); }
@keyframes ring-spin { to { transform: rotate(1turn); } }
@keyframes line-scan { from { background-position: 100% 0; } to { background-position: -100% 0; } }
/* Подключено: вспышка, зелёный маршрут, пакеты бегут, щит NSD пульсирует */
.scene-app.linked .app-power { animation: power-on .7s var(--ease) both; }
.scene-app.linked .app-power::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #4ade80; animation: burst 1s ease-out both; }
@keyframes power-on { 0% { transform: scale(.9); filter: grayscale(.9) brightness(.75); } 50% { transform: scale(1.08); filter: none; } 100% { transform: none; } }
@keyframes burst { from { transform: scale(1); opacity: .9; } to { transform: scale(1.9); opacity: 0; } }
.scene-app.linked .rt-line::before { background: linear-gradient(90deg, rgb(74 222 128 / .35), rgb(74 222 128 / .75)); }
.scene-app.linked .rt-line i { animation: packet 1.3s linear infinite; }
.scene-app.linked .rt-line i:nth-child(2) { animation-delay: .43s; }
.scene-app.linked .rt-line i:nth-child(3) { animation-delay: .86s; }
@keyframes packet { 0% { left: -8px; opacity: 0; } 15%, 85% { opacity: 1; } 100% { left: 100%; opacity: 0; } }
.scene-app.linked .rt-node { border-color: rgb(74 222 128 / .45); }
.scene-app.linked .rt-nsd { animation: nsd-pulse 1.8s ease-out infinite; }
@keyframes nsd-pulse { 0% { box-shadow: 0 0 0 0 rgb(74 222 128 / .55); } 100% { box-shadow: 0 0 0 14px rgb(74 222 128 / 0); } }
.scene-app.linked .app-state { color: #4ade80; animation: msg-fade .4s var(--ease) both; }
