:root {
  /* ===== ДИЗАЙН-СИСТЕМА. Описание: DESIGN.md, наглядно: design-system.html ===== */

  /* Цвет */
  --bg: #0b0b0c;              /* фон страницы */
  --surface: #131315;         /* крупные блоки на фоне */
  --line: rgba(255,255,255,.09); /* линии и рамки */
  --text: #f2f1ee;            /* основной текст, белая половина заголовка */
  --soft: #b4b2ad;            /* абзацы */
  --muted: #77767b;           /* серая половина заголовка, подписи */
  --dim: #2a2a2d;             /* «спящие» цифры */
  --accent: #ff5a1f;          /* оранжевый: кнопки, знак, акценты */
  --accent-hover: #ff6d37;
  --accent-2: #ffb36b;        /* тёплый свет, только в лучах и чате */
  --error: #e5484d;
  --ok: #4cc38a;              /* «защищено», только блок безопасности; текстом только на тёмном */

  /* Шрифт */
  --sans: "Geist", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, monospace;
  --fs-mega: clamp(64px, 15vw, 230px); /* одно слово-финал */
  --fs-h1: clamp(44px, 8.8vw, 124px); /* верх = белая строка влезает в --max */
  --fs-row: 30px;                      /* названия тарифов в таблице */
  --fs-h2: clamp(34px, 5vw, 72px);
  --fs-num: clamp(48px, 5vw, 72px);    /* номера шагов */
  --fs-price: clamp(26px, 3vw, 40px);
  --fs-h3: 21px;
  --fs-lead: 18px;
  --fs-body: 17px;
  --fs-small: 15px;
  --fs-label: 12px;                    /* mono, капсом */
  --tr-mega: -.065em;  /* трекинг: чем крупнее, тем плотнее */
  --tr-h1: -.055em;
  --tr-h2: -.045em;
  --tr-h3: -.025em;

  /* Отступы */
  --pad: clamp(20px, 4vw, 56px);       /* поля страницы */
  --max: 1240px;                       /* ширина контента */
  --cmp-label: 220px;                  /* колонка пунктов: по самому длинному */
  --sec: clamp(110px, 15vw, 180px);    /* между секциями */
  --s-1: 8px; --s-2: 16px; --s-3: 24px; --s-4: 40px; --s-5: 56px; --s-6: 80px;

  /* Скругления */
  --r-pill: 999px;  /* кнопки, шапка, чипы */
  --r-xl: 28px;     /* большие сцены: полоса, демо */
  --r-l: 18px;      /* окна-макеты */
  --r-m: 12px;      /* поля ввода */
  --r-s: 8px;       /* иконки интеграций */

  /* Движение */
  --ease: cubic-bezier(.2,.8,.2,1);
  --t-fast: .2s;   /* цвет */
  --t-base: .3s;   /* кнопки */
  --t-slow: .5s;   /* строки, знак */
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font: 400 var(--fs-body)/1.55 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
::selection { background: var(--accent); color: #000; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

.mono { font-family: var(--mono); font-size: var(--fs-label); letter-spacing: .04em; text-transform: uppercase; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 200; background: var(--accent); color: #000; padding: 8px 14px; border-radius: 99px; }

/* ---------- знак ---------- */
.mark { fill: currentColor; overflow: visible; }
.mark__slide { transition: transform .6s var(--ease); }
.logo:hover .mark__slide, .reel:hover .mark__slide { transform: translate(-10.4px, 6px); } /* луч встаёт в центр */

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--accent); color: #0b0b0c; font-weight: 500;
  padding: 15px 24px; border-radius: var(--r-pill); border: 0; cursor: pointer;
  transition: transform .3s var(--ease), background .2s;
}
.btn:hover { background: var(--accent-hover); }
.btn:active { transform: scale(.97); }
.btn__arrow { transition: transform .3s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(4px); }
.btn--sm { padding: 9px 18px; font-size: var(--fs-small); }
.btn--full { width: 100%; }
.btn--xl { padding: 20px 32px 20px 22px; font-size: 19px; }
.btn--ghost { background: transparent; color: var(--text); border: 1px solid rgba(255,255,255,.18); }
.btn--ghost:hover { background: rgba(255,255,255,.06); }
.btn__tg { width: 30px; height: 30px; }
.link { color: var(--soft); border-bottom: 1px solid rgba(255,255,255,.2); padding-bottom: 2px; transition: color .2s, border-color .2s; }
.link:hover { color: var(--text); border-color: var(--accent); }

/* ---------- шапка ---------- */
.top {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 50;
  width: min(1180px, calc(100% - 24px));
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 8px 8px 8px 18px; border-radius: 999px;
  background: rgba(20,20,22,.6); border: 1px solid var(--line);
  backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 500; font-size: 15px; letter-spacing: -.01em; }
.logo .mark { width: 20px; height: 20px; color: var(--accent); }
.nav { display: flex; gap: 4px; }
.nav a { padding: 8px 14px; border-radius: 99px; font-size: 15px; color: var(--soft); transition: color .2s, background .2s; }
.nav a:hover { color: var(--text); background: rgba(255,255,255,.06); }

/* ---------- 1. hero ---------- */
.hero { max-width: var(--max); margin: 0 auto; padding: clamp(130px, 17vh, 180px) var(--pad) 0; text-align: center; }
.h1 { font: 500 var(--fs-h1)/.98 var(--sans); letter-spacing: var(--tr-h1); }
.h1 .w { display: block; text-wrap: balance; }
.hero .h1 .w { white-space: nowrap; } /* ровно 2 строки на любом экране */
.nw { white-space: nowrap; }
/* три колонки по центру одной оси: левый абзац (3 строки) и правый блок (подпись + иконки) одной высоты */
.hero__row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--s-4); margin-top: var(--s-4); text-align: left; }
.hero__side { max-width: 300px; color: var(--soft); font-size: 16px; line-height: 1.5; }
.hero__side--r { justify-self: end; display: grid; justify-items: end; gap: 4px; }

