@import url("brand.css?v=20261002-brand");

/* Свой ритм — общая система стилей сайта.
   Спокойная типографика, много воздуха, один акцентный цвет.
   Тёмная тема — не инверсия, а отдельный набор значений. */

:root {
  --bg: #ffffff;
  --bg-alt: #f8f4ee;
  --bg-card: #ffffff;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --line: rgba(0, 0, 0, .10);
  --accent: #1f5f5b;   /* цвет логотипа */
  --accent-text: #ffffff;
  --shadow: 0 4px 24px rgba(0, 0, 0, .06);
  --nav-bg: rgba(255, 255, 255, .72);
  --radius: 18px;
  --maxw: 1000px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-alt: #0b0b0d;
    --bg-card: #141416;
    --text: #f5f5f7;
    --muted: #8e8e93;
    --line: rgba(255, 255, 255, .12);
    --accent: #6cc0b5;   /* тот же зелёный, светлее — читается на чёрном */
    --accent-text: #0c2422;
    --shadow: 0 4px 30px rgba(0, 0, 0, .5);
    --nav-bg: rgba(10, 10, 12, .72);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--brand-font-sans);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.narrow { max-width: 720px; }

/* ── Навигация ─────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-in {
  max-width: var(--maxw); margin: 0 auto; padding: 0 22px;
  height: 52px; display: flex; align-items: center; gap: 28px;
}
.nav-brand { font-weight: 600; letter-spacing: -.01em; color: var(--text);
  display: inline-flex; align-items: center; gap: 9px; }
.nav-brand img { display: block; width: 26px; height: 26px; }
.nav-brand:hover { text-decoration: none; }
.nav-links { display: flex; gap: 26px; margin-left: auto; align-items: center; }
.nav-links a { color: var(--text); font-size: 14px; opacity: .85; }
.nav-links a:hover { opacity: 1; text-decoration: none; }
@media (max-width: 680px) {
  .nav-links .hide-sm { display: none; }
  .nav-in { gap: 16px; }
}

/* ── Типографика секций ────────────────────────────────── */
section { padding: 104px 0; }
@media (max-width: 680px) { section { padding: 72px 0; } }

.alt { background: var(--bg-alt); }

h1, h2, h3 { letter-spacing: -.022em; line-height: 1.07; margin: 0; }
h1 { font-size: clamp(42px, 8vw, 80px); font-weight: 600; }
h2 { font-size: clamp(30px, 4.6vw, 48px); font-weight: 600; }
h3 { font-size: 21px; font-weight: 600; line-height: 1.25; }

.lead { font-size: clamp(19px, 2.4vw, 26px); line-height: 1.38; color: var(--muted); font-weight: 400; }
/* Надзаголовок раздела. 15px терялся под заголовком в 48px — соотношение
   было больше трёх к одному, и подпись читалась как сноска. */
.eyebrow { font-size: clamp(17px, 1.8vw, 21px); font-weight: 600; color: var(--accent);
  margin: 0 0 16px; letter-spacing: 0; }
.center { text-align: center; }
p { margin: 18px 0; }
.muted { color: var(--muted); }
.small { font-size: 14px; line-height: 1.5; }

/* ── Кнопки ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 26px; border-radius: 980px;
  background: var(--accent); color: var(--accent-text);
  font-size: 16px; font-weight: 500; border: 0; cursor: pointer;
  transition: transform .15s ease, opacity .15s ease;
}
.btn:hover { text-decoration: none; opacity: .9; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-top: 34px; }

/* ── Экран-обещание ────────────────────────────────────── */
.hero { padding: 92px 0 0; text-align: center; overflow: hidden; }
.hero .lead { max-width: 700px; margin: 22px auto 0; }

