/*
  Сайт продукта; Caddy отдаёт его на SITE_DOMAIN. Шрифт Onest с табличными цифрами, тёплые нейтральные тона и один
  глубокий зелёный — как решено для продукта (CLAUDE.md), но свой рисунок: макеты на сайте — не копия кабинета.
  Ни внешних адресов, ни inline-стилей: CSP сайта — style-src 'self' (deploy/server/Caddyfile). Скрипты меняют только
  отдельные свойства и переменные (el.style.setProperty) — это CSP разрешает.
*/

@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/onest-cyrillic-wght-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/onest-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Знак рубля (U+20BD) — в этом наборе. */
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/onest-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Стрелки (U+2190–2199) — из набора символов: в журнале «было → стало». */
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/onest-symbols-wght-normal.woff2") format("woff2");
  unicode-range: U+2190-2199;
}

/* --- Токены --- */

:root {
  --bg: oklch(0.982 0.003 85);
  --bg-2: oklch(0.966 0.005 85);
  --surface: oklch(1 0 0);
  --surface-2: oklch(0.977 0.004 85);
  --ink: oklch(0.225 0.008 75);
  --ink-2: oklch(0.45 0.01 75);
  --ink-3: oklch(0.53 0.011 75);
  --ink-dim: oklch(0.225 0.008 75 / 0.36);
  --rule: oklch(0.912 0.006 85);
  --rule-2: oklch(0.86 0.008 85);
  --accent: oklch(0.43 0.075 162);
  --accent-ink: oklch(0.985 0.004 150);
  --accent-soft: oklch(0.43 0.075 162 / 0.09);
  --accent-line: oklch(0.43 0.075 162 / 0.3);
  --pos: oklch(0.47 0.1 158);
  --neg: oklch(0.54 0.14 33);
  --neg-soft: oklch(0.54 0.14 33 / 0.12);
  --sand: oklch(0.84 0.035 76);
  --tint-1: oklch(0.43 0.075 162);
  --tint-2: oklch(0.56 0.07 162);
  --tint-3: oklch(0.68 0.055 160);
  --tint-4: oklch(0.79 0.04 158);
  --tint-5: oklch(0.88 0.025 150);

  /* Зелёные панели — одни и те же в светлой и тёмной теме: это лицо продукта. */
  --deep: oklch(0.29 0.045 163);
  --deep-2: oklch(0.255 0.042 163);
  --on-deep: oklch(0.95 0.012 110);
  --on-deep-2: oklch(0.95 0.012 110 / 0.72);
  --on-deep-3: oklch(0.95 0.012 110 / 0.5);
  --on-deep-rule: oklch(0.95 0.012 110 / 0.15);
  --on-deep-line: oklch(0.95 0.012 110 / 0.32);

  --shadow: 0 1px 1px oklch(0.25 0.02 75 / 0.04), 0 3px 8px -3px oklch(0.25 0.02 75 / 0.07),
    0 28px 64px -30px oklch(0.25 0.03 75 / 0.3);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  /* Пружина: нажатое стекло сжимается и отскакивает, как капля. */
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  /* Светлый ободок стекла: ярче сверху слева, к низу гаснет. */
  --rim-dark: linear-gradient(160deg, oklch(1 0 0 / 0.55), oklch(1 0 0 / 0.08) 40%, oklch(1 0 0 / 0.04) 62%,
      oklch(1 0 0 / 0.28));
  --rim-light: linear-gradient(160deg, oklch(1 0 0 / 0.95), oklch(1 0 0 / 0.35) 38%, oklch(0.25 0.02 75 / 0.08) 70%,
      oklch(1 0 0 / 0.7));
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 68px;
  --radius: 22px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: oklch(0.172 0.004 75);
    --bg-2: oklch(0.192 0.004 75);
    --surface: oklch(0.212 0.005 75);
    --surface-2: oklch(0.238 0.005 75);
    --ink: oklch(0.93 0.005 85);
    --ink-2: oklch(0.78 0.008 80);
    --ink-3: oklch(0.66 0.01 80);
    --ink-dim: oklch(0.93 0.005 85 / 0.3);
    --rule: oklch(0.29 0.006 75);
    --rule-2: oklch(0.36 0.006 75);
    --accent: oklch(0.76 0.1 160);
    --accent-ink: oklch(0.2 0.03 160);
    --accent-soft: oklch(0.76 0.1 160 / 0.12);
    --accent-line: oklch(0.76 0.1 160 / 0.35);
    --pos: oklch(0.76 0.12 155);
    --neg: oklch(0.73 0.13 36);
    --neg-soft: oklch(0.73 0.13 36 / 0.16);
    --sand: oklch(0.5 0.03 75);
    --tint-1: oklch(0.76 0.1 160);
    --tint-2: oklch(0.64 0.085 161);
    --tint-3: oklch(0.53 0.07 162);
    --tint-4: oklch(0.43 0.055 162);
    --tint-5: oklch(0.34 0.035 162);
    --deep: oklch(0.265 0.042 163);
    --deep-2: oklch(0.232 0.038 163);
    --shadow: 0 1px 1px oklch(0 0 0 / 0.3), 0 28px 64px -30px oklch(0 0 0 / 0.7);
    --rim-light: linear-gradient(160deg, oklch(1 0 0 / 0.3), oklch(1 0 0 / 0.07) 40%, oklch(1 0 0 / 0.03) 65%,
        oklch(1 0 0 / 0.16));
  }
}

@media (max-width: 759px) {
  :root {
    --header-h: 60px;
    --radius: 18px;
  }
}

/* --- Основа --- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: light dark;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: "Onest", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "kern", "tnum";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

h1,
h2,
h3,
p,
ol,
ul,
dl,
dd,
figure {
  margin: 0;
}

ol,
ul {
  padding: 0;
  list-style: none;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

a {
  color: inherit;
  text-decoration: none;
}

svg,
canvas {
  display: block;
}

b,
strong {
  font-weight: 600;
}

::selection {
  background: oklch(0.43 0.075 162 / 0.24);
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
  font-size: 14px;
  transform: translateY(-160%);
  transition: transform 0.3s var(--ease);
}

.skip:focus-visible {
  transform: none;
}

.wrap {
  width: min(100% - 2 * var(--gutter), 1280px);
  margin-inline: auto;
}

.amt {
  font-weight: 550;
  white-space: nowrap;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.amt--in {
  color: var(--pos);
}

/* --- Шапка --- */

.top {
  /* Капсула из стекла чуть шире содержимого шапки, но не ближе 8px к краю экрана. */
  --cap: max(8px, calc((100% - min(100% - 2 * var(--gutter), 1280px)) / 2 - 16px));
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--header-h);
  color: var(--on-deep);
  transition: color 0.4s;
}

/* Прокрутили страницу — шапка собирается в капсулу из жидкого стекла: над зелёным она тёмная, ниже — светлая. */
.top::before,
.top::after {
  content: "";
  position: absolute;
  top: 8px;
  right: var(--cap);
  bottom: 8px;
  left: var(--cap);
  border-radius: 999px;
  opacity: 0;
  transform: scale(0.98);
  pointer-events: none;
  transition:
    opacity 0.45s,
    transform 0.7s var(--ease),
    background-color 0.45s,
    box-shadow 0.45s;
}

