/* ScanTunnel — лендинг. Без внешних шрифтов и CDN; CSP-совместимо (без inline). */

:root {
  --paper: #f3f1ea;
  --paper-2: #e9e6db;
  --card: #fbfaf6;
  --ink: #111210;
  --ink-2: #3b3d37;
  --mute: #6f7168;
  --line: #d9d5c8;
  --accent: #c8ff3d;        /* «лазер» */
  --accent-rgb: 200 255 61;
  --glow: .45;              /* сила свечения вокруг сцены */
  --hl-bg: linear-gradient(transparent 58%, var(--accent) 58%, var(--accent) 92%, transparent 92%);
  --hl-fg: inherit;
  --ticker-bg: var(--ink);
  --ticker-fg: var(--paper);
  --ticker-dot: var(--accent);
  --show-sun: none;
  --show-moon: block;
  --accent-ink: #111210;    /* текст на акценте */
  --accent-deep: #5a7a00;   /* акцентный текст на светлом */
  --dark: #0c0d0b;
  --dark-2: #151713;
  --dark-line: #2a2d26;
  --dark-ink: #ecebe4;
  --dark-mute: #9a9c92;
  --ok: #2f9e44;
  --chip: #111210;          /* тёмная подложка под лаймовый значок — в обеих темах */
  --no: #e8590c;

  --r-sm: 10px;
  --r: 18px;
  --r-lg: 28px;
  --shadow: 0 1px 0 rgba(17, 18, 16, .04), 0 12px 32px -12px rgba(17, 18, 16, .18);

  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", "Inter", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;

  color-scheme: light;
}