/* ── Телефон ───────────────────────────────────────────── */
.phone {
  width: 300px; margin: 64px auto 0; padding: 11px;
  border-radius: 46px; background: linear-gradient(160deg, #2a2a2e, #0e0e10);
  box-shadow: 0 30px 70px rgba(0, 0, 0, .28);
}
.phone-screen {
  border-radius: 36px; background: #d9e6d4; padding: 16px 12px 22px;
  min-height: 460px; display: flex; flex-direction: column; gap: 9px;
  /* Экран живёт внутри отцентрованного блока, а переписка центрированной
     не бывает — выравнивание задаём здесь явно. */
  text-align: left;
}
@media (prefers-color-scheme: dark) { .phone-screen { background: #16211a; } }
.bubble {
  align-self: flex-start; max-width: 88%; padding: 9px 13px; border-radius: 15px;
  font-size: 13.5px; line-height: 1.42; white-space: pre-line;
  background: #fff; color: #1d1d1f; box-shadow: 0 1px 2px rgba(0,0,0,.12);
}
.bubble.me { align-self: flex-end; background: #e6ffd9; }
@media (prefers-color-scheme: dark) {
  .bubble { background: #22262a; color: #e9e9ea; }
  .bubble.me { background: #2b4a35; }
}
.voice-badge {
  display: inline-block; margin: 18px auto 0; padding: 7px 15px;
  border-radius: 999px; font-size: 14px; line-height: 1.4;
  background: rgba(31, 95, 91, .09); color: var(--accent);
}
@media (prefers-color-scheme: dark) {
  .voice-badge { background: rgba(108, 192, 181, .12); color: var(--accent); }
}

.bubble b { font-weight: 600; }

/* ── Оживший демо-экран ────────────────────────────────────
   Сообщения появляются по очереди, как в настоящей переписке:
   статичный список читается как картинка, а появление по одному
   показывает то, ради чего всё — что запись занимает секунды.

   Анимация на CSS, а не гифка: гифка весит сотни килобайт, мылится
   на плотных экранах и правится только перезаписью. */
.demo .bubble {
  opacity: 0;
  animation: demo-in .45s ease forwards;
}
.demo .bubble:nth-child(1) { animation-delay: .3s; }
.demo .bubble:nth-child(2) { animation-delay: 1.1s; }
.demo .bubble:nth-child(3) { animation-delay: 2.3s; }
.demo .bubble:nth-child(4) { animation-delay: 3.6s; }
.demo .bubble:nth-child(5) { animation-delay: 4.5s; }

@keyframes demo-in {
  from { opacity: 0; transform: translateY(10px) scale(.97); }
  to   { opacity: 1; transform: none; }
}

/* Точки «печатает» перед ответом бота — без них пауза читается
   как подвисшая страница, а не как работа. */
.typing { display: inline-flex; gap: 3px; vertical-align: middle; }
.typing i {
  width: 5px; height: 5px; border-radius: 50%; background: currentColor;
  opacity: .35; animation: typing-blink 1.2s infinite;
}
.typing i:nth-child(2) { animation-delay: .2s; }
.typing i:nth-child(3) { animation-delay: .4s; }
@keyframes typing-blink {
  0%, 60%, 100% { opacity: .25; }
  30% { opacity: .9; }
}
.bubble .bar { display: inline-flex; gap: 3px; vertical-align: middle; }
.bubble .bar i { width: 12px; height: 12px; border: 1px solid #8ba79c; border-radius: 2px; background: #f5faf7; }
.bubble .bar i.filled { border-color: #32775d; background: #32775d; }

/* ── Сетки ─────────────────────────────────────────────── */
.grid { display: grid; gap: 22px; margin-top: 56px; }
.grid.two { grid-template-columns: repeat(2, 1fr); }
.grid.three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 820px) { .grid.three { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .grid.two, .grid.three { grid-template-columns: 1fr; } }

.card {
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px;
  box-shadow: var(--shadow);
}
.card h3 { margin-bottom: 10px; }
.card p { margin: 0; color: var(--muted); font-size: 16px; }
.card .ico { font-size: 26px; display: block; margin-bottom: 14px; }

/* ── Пары «боль → ответ» ───────────────────────────────── */
.pain { display: grid; grid-template-columns: 1fr 1fr; gap: 0 44px; align-items: start;
        padding: 30px 0; border-top: 1px solid var(--line); }
.pain:last-child { border-bottom: 1px solid var(--line); }
.pain .q { font-size: clamp(21px, 2.6vw, 27px); font-weight: 600; letter-spacing: -.02em; margin: 0; }
.pain .a { margin: 0; color: var(--muted); font-size: 17px; }
@media (max-width: 720px) { .pain { grid-template-columns: 1fr; gap: 10px; } }

/* ── Тарифы ────────────────────────────────────────────── */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 54px; align-items: start; }
@media (max-width: 860px) { .plans { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; } }
.plan { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; }
.plan.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.plan .name { font-size: 15px; font-weight: 600; color: var(--muted); }
.plan .price { font-size: 40px; font-weight: 600; letter-spacing: -.03em; margin: 12px 0 2px; }
.plan .per { color: var(--muted); font-size: 15px; }
.plan ul { list-style: none; padding: 0; margin: 22px 0 0; }
.plan li { padding: 7px 0 7px 26px; position: relative; font-size: 15.5px; color: var(--text); }
.plan li::before {
  content: ""; position: absolute; left: 0; top: calc(7px + .3em); width: 1em; height: 1em;
  background: var(--accent); mask: var(--icon-check) center / contain no-repeat;
  -webkit-mask: var(--icon-check) center / contain no-repeat;
}
.plan li.no { color: var(--muted); }
.plan li.no::before { background: var(--muted); mask-image: var(--icon-minus); -webkit-mask-image: var(--icon-minus); }
/* Подзаголовок карточки: чем этот тариф отличается, одной фразой.
   Граница «Бесплатно — записывать, Премиум — анализировать» понятнее
   любого перечня галочек. */
.plan-lead { margin: 14px 0 0; color: var(--muted); font-size: 15px; line-height: 1.45; }

/* Зачёркнутая цена года против помесячной: выгода видна до чтения списка. */
.save { margin: 10px 0 0; font-size: 15px; color: var(--accent); font-weight: 600; }
.save s { color: var(--muted); font-weight: 400; margin-right: 6px; }

/* Главный пункт списка — то, ради чего платят дольше одного месяца. */
.plan li.key { font-weight: 600; }

/* На /pay тарифов четыре. В одну строку они помещаются только за счёт
   плотности: меньше поля, мельче цена, у́же список. Между 620 и 960 —
   два ряда по два, ниже — столбик, потому что четвёртая карточка шириной
   в четверть экрана телефона нечитаема. */
.plans.four { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; }
@media (min-width: 560px) {
  .plans.four { grid-template-columns: repeat(2, 1fr); max-width: 760px; }
}
@media (min-width: 880px) {
  .plans.four { grid-template-columns: repeat(4, 1fr); max-width: none; gap: 14px; }
  .plans.four .plan { padding: 22px 18px; }
  .plans.four .price { font-size: 32px; }
  .plans.four .plan-lead,
  .plans.four .save { font-size: 14px; }
  .plans.four li { font-size: 14.5px; padding-left: 22px; }
  /* Кнопка в колонке 200 px: «Оплатить 1 490 ₽» не должно рвать на две строки. */
  .plans.four .btn { font-size: 15px; padding-inline: 12px; }
}
/* Списки у тарифов разной длины, и кнопки вставали лесенкой. Карточка —
   колонка одинаковой высоты, кнопка прижата к низу: взгляд идёт по одной
   линии, а не прыгает. */
@media (min-width: 560px) {
  .plans.four { align-items: stretch; }
  .plans.four .plan { display: flex; flex-direction: column; }
  .plans.four .plan .btn { margin-top: auto; }
  /* margin-top:auto съедает зазор, когда список дотягивается до низа. */
  .plans.four .plan ul { margin-bottom: 22px; }
}
.plan .btn { width: 100%; margin-top: 22px; }

.badge { display: inline-block; background: var(--accent); color: var(--accent-text); font-size: 12px;
         font-weight: 600; padding: 3px 10px; border-radius: 980px; margin-bottom: 10px; }

/* ── Вопросы ───────────────────────────────────────────── */
details { border-bottom: 1px solid var(--line); padding: 20px 0; }
details summary {
  cursor: pointer; font-size: 18px; font-weight: 500; list-style: none;
  display: flex; justify-content: space-between; gap: 18px; align-items: baseline;
}
details summary::-webkit-details-marker { display: none; }
details summary::after {
  content: ""; flex: 0 0 24px; width: 24px; height: 24px; align-self: center;
  background: var(--accent); mask: var(--icon-plus) center / contain no-repeat;
  -webkit-mask: var(--icon-plus) center / contain no-repeat;
}
details[open] summary::after { mask-image: var(--icon-minus); -webkit-mask-image: var(--icon-minus); }
details p { color: var(--muted); margin: 14px 0 0; font-size: 16px; }

/* ── Форма ─────────────────────────────────────────────── */
form { margin-top: 40px; }
.field { margin-bottom: 16px; }
label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 7px; }
input[type=text], input[type=email], textarea {
  width: 100%; padding: 13px 15px; font: inherit; font-size: 16px;
  color: var(--text); background: var(--bg); border: 1px solid var(--line);
  border-radius: 12px; outline: none; transition: border-color .15s;
}
input:focus, textarea:focus { border-color: var(--accent); }
textarea { min-height: 130px; resize: vertical; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.check { display: flex; gap: 11px; align-items: flex-start; font-size: 14px; color: var(--muted); margin: 18px 0 24px; }
.check input { margin-top: 3px; flex: 0 0 auto; width: 17px; height: 17px; accent-color: var(--accent); }
.form-note { margin-top: 18px; font-size: 15px; min-height: 22px; }
.form-note.ok { color: #1a8a3c; }
.form-note.err { color: #c7382c; }
@media (prefers-color-scheme: dark) {
  .form-note.ok { color: #4cd964; }
  .form-note.err { color: #ff6b5e; }
}

/* ── Подвал ────────────────────────────────────────────── */
footer { background: var(--bg-alt); border-top: 1px solid var(--line); padding: 48px 0 60px;
         font-size: 13.5px; color: var(--muted); line-height: 1.7; }
footer a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
footer a:hover { color: var(--text); }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 26px; }
.foot-req { max-width: 620px; }

/* ── Появление при прокрутке ───────────────────────────── */
.rise { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.rise.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise { opacity: 1; transform: none; transition: none; }
  /* Человеку, попросившему систему не двигать картинку, показываем
     всю переписку сразу — смысл демо от этого не теряется. */
  .demo .bubble { opacity: 1; animation: none; }
  .typing i { animation: none; opacity: .5; }
}

/* ── Документы ─────────────────────────────────────────── */
.doc { padding: 64px 0 96px; }
.doc h1 { font-size: clamp(30px, 5vw, 44px); margin-bottom: 26px; }
.doc h2 { font-size: 25px; margin: 46px 0 14px; }
.doc h3 { font-size: 19px; margin: 30px 0 10px; }
.doc p, .doc li { font-size: 16.5px; line-height: 1.65; }
.doc li { margin: 7px 0; }
.doc blockquote {
  margin: 22px 0; padding: 18px 22px; border-left: 3px solid var(--accent);
  background: var(--bg-alt); border-radius: 0 12px 12px 0; color: var(--text);
}
.doc blockquote p { margin: 10px 0; }
.doc table { border-collapse: collapse; width: 100%; margin: 22px 0; font-size: 15.5px; }
.doc th, .doc td { border: 1px solid var(--line); padding: 10px 13px; text-align: left; vertical-align: top; }
.doc th { background: var(--bg-alt); font-weight: 600; }
.doc code { background: var(--bg-alt); padding: 2px 6px; border-radius: 6px; font-size: 14px; }
.doc hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }

/* ── Калькуляторы на тематических страницах ────────────── */
.calc { background: var(--bg-alt); border-radius: var(--radius); padding: 24px 24px 18px; margin: 26px 0; }
.calc .row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.calc select, .calc input[type=time] {
  width: 100%; padding: 13px 15px; font: inherit; font-size: 16px;
  color: var(--text); background: var(--bg); border: 1px solid var(--line);
  border-radius: 12px; outline: none;
}
.calc select:focus, .calc input[type=time]:focus { border-color: var(--accent); }
.calc-big { font-size: 30px; font-weight: 600; line-height: 1.2; margin: 18px 0 6px; color: var(--accent); }
.calc [data-out] p { margin: 8px 0; }
@media (max-width: 560px) { .calc .row { grid-template-columns: 1fr; } }

.site-icon {
  display: inline-block; width: var(--brand-icon-inline); height: var(--brand-icon-inline); flex: none; vertical-align: -.22em;
  fill: none; stroke: currentColor; stroke-width: var(--brand-icon-stroke); stroke-linecap: round; stroke-linejoin: round;
  color: var(--accent);
}
.btn .site-icon { color: inherit; }
.payment-status-icon { font-size: 48px; line-height: 1; }
/* Lucide outline masks; license: lucide-LICENSE.txt. */
:root {
  --icon-check: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.4%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M20%206%209%2017l-5-5%22%2F%3E%3C%2Fsvg%3E");
  --icon-minus: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.4%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M5%2012h14%22%2F%3E%3C%2Fsvg%3E");
  --icon-plus: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.4%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M5%2012h14%22%2F%3E%3Cpath%20d%3D%22M12%205v14%22%2F%3E%3C%2Fsvg%3E");
  --icon-arrow-up-right: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.4%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M7%207h10v10%22%2F%3E%3Cpath%20d%3D%22M7%2017%2017%207%22%2F%3E%3C%2Fsvg%3E");
}