.top::before {
  background: var(--deep);
  background: oklch(from var(--deep) l c h / 0.58);
  -webkit-backdrop-filter: blur(16px) saturate(1.7);
  backdrop-filter: blur(16px) saturate(1.7);
  box-shadow:
    inset 0 1px 0 oklch(1 0 0 / 0.14),
    0 14px 34px -18px oklch(0.08 0.03 163 / 0.75);
}

.top::after {
  padding: 1px;
  background: var(--rim-dark);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}

.top.is-scrolled::before,
.top.is-scrolled::after {
  opacity: 1;
  transform: none;
}

.top.is-solid {
  color: var(--ink);
}

.top.is-solid::before {
  background: var(--bg);
  background: oklch(from var(--bg) l c h / 0.72);
  box-shadow:
    inset 0 1px 0 oklch(1 0 0 / 0.5),
    0 12px 32px -18px oklch(0.25 0.03 75 / 0.45);
}

.top.is-solid::after {
  background: var(--rim-light);
}

.top__in {
  position: relative;
  display: flex;
  align-items: center;
  gap: 24px;
  height: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  border-radius: 8px;
}

/* Название: BAVITEK заглавными, плотнее и чуть разреженно, «Финансы» — легче. */
.brand__name {
  font-weight: 450;
  letter-spacing: -0.005em;
}

.brand__word {
  font-weight: 680;
  letter-spacing: 0.07em;
}

/* Знак BAVITEK — круглая эмблема из файла (site/brand), уже с металлическим ободком. */
.logo {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
}

.top__nav {
  display: flex;
  gap: 30px;
  margin-left: auto;
  font-size: 14.5px;
}

.top__nav a {
  position: relative;
  padding-block: 6px;
  opacity: 0.74;
  transition: opacity 0.25s;
}

.top__nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.5s var(--ease);
}

.top__nav a.is-current {
  opacity: 1;
}

.top__nav a.is-current::after {
  transform: scaleX(1);
  transform-origin: left;
}

@media (hover: hover) {
  .top__nav a:hover {
    opacity: 1;
  }

  .top__nav a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
  }
}

@media (max-width: 1023px) {
  .top__nav {
    display: none;
  }

  .top .btn {
    margin-left: auto;
  }
}

@media (max-width: 479px) {
  .wide-only {
    display: none;
  }

  .dds__scope {
    display: none;
  }

  .brand__name {
    font-size: 14px;
  }
}

/* --- Кнопки --- */

.btn {
  --h: 52px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: var(--h);
  padding: 0 26px;
  border-radius: 999px;
  font-size: 15.5px;
  font-weight: 550;
  letter-spacing: -0.005em;
  white-space: nowrap;
  transition:
    background-color 0.35s,
    color 0.35s,
    box-shadow 0.35s,
    transform 0.55s var(--spring);
}

.btn--sm {
  --h: 40px;
  padding: 0 18px;
  font-size: 14px;
}

.btn--lg {
  --h: 60px;
  padding: 0 32px;
  font-size: 17px;
}

/* Кнопки — жидкое стекло: полупрозрачная поверхность с размытым фоном, ободок светится сверху слева,
   снизу — тень. Главная кнопка — молочное стекло, вторая — прозрачное. */
.btn--light,
.btn--ghost,
.btn--top,
.dock {
  -webkit-backdrop-filter: blur(10px) saturate(1.7);
  backdrop-filter: blur(10px) saturate(1.7);
}

.btn--light::before,
.btn--ghost::before,
.btn--top::before,
.dock::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: var(--rim-dark);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
}

.btn--light,
.btn--top {
  background: oklch(0.965 0.012 110 / 0.97);
  color: var(--deep);
  box-shadow:
    inset 0 1px 0 oklch(1 0 0 / 0.9),
    inset 0 -1px 1px oklch(0.29 0.045 163 / 0.14),
    0 14px 30px -18px oklch(0.1 0.03 163 / 0.8);
}

.btn--light::before,
.btn--top::before {
  background: var(--rim-light);
}

.btn--ghost {
  background: oklch(0.95 0.012 110 / 0.07);
  color: var(--on-deep);
  box-shadow:
    inset 0 1px 0 oklch(1 0 0 / 0.16),
    0 12px 28px -18px oklch(0.06 0.03 163 / 0.85);
}

.top.is-solid .btn--top {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow:
    inset 0 1px 0 oklch(1 0 0 / 0.28),
    inset 0 -1px 1px oklch(0 0 0 / 0.2),
    0 10px 22px -12px oklch(0.43 0.075 162 / 0.7);
}

.top.is-solid .btn--top::before {
  background: var(--rim-dark);
}

.btn .ic {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.6s var(--ease);
}

.btn:active,
.dock:active {
  transform: scale(0.95);
}

/* Надпись кнопки уезжает вверх, снизу приходит её копия. */
.roll {
  display: grid;
  height: 1.3em;
  overflow: hidden;
  line-height: 1.3;
}

.roll > span {
  grid-area: 1 / 1;
  transition: transform 0.6s var(--ease);
}

.roll > span + span {
  transform: translateY(105%);
}

@media (hover: hover) {
  .btn--light:hover,
  .btn--top:hover {
    background: oklch(0.99 0.006 110 / 0.96);
    transform: translateY(-1px);
  }

  .top.is-solid .btn--top:hover {
    background: color-mix(in oklch, var(--accent) 88%, var(--ink));
  }

  .btn--ghost:hover {
    background: oklch(0.95 0.012 110 / 0.13);
    transform: translateY(-1px);
  }

  .btn:hover .roll > span:first-child {
    transform: translateY(-105%);
  }

  .btn:hover .roll > span + span {
    transform: none;
  }

  .btn:hover .ic {
    transform: translateX(3px);
  }
}

/* --- Подписи и заголовки разделов --- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink-3);
  font-size: 12.5px;
  font-weight: 560;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: currentColor;
}

.eyebrow--deep {
  color: var(--on-deep-2);
}

.head {
  max-width: 920px;
}

.h2 {
  margin-top: 22px;
  color: var(--ink);
  font-size: clamp(36px, 1rem + 3.7vw, 78px);
  font-weight: 540;
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.h2 .dim {
  color: var(--ink-dim);
}

.lead {
  max-width: 34em;
  margin-top: 26px;
  color: var(--ink-2);
  font-size: clamp(17px, 0.9rem + 0.35vw, 19.5px);
}

.head--deep .h2,
.panel .h2 {
  color: var(--on-deep);
}

.head--deep .dim,
.panel .h2 .dim {
  color: var(--on-deep-3);
}

.head--deep .lead {
  color: var(--on-deep-2);
}

/* --- Первый экран --- */

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: 100svh;
  overflow: hidden;
  background: var(--deep);
  color: var(--on-deep);
}

