/* KeepAll — маркетинговый сайт.
   Токены совпадают с рабочей панелью (apps/web/src/styles/global.scss),
   чтобы шлюз и сайт читались как одна система. */

/* Счётчик очереди: анимируем целое число, чтобы CSS мог напечатать его
   через counter(). Без @property значение не интерполировалось бы. */
@property --pw-count {
  syntax: '<integer>';
  inherits: false;
  initial-value: 3;
}

:root {
  color-scheme: light;

  --ink: light-dark(#1b1f24, #e8ebef);
  --ink-soft: light-dark(#5a6472, #a4adba);
  --paper: light-dark(#f5f6f8, #101317);
  --surface: light-dark(#ffffff, #171b21);
  --line: light-dark(#d3d8e0, #2b333d);
  --line-soft: light-dark(#e6e9ee, #222932);
  --brand: light-dark(#2f5d8a, #7aa7d6);
  --brand-deep: light-dark(#1d3f60, #a8c8ea);
  --brand-wash: light-dark(#eaf0f7, #1b2734);
  --calm: light-dark(#12805c, #4fc48d);
  --calm-wash: light-dark(#e6f5ef, #12291f);
  --alert: light-dark(#e5484d, #ff8f8a);
  --alert-wash: light-dark(#fdecec, #33191a);
  --focus: light-dark(#0b5fff, #8ab4ff);

  --display: 'Golos Text', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;

  --gut: clamp(20px, 5vw, 40px);
  --pad-block: clamp(64px, 9vw, 120px);
  --radius: 10px;
  --measure: 62ch;

  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
  --t-fast: 160ms;
  --t-reveal: 320ms;
}

/* Три состояния темы без дублирования палитры: color-scheme решает,
   какую половину light-dark() взять, и заодно перекрашивает нативные
   скроллбары и поля форм. Атрибута нет — значит «как в системе». */
:root[data-theme='dark'] {
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Полоса прокрутки не должна то появляться, то исчезать: иначе вся
     страница сдвигается вбок ровно в момент загрузки контента. */
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--display);
  font-size: 17px;
  line-height: 1.6;
  font-optical-sizing: auto;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p {
  margin: 0;
}

a {
  color: var(--brand);
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: 8px;
  top: -120px;
  z-index: 50;
  padding: 10px 16px;
  background: var(--surface);
  border: 2px solid var(--focus);
  border-radius: var(--radius);
}

.skip:focus {
  top: 8px;
}

.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- каркас ---------- */

.wrap {
  width: min(1080px, 100% - var(--gut) * 2);
  margin-inline: auto;
}

.band {
  padding-block: var(--pad-block);
}

.band--surface {
  background: var(--surface);
  border-block: 1px solid var(--line-soft);
}

.band--tight {
  padding-block: calc(var(--pad-block) * 0.6);
}

.eyebrow {
  display: block;
  margin-bottom: 14px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.lede {
  max-width: var(--measure);
  font-size: clamp(1.05rem, 1.7vw, 1.25rem);
  line-height: 1.5;
  color: var(--ink-soft);
}

h2 {
  font-size: clamp(1.65rem, 3.2vw, 2.4rem);
  font-weight: 700;
}

.section-lede {
  margin-top: 16px;
}

/* ---------- шапка ---------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}

.masthead__inner {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 68px;
}

/* Кнопка темы — компактная пилюля: иконка + подпись текущего режима.
   Отдельного margin-left нет: вправо её уже выталкивает nav своим auto,
   иначе два auto-отступа делили бы свободное место и nav уезжал в середину. */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease);
}

.theme-toggle svg {
  flex: 0 0 auto;
}

.theme-toggle__label {
  flex: 0 0 auto;
}

.theme-toggle:hover {
  background: var(--brand-wash);
  border-color: var(--brand);
}
.theme-toggle:active {
  transform: scale(0.94);
}
.theme-toggle:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-decoration: none;
}

.wordmark::after {
  content: '';
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--calm);
}

.masthead nav {
  margin-left: auto;
}

.masthead nav ul {
  display: flex;
  gap: 26px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.masthead nav a {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
}

.masthead nav a:hover {
  color: var(--ink);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 40px;
  height: 40px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
}

.nav-toggle__bar {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform var(--t-fast) var(--ease), opacity var(--t-fast) var(--ease);
}

.masthead.nav-open .nav-toggle__bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.masthead.nav-open .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}
.masthead.nav-open .nav-toggle__bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

@media (max-width: 780px) {
  .masthead__inner {
    gap: 10px;
  }

  .masthead nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    margin: 0;
    padding: 10px var(--gut) 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 34px -28px rgb(0 0 0 / 0.55);
  }

  .masthead.nav-open nav {
    display: block;
  }

  .masthead nav ul {
    flex-direction: column;
    gap: 0;
  }

  .masthead nav a {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid var(--line-soft);
  }

  .masthead nav li:last-child a {
    border-bottom: 0;
  }

  .masthead__cta {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
    order: 5;
  }

  .theme-toggle {
    margin-left: auto;
    order: 4;
  }
}

/* ---------- кнопки ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease),
              transform var(--t-fast) var(--ease),
              box-shadow var(--t-fast) var(--ease);
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--brand);
  background-image: linear-gradient(
    180deg,
    color-mix(in srgb, var(--brand) 88%, #fff),
    var(--brand));
  color: light-dark(#fff, #0d1117);
  box-shadow:
    0 1px 2px rgb(0 0 0 / 0.14),
    0 6px 18px -10px color-mix(in srgb, var(--brand) 80%, transparent);
}

.btn--primary:hover {
  background-color: var(--brand-deep);
  background-image: none;
}

.btn--quiet {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}

.btn--quiet:hover {
  border-color: var(--ink-soft);
}

.btn--sm {
  min-height: 40px;
  padding: 0 16px;
  font-size: 15px;
}

/* ---------- hero ---------- */

.hero {
  padding-block: clamp(48px, 7vw, 88px) clamp(56px, 8vw, 104px);
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: clamp(32px, 6vw, 64px);
  align-items: center;
}

@media (max-width: 900px) {
  .hero__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

.hero h1 {
  font-size: clamp(2.15rem, 5.6vw, 3.9rem);
  font-weight: 800;
}

.hero__sub {
  margin-top: 22px;
  max-width: 46ch;
  font-size: clamp(1.05rem, 1.9vw, 1.3rem);
  color: var(--ink-soft);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.hero__note {
  margin-top: 18px;
  font-size: 14px;
  color: var(--ink-soft);
}

/* окно панели в hero — макет, а не скриншот */
.pw {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 24px 60px -34px rgb(0 0 0 / 0.45);
  overflow: hidden;
}

.pw__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: var(--brand-wash);
  border-bottom: 1px solid var(--line-soft);
}

.pw__title {
  font-size: 15px;
  font-weight: 700;
}

.pw__badge {
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--alert-wash);
  color: var(--alert);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
}

.pw__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.pw__row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-soft);
  border-left: 3px solid transparent;
}

.pw__row:last-child {
  border-bottom: 0;
}

.pw__row--alert {
  border-left-color: var(--alert);
  background: color-mix(in srgb, var(--alert) 7%, var(--surface));
}

.pw__ch {
  display: grid;
  place-items: center;
  height: 30px;
  border-radius: 7px;
  background: var(--brand-wash);
  color: var(--brand);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
}

.pw__who {
  font-size: 14.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pw__wait {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.pw__row--alert .pw__wait {
  color: var(--alert);
}

.pw__btn {
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--brand);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: default;
  appearance: none;
}

.pw__sum {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 0;
  padding: 12px 16px;
  background: var(--paper);
  border-top: 1px solid var(--line-soft);
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--ink-soft);
}

.pw__count {
  --pw-count: 3;
  counter-reset: pw var(--pw-count);
  color: var(--ink);
  font-size: 15px;
}

.pw__count::before {
  content: counter(pw);
}

/* The queue always shows three unanswered rows, so the counter must stay at 3.
   A pulse on the oldest wait time gives the panel life without contradicting it. */
@keyframes pw-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

@media (prefers-reduced-motion: no-preference) {
  .pw__row--alert .pw__wait {
    animation: pw-pulse 2.4s ease-in-out infinite;
  }
}

@media (max-width: 440px) {
  .pw__row {
    grid-template-columns: 58px minmax(0, 1fr) auto;
  }

  .pw__btn {
    grid-column: 2 / -1;
    justify-self: start;
  }
}

/* полоса доверия под hero */
.hero__trust {
  margin-top: clamp(28px, 4vw, 44px);
}

.trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  color: var(--ink-soft);
}

.trust li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.trust li::before {
  content: '';
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--calm);
}

.trust a {
  color: var(--ink-soft);
}

/* ---------- полоса доказательств ---------- */

.proof {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin: 0;
  padding: 0;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
}

.proof > div {
  padding: 22px 24px;
  background: var(--surface);
}

.proof dt {
  font-family: var(--mono);
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.proof dd {
  margin: 6px 0 0;
  font-size: 14px;
  color: var(--ink-soft);
}

@media (max-width: 760px) {
  .proof {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---------- сцены проблемы ---------- */

.scenes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 44px;
}

@media (max-width: 860px) {
  .scenes {
    grid-template-columns: 1fr;
  }
}

.scene {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.scene__time {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--alert);
  font-variant-numeric: tabular-nums;
}

.scene__time--calm {
  color: var(--calm);
}

.scene p {
  margin-top: 12px;
  font-size: 15.5px;
}

.scene p + p {
  margin-top: 8px;
  color: var(--ink-soft);
}

/* ---------- шаги ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 48px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  border-top: 1px solid var(--line);
}

@media (max-width: 900px) {
  .steps {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .steps {
    grid-template-columns: 1fr;
  }
}

.steps li {
  position: relative;
  padding: 26px 24px 26px 0;
  counter-increment: step;
}

.steps li + li {
  padding-left: 24px;
  border-left: 1px solid var(--line-soft);
}

@media (max-width: 900px) {
  .steps li:nth-child(odd) {
    padding-left: 0;
    border-left: 0;
  }
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  margin-bottom: 14px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--brand);
}

.steps h3 {
  font-size: 1.05rem;
  font-weight: 700;
}

.steps p {
  margin-top: 8px;
  font-size: 15px;
  color: var(--ink-soft);
}

/* ---------- продукт / скриншот ---------- */

.shot {
  margin: 40px 0 0;
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.shot figcaption {
  margin-top: 14px;
  font-size: 14px;
  color: var(--ink-soft);
}

/* ---------- карточки продукта (макеты) ---------- */

.mocks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 40px;
}

@media (max-width: 900px) {
  .mocks {
    grid-template-columns: 1fr;
  }
}

.mock-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.mock-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
}

.mock-card > p {
  font-size: 14.5px;
  color: var(--ink-soft);
}

.mock {
  margin-top: auto;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--paper);
  overflow: hidden;
  font-size: 12.5px;
}

.mock__bar {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 11px;
  background: var(--brand-wash);
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ink-soft);
}

.mock__row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  border-bottom: 1px solid var(--line-soft);
}

.mock__row:last-child {
  border-bottom: 0;
}

.mock__row--alert {
  border-left: 2px solid var(--alert);
  background: var(--alert-wash);
}

.mock__ch {
  display: grid;
  place-items: center;
  height: 24px;
  border-radius: 5px;
  background: var(--surface);
  color: var(--brand);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
}

.mock__name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mock__wait {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-soft);
}

.mock__row--alert .mock__wait {
  color: var(--alert);
}

.mock--card {
  display: grid;
  gap: 6px;
  padding: 12px;
}

.mock__field {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 11.5px;
  color: var(--ink-soft);
}

.mock__field strong {
  color: var(--ink);
  font-weight: 600;
}

.mock__msg {
  margin-top: 4px;
  padding: 8px 10px;
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font-size: 11.5px;
}

.mock__btn {
  justify-self: start;
  margin-top: 2px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  color: var(--brand);
  font-size: 10.5px;
  font-weight: 600;
}

.mock--log {
  display: grid;
  gap: 0;
}

.mock--log p {
  display: flex;
  gap: 8px;
  padding: 8px 11px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 11.5px;
  color: var(--ink-soft);
}

.mock--log p:last-child {
  border-bottom: 0;
}

.mock--log span {
  font-family: var(--mono);
  color: var(--ink);
}

/* ---------- таблица сравнения ---------- */

.table-scroll {
  overflow-x: auto;
  margin-top: 40px;
}

table.compare {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 15.5px;
}

table.compare caption {
  caption-side: bottom;
  margin-top: 14px;
  font-size: 13.5px;
  text-align: left;
  color: var(--ink-soft);
}

table.compare th,
table.compare td {
  padding: 15px 18px;
  text-align: left;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}

table.compare thead th {
  border-bottom: 2px solid var(--line);
  font-size: 14px;
  font-weight: 600;
}

table.compare thead th:nth-child(2) {
  color: var(--brand);
}

table.compare tbody th {
  font-weight: 500;
  color: var(--ink-soft);
}

.yes {
  color: var(--calm);
  font-weight: 600;
}

.no {
  color: var(--ink-soft);
}

.src {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  color: var(--ink-soft);
  white-space: nowrap;
}

.sources {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
  max-width: var(--measure);
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink-soft);
}

.sources li {
  scroll-margin-top: 90px;
}

/* ---------- каналы ---------- */

.channels {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
}

@media (max-width: 760px) {
  .channels {
    grid-template-columns: 1fr;
  }
}

.channel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.channel h3 {
  font-size: 1.05rem;
  font-weight: 700;
}

.channel p {
  font-size: 15px;
  color: var(--ink-soft);
}

.status {
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.status--live {
  background: var(--calm-wash);
  color: var(--calm);
}

.status--soon {
  background: var(--brand-wash);
  color: var(--brand);
}

.status--planned {
  background: var(--line-soft);
  color: var(--ink-soft);
}

.status--blocked {
  background: var(--alert-wash);
  color: var(--alert);
}

.channel__note {
  margin-top: auto;
  padding-top: 6px;
  font-size: 13.5px;
  color: var(--ink-soft);
}

.channel--blocked {
  border-color: color-mix(in srgb, var(--alert) 38%, var(--line));
  background: color-mix(in srgb, var(--alert) 4%, var(--surface));
}

.channel .legal-note {
  font-size: 13.5px;
}

.channel.channel--blocked:hover {
  border-color: color-mix(in srgb, var(--alert) 60%, var(--line));
}

.legal-note {
  max-width: var(--measure);
  margin-top: 20px;
  padding: 14px 16px;
  border-left: 3px solid var(--alert);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--alert-wash);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-soft);
}

.channels-more {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
}

.channels-more__label {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.channels-more__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.channels-more__list li {
  padding: 6px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 14px;
  color: var(--ink);
}

.channels-more__cta {
  margin-top: 18px;
  font-size: 15px;
  color: var(--ink-soft);
}

/* ---------- CRM ---------- */

.crm {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

@media (max-width: 760px) {
  .crm {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  .crm {
    grid-template-columns: 1fr;
  }
}

.crm-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.crm-card strong {
  font-size: 1.05rem;
}

.badge {
  align-self: flex-start;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--brand-wash);
  color: var(--brand);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.badge--calm {
  background: var(--calm-wash);
  color: var(--calm);
}

/* ---------- пилот ---------- */

.pilot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: clamp(24px, 4vw, 36px);
  border: 1px solid var(--brand);
  border-radius: var(--radius);
  background: var(--brand-wash);
}

.pilot .lede {
  margin-top: 10px;
  color: var(--ink);
}

@media (max-width: 780px) {
  .pilot {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ---------- письмо основателя ---------- */

.founder {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}

@media (max-width: 780px) {
  .founder {
    grid-template-columns: 1fr;
  }
}

.founder__body {
  display: grid;
  gap: 14px;
  max-width: var(--measure);
  font-size: 16px;
}

.founder__body p {
  color: var(--ink-soft);
}

.founder__sign {
  font-weight: 600;
  color: var(--ink) !important;
}

.founder__contacts {
  font-size: 14.5px;
}

/* ---------- цены ---------- */

.period {
  display: inline-flex;
  gap: 4px;
  margin-top: 30px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

.period__btn {
  min-height: 36px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease);
}

.period__btn:hover {
  color: var(--ink);
}

.period__btn.is-active {
  background: var(--brand);
  color: light-dark(#fff, #0d1117);
}

.period__btn:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.plans {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

@media (max-width: 1000px) {
  .plans {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .plans {
    grid-template-columns: 1fr;
  }
}

.plan {
  display: flex;
  flex-direction: column;
  padding: 26px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.plan--featured {
  border-color: var(--brand);
  box-shadow: 0 0 0 1px var(--brand);
}

.plan__name {
  font-size: 1.1rem;
  font-weight: 700;
}

.plan__price {
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 1.7rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.plan__per {
  font-size: 13px;
  font-weight: 400;
  color: var(--ink-soft);
}

/* Без JS виден месяц. Годовая цена включается атрибутом data-period="year". */
[data-price-year],
[data-per-year] {
  display: none;
}

[data-period='year'] [data-price-year],
[data-period='year'] [data-per-year] {
  display: inline;
}

[data-period='year'] [data-price-month],
[data-period='year'] [data-per-month] {
  display: none;
}

.plan ul {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 9px;
  font-size: 14.5px;
  color: var(--ink-soft);
}

.plan li::before {
  content: '—';
  margin-right: 8px;
  color: var(--line);
}

.plan__cta {
  margin-top: auto;
  padding-top: 24px;
}

/* ---------- FAQ ---------- */

.faq {
  margin: 40px 0 0;
  border-top: 1px solid var(--line);
}

.faq details {
  border-bottom: 1px solid var(--line-soft);
}

.faq summary {
  padding: 20px 0;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '+';
  float: right;
  font-family: var(--mono);
  color: var(--brand);
}

.faq details[open] summary::after {
  content: '−';
}

.faq p {
  max-width: var(--measure);
  padding-bottom: 22px;
  font-size: 15.5px;
  color: var(--ink-soft);
}

/* ---------- заявка ---------- */

.lead {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}

@media (max-width: 900px) {
  .lead {
    grid-template-columns: 1fr;
  }
}

.lead__intro .btn {
  margin-top: 20px;
}

.lead__note {
  margin-top: 16px;
  font-size: 14px;
  color: var(--ink-soft);
}

.lead-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 18px;
  padding: clamp(20px, 3vw, 28px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

@media (max-width: 620px) {
  .lead-form {
    grid-template-columns: 1fr;
  }
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  font-size: 13.5px;
  font-weight: 600;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font-family: inherit;
  font-size: 15px;
}

.field textarea {
  min-height: 92px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--focus);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 25%, transparent);
}

.field--full {
  grid-column: 1 / -1;
}

.field--checks {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.field--checks legend {
  padding: 0;
  margin-bottom: 2px;
  font-size: 13.5px;
  font-weight: 600;
}

.field--checks label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14.5px;
  font-weight: 400;
}

.field--checks input {
  width: 16px;
  min-height: auto;
  height: 16px;
  padding: 0;
  accent-color: var(--brand);
}

.consent label {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 13.5px;
  font-weight: 400;
  color: var(--ink-soft);
}

.consent input {
  width: 16px;
  height: 16px;
  min-height: auto;
  margin-top: 3px;
  padding: 0;
  accent-color: var(--brand);
}

.lead-form__actions {
  display: flex;
  justify-content: flex-start;
}

.form-msg {
  min-height: 1.4em;
  font-size: 14px;
}

.form-msg.is-error {
  color: var(--alert);
}

.form-msg.is-success {
  color: var(--calm);
  font-weight: 600;
}

.form-msg.is-pending {
  color: var(--ink-soft);
}

/* ---------- финальный CTA ---------- */

.final {
  background: var(--brand-wash);
  border-top: 1px solid var(--line-soft);
}

.final__inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
}

@media (max-width: 780px) {
  .final__inner {
    grid-template-columns: 1fr;
  }
}

/* ---------- подвал ---------- */

.foot {
  padding-block: 56px 40px;
  background: var(--surface);
  border-top: 1px solid var(--line-soft);
  font-size: 14.5px;
}

.foot__grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(4, 1fr);
  gap: 28px;
}

@media (max-width: 1000px) {
  .foot__grid {
    grid-template-columns: 1.4fr repeat(2, 1fr);
  }
}

@media (max-width: 780px) {
  .foot__grid {
    grid-template-columns: 1fr 1fr;
  }
}

.foot h2 {
  margin-bottom: 14px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.foot ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 9px;
}

.foot .foot__contacts {
  margin-top: 26px;
}

.foot a {
  color: var(--ink-soft);
  text-decoration: none;
}

.foot a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.foot__legal {
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  justify-content: space-between;
  color: var(--ink-soft);
  font-size: 13.5px;
}

/* ---------- движение ----------
   Только CSS: ни одного класса, который обязан поставить JS. Если скрипт
   не выполнится или упадёт, текст всё равно останется видимым — анимация
   не может застрять на opacity: 0. Анимируются только opacity и transform:
   они не меняют layout, поэтому не двигают соседний текст. */

@media (prefers-reduced-motion: no-preference) {
  /* Вход hero через @starting-style: конечное состояние — обычный стиль,
     то есть видимый. Если анимация почему-то не выполнится (скрытая
     вкладка, отключённые переходы), текст всё равно на месте. */
  .hero__grid > * {
    transition: opacity 460ms var(--ease), transform 460ms var(--ease);
  }

  .hero__grid > *:nth-child(2) {
    transition-delay: 110ms;
  }

  @starting-style {
    .hero__grid > * {
      opacity: 0;
      transform: translateY(16px);
    }
  }

  /* Появление блоков привязано к прокрутке средствами браузера.
     Там, где animation-timeline не поддержан, блоки просто видны сразу. */
  @supports (animation-timeline: view()) {
    @keyframes rise-in {
      from { opacity: 0; transform: translateY(12px); }
      to   { opacity: 1; transform: none; }
    }

    .scenes > *,
    .steps > li,
    .channels > *,
    .plans > *,
    .proof > div,
    .mocks > *,
    .crm > * {
      animation: rise-in both;
      animation-timeline: view();
      animation-range: entry 8% cover 26%;
    }
  }
}

/* Мягкая подсветка за hero — вместо плоского фона. */
.hero {
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  inset: -40px 0 auto 0;
  height: 560px;
  background: radial-gradient(
    52% 62% at 74% 0%,
    color-mix(in srgb, var(--brand) 14%, transparent),
    transparent 72%);
  pointer-events: none;
  z-index: 0;
}

.hero > .wrap {
  position: relative;
  z-index: 1;
}

/* Карточки: подъём на 2px и подсветка рамки — реакция, а не украшение. */
.scene,
.channel,
.plan,
.mock-card,
.crm-card {
  transition:
    border-color var(--t-fast) var(--ease),
    transform var(--t-fast) var(--ease),
    box-shadow var(--t-fast) var(--ease);
}

.scene:hover,
.channel:hover,
.mock-card:hover,
.crm-card:hover {
  border-color: color-mix(in srgb, var(--brand) 45%, var(--line));
  transform: translateY(-2px);
  box-shadow: 0 8px 22px -14px rgb(0 0 0 / 0.4);
}

.plan:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 34px -22px rgb(0 0 0 / 0.5);
}

table.compare tbody tr {
  transition: background-color var(--t-fast) var(--ease);
}

table.compare tbody tr:hover {
  background: var(--brand-wash);
}

.faq summary {
  transition: color var(--t-fast) var(--ease);
}

.faq summary:hover {
  color: var(--brand);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  /* Появление по прокрутке и вход hero отключаем полностью: у таких
     анимаций нет длительности, поэтому одного обнуления мало. */
  .hero__grid > *,
  .scenes > *,
  .steps > li,
  .channels > *,
  .plans > *,
  .proof > div,
  .mocks > *,
  .crm > * {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  /* Счётчик очереди остаётся на числе 3 — статичный кадр без движения. */
  .pw__count {
    animation: none !important;
  }
}

.hero-shot {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 24px 60px rgb(0 0 0 / 0.28);
}

.hero-shot img {
  display: block;
  width: 100%;
  height: auto;
}

/* ---------- мобильная панель действий ---------- */

.mobile-bar {
  display: none;
}

@media (max-width: 780px) {
  body {
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
  }

  /* .btn sets display:inline-flex later in the file, so the header CTA needs
     higher specificity than a bare .masthead__cta rule to stay hidden. */
  .masthead__cta.btn {
    display: none;
  }

  .theme-toggle__label {
    display: none;
  }

  .hero h1 {
    font-size: clamp(30px, 8vw, 42px);
  }

  .mobile-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 10px var(--gut) calc(10px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--paper) 94%, transparent);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--line);
  }

  .mobile-bar .btn {
    min-height: 44px;
  }
}