/* тёмная тема: по системе (если пользователь не выбрал светлую) или явно */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0f100e;
    --paper-2: #161814;
    --card: #151713;
    --ink: #e8e7e0;
    --ink-2: #c2c3ba;
    --mute: #8e9087;
    --line: #272a24;
    /* ночью лайм приглушён: фисташковый вместо «кислотного» */
    --accent: #b5cf86;
    --accent-rgb: 181 207 134;
    --accent-deep: #b5cf86;
    --glow: .16;
    --hl-bg: none;
    --hl-fg: var(--accent);
    --ticker-bg: #1b1d18;
    --ticker-fg: var(--ink);
    --ticker-dot: var(--accent);
    --chip: #23271f;
    --dark: #0b0c0a;
    --dark-2: #151713;
    --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 18px 40px -16px rgba(0, 0, 0, .7);
    --show-sun: block;
    --show-moon: none;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
    --paper: #0f100e;
    --paper-2: #161814;
    --card: #151713;
    --ink: #e8e7e0;
    --ink-2: #c2c3ba;
    --mute: #8e9087;
    --line: #272a24;
    /* ночью лайм приглушён: фисташковый вместо «кислотного» */
    --accent: #b5cf86;
    --accent-rgb: 181 207 134;
    --accent-deep: #b5cf86;
    --glow: .16;
    --hl-bg: none;
    --hl-fg: var(--accent);
    --ticker-bg: #1b1d18;
    --ticker-fg: var(--ink);
    --ticker-dot: var(--accent);
    --chip: #23271f;
    --dark: #0b0c0a;
    --dark-2: #151713;
    --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 18px 40px -16px rgba(0, 0, 0, .7);
    --show-sun: block;
    --show-moon: none;
    color-scheme: dark;
}
:root[data-theme="light"] { color-scheme: light; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

h1, h2, h3, h4 { margin: 0; line-height: 1.08; letter-spacing: -.025em; font-weight: 750; }
p { margin: 0; }
a { color: inherit; }
code { font: .9em var(--mono); background: var(--paper-2); padding: .1em .4em; border-radius: 6px; }
.mono { font-family: var(--mono); letter-spacing: 0; }
.dim { opacity: .45; }

.wrap { width: min(1180px, 100% - 40px); margin-inline: auto; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 8px;
}
.skip:focus { top: 12px; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* ---------------------------------------------------------------- кнопки */
.btn {
  --h: 44px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: var(--h); padding: 0 20px;
  border-radius: 999px; border: 1.5px solid transparent;
  font: 600 15px/1 var(--sans); text-decoration: none; white-space: nowrap;
  cursor: pointer;
  transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease, border-color .15s;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--sm { --h: 38px; padding: 0 16px; font-size: 14px; }
.btn--lg { --h: 56px; padding: 0 28px; font-size: 16px; }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--accent { background: var(--accent); color: var(--accent-ink); box-shadow: 0 10px 30px -10px rgb(var(--accent-rgb) / .55); }
.btn--accent:hover { box-shadow: 0 16px 36px -12px rgb(var(--accent-rgb) / .75); }
.btn--accent:hover svg { transform: translateX(3px); }
.btn--accent svg { transition: transform .2s ease; }
.btn--ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn--ghost:hover { border-color: var(--ink); }
.btn__meta { font-size: 13px; font-weight: 500; color: var(--mute); }

/* «Смотреть видео»: раз в 7 с по кнопке пробегает блик, рамка на миг загорается лаймом.
 * Не мигает и не прыгает; после запуска видео (.is-seen) и при reduced-motion — выключено. */
.btn-glint { position: relative; overflow: hidden; isolation: isolate; }
.btn-glint::after {
  content: ""; position: absolute; inset: -2px; z-index: -1; pointer-events: none;
  background: linear-gradient(105deg, transparent 30%, rgb(var(--accent-rgb) / .55) 48%, rgb(var(--accent-rgb) / .2) 56%, transparent 70%);
  transform: translateX(-110%);
  animation: glint 7s cubic-bezier(.4, 0, .2, 1) 2.5s infinite;
}
.btn-glint { animation: glint-ring 7s ease 2.5s infinite; }
.btn-glint svg { color: var(--accent-deep); }
@keyframes glint {
  0% { transform: translateX(-110%); }
  14%, 100% { transform: translateX(110%); }
}
@keyframes glint-ring {
  0%, 100% { border-color: var(--line); box-shadow: 0 0 0 0 rgb(var(--accent-rgb) / 0); }
  8% { border-color: rgb(var(--accent-rgb) / .9); box-shadow: 0 0 0 5px rgb(var(--accent-rgb) / .18); }
  20% { border-color: var(--line); box-shadow: 0 0 0 0 rgb(var(--accent-rgb) / 0); }
}
.btn-glint:hover, .btn-glint.is-seen { animation: none; }
.btn-glint.is-seen::after { animation: none; opacity: 0; }
@media (prefers-reduced-motion: reduce) { .btn-glint, .btn-glint::after { animation: none; } }

/* ---------------------------------------------------------------- видео */
.film-section { padding-bottom: 100px; }
.film {
  position: relative; margin: 0 auto; border-radius: var(--r-lg); overflow: hidden;
  /* целиком в окне под шапкой (≈70 px) с полями: на низких экранах видео чуть уже */
  aspect-ratio: 16 / 9; width: min(100%, calc((100vh - 110px) * 16 / 9)); width: min(100%, calc((100svh - 110px) * 16 / 9)); max-width: 100%; background: #0b0c0a;
  box-shadow: 0 0 0 1px var(--dark-line), 0 40px 100px -40px rgb(0 0 0 / .8), 0 0 120px -40px rgb(var(--accent-rgb) / .25);
}
.film__video { display: block; width: 100%; height: 100%; object-fit: cover; background: #0b0c0a; }
.film__play {
  position: absolute; inset: 0; border: 0; padding: 0; cursor: pointer; color: #111210;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: radial-gradient(closest-side, rgb(11 12 10 / .55), rgb(11 12 10 / .15) 80%, transparent);
}
.film__btn {
  width: clamp(64px, 9vw, 104px); aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center; background: #c8ff3d;
  box-shadow: 0 0 0 10px rgb(200 255 61 / .18), 0 20px 50px -10px rgb(0 0 0 / .6);
  transition: transform .2s ease, box-shadow .2s ease;
}
.film__btn svg { width: 42%; height: 42%; margin-left: 8%; }
.film__dur { padding: 6px 12px; border-radius: 999px; background: rgb(11 12 10 / .75); color: #ecebe4; font-size: 13px; letter-spacing: .04em; }
.film__play:hover .film__btn { transform: scale(1.06); box-shadow: 0 0 0 16px rgb(200 255 61 / .16), 0 20px 50px -10px rgb(0 0 0 / .6); }
/* display: flex выше перебивает атрибут hidden — без этого обложка остаётся поверх видео */
.film__play[hidden] { display: none; }
.film__play:focus-visible { outline: none; }
.film__play:focus-visible .film__btn { outline: 3px solid #ecebe4; outline-offset: 6px; }
.film video::cue { font-family: var(--sans); background: rgb(11 12 10 / .8); }
@media (max-width: 700px) { .film { border-radius: var(--r); } .film-section { padding-bottom: 72px; } }

.tag {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font: 600 11px/1.5 var(--mono); letter-spacing: .02em;
  background: rgb(var(--accent-rgb) / .18); color: var(--accent-deep);
  border: 1px solid rgb(var(--accent-rgb) / .45);
  white-space: nowrap;
}

/* ---------------------------------------------------------------- логотип */
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.logo__mark {
  display: inline-flex; align-items: stretch; gap: 2px;
  width: 34px; height: 34px; padding: 8px 7px; border-radius: 10px;
  background: var(--chip);
}
.logo__mark i { display: block; background: var(--accent); border-radius: 1px; }
.logo__mark i:nth-child(1) { flex: 2; }
.logo__mark i:nth-child(2) { flex: 1; }
.logo__mark i:nth-child(3) { flex: 2.5; }
.logo__mark i:nth-child(4) { flex: 1; }
.logo__mark i:nth-child(5) { flex: 1.5; }
.logo__word { font-weight: 650; font-size: 18px; letter-spacing: -.02em; }
.logo__word b { font-weight: 800; }
.logo--sm .logo__mark { width: 28px; height: 28px; padding: 6px 6px; border-radius: 8px; }
.logo--sm .logo__word { font-size: 16px; }

/* ---------------------------------------------------------------- навигация */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 78%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.nav.is-stuck { border-bottom-color: var(--line); }
.nav__inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.nav__links { display: flex; gap: 28px; margin-left: auto; }
.nav__links a { text-decoration: none; font-size: 15px; color: var(--ink-2); position: relative; }
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .2s ease;
}
.nav__links a:hover { color: var(--ink); }
.nav__links a:hover::after { transform: scaleX(1); }
@media (max-width: 860px) {
  .nav__links { display: none; }
  .nav__inner > .btn { margin-left: auto; }
}

/* ---------------------------------------------------------------- hero */
.hero { position: relative; padding: 64px 0 88px; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 60% at 70% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 70% 40%, #000 20%, transparent 75%);
  opacity: .55;
}
.hero__grid { display: grid; grid-template-columns: 1.12fr 1fr; gap: 56px; align-items: center; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 14px 6px 10px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line);
  font-size: 14px; color: var(--ink-2); margin-bottom: 28px;
}
.eyebrow__dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 4px rgb(var(--accent-rgb) / .3);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgb(var(--accent-rgb) / 0); } }

.hero__title { font-size: clamp(38px, 4.5vw, 60px); letter-spacing: -.045em; line-height: 1.0; }
.hero__muted { color: var(--mute); font-weight: 650; }
.hl { background: var(--hl-bg); color: var(--hl-fg); padding: 0 .06em; margin: 0 -.06em; }
.hl--dark { background: none; color: var(--accent); }

.hero__lead { margin-top: 26px; font-size: 19px; line-height: 1.6; color: var(--ink-2); max-width: 36em; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero__facts {
  list-style: none; padding: 0; margin: 44px 0 0;
  display: flex; flex-wrap: wrap; gap: 14px 36px;
  font-size: 14px; color: var(--mute);
}
.hero__facts b { display: block; font-size: 26px; color: var(--ink); letter-spacing: -.03em; line-height: 1.2; }

/* ---------------------------------------------------------------- сцена в hero */
.stage {
  position: relative;
  display: grid; grid-template-columns: 170px 1fr; grid-template-rows: auto;
  align-items: center; gap: 0;
  min-height: 460px;
}
.stage__glow {
  position: absolute; inset: 10% 5% 10% 20%; z-index: -1;
  background: radial-gradient(closest-side, rgb(var(--accent-rgb) / var(--glow)), transparent);
  filter: blur(30px);
}

.phone {
  position: relative; z-index: 2;
  width: 170px; height: 340px; padding: 9px;
  border-radius: 34px; background: #0b0c0a;
  box-shadow: 0 0 0 1.5px #2b2e27 inset, 0 30px 60px -20px rgba(0, 0, 0, .55);
  transform: rotate(-4deg);
}
.phone__notch {
  position: absolute; top: 14px; left: 50%; width: 56px; height: 16px; margin-left: -28px;
  border-radius: 10px; background: #000; z-index: 3;
}
.phone__screen {
  height: 100%; border-radius: 26px; overflow: hidden;
  background: #121410; color: #ecebe4;
  display: flex; flex-direction: column; padding: 34px 10px 10px;
}
.phone__top { display: flex; justify-content: space-between; font-size: 10px; color: #9a9c92; padding: 0 2px 8px; }
.phone__live { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); }
.phone__live i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: pulse 1.6s infinite; }

.viewfinder {
  position: relative; flex: 1; border-radius: 14px; overflow: hidden;
  background:
    radial-gradient(120% 80% at 50% 40%, #3a3d33 0%, #1b1d18 70%);
  display: grid; place-items: center;
}
.viewfinder__code {
  width: 78%; padding: 10px 8px 6px; border-radius: 6px; background: #f6f4ec;
  transform: rotate(2deg);
  transition: opacity .25s ease, transform .25s ease;
}
.viewfinder__code.is-swap { opacity: 0; transform: rotate(2deg) scale(.92); }
.viewfinder__code svg { display: block; width: 100%; height: 64px; }
.viewfinder__code svg.is-qr { width: 64px; height: 64px; margin: 0 auto 4px; }
.viewfinder__code small { display: block; text-align: center; font: 600 8px/1.4 var(--mono); color: #111; letter-spacing: .08em; }
.viewfinder__laser {
  position: absolute; left: 8%; right: 8%; height: 2px; top: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px 2px rgb(var(--accent-rgb) / .8);
  animation: laser 1.8s ease-in-out infinite alternate;
}
@keyframes laser { from { transform: translateY(-46px); } to { transform: translateY(46px); } }
.viewfinder.is-hit .viewfinder__laser { animation-play-state: paused; background: #fff; }
.viewfinder.is-hit { box-shadow: 0 0 0 2px var(--accent) inset; }
.corner { position: absolute; width: 18px; height: 18px; border: 2.5px solid var(--accent); z-index: 2; }
.corner--tl { top: 10px; left: 10px; border-right: 0; border-bottom: 0; border-radius: 6px 0 0 0; }
.corner--tr { top: 10px; right: 10px; border-left: 0; border-bottom: 0; border-radius: 0 6px 0 0; }
.corner--bl { bottom: 10px; left: 10px; border-right: 0; border-top: 0; border-radius: 0 0 0 6px; }
.corner--br { bottom: 10px; right: 10px; border-left: 0; border-top: 0; border-radius: 0 0 6px 0; }

.phone__caption { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 10px 2px 8px; font-size: 10.5px; min-height: 36px; }
.phone__caption .mono { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.phone__caption .tag { font-size: 9px; padding: 1px 6px; color: var(--accent); background: rgb(var(--accent-rgb) / .12); }
.phone__btn {
  text-align: center; font-size: 10.5px; font-weight: 700; padding: 9px 4px; border-radius: 999px; white-space: nowrap;
  background: var(--accent); color: #111;
  transition: transform .15s ease;
}
.phone__btn.is-press { transform: scale(.94); }

.tunnel {
  position: absolute; z-index: 1; left: 150px; top: 50%; width: 120px; height: 60px; margin-top: -40px;
}
.tunnel__path { width: 100%; height: 100%; overflow: visible; }
.tunnel__path path {
  fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 3 6; opacity: .35;
  vector-effect: non-scaling-stroke;
  animation: dash 1s linear infinite;
}
@keyframes dash { to { stroke-dashoffset: -9; } }
.tunnel__label { position: absolute; left: 50%; top: 100%; transform: translateX(-50%); font-size: 11px; color: var(--mute); white-space: nowrap; }
.packet {
  position: absolute; left: 0; top: 50%;
  padding: 3px 8px; border-radius: 999px; font-size: 10px;
  background: var(--ink); color: var(--accent);
  box-shadow: 0 6px 18px -6px rgba(0, 0, 0, .5);
  opacity: 0; transform: translate(-10%, -50%);
  white-space: nowrap; pointer-events: none;
}
.packet.is-fly { animation: fly .9s cubic-bezier(.55, .1, .35, 1) forwards; }
@keyframes fly {
  0%   { opacity: 0; transform: translate(-10%, -50%) scale(.8); }
  15%  { opacity: 1; }
  50%  { transform: translate(60%, -140%) scale(1); }
  85%  { opacity: 1; }
  100% { opacity: 0; transform: translate(130%, -50%) scale(.85); }
}

.desk {
  grid-column: 2; margin-left: 76px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow); overflow: hidden;
  transform: rotate(1.5deg);
}
.desk__bar {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-bottom: 1px solid var(--line); background: var(--paper-2);
}
.dots { display: inline-flex; gap: 5px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.desk__url {
  flex: 1; min-width: 0; font-size: 11px; color: var(--mute);
  background: var(--card); border-radius: 6px; padding: 3px 8px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.desk__frag { color: var(--accent-deep); font-weight: 600; }
.desk__body { padding: 14px; }
.desk__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.desk__stats > div { background: var(--paper-2); border-radius: 10px; padding: 8px 10px; }
.desk__stats b { display: flex; align-items: center; gap: 6px; font-size: 20px; letter-spacing: -.03em; line-height: 1.2; font-variant-numeric: tabular-nums; }
.desk__stats span { font-size: 11px; color: var(--mute); }
.desk__phones i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.desk__list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; min-height: 176px; align-content: start; }
.desk__list li {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--card);
  font-size: 12.5px;
}
.desk__list li .mono { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.desk__list li.is-new { animation: rowIn .6s cubic-bezier(.2, .9, .3, 1.2); border-color: var(--accent); box-shadow: 0 0 0 3px rgb(var(--accent-rgb) / .3); }
.desk__list li.is-settle { transition: border-color 1.2s ease, box-shadow 1.2s ease; }
@keyframes rowIn { from { opacity: 0; transform: translateY(-10px) scale(.97); } }

@media (max-width: 1020px) {
  .hero__grid { grid-template-columns: 1fr; gap: 40px; }
  .stage { max-width: 580px; margin-inline: auto; width: 100%; }
}
@media (max-width: 560px) {
  .hero { padding: 36px 0 56px; }
  .stage { grid-template-columns: 1fr; min-height: 0; justify-items: center; }
  .phone { transform: rotate(-3deg) scale(.92); }
  .tunnel { display: none; }
  .desk { grid-column: 1; margin: -60px 0 0; width: 100%; transform: none; }
}

/* ---------------------------------------------------------------- бегущая строка */
.ticker {
  background: var(--ticker-bg); color: var(--ticker-fg); overflow: hidden;
  border-block: 1px solid var(--line);
  transform: rotate(-1deg); margin: 0 -20px;
}
.ticker__track {
  display: flex; width: max-content;
  animation: marquee 38s linear infinite;
}
.ticker span {
  display: inline-flex; align-items: center; gap: 22px; padding: 16px 0 16px 22px;
  font-weight: 650; font-size: 18px; letter-spacing: -.01em; white-space: nowrap;
}
.ticker span::after { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--ticker-dot); transform: rotate(45deg); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------------------------------------------------------------- секции */
.section { padding: 120px 0; }
.section--tint { background: var(--paper-2); }
.section--dark {
  background: var(--dark); color: var(--dark-ink);
  --line: var(--dark-line); --mute: var(--dark-mute); --card: var(--dark-2); --ink: var(--dark-ink);
  position: relative; overflow: hidden;
}
.section--dark::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(60% 50% at 85% 0%, rgb(var(--accent-rgb) / .12), transparent 70%);
}
.section__head { max-width: 760px; margin-bottom: 56px; }
.section__head h2 { font-size: clamp(32px, 4.4vw, 54px); letter-spacing: -.04em; }
.section__lead { margin-top: 18px; font-size: 18px; color: var(--mute); max-width: 40em; }
.kicker {
  font: 600 13px/1 var(--mono); text-transform: uppercase; letter-spacing: .12em;
  color: var(--mute); margin-bottom: 18px;
}
@media (max-width: 700px) { .section { padding: 80px 0; } .section__head { margin-bottom: 36px; } }

/* появление при прокрутке — только если JS работает (класс js на <html>) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .2, 1); }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
}

/* ---------------------------------------------------------------- шаги */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: s; }
.step {
  position: relative; padding: 28px; border-radius: var(--r-lg);
  background: var(--card); border: 1px solid var(--line);
}
.step:nth-child(2) { transition-delay: .08s; }
.step:nth-child(3) { transition-delay: .16s; }
.step__num {
  position: absolute; top: 42px; left: 42px; z-index: 1;
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  font: 700 15px/1 var(--mono); background: var(--chip); color: var(--accent);
}
.step h3 { font-size: 22px; margin: 26px 0 10px; }
.step p { color: var(--mute); font-size: 16px; }
.step__art {
  height: 150px; border-radius: var(--r); background: var(--paper-2);
  display: grid; place-items: center; overflow: hidden; position: relative;
}
.mini-window {
  width: 150px; height: 104px; border-radius: 10px; background: var(--card); border: 1px solid var(--line);
  display: grid; place-items: center; box-shadow: var(--shadow);
}
.mini-qr { width: 64px; height: 64px; }
.mini-qr svg { display: block; width: 100%; height: 100%; }
.mini-phone {
  width: 62px; height: 112px; border-radius: 14px; background: #0b0c0a; position: relative;
  transform: rotate(-8deg); box-shadow: var(--shadow);
}
.mini-phone::before { content: ""; position: absolute; inset: 6px; border-radius: 9px; background: #1d2019; }
.mini-phone__beam {
  position: absolute; left: 50%; top: -34px; width: 90px; height: 50px; margin-left: -45px;
  background: linear-gradient(to top, rgb(var(--accent-rgb) / .55), transparent);
  clip-path: polygon(35% 100%, 65% 100%, 100% 0, 0 0);
  animation: beam 2.4s ease-in-out infinite;
}
@keyframes beam { 50% { opacity: .35; } }
.mini-rows { width: 170px; display: grid; gap: 7px; }
.mini-rows i {
  display: block; height: 18px; border-radius: 6px; background: var(--card); border: 1px solid var(--line);
  position: relative;
}
.mini-rows i::before {
  content: ""; position: absolute; left: 8px; top: 6px; height: 5px; border-radius: 3px; background: var(--ink); opacity: .25;
  width: var(--w, 60%);
}
.mini-rows i:first-child { border-color: var(--accent); box-shadow: 0 0 0 3px rgb(var(--accent-rgb) / .3); animation: rowIn 2.4s ease infinite; }
.mini-rows i:nth-child(1) { --w: 70%; }
.mini-rows i:nth-child(2) { --w: 50%; }
.mini-rows i:nth-child(3) { --w: 64%; }
.mini-rows i:nth-child(4) { --w: 42%; }

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

/* ---------------------------------------------------------------- шифрование */
.cipher {
  display: grid; grid-template-columns: 1fr 1.25fr 1fr; gap: 14px; align-items: end;
  margin-bottom: 36px;
}
.cipher__who { font-size: 14px; color: var(--dark-mute); margin-bottom: 10px; }
.cipher__box {
  display: flex; flex-direction: column; gap: 6px;
  padding: 20px 22px; border-radius: var(--r); border: 1px solid var(--dark-line); background: var(--dark-2);
  min-height: 96px; justify-content: center;
}
.cipher__box .mono { font-size: 20px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cipher__box--plain .mono { color: var(--dark-ink); }
.cipher__box--noise { border-style: dashed; border-color: rgb(var(--accent-rgb) / .4); background: repeating-linear-gradient(135deg, rgb(var(--accent-rgb) / .04) 0 8px, transparent 8px 16px), var(--dark-2); }
.cipher__noise { color: var(--accent); font-size: 15px !important; }
.cipher__meta { font-size: 12px; color: var(--dark-mute); font-family: var(--mono); }
.cipher__col--mid { position: relative; }
.cipher__col--mid::before, .cipher__col--mid::after {
  content: "→"; position: absolute; bottom: 34px; font-size: 20px; color: var(--accent);
}
.cipher__col--mid::before { left: -14px; transform: translateX(-50%); }
.cipher__col--mid::after { right: -14px; transform: translateX(50%); }
@media (max-width: 800px) {
  .cipher { grid-template-columns: 1fr; }
  .cipher__col--mid::before, .cipher__col--mid::after { content: none; }
}

.sec-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.sec-card { padding: 26px; border-radius: var(--r); background: var(--dark-2); border: 1px solid var(--dark-line); }
.sec-card__code {
  font-size: 12.5px; padding: 10px 12px; border-radius: 10px; background: #070806; color: var(--dark-mute);
  border: 1px solid var(--dark-line); margin-bottom: 20px; overflow-x: auto; white-space: nowrap;
}
.sec-card .accent { color: var(--accent); }
.sec-card h3 { font-size: 20px; margin-bottom: 10px; }
.sec-card p { color: var(--dark-mute); font-size: 15.5px; }
.sec-card code { background: #070806; color: var(--accent); }
@media (max-width: 900px) { .sec-grid { grid-template-columns: 1fr; } }

.deep {
  margin-top: 8px; border-radius: var(--r); border: 1px solid var(--dark-line); background: var(--dark-2);
}
.deep summary {
  cursor: pointer; list-style: none; padding: 22px 26px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.deep summary::-webkit-details-marker { display: none; }
.deep summary > span { display: grid; gap: 2px; font-weight: 650; font-size: 18px; }
.deep summary small { font-weight: 400; font-size: 14px; color: var(--dark-mute); }
.deep summary::after {
  content: "+"; flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  font: 400 24px/1 var(--sans); color: #111; background: var(--accent); transition: transform .25s ease;
}
.deep[open] summary::after { transform: rotate(45deg); }
.deep__body { padding: 0 26px 26px; display: grid; gap: 16px; }
.deep .sec-card { background: #0d0e0c; }
.threat { padding: 24px 26px; border-radius: var(--r); border: 1px dashed var(--dark-line); }
.threat__title { font-size: 18px; margin-bottom: 18px; }
.threat__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.threat h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 12px; font-family: var(--mono); }
.threat .ok { color: var(--accent); }
.threat .no { color: #f0a070; }
.threat ul { margin: 0; padding-left: 18px; color: var(--dark-mute); font-size: 15.5px; display: grid; gap: 8px; }
@media (max-width: 700px) { .deep summary, .deep__body { padding-inline: 18px; } }
@media (max-width: 700px) { .threat__grid { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- bento */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card {
  padding: 28px; border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card--wide { grid-column: span 3; }
.card--span2 { grid-column: span 2; }
.card h3 { font-size: 21px; margin-bottom: 10px; }
.card p { color: var(--mute); font-size: 16px; }
.card__icon {
  display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 22px;
  border-radius: 14px; background: var(--chip); color: var(--accent);
}
.card__icon svg { width: 24px; height: 24px; }
.card--accent { background: var(--accent); border-color: var(--accent); color: #111; }
.card--accent p { color: #2c3a00; font-size: 17px; max-width: 42em; }
.card--accent h3 { font-size: 28px; }
.card__row { display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.modes { display: inline-flex; padding: 5px; border-radius: 999px; background: rgba(17, 18, 16, .1); flex: none; }
.modes__opt { padding: 10px 18px; border-radius: 999px; font-weight: 650; font-size: 15px; transition: background-color .3s ease, color .3s ease; }
.modes__opt.is-on { background: #111; color: var(--accent); }
.formats { list-style: none; padding: 0; margin: 18px 0 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.formats li {
  font: 600 14px/1 var(--mono); padding: 10px 14px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--paper);
  transition: background-color .2s ease, border-color .2s ease;
}
.formats li:hover { background: var(--accent); border-color: var(--accent); color: #111; }
.card__foot { font-size: 14.5px !important; }
@media (max-width: 900px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .card--wide, .card--span2 { grid-column: span 2; }
  .card__row { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 600px) {
  .bento { grid-template-columns: 1fr; }
  .card--wide, .card--span2 { grid-column: auto; }
}

/* ---------------------------------------------------------------- кейсы */
.cases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.case { background: var(--paper-2); padding: 32px 28px; transition: background-color .2s ease; }
.case:hover { background: var(--card); }
.case__emoji { font-size: 30px; display: block; margin-bottom: 18px; }
.case h3 { font-size: 20px; margin-bottom: 8px; }
.case p { color: var(--mute); font-size: 15.5px; }
@media (max-width: 900px) { .cases { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .cases { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- self-host */
.selfhost { display: grid; grid-template-columns: 1fr 1.05fr; gap: 64px; align-items: center; }
.selfhost h2 { font-size: clamp(30px, 3.8vw, 46px); letter-spacing: -.04em; }
.checks { list-style: none; padding: 0; margin: 28px 0 32px; display: grid; gap: 10px; }
.checks li { display: flex; gap: 12px; align-items: center; }
.checks li::before {
  content: "✓"; flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent); color: #111; font-size: 13px; font-weight: 800;
}
.term { border-radius: var(--r); background: #0b0c0a; color: #d7d8cf; overflow: hidden; box-shadow: var(--shadow); border: 1px solid #22251f; }
.term__bar { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: #151713; font-size: 12px; color: #8d8f86; }
.term__bar .dots i { background: #2c2f28; }
.term__body { margin: 0; padding: 22px 24px 26px; font-size: 14px; line-height: 1.75; overflow-x: auto; }
.term .c { color: #6f7168; }
.term .p { color: var(--accent); }
.term .o { color: #8fd18f; }
.cursor { display: inline-block; width: 8px; height: 1.1em; vertical-align: -3px; margin-left: 4px; background: var(--accent); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (max-width: 900px) { .selfhost { grid-template-columns: 1fr; gap: 40px; } }

/* ---------------------------------------------------------------- FAQ */
.faq { display: grid; grid-template-columns: .8fr 1.2fr; gap: 56px; align-items: start; }
.faq .section__head { position: sticky; top: 100px; }
.faq__list { display: grid; gap: 10px; }
.qa { border-radius: var(--r); background: var(--card); border: 1px solid var(--line); transition: border-color .2s ease; }
.qa[open] { border-color: var(--ink); }
.qa summary {
  cursor: pointer; list-style: none; padding: 20px 24px; font-weight: 650; font-size: 17px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: ""; flex: none; width: 28px; height: 28px; border-radius: 50%;
  background: var(--paper-2) center / 12px no-repeat;
  background-image: linear-gradient(currentColor, currentColor), linear-gradient(currentColor, currentColor);
  background-size: 12px 2px, 2px 12px;
  transition: transform .25s ease, background-color .2s ease;
}
.qa[open] summary::after { transform: rotate(45deg); background-color: var(--accent); color: #111; }
.qa p { padding: 0 24px 22px; color: var(--mute); }
@media (max-width: 900px) { .faq { grid-template-columns: 1fr; gap: 0; } .faq .section__head { position: static; } }

/* ---------------------------------------------------------------- финальный CTA */
.final { padding: 40px 0 120px; }
.final__inner {
  position: relative; overflow: hidden; text-align: center;
  padding: 96px 32px; border-radius: 40px; background: var(--dark); color: var(--dark-ink);
}
.final__bars {
  position: absolute; inset: 0; display: flex; align-items: stretch; justify-content: center; gap: 0;
  opacity: .09; pointer-events: none;
}
.final__bars i { display: block; background: var(--accent); }
.final h2 { position: relative; font-size: clamp(34px, 5.4vw, 66px); letter-spacing: -.045em; }
.final p { position: relative; margin: 20px auto 36px; font-size: 19px; color: var(--dark-mute); max-width: 32em; }
.final .btn { position: relative; }
@media (max-width: 600px) { .final__inner { padding: 64px 20px; border-radius: 28px; } }

/* ---------------------------------------------------------------- footer */
.footer { border-top: 1px solid var(--line); padding: 32px 0 48px; font-size: 14px; color: var(--mute); }
.footer__inner { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.footer__inner p { flex: 1; min-width: 200px; }
.footer nav { display: flex; gap: 22px; }
.footer nav a { text-decoration: none; }
.footer nav a:hover { color: var(--ink); }
.footer .logo__word { color: var(--ink); }

/* элементы сетки с моноширинным nowrap-содержимым не должны распирать колонки */
.cipher__col, .sec-card, .step, .card, .case, .selfhost > *, .faq > *, .hero__grid > * { min-width: 0; }

/* ---------------------------------------------------------------- тема и язык */
.nav__tools { display: flex; align-items: center; gap: 10px; }
.nav__links + .nav__tools { margin-left: 8px; }
@media (max-width: 860px) { .nav__tools { margin-left: auto; } .nav__inner > .btn { margin-left: 0; } }
.langs { display: inline-flex; padding: 3px; border-radius: 999px; border: 1px solid var(--line); }
.langs a {
  padding: 5px 9px; border-radius: 999px; font: 600 12px/1 var(--mono); letter-spacing: .04em;
  text-decoration: none; color: var(--mute);
}
.langs a:hover { color: var(--ink); }
.langs a[aria-current] { background: var(--ink); color: var(--paper); }
.theme-btn {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer;
  transition: border-color .15s ease, transform .3s ease;
}
.theme-btn:hover { border-color: var(--ink); transform: rotate(-20deg); }
.theme-btn svg { width: 18px; height: 18px; }
.theme-btn__sun { display: var(--show-sun); }
.theme-btn__moon { display: var(--show-moon); }
@media (max-width: 480px) {
  .nav__cta { display: none; }
  .logo__word { font-size: 16px; }
}

/* ---------------------------------------------------------------- «скоро» */
.soon-badge {
  display: inline-block; padding: 3px 8px; border-radius: 999px; margin-left: 2px;
  font: 700 11px/1.2 var(--mono); text-transform: uppercase; letter-spacing: .08em;
  background: #111; color: var(--accent);
}
.soon-badge--dark { background: var(--accent); color: #111; }
.final__badge {
  position: relative; display: inline-flex; align-items: center; gap: 10px;
  margin: 0 auto 22px !important; padding: 6px 14px 6px 10px; border-radius: 999px;
  border: 1px solid var(--dark-line); font: 600 13px/1.4 var(--mono) !important; text-transform: uppercase;
  letter-spacing: .1em; color: var(--accent) !important;
}
.tg-link { color: var(--ink); font-weight: 650; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }

.toast {
  position: fixed; z-index: 80; left: 50%; bottom: 24px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center;
  width: max-content; max-width: calc(100% - 32px);
  padding: 14px 18px; border-radius: 16px; background: #111210; color: #ecebe4;
  box-shadow: 0 20px 50px -12px rgba(0, 0, 0, .5); font-size: 15px;
  animation: toastIn .35s cubic-bezier(.2, .9, .3, 1.2);
}
.toast[hidden] { display: none; }
.toast__link { color: #111; background: var(--accent); padding: 6px 12px; border-radius: 999px; font-weight: 700; text-decoration: none; white-space: nowrap; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 12px); } }

/* предложение другой локали по языку браузера (не редирект) */
.suggest {
  background: var(--chip); color: #ecebe4; font-size: 14px;
}
.suggest__inner { display: flex; align-items: center; gap: 14px; min-height: 44px; }
.suggest__inner span { flex: 1; }
.suggest a { color: var(--accent); font-weight: 700; }
.suggest button { background: none; border: 0; color: inherit; font-size: 20px; line-height: 1; cursor: pointer; padding: 4px 8px; opacity: .7; }
.suggest button:hover { opacity: 1; }

.footer__langs { display: inline-flex; gap: 10px; }
.footer__langs a[aria-current] { color: var(--ink); font-weight: 700; }