.hero__canvas {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
}

.hero__in {
  padding-top: calc(var(--header-h) + clamp(32px, 7.5vh, 120px));
  padding-bottom: clamp(32px, 5vh, 72px);
}

.display {
  margin-top: clamp(22px, 3.4vh, 34px);
  font-size: clamp(44px, 0.9rem + 5.9vw, 112px);
  font-weight: 520;
  line-height: 0.98;
  letter-spacing: -0.048em;
}

.line {
  display: block;
  overflow: hidden;
  /* Хвосты букв «р», «у», «ц» не обрезаются маской строки. */
  padding-bottom: 0.1em;
  margin-bottom: -0.1em;
}

.line__in {
  display: block;
  color: var(--on-deep-3);
}

.line__in--bright {
  color: var(--on-deep);
}

.hero__lead {
  max-width: 35em;
  margin-top: clamp(22px, 3.2vh, 34px);
  color: var(--on-deep-2);
  font-size: clamp(17px, 0.85rem + 0.45vw, 20px);
  line-height: 1.55;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(26px, 3.6vh, 38px);
}

.hero__note {
  margin-top: 18px;
  color: var(--on-deep-3);
  font-size: 13.5px;
}

.hero__foot {
  padding-block: 22px 26px;
  border-top: 1px solid var(--on-deep-rule);
}

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.facts dt {
  color: var(--on-deep-3);
  font-size: 12px;
  font-weight: 560;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.facts dd {
  margin-top: 6px;
  font-size: 15.5px;
}

@media (max-width: 759px) {
  /* Внизу первого экрана на телефоне — место для знака из цифр (canvas.js), чтобы он не лёг под кнопки. */
  .hero__in {
    padding-bottom: 210px;
  }

  .hero__actions .btn {
    flex: 1 1 auto;
  }

  .facts {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .facts__item {
    display: flex;
    justify-content: space-between;
    gap: 16px;
  }

  .facts dd {
    margin-top: 0;
    text-align: right;
    font-size: 14.5px;
  }
}

/* Вступление: строки заголовка поднимаются из-под маски, остальное проявляется следом. */
.js .line__in {
  transform: translateY(110%);
  animation: rise 1.2s var(--ease) 0.18s forwards;
}

.js .line:nth-child(2) .line__in {
  animation-delay: 0.27s;
}

.js .line:nth-child(3) .line__in {
  animation-delay: 0.36s;
}

.js .intro {
  opacity: 0;
  transform: translateY(16px);
  animation: appear 1s var(--ease) forwards;
}

.js .intro--1 {
  animation-delay: 0.1s;
}

.js .intro--2 {
  animation-delay: 0.6s;
}

.js .intro--3 {
  animation-delay: 0.72s;
}

.js .intro--4 {
  animation-delay: 0.86s;
}

@keyframes rise {
  to {
    transform: none;
  }
}

@keyframes appear {
  to {
    opacity: 1;
    transform: none;
  }
}

/* --- Бегущая строка --- */

.ticker {
  overflow: hidden;
  padding-block: clamp(18px, 2.6vw, 28px);
  border-bottom: 1px solid var(--rule);
}

.ticker__track {
  display: flex;
  width: max-content;
  animation: ticker 64s linear infinite;
}

.ticker__list {
  display: flex;
  flex: none;
}

.ticker__list li {
  display: flex;
  align-items: center;
  padding-right: clamp(26px, 3vw, 44px);
  color: var(--ink-2);
  font-size: clamp(18px, 0.9rem + 0.9vw, 27px);
  font-weight: 500;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.ticker__list li::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-right: clamp(26px, 3vw, 44px);
  border-radius: 2px;
  background: var(--accent);
}

@keyframes ticker {
  to {
    transform: translateX(-50%);
  }
}

@media (hover: hover) {
  .ticker:hover .ticker__track {
    animation-play-state: paused;
  }
}

/* --- Утверждение: слова загораются по мере прокрутки --- */

.statement {
  padding-block: clamp(96px, 17vh, 210px);
}

.statement__text {
  max-width: 21.5em;
  font-size: clamp(28px, 0.8rem + 2.75vw, 58px);
  font-weight: 500;
  line-height: 1.14;
  letter-spacing: -0.03em;
}

.js .statement__text .w {
  color: var(--ink-dim);
  transition: color 0.45s;
}

.js .statement__text .w.on {
  color: var(--ink);
}

/* --- История: закреплённый макет меняется по шагам --- */

.story {
  padding-block: clamp(72px, 12vh, 150px) clamp(40px, 8vh, 110px);
}

.story__body {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 5vw, 96px);
  margin-top: clamp(32px, 6vh, 72px);
}

.story__steps {
  grid-column: 1;
  grid-row: 1;
}

.step {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 82svh;
  padding-block: 8vh;
  transition: opacity 0.7s var(--ease);
}

.js .step {
  opacity: 0.26;
}

.js .step.is-on {
  opacity: 1;
}

.step__num {
  color: var(--accent);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.14em;
}

.step__title {
  margin-top: 14px;
  font-size: clamp(26px, 0.9rem + 1.5vw, 42px);
  font-weight: 560;
  line-height: 1.06;
  letter-spacing: -0.035em;
}

.step__text {
  max-width: 29em;
  margin-top: 18px;
  color: var(--ink-2);
  font-size: 17.5px;
}

.stage {
  position: sticky;
  top: calc(var(--header-h) + 3.5vh);
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  display: flex;
  flex-direction: column;
  height: calc(100svh - var(--header-h) - 7vh);
  min-height: 520px;
  max-height: 780px;
}

.stage__note {
  margin-top: 12px;
  color: var(--ink-3);
  font-size: 12.5px;
  text-align: right;
}

.sheet {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  font-size: 14px;
  line-height: 1.4;
}

.sheet__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 4px 16px;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--rule);
}

.sheet__titles,
.sheet__metas {
  display: grid;
}

.sheet__title,
.sheet__meta {
  grid-area: 1 / 1;
  opacity: 0;
  transition:
    opacity 0.45s var(--ease),
    transform 0.7s var(--ease);
}

.sheet__title {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
  transform: translateY(10px);
}

.sheet__meta {
  justify-self: end;
  color: var(--ink-3);
  font-size: 13px;
  white-space: nowrap;
}

.stage[data-at="1"] [data-for~="1"],
.stage[data-at="2"] [data-for~="2"],
.stage[data-at="3"] [data-for~="3"],
.stage[data-at="4"] [data-for~="4"],
.stage[data-at="5"] [data-for~="5"] {
  opacity: 1;
  transform: none;
}

.sheet__progress {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin-top: 14px;
}

.sheet__progress li {
  position: relative;
  height: 2px;
  overflow: hidden;
  border-radius: 2px;
  background: var(--rule);
}

.sheet__progress li::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.8s var(--ease);
}

