/* Сальдо — стили лендинга. Токены описаны в spec.md, раздел 9. */

@font-face { font-family: "Onest"; font-weight: 400; font-display: swap; src: url(/fonts/onest-cyrillic-400.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; font-weight: 500; font-display: swap; src: url(/fonts/onest-cyrillic-500.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; font-weight: 600; font-display: swap; src: url(/fonts/onest-cyrillic-600.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; font-weight: 700; font-display: swap; src: url(/fonts/onest-cyrillic-700.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; font-weight: 400; font-display: swap; src: url(/fonts/onest-latin-400.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+20BD, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Onest"; font-weight: 500; font-display: swap; src: url(/fonts/onest-latin-500.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+20BD, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Onest"; font-weight: 600; font-display: swap; src: url(/fonts/onest-latin-600.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+20BD, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Onest"; font-weight: 700; font-display: swap; src: url(/fonts/onest-latin-700.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+20BD, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  color-scheme: light;
  --paper: #F2F4F1;
  --surface: #FFFFFF;
  --ink: #15233B;
  --muted: #56627A;
  --line: #D6DDD8;
  --money: #0E8358;
  --money-ink: #0A6443;
  --money-soft: #DDEFE6;
  --on-money: #FFFFFF;
  --due: #A95E1A;
  --chat-bg: #E6ECE8;
  --bubble-bot: #FFFFFF;
  --bubble-me: #D3EEDF;
  --shadow: 0 1.25rem 3rem rgb(21 35 59 / 12%), 0 0.25rem 0.75rem rgb(21 35 59 / 6%);
  --font: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --paper: #10161F;
    --surface: #18202B;
    --ink: #E9EDF2;
    --muted: #9BA6B5;
    --line: #283243;
    --money: #3CC48C;
    --money-ink: #7FE0B4;
    --money-soft: #15332A;
    --on-money: #0B1A13;
    --due: #E0A064;
    --chat-bg: #141B25;
    --bubble-bot: #212A37;
    --bubble-me: #1D4535;
    --shadow: 0 1.25rem 3rem rgb(0 0 0 / 45%);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.55 var(--font);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--money-ink); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--money); outline-offset: 3px; border-radius: 6px; }
b, strong { font-weight: 600; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; text-wrap: balance; }
h2 { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem); line-height: 1.12; letter-spacing: -0.02em; }
h3 { font-size: 1.1875rem; line-height: 1.3; font-weight: 600; letter-spacing: -0.005em; }
h4 { font-size: 1.0625rem; font-weight: 600; }
p { margin: 0; }
ul, ol, dl { margin: 0; padding: 0; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -3rem; background: var(--surface); padding: 0.5rem 1rem; border-radius: 8px; z-index: 20; }
.skip:focus { top: calc(env(safe-area-inset-top, 0px) + 0.5rem); }

.wrap { max-width: 72rem; margin-inline: auto; padding-inline: max(1.25rem, env(safe-area-inset-left, 0px)); }
.narrow > * { max-width: 46rem; }

/* Кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3rem; padding: 0.75rem 1.5rem;
  border-radius: 0.75rem; border: 1px solid transparent;
  font: 500 1rem/1.2 var(--font); text-decoration: none; white-space: nowrap;
  transition: background-color 0.15s, border-color 0.15s;
}
.btn-main { background: var(--money); color: var(--on-money); }
.btn-main:hover { background: var(--money-ink); }
@media (prefers-color-scheme: dark) { .btn-main:hover { background: #5AD6A2; } }
.btn-quiet { border-color: var(--line); color: var(--ink); background: var(--surface); }
.btn-quiet:hover { border-color: var(--muted); }
.btn-small { min-height: 2.5rem; padding: 0.5rem 1rem; font-size: 0.9375rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
@media (max-width: 520px) { .actions .btn { flex: 1 1 100%; } }

/* Шапка */
.top {
  position: sticky; top: 0; z-index: 10;
  padding-top: env(safe-area-inset-top, 0px);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.top-in { display: flex; align-items: center; gap: 2rem; min-height: 4rem; }
.logo { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.25rem; letter-spacing: -0.01em; }
.logo-mark { width: 1.5rem; height: 1.5rem; fill: var(--money); }
.nav { display: flex; gap: 1.5rem; margin-left: auto; }
.nav a { color: var(--muted); text-decoration: none; font-size: 0.9375rem; }
.nav a:hover { color: var(--ink); }
@media (max-width: 860px) {
  .nav { display: none; }
  .top-in .btn { margin-left: auto; }
}

/* Первый экран */
.hero { padding-block: clamp(2.5rem, 6vw, 5rem) clamp(3.5rem, 7vw, 6rem); }
.hero-in { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero h1 {
  font-size: clamp(2.5rem, 1.3rem + 4.4vw, 4.25rem);
  line-height: 1.02; letter-spacing: -0.035em;
  max-width: 11ch;
}
.lead { margin-top: 1.5rem; font-size: 1.1875rem; line-height: 1.5; color: var(--muted); max-width: 34rem; }
.facts { list-style: none; margin-block: 1.75rem 2rem; display: grid; gap: 0.625rem; }
.facts li { position: relative; padding-left: 2rem; }
.facts li::before {
  content: ""; position: absolute; left: 0; top: 0.2em;
  width: 1.25rem; height: 1.25rem; border-radius: 50%;
  background: var(--money-soft) no-repeat center / 0.75rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.3l2.6 2.5L10 3.4' fill='none' stroke='%230E8358' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
@media (max-width: 900px) {
  .hero-in { grid-template-columns: 1fr; }
  .hero h1 { max-width: 13ch; }
}

/* Демо: вкладки и телефон */
.demo { display: grid; justify-items: center; gap: 1rem; }
.tabs { display: flex; gap: 0.375rem; flex-wrap: wrap; justify-content: center; max-width: 100%; }
.tabs button {
  font: 500 0.9375rem/1.2 var(--font); color: var(--muted);
  background: transparent; border: 1px solid var(--line); border-radius: 999px;
  padding: 0.5rem 0.875rem; cursor: pointer; min-height: 2.5rem;
}
@media (max-width: 520px) {
  .tabs { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; padding-bottom: 0.25rem; width: 100%; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs button { flex: none; }
}
.tabs button:hover { color: var(--ink); border-color: var(--muted); }
.tabs button[aria-selected="true"] { background: var(--money-soft); border-color: transparent; color: var(--money-ink); }

.phone {
  width: min(100%, 23rem);
  height: 36rem;
  display: flex; flex-direction: column;
  background: var(--chat-bg);
  border: 0.5rem solid var(--surface);
  border-radius: 2.25rem;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.phone-head {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.875rem 1rem;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.ava {
  width: 2.25rem; height: 2.25rem; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--money); color: var(--on-money); font-weight: 700;
}
.who { display: grid; line-height: 1.2; }
.who small { color: var(--muted); font-size: 0.8125rem; }

.chat {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 0.5rem;
  padding: 1rem 0.75rem;
  overflow: hidden;
  font-size: 0.9375rem; line-height: 1.42;
}
.msg {
  position: relative;
  max-width: 86%;
  padding: 0.5rem 0.75rem 1.25rem;
  border-radius: 1rem;
  box-shadow: 0 1px 1px rgb(21 35 59 / 8%);
  animation: rise 0.22s ease-out both;
}
.msg.bot { align-self: flex-start; background: var(--bubble-bot); border-bottom-left-radius: 0.25rem; }
.msg.me { align-self: flex-end; background: var(--bubble-me); border-bottom-right-radius: 0.25rem; }
.msg .t { position: absolute; right: 0.625rem; bottom: 0.3rem; font-size: 0.6875rem; color: var(--muted); }
.msg .note { color: var(--due); }
.kbd { display: grid; gap: 0.25rem; margin-top: 0.375rem; align-self: flex-start; width: 86%; animation: rise 0.22s ease-out both; }
.kbd-row { display: flex; gap: 0.25rem; }
.kbd span {
  flex: 1; text-align: center;
  padding: 0.5rem; border-radius: 0.625rem;
  background: color-mix(in srgb, var(--bubble-bot) 70%, var(--chat-bg));
  color: var(--money-ink); font-weight: 500; font-size: 0.875rem;
  transition: background-color 0.2s, transform 0.2s;
}
.kbd span.pressed { background: var(--money); color: var(--on-money); transform: scale(0.97); }
.file { display: flex; align-items: center; gap: 0.625rem; }
.file-ico {
  flex: none; width: 2.5rem; height: 2.5rem; border-radius: 0.625rem;
  display: grid; place-items: center;
  background: var(--money-soft); color: var(--money-ink); font-size: 0.6875rem; font-weight: 700;
}
.file small { display: block; color: var(--muted); font-size: 0.8125rem; }
.typing { align-self: flex-start; background: var(--bubble-bot); border-radius: 1rem; border-bottom-left-radius: 0.25rem; padding: 0.75rem 0.875rem; display: flex; gap: 0.25rem; }
.typing i { width: 0.4rem; height: 0.4rem; border-radius: 50%; background: var(--muted); opacity: 0.4; animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }
.demo-note { max-width: 23rem; text-align: center; font-size: 0.875rem; color: var(--muted); }

@keyframes rise { from { opacity: 0; transform: translateY(0.5rem); } to { opacity: 1; transform: none; } }
@keyframes blink { 50% { opacity: 1; } }

/* Общие секции */
.band { padding-block: clamp(3.5rem, 7vw, 6rem); border-top: 1px solid var(--line); }
.band h2 { margin-bottom: clamp(1.75rem, 3vw, 2.5rem); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 2rem 4rem; }
.split h2 { margin-bottom: 0; }
.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem 4rem; }
.cols h3 { margin-bottom: 1rem; }
@media (max-width: 760px) {
  .split, .cols { grid-template-columns: 1fr; }
}

.pains { list-style: none; display: grid; gap: 1.5rem; }
.pains li { max-width: 40rem; color: var(--muted); padding-left: 1.25rem; border-left: 3px solid var(--line); }
.pains b { display: block; color: var(--ink); font-size: 1.1875rem; font-weight: 600; margin-bottom: 0.25rem; line-height: 1.35; }

.ticks { list-style: none; display: grid; gap: 0.75rem; }
.ticks li { position: relative; padding-left: 1.5rem; max-width: 34rem; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 0.625rem; height: 2px; background: var(--money); border-radius: 1px; }

.more { margin-top: 2.5rem; max-width: 46rem; padding: 1rem 1.25rem; background: var(--money-soft); border-radius: 0.75rem; }
.fine { margin-top: 1rem; max-width: 46rem; font-size: 0.9375rem; color: var(--muted); }

/* Шаги — настоящая последовательность, поэтому номера */
.steps { list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; }
.steps li { counter-increment: step; position: relative; padding-top: 3.25rem; }
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 2.25rem; height: 2.25rem; border-radius: 50%;
  display: grid; place-items: center;
  border: 1.5px solid var(--money); color: var(--money-ink); font-weight: 600;
}
.steps li:not(:last-child)::after {
  content: ""; position: absolute; top: 1.125rem; left: 3rem; right: -1.25rem;
  height: 1.5px; background: var(--line);
}
.steps h3 { margin-bottom: 0.5rem; }
.steps p { color: var(--muted); }
@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; gap: 1.75rem; }
  .steps li { padding-top: 0; padding-left: 3.25rem; }
  .steps li:not(:last-child)::after { top: 2.75rem; bottom: -1.25rem; left: 1.125rem; right: auto; width: 1.5px; height: auto; }
}

/* Цены как выписка */
.statement { max-width: 46rem; display: grid; gap: 1.75rem; }
.line { display: flex; align-items: baseline; gap: 0.5rem; font-size: clamp(1.1875rem, 1rem + 0.8vw, 1.5rem); font-weight: 600; letter-spacing: -0.01em; }
.dots { flex: 1; min-width: 1.5rem; border-bottom: 2px dotted var(--line); transform: translateY(-0.3em); }
.sum { white-space: nowrap; color: var(--money-ink); }
.row p { margin-top: 0.375rem; color: var(--muted); max-width: 38rem; }
.sub { margin-block: 3.5rem 1.25rem; font-size: 1.375rem; }
.place { padding: 1.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: 1rem; }
.place h4 { margin-bottom: 0.5rem; }
.place p { color: var(--muted); }
@media (max-width: 520px) {
  .line { flex-wrap: wrap; }
  .dots { display: none; }
  .sum { flex-basis: 100%; }
}

/* Сравнение */
.table-box { overflow-x: auto; }
.compare { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.compare th, .compare td { text-align: left; vertical-align: top; padding: 0.875rem 1rem; border-bottom: 1px solid var(--line); }
.compare thead th { font-weight: 600; font-size: 0.9375rem; color: var(--muted); }
.compare tbody th { font-weight: 600; width: 22%; }
.compare .us { background: var(--money-soft); color: var(--ink); }
.compare thead .us { color: var(--money-ink); border-radius: 0.75rem 0.75rem 0 0; }
.compare td { color: var(--muted); }
.compare td.us { font-weight: 500; }
@media (max-width: 760px) {
  .compare, .compare tbody, .compare tr, .compare th, .compare td { display: block; width: auto; }
  .compare thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .compare tr { padding-block: 1rem; border-bottom: 1px solid var(--line); }
  .compare tbody th { padding: 0 0 0.5rem; border: 0; width: auto; font-size: 1.0625rem; }
  .compare td { display: flex; justify-content: space-between; gap: 1rem; padding: 0.375rem 0.75rem; border: 0; border-radius: 0.5rem; }
  .compare td::before { content: attr(data-col); color: var(--ink); flex: none; max-width: 45%; text-align: left; }
  .compare td { text-align: right; }
}
.not-for { margin-top: 3rem; max-width: 46rem; }
.not-for h3 { margin-bottom: 1rem; }
.not-for ul { list-style: none; display: grid; gap: 0.625rem; }
.not-for li { position: relative; padding-left: 1.5rem; color: var(--muted); }
.not-for li::before { content: "×"; position: absolute; left: 0.1rem; color: var(--due); font-weight: 700; }

/* Почему я */
.about { display: grid; grid-template-columns: 20rem minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 1.25rem; background: var(--surface); }
.about-text { max-width: 38rem; display: grid; gap: 1rem; }
.about-text h2 { margin-bottom: 0.5rem; }
.sign { font-weight: 600; margin-top: 0.5rem; }
@media (max-width: 760px) {
  .about { grid-template-columns: 1fr; }
  .photo { max-width: 16rem; }
}

/* Данные */
.flows { display: grid; grid-template-columns: max-content 1fr; gap: 0.75rem 1.25rem; }
.flows dt { font-weight: 600; }
.flows dd { margin: 0; color: var(--muted); }
@media (max-width: 520px) {
  .flows { grid-template-columns: 1fr; gap: 0.125rem; }
  .flows dd { margin-bottom: 0.75rem; }
}

/* Вопросы */
details { border-bottom: 1px solid var(--line); }
details:first-of-type { border-top: 1px solid var(--line); }
summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding-block: 1.125rem; font-weight: 600; font-size: 1.125rem;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: ""; flex: none; width: 0.75rem; height: 0.75rem;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: translateY(-25%) rotate(45deg); transition: transform 0.2s;
}
details[open] summary::after { transform: translateY(25%) rotate(-135deg); }
details p { padding-bottom: 1.25rem; color: var(--muted); max-width: 40rem; }

.band-plain { border-top: 0; }
.gap-top { margin-top: 2rem; }

/* Финал и подвал */
.final { text-align: left; }
.final .lead { margin-block: 0 2rem; }
.foot { border-top: 1px solid var(--line); padding-block: 2rem calc(2rem + env(safe-area-inset-bottom, 0px)); font-size: 0.9375rem; color: var(--muted); }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