/* стопка интеграций: наведённая и все левее неё плавно отъезжают к центру, самая правая стоит.
   li — неподвижная зона наведения (иначе дрожит), двигается только картинка .ic */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.stack { list-style: none; display: flex; }
.stack li { position: relative; width: 44px; height: 44px; cursor: default; }
.stack li + li { margin-left: -22px; }
.stack .ic { position: absolute; inset: 0; border-radius: var(--r-s); background: var(--c); display: grid; place-items: center;
  transition: transform var(--t-slow) var(--ease); }
.stack li:not(:last-child):hover .ic,
.stack li:has(~ li:not(:last-child):hover) .ic { transform: translateX(-26px); }
.stack svg { width: 22px; height: 22px; fill: #fff; }
.stack img { width: 100%; height: 100%; border-radius: inherit; }
.actions { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; justify-content: center; }

/* кинополоса: лучи света, как в референсе со звёздочкой */
.reel {
  position: relative; overflow: hidden; isolation: isolate;
  margin-top: clamp(48px, 7vh, var(--s-6)); aspect-ratio: 21 / 8; border-radius: var(--r-xl);
  background: #070707; border: 1px solid var(--line);
  display: grid; place-items: center;
}
/* наведение (app.js): --k сила эффекта 0→1, --nx/--ny курсор от центра (уже умножены на --k), --x/--y курсор в px.
   Знак наклоняется к курсору, лучи уходят в обратную сторону и приглушаются, под курсором светит «фонарик» */
.beams { position: absolute; inset: 0; z-index: -1; opacity: calc(1 - .7 * var(--k, 0)); }
.lit { opacity: var(--k, 0);
  -webkit-mask-image: radial-gradient(circle 340px at var(--x, 50%) var(--y, 50%), #000, transparent);
          mask-image: radial-gradient(circle 340px at var(--x, 50%) var(--y, 50%), #000, transparent); }
.lit::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle 260px at var(--x, 50%) var(--y, 50%), rgba(255,90,31,.35), transparent); }
.lit .beam { filter: blur(30px); opacity: 1; }
.beam { position: absolute; width: 70%; height: 34%; border-radius: 50%;
  background: linear-gradient(90deg, transparent, var(--accent) 50%, transparent); filter: blur(42px);
  transform: translate(calc(var(--nx, 0) * -200px), calc(var(--ny, 0) * -110px)) rotate(-28deg); }
.reel__mark { transform: perspective(700px) rotateY(calc(var(--nx, 0) * 60deg)) rotateX(calc(var(--ny, 0) * -60deg)); }
.beam--1 { left: -6%; top: 46%; opacity: .75; }
.beam--2 { left: 18%; top: 22%; height: 16%; opacity: .35; background: linear-gradient(90deg, transparent, var(--accent-2), transparent); }
.beam--3 { left: 42%; top: 60%; height: 12%; opacity: .3; }
.reel__mark { width: clamp(90px, 13vw, 170px); height: auto; color: var(--text); }

/* ---------- секции ---------- */
.sec { max-width: var(--max); margin: 0 auto; padding: var(--sec) var(--pad) 0; }
.sec__head { margin-bottom: var(--s-5); }
.kicker { color: var(--accent); margin-bottom: 20px; }
.h2 { font: 500 var(--fs-h2)/1.02 var(--sans); letter-spacing: var(--tr-h2); }

/* ---------- 2. demo ---------- */
.demo__stage {
  display: grid; grid-template-columns: minmax(0, 1fr) 120px minmax(0, 1fr); align-items: center;
  padding: clamp(24px, 4vw, var(--s-5)); border-radius: var(--r-xl); border: 1px solid var(--line);
  background: radial-gradient(600px 300px at 80% 0%, rgba(255,90,31,.10), transparent 70%), var(--surface);
}
.site-card { background: #f4f2ee; color: #121214; border-radius: var(--r-l); overflow: hidden; box-shadow: 0 40px 80px -30px rgba(0,0,0,.8); }
.site-card__bar { display: flex; align-items: center; gap: 6px; padding: 12px 14px; background: #e6e3dd; }
.site-card__bar i { width: 10px; height: 10px; border-radius: 50%; background: #c9c5be; }
.site-card__bar span { margin-left: 10px; color: #7a766f; font: 12px var(--mono); }
.site-card__body { padding: 26px; display: grid; gap: 16px; }
.site-card__eyebrow { color: #8a857c; }
.site-card__title { font: 500 26px/1.1 var(--sans); letter-spacing: -.035em; }
.field { display: grid; gap: 6px; font-size: 14px; color: #5f5b55; }
.field input { background: #fff; border: 1.5px solid #ddd8d0; border-radius: var(--r-m); padding: 13px 14px; color: #121214; outline: none; transition: border-color .2s; }
.field input:focus { border-color: var(--accent); }
.field input.err { border-color: var(--error); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1.5px solid #ddd8d0; background: #fff; color: #121214; border-radius: 99px; padding: 8px 14px; font-size: 14px; cursor: pointer; transition: all .2s; }
.chip.is-on { background: #121214; color: #fff; border-color: #121214; }
.hint { font-size: 13px; color: #8a857c; min-height: 1.4em; }
.hint.err { color: var(--error); }

.demo__wire { width: 100%; height: 60px; overflow: visible; }
.demo__wire path { fill: none; stroke: rgba(255,90,31,.35); stroke-width: 2; stroke-dasharray: 4 6; }
.wire__dot { fill: var(--accent); }

.tg { background: #17212b; border-radius: var(--r-l); overflow: hidden; border: 1px solid rgba(255,255,255,.06); box-shadow: 0 40px 80px -30px rgba(0,0,0,.8); }
.tg__head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: #1e2c3a; }
.tg__ava { width: 38px; height: 38px; border-radius: 50%; background: var(--accent); color: #0b0b0c; display: grid; place-items: center; }
.tg__ava svg { width: 20px; height: 20px; fill: currentColor; }
.tg__name { font-weight: 500; font-size: 15px; }
.tg__sub { color: #6c8aa5; font-size: 13px; }
.tg__logo { width: 26px; height: 26px; margin-left: auto; }
.tg__day { align-self: center; background: rgba(255,255,255,.06); color: #8aa4bb; padding: 3px 10px; border-radius: 99px; font-size: 12px; margin-bottom: 4px; }
.tg__feed { height: 396px; padding: 16px; display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; overflow: hidden; background: #0e1621; }
.msg { align-self: flex-start; max-width: 88%; background: #182533; border-radius: 14px 14px 14px 4px; padding: 10px 14px 8px; font-size: 15px; line-height: 1.45; }
.msg .muted { color: #6c8aa5; }
.msg__title { font-weight: 500; color: var(--accent-2); margin-bottom: 2px; }
.msg__time { text-align: right; color: #6c8aa5; font-size: 11px; margin-top: 2px; }
.msg.is-new { animation: msgIn .55s var(--ease) both; }
@keyframes msgIn { from { opacity: 0; transform: translateY(18px) scale(.96); } }
.tg.ping { animation: ping .6s var(--ease); }
@keyframes ping { 40% { box-shadow: 0 0 0 4px rgba(255,90,31,.5), 0 40px 80px -30px rgba(0,0,0,.8); } }

/* ---------- 3. тарифы: таблица сравнения ---------- */
.cmp { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.cmp col.f { width: var(--cmp-label); }
.cmp th, .cmp td { padding: 11px 16px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line); font-size: var(--fs-small); }
.cmp tbody th { font-weight: 400; color: var(--soft); }
.cmp td { color: var(--text); }
/* шапка с тарифами липнет при прокрутке */
.cmp thead tr > * { position: sticky; top: 76px; z-index: 2; background: var(--bg); vertical-align: top; padding-top: 22px; padding-bottom: 20px; }
.cmp__name { font: 500 var(--fs-row)/1.1 var(--sans); letter-spacing: -.035em; }
.cmp__price { font: 500 var(--fs-price)/1.1 var(--sans); letter-spacing: -.04em; margin-top: var(--s-2); white-space: nowrap; }
.cmp__price i { font-style: normal; font-size: .45em; letter-spacing: 0; color: var(--muted); }
.cmp__price small { display: block; margin-top: 8px; font: 400 var(--fs-label)/1 var(--mono); color: var(--muted); letter-spacing: .02em; }
/* выгодный тариф: колонка-карточка с оранжевой каймой */
.cmp .hit { background: var(--surface); }
.cmp thead th.hit { border-radius: var(--r-l) var(--r-l) 0 0; box-shadow: inset 0 2px 0 var(--accent); }
.cmp tbody tr:last-child .hit { border-radius: 0 0 var(--r-l) var(--r-l); }
/* входит: белым или галочкой; доплата: серым моно; нет: тёмный прочерк */
.cmp .y::before { content: '✓'; color: var(--accent); }
.cmp td.add { color: var(--muted); font-family: var(--mono); font-size: var(--fs-label); letter-spacing: .02em; }
.cmp td.n { color: var(--dim); }
.cmp td.q { color: var(--accent-2); font-family: var(--mono); font-size: var(--fs-label); }
.plans__note { color: var(--soft); font-size: var(--fs-small); padding-top: var(--s-2); }
.plans__note b { color: var(--text); font-weight: 400; }
.demo { margin-top: var(--s-6); }
.demo__lead { margin-bottom: var(--s-4); }

/* ---------- 4. этапы ---------- */
.steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.step { padding: 30px 28px 0 0; }
.step + .step { padding-left: 28px; border-left: 1px solid var(--line); }
.step__n { display: block; font: 500 var(--fs-num)/1 var(--sans); letter-spacing: var(--tr-h1); color: var(--dim); margin-bottom: 36px; }
.step--accent .step__n { color: var(--accent); }
.step h3 { font: 500 var(--fs-h3)/1.2 var(--sans); letter-spacing: var(--tr-h3); margin-bottom: 10px; }
.step p { color: var(--soft); font-size: 16px; }

/* ---------- 5. CTA ---------- */
.cta { max-width: var(--max); margin: 0 auto; padding: clamp(120px, 16vw, 200px) var(--pad) clamp(90px, 12vw, 140px); text-align: center; display: grid; justify-items: center; gap: 28px; }
.cta .kicker { margin: 0; }
.cta__word { position: relative; }
.h-cta { font: 500 var(--fs-mega)/.9 var(--sans); letter-spacing: var(--tr-mega); }
.polaroid {
  position: absolute; right: -16%; top: -62%; width: clamp(110px, 13vw, 180px);
  background: #f2f1ee; padding: 8px 8px 0; transform: rotate(7deg);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.9); transition: transform .5s var(--ease);
}
.polaroid:hover { transform: rotate(2deg) scale(1.04); }
.polaroid__img { aspect-ratio: 1; background: #1c1c1f; display: grid; place-items: center; color: #55545a; }
.polaroid figcaption { color: #121214; font-size: 14px; padding: 8px 2px 10px; text-align: left; }
.lead { max-width: 460px; color: var(--soft); font-size: var(--fs-lead); }

.foot { max-width: var(--max); margin: 0 auto; display: flex; justify-content: space-between; gap: 16px; padding: 22px var(--pad); border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.foot a:hover { color: var(--text); }

/* ---------- вход первого экрана (единственная анимация появления) ---------- */
.js .h1 .w, .js .hero__row, .js .reel { animation: rise 1s var(--ease) both; }
.js .h1 .w:nth-child(2) { animation-delay: .08s; }
.js .hero__row { animation-delay: .18s; }
.js .reel { animation-delay: .28s; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }

/* ---------- адаптив ---------- */
@media (max-width: 960px) {
  .nav { display: none; }
  .hero__row { grid-template-columns: 1fr 1fr; }
  .hero__row .actions { grid-column: 1 / -1; order: 3; }
  .demo__stage { grid-template-columns: 1fr; gap: 0; }
  .demo__wire { height: 70px; width: 60px; justify-self: center; transform: rotate(90deg); }
  .cmp { --cmp-label: 170px; }
  .cmp th, .cmp td { padding-left: 12px; padding-right: 12px; }
  .cmp__name { font-size: 22px; }
  .cmp__price { font-size: 24px; }
  .steps { grid-template-columns: 1fr 1fr; }
  .step:nth-child(3) { border-left: 0; padding-left: 0; }
  .step { padding-bottom: 30px; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  /* 5 колонок не влезают: таблица листается вбок, пункты стоят на месте */
  .cmp-wrap { overflow-x: auto; position: relative; } /* relative: скрытые подписи .sr не вылезают за край */
  .cmp { --cmp-label: 112px; min-width: 560px; }
  .cmp th, .cmp td { padding: 10px 8px; font-size: 13px; }
  .cmp thead tr > * { position: static; padding-top: 14px; }
  .cmp tbody th, .cmp thead td { position: sticky; left: 0; top: auto; z-index: 1; background: var(--bg); padding-left: 0; }
  .cmp__name { font-size: 17px; letter-spacing: -.02em; }
  .cmp__price { font-size: 19px; letter-spacing: -.03em; margin-top: var(--s-1); }
  .cmp__price small { margin-top: 4px; }
  .h1 { font-size: 10.2vw; }
  .hero__row { grid-template-columns: 1fr; gap: 16px; margin-top: 28px; text-align: center; }
  .hero__side, .hero__side--r { max-width: none; justify-self: center; }
  .hero__side--r { justify-items: center; }
  .hero__row .actions { order: 0; margin-top: 8px; }
  .reel { aspect-ratio: 4 / 3; border-radius: 20px; }
  .tg__feed { height: 380px; }
  .steps { grid-template-columns: 1fr; }
  .step, .step + .step { padding: 24px 0; border-left: 0; }
  .step + .step { border-top: 1px solid var(--line); }
  .step__n { margin-bottom: 16px; }
  .cta__word { display: flex; flex-direction: column-reverse; align-items: center; gap: 4px; }
  .polaroid { position: relative; right: auto; top: auto; width: 120px; transform: rotate(6deg); }
  .btn--xl { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