.stage[data-at="1"] .sheet__progress li:nth-child(-n + 1)::after,
.stage[data-at="2"] .sheet__progress li:nth-child(-n + 2)::after,
.stage[data-at="3"] .sheet__progress li:nth-child(-n + 3)::after,
.stage[data-at="4"] .sheet__progress li:nth-child(-n + 4)::after,
.stage[data-at="5"] .sheet__progress li:nth-child(-n + 5)::after {
  transform: none;
}

.sheet__views {
  position: relative;
  flex: 1;
  min-height: 0;
}

.view {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: 16px 24px 22px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px) scale(0.99);
  transition:
    opacity 0.45s var(--ease),
    transform 0.8s var(--ease),
    visibility 0s linear 0.45s;
}

.stage[data-at="1"] .view--ledger,
.stage[data-at="2"] .view--ledger,
.stage[data-at="3"] .view--dds,
.stage[data-at="4"] .view--pnl,
.stage[data-at="5"] .view--cal {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition:
    opacity 0.6s var(--ease) 0.12s,
    transform 0.9s var(--ease) 0.12s,
    visibility 0s;
}

/* Шаги 1–2: операции приходят, затем получают статью. */
.ledger__sum {
  display: grid;
  margin-bottom: 6px;
  color: var(--ink-3);
  font-size: 12.5px;
}

.ledger__sum > span {
  grid-area: 1 / 1;
  transition: opacity 0.4s;
}

.ledger__sum-b,
.stage[data-at="2"] .ledger__sum-a {
  opacity: 0;
}

.stage[data-at="2"] .ledger__sum-b {
  opacity: 1;
}

.row {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  border-top: 1px solid var(--rule);
  transition:
    opacity 0.5s var(--ease),
    transform 0.9s var(--ease);
  transition-delay: calc(var(--i, 0) * 70ms);
}

.row:first-child {
  border-top: 0;
}

.js .row {
  opacity: 0;
  transform: translateX(-20px);
}

.js .stage[data-at="1"] .row,
.js .stage[data-at="2"] .row {
  opacity: 1;
  transform: none;
}

.src {
  display: flex;
  flex-direction: column;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.src small {
  margin-top: 2px;
  color: var(--ink-3);
  font-size: 10.5px;
  font-weight: 560;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.row__main {
  min-width: 0;
}

.row__what {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row__sub {
  display: grid;
  margin-top: 4px;
}

.row__meta,
.tag {
  grid-area: 1 / 1;
  min-width: 0;
}

.row__meta {
  overflow: hidden;
  color: var(--ink-3);
  font-size: 12.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition:
    opacity 0.35s,
    transform 0.6s var(--ease);
}

.tag {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 8px;
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity 0.45s var(--ease),
    transform 0.7s var(--ease);
}

.tag b {
  padding: 2px 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 560;
  white-space: nowrap;
  transition:
    background-color 0.5s,
    border-color 0.5s;
}

.tag i {
  color: var(--ink-3);
  font-size: 11.5px;
  font-style: normal;
  white-space: nowrap;
}

.tag__state {
  display: grid;
}

.tag__state > i {
  grid-area: 1 / 1;
  transition: opacity 0.4s;
}

.tag--ai b {
  border-color: var(--accent-line);
  border-style: dashed;
  background: transparent;
}

.tag__ai {
  color: var(--accent);
}

.tag__ok {
  opacity: 0;
}

.stage[data-at="2"] .row__meta {
  opacity: 0;
  transform: translateY(-6px);
}

.stage[data-at="2"] .tag {
  opacity: 1;
  transform: none;
  transition-delay: calc(0.25s + var(--i, 0) * 90ms);
}

/* ИИ предложил — через мгновение человек принимает. */
.stage[data-at="2"] .tag--ai b {
  border-color: transparent;
  background: var(--accent-soft);
  transition-delay: 1.9s;
}

.stage[data-at="2"] .tag__ai {
  opacity: 0;
  transition-delay: 1.9s;
}

.stage[data-at="2"] .tag__ok {
  opacity: 1;
  transition-delay: 1.9s;
}

/* Шаг 3: движение денег. */
.dds__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
}

.dds__scope {
  display: grid;
  color: var(--ink-3);
  font-size: 13px;
}

.dds__scope > span {
  grid-area: 1 / 1;
  justify-self: end;
  opacity: 0;
  transition: opacity 0.45s;
}

.dds__scope > span.is-on {
  opacity: 1;
}

.seg {
  position: relative;
  display: inline-grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  padding: 3px;
  border-radius: 999px;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--rule);
  font-size: 12.5px;
  font-weight: 560;
}

.seg__thumb {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc((100% - 6px) / 3);
  border-radius: 999px;
  background: var(--surface);
  background: oklch(from var(--surface) l c h / 0.78);
  -webkit-backdrop-filter: blur(6px) saturate(1.5);
  backdrop-filter: blur(6px) saturate(1.5);
  box-shadow:
    inset 0 1px 0 oklch(1 0 0 / 0.7),
    0 0 0 1px var(--rule),
    0 6px 14px -8px oklch(0.25 0.03 75 / 0.4);
  transform: translateX(calc(var(--seg, 0) * 100%));
  transition: transform 0.7s var(--ease);
}

/* Бегунок переключателя — капля: на ходу вытягивается и, встав на место, слегка пружинит. */
.seg.is-moving .seg__thumb {
  animation: squish 0.7s var(--ease);
}

@keyframes squish {
  30% {
    scale: 1.18 0.86;
  }

  65% {
    scale: 0.97 1.03;
  }
}

.seg__opt {
  position: relative;
  padding: 6px 14px;
  color: var(--ink-3);
  text-align: center;
  white-space: nowrap;
  transition: color 0.35s;
}

.seg:not([data-on]) .seg__opt:nth-child(2),
.seg[data-on="0"] .seg__opt:nth-child(2),
.seg[data-on="1"] .seg__opt:nth-child(3),
.seg[data-on="2"] .seg__opt:nth-child(4) {
  color: var(--ink);
}

.kpi {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule);
}

.kpi dt {
  color: var(--ink-3);
  font-size: 12px;
}

.kpi dd {
  margin-top: 4px;
  font-size: clamp(16px, 0.6rem + 1vw, 24px);
  font-weight: 600;
  letter-spacing: -0.025em;
  white-space: nowrap;
}

.bars {
  position: relative;
  display: grid;
  flex: 1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6%;
  align-items: end;
  min-height: 120px;
  margin-top: 14px;
  padding: 0 3% 26px;
}

.bars__grid {
  position: absolute;
  inset: 0 0 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.bars__grid i {
  height: 1px;
  background: var(--rule);
}

.bars__grid i:last-child {
  background: var(--rule-2);
}

.bars__month {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 7%;
  height: 100%;
}

.bar {
  width: 36%;
  height: calc(var(--v, 0) * 100%);
  border-radius: 6px 6px 2px 2px;
  transition: height 1.1s var(--ease);
}

.bars__month:nth-child(3) .bar {
  transition-delay: 60ms;
}

.bars__month:nth-child(4) .bar {
  transition-delay: 120ms;
}

.bars__month:nth-child(5) .bar {
  transition-delay: 180ms;
}

.bar--in {
  background: var(--accent);
}

.bar--out {
  background: var(--sand);
}

.bars__label {
  position: absolute;
  bottom: -24px;
  color: var(--ink-3);
  font-size: 12px;
}

.legend {
  display: flex;
  gap: 18px;
  margin-top: 6px;
  color: var(--ink-3);
  font-size: 12px;
}

.legend > span::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 7px;
  border-radius: 2px;
  background: var(--accent);
}

.legend .legend__out::before {
  background: var(--sand);
}

/* Шаг 4: прибыль и убытки — водопад от выручки до чистой прибыли. */
.wf {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
}

.wf__row {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.5fr) 7.4em;
  align-items: center;
  gap: 14px;
  padding: 8px 0;
  border-top: 1px solid var(--rule);
  font-size: 13.5px;
}

.wf__row:first-child {
  border-top: 0;
}

.wf__name small {
  display: block;
  color: var(--ink-3);
  font-size: 11.5px;
  font-weight: 450;
}

.wf__row--total .wf__name {
  font-weight: 600;
}

@media (min-width: 1024px) and (min-height: 820px) {
  .wf__row {
    padding: 12px 0;
  }
}

.wf__track {
  position: relative;
  height: 14px;
}

.wf__bar {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--a, 0%);
  width: calc(var(--b, 0%) - var(--a, 0%));
  border-radius: 3px;
  background: var(--sand);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 1s var(--ease);
  transition-delay: calc(0.15s + var(--i, 0) * 90ms);
}

.wf__row--total .wf__bar {
  background: var(--accent);
  transform-origin: left;
}

.stage[data-at="4"] .wf__bar {
  transform: none;
}

.wf__val {
  font-weight: 560;
  text-align: right;
  white-space: nowrap;
}

.wf__row--net .wf__val {
  color: var(--pos);
}

/* Шаг 5: платёжный календарь и кассовый разрыв. */
.cal {
  position: relative;
  flex: 1;
  min-height: 150px;
}

.cal__chart {
  position: absolute;
  inset: 0 0 26px;
  width: 100%;
  height: calc(100% - 26px);
  overflow: visible;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 1.7s var(--ease-io) 0.2s;
}

.stage[data-at="5"] .cal__chart {
  clip-path: inset(-10px -10px -10px -10px);
}

.cal__grid {
  stroke: var(--rule);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.cal__zero {
  stroke: var(--ink-3);
  stroke-width: 1;
  stroke-dasharray: 3 4;
  vector-effect: non-scaling-stroke;
}

.cal__guide {
  stroke: var(--neg);
  stroke-width: 1;
  stroke-dasharray: 2 4;
  opacity: 0.6;
  vector-effect: non-scaling-stroke;
}

.cal__gap {
  fill: var(--neg-soft);
}

.cal__line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.cal__dot {
  position: absolute;
  width: 9px;
  height: 9px;
  margin: -4.5px 0 0 -4.5px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: var(--surface);
  opacity: 0;
  transform: scale(0.4);
  transition:
    opacity 0.4s,
    transform 0.6s var(--ease);
}

/* Точки платежей — в долях графика: viewBox 600 × 240, под графиком 26px подписей. */
.cal__dot--1 {
  left: calc(116.1 / 600 * 100%);
  top: calc(75 / 240 * (100% - 26px));
  transition-delay: 0.6s;
}

.cal__dot--2 {
  left: calc(202.7 / 600 * 100%);
  top: calc(96.6 / 240 * (100% - 26px));
  transition-delay: 0.85s;
}

.cal__dot--3 {
  left: calc(310.8 / 600 * 100%);
  top: calc(97.3 / 240 * (100% - 26px));
  transition-delay: 1.1s;
}

.cal__dot--gap {
  left: calc(483.9 / 600 * 100%);
  top: calc(173.5 / 240 * (100% - 26px));
  border-color: var(--neg);
  transition-delay: 1.5s;
}

.stage[data-at="5"] .cal__dot {
  opacity: 1;
  transform: none;
}

.cal__zero-label {
  position: absolute;
  top: calc(151 / 240 * (100% - 26px) - 18px);
  left: 0;
  color: var(--ink-3);
  font-size: 11px;
}

.cal__callout {
  position: absolute;
  top: calc(173.5 / 240 * (100% - 26px) - 6px);
  right: calc(100% - 483.9 / 600 * 100% + 16px);
  display: flex;
  flex-direction: column;
  padding: 7px 11px;
  border-radius: 10px;
  background: var(--surface);
  box-shadow:
    0 0 0 1px color-mix(in oklch, var(--neg) 35%, transparent),
    0 10px 24px -14px oklch(0.25 0.03 75 / 0.4);
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.35;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(8px);
  transition:
    opacity 0.5s,
    transform 0.8s var(--ease);
  transition-delay: 1.7s;
}

.cal__callout b {
  color: var(--neg);
  font-size: 12.5px;
}

.stage[data-at="5"] .cal__callout {
  opacity: 1;
  transform: none;
}

.cal__dates {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  justify-content: space-between;
  color: var(--ink-3);
  font-size: 11.5px;
}

.pay {
  margin-top: 14px;
}

.pay li {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 12px;
  padding: 7px 0;
  border-top: 1px solid var(--rule);
  font-size: 13px;
  transition:
    opacity 0.5s,
    transform 0.7s var(--ease);
  transition-delay: calc(0.3s + var(--i, 0) * 80ms);
}

.js .pay li {
  opacity: 0;
  transform: translateY(8px);
}

.js .stage[data-at="5"] .pay li {
  opacity: 1;
  transform: none;
}

.pay__day {
  color: var(--ink-3);
}

.pay__what {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pay--gap .amt,
.pay--gap .pay__day {
  color: var(--neg);
}

@media (max-width: 1023px) {
  .story__body {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .stage {
    z-index: 2;
    grid-column: 1;
    top: calc(var(--header-h) + 8px);
    height: min(58svh, 540px);
    min-height: 390px;
    padding-bottom: 10px;
    background: var(--bg);
  }

  .stage__note {
    margin-top: 6px;
  }

  .story__steps {
    grid-row: 2;
  }

  .step {
    justify-content: flex-start;
    min-height: 62svh;
    padding-block: 28px 0;
  }

  .step__text {
    font-size: 16.5px;
  }
}

@media (max-width: 759px) {
  .sheet {
    font-size: 12.5px;
  }

  .sheet__head {
    grid-template-columns: minmax(0, 1fr);
    padding: 14px 16px 12px;
  }

  .sheet__meta {
    justify-self: start;
  }

  .sheet__progress {
    margin-top: 10px;
  }

  .kpi {
    margin-top: 12px;
    padding-bottom: 10px;
  }

  .bars {
    min-height: 90px;
    margin-top: 10px;
  }

  .legend {
    display: none;
  }

  .sheet__title {
    font-size: 16px;
  }

  .sheet__meta {
    font-size: 11.5px;
  }

  .view {
    padding: 10px 16px 14px;
  }

  .row {
    grid-template-columns: 58px minmax(0, 1fr) auto;
    gap: 10px;
    padding: 8px 0;
  }

  .src {
    font-size: 12px;
  }

  .row--extra {
    display: none;
  }

  .tag b {
    font-size: 11.5px;
  }

  .tag i {
    display: none;
  }

  .tag__state > i {
    display: block;
  }

  .seg__opt {
    padding: 5px 10px;
    font-size: 11.5px;
  }

  .kpi dd {
    font-size: 15px;
  }

  .wf__row {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) 6.4em;
    gap: 10px;
    padding: 5px 0;
    font-size: 12px;
  }

  .wf__name small {
    display: none;
  }

  .pay li:nth-child(-n + 2) {
    display: none;
  }

  .cal__callout {
    font-size: 11px;
  }
}

@media (max-height: 760px) and (min-width: 1024px) {
  .row--extra:last-child {
    display: none;
  }
}

/* --- Возможности: карточки --- */

.features {
  padding-block: clamp(80px, 13vh, 170px);
  border-top: 1px solid var(--rule);
}

.bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
  margin-top: clamp(40px, 7vh, 84px);
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 440px;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
  transition:
    opacity 0.9s var(--ease),
    transform 1.1s var(--ease),
    box-shadow 0.5s,
    border-color 0.5s;
}

@media (hover: hover) {
  .card:hover {
    border-color: var(--rule-2);
    box-shadow: var(--shadow);
  }
}

.card--cash,
.card--ai {
  grid-column: span 7;
}

.card--plan,
.card--scope {
  grid-column: span 5;
}

.card--roles,
.card--onec {
  grid-column: span 6;
}

.card__art {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  min-height: 240px;
  padding: 32px 32px 8px;
}

.card__copy {
  padding: 12px 32px 32px;
}

.card__title {
  font-size: clamp(20px, 0.9rem + 0.5vw, 24px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.028em;
}

.card__text {
  max-width: 34em;
  margin-top: 10px;
  color: var(--ink-2);
  font-size: 15.5px;
}

@media (max-width: 1023px) {
  .card--cash,
  .card--ai,
  .card--plan,
  .card--scope,
  .card--roles,
  .card--onec {
    grid-column: span 12;
  }

  .card {
    min-height: 0;
  }
}

@media (min-width: 760px) and (max-width: 1023px) {
  .card--plan,
  .card--scope,
  .card--roles,
  .card--onec {
    grid-column: span 6;
  }
}

@media (max-width: 759px) {
  .card__art {
    min-height: 0;
    padding: 22px 20px 4px;
  }

  .card__copy {
    padding: 14px 20px 24px;
  }
}

/* Касса: записи приходят сверху, остаток пересчитывается. */
.till {
  width: min(100%, 440px);
  margin-inline: auto;
  padding: 16px 18px 12px;
  border-radius: 16px;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--rule);
}

.till__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
  color: var(--ink-3);
  font-size: 13px;
}

.till__head strong {
  color: var(--ink);
  font-size: 22px;
  letter-spacing: -0.025em;
  white-space: nowrap;
}

.till__list {
  position: relative;
  height: 132px;
  overflow: hidden;
}

.till__list li {
  position: absolute;
  right: 0;
  left: 0;
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  height: 44px;
  border-bottom: 1px solid var(--rule);
  font-size: 13.5px;
  transform: translateY(calc(var(--pos, 0) * 100%));
  transition: transform 0.8s var(--ease);
}

.till__list li:nth-child(2) {
  --pos: 1;
}

.till__list li:nth-child(3) {
  --pos: 2;
}

.till__list li:nth-child(4) {
  --pos: 3;
}

.till__list li.is-jump {
  transition: none;
}

.till__list li.is-new {
  animation: tillIn 0.8s var(--ease);
}

@keyframes tillIn {
  from {
    opacity: 0;
  }
}

.till__kind {
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.till__what {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.till__transit {
  display: grid;
  margin-top: 10px;
  font-size: 12.5px;
}

.till__transit > span {
  grid-area: 1 / 1;
  justify-self: start;
  padding: 4px 10px;
  border-radius: 999px;
  opacity: 0;
  transform: translateY(4px);
  transition:
    opacity 0.45s,
    transform 0.6s var(--ease);
}

.till__wait {
  background: var(--bg-2);
  color: var(--ink-2);
  box-shadow: inset 0 0 0 1px var(--rule-2);
}

.till__done {
  background: var(--accent-soft);
  color: var(--accent);
}

.card.is-transit .till__wait,
.card.is-landed .till__done {
  opacity: 1;
  transform: none;
}

/* План статей: шаблоны отраслей добавляют свои статьи. */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chips li {
  padding: 7px 13px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--rule-2);
  color: var(--ink-2);
  font-size: 13px;
  transition:
    background-color 0.45s,
    color 0.45s,
    box-shadow 0.45s;
}

.chips li.is-on {
  background: var(--accent);
  box-shadow: none;
  color: var(--accent-ink);
}

.adds {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px dashed var(--rule-2);
}

.adds li {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: var(--ink-2);
  font-size: 13.5px;
  transition:
    opacity 0.5s,
    transform 0.7s var(--ease);
}

.adds li::before {
  content: "+";
  color: var(--accent);
  font-weight: 650;
}

.js .card--plan .adds li {
  opacity: 0;
  transform: translateY(6px);
}

.js .card--plan .adds li.is-on {
  opacity: 1;
  transform: none;
}

/* Группа, юрлицо, направление: одна полоса делится по-разному. */
.seg--small {
  align-self: flex-start;
}

.split {
  display: flex;
  height: 46px;
  margin-top: 24px;
  overflow: hidden;
  border-radius: 10px;
}

.split__part {
  flex: var(--f, 0) 1 0;
  min-width: 0;
  border-left: calc(min(var(--f, 0) * 1000, 1) * 4px) solid var(--surface);
  transition:
    flex-grow 0.9s var(--ease),
    border-left-width 0.9s var(--ease);
}

.split__part:first-child {
  --f: 1;
  border-left: 0;
  background: var(--tint-1);
}

.split__part:nth-child(2) {
  background: var(--tint-2);
}

.split__part:nth-child(3) {
  background: var(--tint-3);
}

.split__part:nth-child(4) {
  background: var(--tint-4);
}

.split__part:nth-child(5) {
  background: var(--tint-5);
}

.split__names {
  display: grid;
  margin-top: 14px;
  color: var(--ink-3);
  font-size: 13px;
}

.split__names > span {
  grid-area: 1 / 1;
  opacity: 0;
  transition: opacity 0.5s;
}

.split__names > span.is-on,
.split__names:not(.is-set) > span:first-child {
  opacity: 1;
}

/* ИИ: персональные данные скрываются до вопроса модели. */
.mask__label {
  display: block;
  margin-bottom: 8px;
  color: var(--ink-3);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.mask__text {
  display: block;
  font-size: clamp(16px, 0.8rem + 0.4vw, 18px);
  line-height: 1.5;
}

.pd > span {
  white-space: nowrap;
}

.pd > span:first-child {
  border-radius: 4px;
  background: var(--neg-soft);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.pd > span + span {
  display: none;
  color: var(--accent);
  font-weight: 600;
}

.pd.is-masked > span:first-child {
  display: none;
}

.pd.is-masked > span + span {
  display: inline;
  animation: maskIn 0.6s var(--ease);
}

@keyframes maskIn {
  from {
    opacity: 0;
    filter: blur(3px);
  }
}

.guess {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px dashed var(--rule-2);
  transition:
    opacity 0.5s,
    transform 0.8s var(--ease);
}

.js .card--ai .guess {
  opacity: 0;
  transform: translateY(8px);
}

.js .card--ai .guess.is-on {
  opacity: 1;
  transform: none;
}

.guess__row {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 16px;
}

.guess__meter {
  flex: 1;
  height: 4px;
  overflow: hidden;
  border-radius: 4px;
  background: var(--rule);
}

.guess__meter i {
  display: block;
  width: 91%;
  height: 100%;
  background: var(--accent);
  transform-origin: left;
  transition: transform 1.3s var(--ease) 0.2s;
}

.js .card--ai .guess__meter i {
  transform: scaleX(0);
}

.js .card--ai .guess.is-on .guess__meter i {
  transform: none;
}

.guess__pct {
  color: var(--accent);
  font-weight: 600;
}

.guess__who {
  display: block;
  margin-top: 8px;
  color: var(--ink-3);
  font-size: 13px;
}

/* Роли: таблица прав, столбец роли подсвечивается по очереди. */
.roles {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.roles th,
.roles td {
  padding: 9px 6px;
  border-bottom: 1px solid var(--rule);
  text-align: center;
  transition: background-color 0.45s, color 0.45s;
}

.roles tr:last-child th,
.roles tr:last-child td {
  border-bottom: 0;
}

.roles thead th {
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 600;
}

.roles tbody th {
  padding-left: 0;
  color: var(--ink-2);
  font-weight: 450;
  text-align: left;
}

.roles td::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--rule-2);
}

.roles td.y::before {
  background: var(--accent);
  box-shadow: none;
}

.roles[data-col="1"] :is(th, td):nth-child(2),
.roles[data-col="2"] :is(th, td):nth-child(3),
.roles[data-col="3"] :is(th, td):nth-child(4) {
  background: var(--accent-soft);
}

.roles[data-col="1"] thead th:nth-child(2),
.roles[data-col="2"] thead th:nth-child(3),
.roles[data-col="3"] thead th:nth-child(4) {
  color: var(--accent);
}

@media (max-width: 479px) {
  .roles {
    font-size: 12px;
  }

  .roles thead th {
    font-size: 10.5px;
  }
}

/* Поверх 1С: выписка уходит из 1С в кабинет. */
.sides {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.sides__col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  border-radius: 14px;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--rule);
  color: var(--ink-2);
  font-size: 14px;
}

.sides__col--we {
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent-line);
  color: var(--ink);
}

.sides__head {
  color: var(--ink-3);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.sides__col--we .sides__head {
  color: var(--accent);
}

.sides__file {
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--surface);
  box-shadow:
    0 0 0 1px var(--rule-2),
    0 8px 18px -10px oklch(0.2 0.02 75 / 0.35);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.js .card--onec.is-live .sides__file {
  animation: carry 3.8s var(--ease-io) infinite;
}

@keyframes carry {
  0% {
    opacity: 0;
    transform: translateX(-26px);
  }

  18% {
    opacity: 1;
  }

  70% {
    opacity: 1;
    transform: translateX(26px);
  }

  86%,
  100% {
    opacity: 0;
    transform: translateX(26px);
  }
}

@media (max-width: 559px) {
  .sides {
    grid-template-columns: minmax(0, 1fr);
    justify-items: stretch;
  }

  .sides__file {
    justify-self: center;
  }

  .js .card--onec.is-live .sides__file {
    animation-name: carryDown;
  }

  @keyframes carryDown {
    0% {
      opacity: 0;
      transform: translateY(-10px);
    }

    18% {
      opacity: 1;
    }

    70% {
      opacity: 1;
      transform: translateY(10px);
    }

    86%,
    100% {
      opacity: 0;
      transform: translateY(10px);
    }
  }
}

/* --- Безопасность --- */

.security {
  padding-inline: clamp(8px, 1vw, 16px);
}

.panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: clamp(24px, 3vw, 36px);
  background: var(--deep);
  color: var(--on-deep);
}

.security__in {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(40px, 6vw, 104px);
  padding-block: clamp(72px, 13vh, 150px);
}

.guard {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 32px;
  margin-top: clamp(36px, 6vh, 56px);
}

.guard > div {
  padding-top: 16px;
  border-top: 1px solid var(--on-deep-rule);
}

.guard dt {
  font-size: 16px;
  font-weight: 600;
}

.guard dd {
  margin-top: 8px;
  color: var(--on-deep-2);
  font-size: 14.5px;
}

.journal {
  border-radius: 22px;
  background: var(--deep-2);
  box-shadow: inset 0 0 0 1px var(--on-deep-rule);
  font-size: 14px;
}

.journal__head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--on-deep-rule);
  font-weight: 600;
}

.journal__lock {
  color: var(--on-deep-3);
  font-size: 12.5px;
  font-weight: 500;
}

.journal__list {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: calc(8 * 46px + 12px);
  padding: 6px 0;
  overflow: hidden;
}

.journal__list li {
  display: grid;
  flex: none;
  grid-template-columns: 50px 104px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  height: 46px;
  padding-inline: 22px;
  border-bottom: 1px solid oklch(0.95 0.012 110 / 0.07);
  transition:
    margin-top 0.7s var(--ease),
    opacity 0.5s;
}

.journal__list li:last-child {
  border-bottom: 0;
}

.journal__list li.is-out {
  opacity: 0;
  margin-top: -46px;
}

.journal__list time {
  color: var(--on-deep-3);
}

.journal__list .who {
  overflow: hidden;
  color: var(--on-deep-2);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.journal__list .what {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.caret {
  display: inline-block;
  width: 7px;
  height: 1.05em;
  margin-left: 2px;
  vertical-align: -0.15em;
  background: var(--on-deep-2);
  animation: blink 1s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@media (max-width: 1023px) {
  .security__in {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 759px) {
  .guard {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .journal__list {
    height: calc(8 * 54px + 12px);
  }

  .journal__list li {
    grid-template-columns: 44px minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 0 10px;
    height: 54px;
    padding-inline: 16px;
    font-size: 13px;
  }

  .journal__list li.is-out {
    margin-top: -54px;
  }

  .journal__list time {
    grid-row: 1 / 3;
  }

  .journal__list .who {
    font-size: 11.5px;
  }

  .journal__head {
    padding: 16px;
  }
}

/* --- Вопросы --- */

.faq {
  padding-block: clamp(80px, 13vh, 170px);
}

.faq__in {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  align-items: start;
  gap: clamp(32px, 6vw, 104px);
}

.faq__in > .head {
  position: sticky;
  top: calc(var(--header-h) + 36px);
}

.qa {
  border-top: 1px solid var(--rule);
}

.qa:last-child {
  border-bottom: 1px solid var(--rule);
}

.qa summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 0;
  font-size: clamp(18px, 0.9rem + 0.5vw, 22px);
  font-weight: 550;
  letter-spacing: -0.02em;
  list-style: none;
  cursor: pointer;
  border-radius: 6px;
}

.qa summary::-webkit-details-marker {
  display: none;
}

.qa__sign {
  position: relative;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--rule-2);
  transition:
    background-color 0.35s,
    box-shadow 0.35s;
}

.qa__sign::before,
.qa__sign::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 1.5px;
  margin: -0.75px 0 0 -6px;
  border-radius: 1px;
  background: currentColor;
  transition: transform 0.5s var(--ease);
}

.qa__sign::after {
  transform: rotate(90deg);
}

.qa[open] .qa__sign {
  background: var(--accent);
  box-shadow: none;
  color: var(--accent-ink);
}

.qa[open] .qa__sign::after {
  transform: rotate(0deg);
}

@media (hover: hover) {
  .qa summary:hover .qa__sign {
    box-shadow: inset 0 0 0 1px var(--ink-3);
  }
}

.qa__a {
  max-width: 40em;
  padding-bottom: 28px;
  color: var(--ink-2);
  font-size: 16.5px;
}

.qa__a a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  border-radius: 4px;
}

@supports (interpolate-size: allow-keywords) {
  .faq {
    interpolate-size: allow-keywords;
  }

  .qa::details-content {
    block-size: 0;
    overflow: clip;
    transition:
      block-size 0.55s var(--ease),
      content-visibility 0.55s allow-discrete;
  }

  .qa[open]::details-content {
    block-size: auto;
  }
}

@media (max-width: 1023px) {
  .faq__in {
    grid-template-columns: minmax(0, 1fr);
  }

  .faq__in > .head {
    position: static;
  }
}

/* --- Последний экран --- */

.cta {
  padding: 0 clamp(8px, 1vw, 16px) clamp(8px, 1vw, 16px);
}

.panel--cta {
  display: flex;
  align-items: center;
  min-height: min(88svh, 780px);
}

.cta__canvas {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
}

.cta__in {
  padding-block: clamp(80px, 14vh, 160px);
}

.h2--xl {
  max-width: 10.5em;
  margin-top: 0;
  font-size: clamp(42px, 0.8rem + 5.6vw, 108px);
  line-height: 0.98;
  letter-spacing: -0.048em;
}

/* Кнопки — в строку, подпись — под ними: справа от кнопок на этом экране стоят столбики из цифр. */
.cta__actions {
  display: grid;
  grid-template-columns: auto auto 1fr;
  justify-items: start;
  align-items: center;
  gap: 20px 16px;
  margin-top: clamp(32px, 6vh, 56px);
}

.cta__note {
  grid-column: 1 / -1;
  max-width: 30em;
  color: var(--on-deep-2);
  font-size: 15px;
}

@media (max-width: 759px) {
  .panel--cta {
    align-items: flex-start;
    min-height: 0;
  }

  .cta__in {
    padding-block: 64px 260px;
  }

  .cta__actions {
    grid-template-columns: minmax(0, 1fr);
    justify-items: stretch;
  }

  .cta__actions .btn {
    width: 100%;
  }
}

/* --- Подвал --- */

.foot {
  padding-block: 56px 44px;
}

.foot__in {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) auto;
  align-items: start;
  gap: 32px;
}

.foot__about {
  max-width: 26em;
  margin-top: 16px;
  color: var(--ink-3);
  font-size: 14px;
}

.foot__nav {
  display: grid;
  gap: 10px;
  color: var(--ink-2);
  font-size: 14.5px;
}

.foot__nav a,
.foot__login,
.foot__access {
  justify-self: start;
  border-radius: 4px;
  transition: color 0.25s;
}

@media (hover: hover) {
  .foot__nav a:hover,
  .foot__login:hover,
  .foot__access:hover {
    color: var(--accent);
  }
}

.foot__login,
.foot__access {
  display: block;
}

.foot__access {
  margin-top: 8px;
  color: var(--ink-2);
  font-size: 14.5px;
}

.foot__end {
  text-align: right;
}

.foot__login {
  font-size: 15px;
  font-weight: 600;
}

.foot__copy {
  margin-top: 10px;
  color: var(--ink-3);
  font-size: 13px;
}

@media (max-width: 759px) {
  .foot__in {
    grid-template-columns: minmax(0, 1fr);
  }

  .foot__end {
    text-align: left;
  }
}

/* --- Плавающая кнопка входа на телефоне: стеклянная, появляется после первого экрана --- */

.dock {
  display: none;
}

@media (max-width: 759px) {
  .dock {
    position: fixed;
    right: 16px;
    bottom: calc(14px + env(safe-area-inset-bottom));
    left: 16px;
    z-index: 45;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 54px;
    border-radius: 999px;
    background: var(--deep);
    background: oklch(from var(--deep) l c h / 0.9);
    box-shadow:
      inset 0 1px 0 oklch(1 0 0 / 0.2),
      0 16px 36px -14px oklch(0.08 0.03 163 / 0.7);
    color: var(--on-deep);
    font-size: 16px;
    font-weight: 600;
    transform: translateY(calc(100% + 40px));
    transition: transform 0.7s var(--spring);
  }

  .dock.is-on {
    transform: none;
  }

  .dock.is-on:active {
    transform: scale(0.95);
  }

  .dock .ic {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
}

/* --- Страница 404 --- */

.lost {
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding: var(--gutter);
  background: var(--deep);
  color: var(--on-deep);
}

.lost__in {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: min(100%, 640px);
}

.lost .brand {
  margin-bottom: 64px;
}

.lost .h2 {
  color: var(--on-deep);
}

.lost .h2 .dim {
  color: var(--on-deep-3);
}

.lost .lead {
  color: var(--on-deep-2);
}

.lost .hero__actions {
  margin-top: 36px;
}

/* --- Появление при прокрутке --- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.9s var(--ease),
    transform 1.1s var(--ease),
    box-shadow 0.5s,
    border-color 0.5s;
  transition-delay: var(--d, 0s), var(--d, 0s), 0s, 0s;
}

.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* --- Уменьшенное движение: всё на местах сразу, без анимаций --- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }

  .js .line__in,
  .js .intro,
  .js [data-reveal] {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .js .statement__text .w {
    color: var(--ink);
  }

  .ticker__track {
    flex-wrap: wrap;
    justify-content: center;
    width: auto;
    animation: none;
  }

  .ticker__list {
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 10px;
  }

  .ticker__list[aria-hidden] {
    display: none;
  }

  .caret {
    display: none;
  }

  .js .card--onec.is-live .sides__file {
    animation: none;
  }
}
