:root {
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl: clamp(2.25rem, 1rem + 3.6vw, 4.5rem);

  --space-1: .25rem; --space-2: .5rem; --space-3: .75rem; --space-4: 1rem; --space-5: 1.25rem;
  --space-6: 1.5rem; --space-8: 2rem; --space-10: 2.5rem; --space-12: 3rem; --space-16: 4rem;
  --space-20: 5rem; --space-24: 6rem; --space-32: 8rem;

  --radius-sm: 10px; --radius-md: 16px; --radius-lg: 24px; --radius-xl: 32px;

  /* светлая часть — как продуктовые страницы Сбера: белый, серые подложки, один акцент */
  --bg: #FFFFFF;
  --surface: #F3F5F8;
  --surface-2: #E9EDF2;
  --line: rgba(16, 24, 40, .10);
  --text: #12151C;
  --muted: #5B6271;
  --primary: #2A49F0;      /* синий из логотипа Полины, белый текст ≥ 5:1 */
  --primary-hover: #1E38C9;
  --cyan: #19D6FF;

  /* тёмный герой */
  --ink: #0A0F1F;
  --ink-2: #121A33;
  --ink-text: #EEF2FF;
  --ink-muted: #A3ADCC;

  --font: 'Onest', 'Segoe UI', system-ui, sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: var(--text-base); line-height: 1.6; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: var(--primary); text-underline-offset: 3px; }
a:hover { color: var(--primary-hover); }
h1, h2, h3 { line-height: 1.1; margin: 0; letter-spacing: -0.02em; text-wrap: balance; }
p { margin: 0; }
code { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: .9em; background: var(--surface); padding: .1em .4em; border-radius: 6px; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: var(--space-4); top: -100px; z-index: 100; background: var(--primary); color: #fff; padding: var(--space-2) var(--space-4); border-radius: var(--radius-sm); }
.skip:focus { top: var(--space-4); }
.wrap { width: min(1200px, 100% - 2 * clamp(var(--space-4), 4vw, var(--space-10))); margin-inline: auto; }

/* ---------- кнопки ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 var(--space-6); border-radius: 14px; background: var(--primary); color: #fff; font-weight: 600; font-size: var(--text-sm); text-decoration: none; transition: background .2s, transform .2s var(--ease); }
.btn:hover { background: var(--primary-hover); color: #fff; transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn--sm { min-height: 44px; padding: 0 var(--space-5); }
.btn--ghost { background: rgba(255, 255, 255, .08); color: var(--ink-text); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18); }
.btn--ghost:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.btn--line { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn--line:hover { background: var(--surface); color: var(--text); }

/* ---------- шапка ---------- */
.header { position: sticky; top: 0; z-index: 50; background: rgba(10, 15, 31, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid rgba(255, 255, 255, .06); transition: background .3s; }
.header.is-light { background: rgba(255, 255, 255, .88); border-bottom-color: var(--line); }
.header__in { display: flex; align-items: center; gap: var(--space-6); min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: var(--space-3); text-decoration: none; color: inherit; font-weight: 700; font-size: var(--text-base); }
.brand img { border-radius: 10px; }
.header .brand { color: var(--ink-text); }
.header.is-light .brand { color: var(--text); }
.nav { display: flex; gap: var(--space-1); margin-left: auto; }
.nav a { padding: var(--space-2) var(--space-3); border-radius: 10px; color: var(--ink-muted); text-decoration: none; font-size: var(--text-sm); font-weight: 500; transition: color .2s, background .2s; }
.nav a:hover, .nav a.is-active { color: var(--ink-text); background: rgba(255, 255, 255, .08); }
.header.is-light .nav a { color: var(--muted); }
.header.is-light .nav a:hover, .header.is-light .nav a.is-active { color: var(--text); background: var(--surface); }

/* ---------- герой ---------- */
.hero { position: relative; overflow: hidden; background: var(--ink); color: var(--ink-text); padding-block: clamp(var(--space-12), 9vw, var(--space-32)) clamp(var(--space-16), 10vw, var(--space-32)); margin-top: -69px; padding-top: calc(69px + clamp(var(--space-12), 8vw, var(--space-24))); }
.hero__arcs { position: absolute; inset: 0; width: 100%; height: 100%; }
.arc { stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: draw 2.4s var(--ease) forwards; }
.a2 { animation-delay: .15s; } .a3 { animation-delay: .3s; } .a4 { animation-delay: .45s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.dots { position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .09) 1px, transparent 1.2px); background-size: 22px 22px; mask-image: linear-gradient(100deg, #000 0%, transparent 55%); -webkit-mask-image: linear-gradient(100deg, #000 0%, transparent 55%); }
.hero__grid { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(var(--space-8), 5vw, var(--space-20)); align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: var(--space-2); font-size: var(--text-xs); font-weight: 600; color: var(--ink-muted); padding: var(--space-2) var(--space-3); border-radius: 999px; background: rgba(255, 255, 255, .06); margin-bottom: var(--space-6); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 0 rgba(25, 214, 255, .6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(25, 214, 255, 0); } 100% { box-shadow: 0 0 0 0 rgba(25, 214, 255, 0); } }
.hero h1 { font-size: var(--text-3xl); font-weight: 800; letter-spacing: -0.035em; max-width: 14ch; }
.lead { margin-top: var(--space-6); max-width: 52ch; color: var(--ink-muted); font-size: var(--text-base); }
.hero__cta { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-8); }

/* чат-превью */
.chat { background: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .03)); border: 1px solid rgba(255, 255, 255, .1); border-radius: var(--radius-xl); padding: var(--space-4); backdrop-filter: blur(8px); box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .6); transform: rotate(1.5deg); }
.chat__top { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2) var(--space-2) var(--space-4); border-bottom: 1px solid rgba(255, 255, 255, .08); }
.chat__top img { border-radius: 50%; }
.chat__top b { display: block; font-size: var(--text-sm); }
.chat__top small { display: block; font-size: var(--text-xs); color: var(--cyan); }
.chat__body { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-4) var(--space-1) var(--space-2); }
.msg { max-width: 88%; padding: var(--space-3) var(--space-4); border-radius: 18px; font-size: var(--text-sm); line-height: 1.45; }
.msg--me { align-self: flex-end; background: var(--primary); border-bottom-right-radius: 6px; }
.msg--bot { align-self: flex-start; background: var(--ink-2); border: 1px solid rgba(255, 255, 255, .06); border-bottom-left-radius: 6px; }
.msg blockquote { margin: 0 0 var(--space-2); padding-left: var(--space-3); border-left: 2px solid var(--cyan); color: var(--ink-muted); font-size: var(--text-xs); }
.voice { display: flex; align-items: center; gap: var(--space-3); min-width: 210px; }
.voice__play { flex: none; width: 34px; height: 34px; border-radius: 50%; background: #fff; position: relative; }
.voice__play::after { content: ''; position: absolute; left: 13px; top: 10px; border-left: 11px solid var(--primary); border-top: 7px solid transparent; border-bottom: 7px solid transparent; }
.voice--bot .voice__play { background: var(--cyan); }
.voice--bot .voice__play::after { border-left-color: var(--ink); }
.voice__t { font-size: var(--text-xs); opacity: .8; font-variant-numeric: tabular-nums; }
.wave { display: flex; align-items: center; gap: 3px; height: 26px; flex: 1; }
.wave i { width: 3px; border-radius: 2px; background: rgba(255, 255, 255, .85); height: 30%; }
.wave i:nth-child(3n) { height: 70%; } .wave i:nth-child(4n+1) { height: 50%; } .wave i:nth-child(5n) { height: 90%; } .wave i:nth-child(7n+2) { height: 40%; }
.wave--live i { background: var(--cyan); animation: eq 1.1s ease-in-out infinite; }
.wave--live i:nth-child(2n) { animation-delay: -.3s; } .wave--live i:nth-child(3n) { animation-delay: -.6s; } .wave--live i:nth-child(5n) { animation-delay: -.9s; }
@keyframes eq { 0%, 100% { transform: scaleY(.35); } 50% { transform: scaleY(1); } }
.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.chips span { font-size: var(--text-xs); padding: var(--space-2) var(--space-3); border-radius: 10px; background: rgba(255, 255, 255, .07); color: var(--ink-text); }
.reveal { opacity: 0; transform: translateY(12px) scale(.98); animation: pop .6s var(--ease) forwards; animation-delay: var(--d, 0s); }
@keyframes pop { to { opacity: 1; transform: none; } }

/* ---------- секции ---------- */
.section { padding-block: clamp(var(--space-16), 9vw, var(--space-32)) clamp(var(--space-12), 6vw, var(--space-20)); }
.section__head { display: grid; grid-template-columns: auto 1fr; gap: var(--space-4) var(--space-12); align-items: end; margin-bottom: var(--space-10); }
.section__head h2 { font-size: var(--text-2xl); font-weight: 800; }
.section__head p { color: var(--muted); max-width: 52ch; justify-self: end; }

.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); }
.plan { position: relative; background: var(--surface); border-radius: var(--radius-lg); padding: var(--space-8); transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.plan:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -24px rgba(16, 24, 40, .35); }
.plan h3 { font-size: var(--text-sm); font-weight: 600; color: var(--muted); }
.price { margin-top: var(--space-6); font-size: var(--text-2xl); font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; display: flex; align-items: baseline; gap: var(--space-2); }
.star { color: #F5B300; font-size: .7em; }
.plan__note { margin-top: var(--space-2); color: var(--muted); font-size: var(--text-sm); }
.plan--best { background: var(--ink); color: var(--ink-text); }
.plan--best h3, .plan--best .plan__note { color: var(--ink-muted); }
.plan--best::before { content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; background: linear-gradient(120deg, #5B3CFF, var(--cyan)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.badge { position: absolute; top: var(--space-6); right: var(--space-6); font-size: var(--text-xs); font-weight: 600; padding: var(--space-1) var(--space-3); border-radius: 999px; background: rgba(25, 214, 255, .14); color: var(--cyan); }

.compare { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(var(--space-8), 5vw, var(--space-16)); margin-top: var(--space-16); align-items: start; }
.compare__intro h3 { font-size: var(--text-xl); font-weight: 700; }
.compare__intro p { color: var(--muted); margin: var(--space-4) 0 var(--space-6); max-width: 40ch; }
.compare__intro .small { font-size: var(--text-sm); margin-top: var(--space-4); }
.table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.table th, .table td { text-align: left; padding: var(--space-4) var(--space-3); border-bottom: 1px solid var(--line); vertical-align: top; }
.table thead th { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.table tbody th { font-weight: 500; }
.table td { white-space: nowrap; }
.table td:last-child { font-weight: 600; color: var(--primary); white-space: normal; }

/* ---------- документы ---------- */
.docs { background: var(--surface); padding-block: clamp(var(--space-16), 8vw, var(--space-24)); }
.docs__grid { display: grid; grid-template-columns: 240px 1fr; gap: clamp(var(--space-8), 5vw, var(--space-16)); align-items: start; }
.toc { position: sticky; top: 96px; display: flex; flex-direction: column; gap: var(--space-1); }
.toc__label { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; margin-bottom: var(--space-2); }
.toc a { position: relative; padding: var(--space-2) var(--space-3); border-radius: 10px; color: var(--text); text-decoration: none; font-size: var(--text-sm); font-weight: 500; transition: background .2s; }
.toc a:hover { background: var(--surface-2); }
.toc a.is-active { background: #fff; box-shadow: 0 1px 2px rgba(16, 24, 40, .06); color: var(--primary); }
.toc__date { margin-top: var(--space-4); font-size: var(--text-xs); color: var(--muted); padding-left: var(--space-3); }
.docs__body { display: flex; flex-direction: column; gap: var(--space-6); min-width: 0; }
.doc { background: #fff; border-radius: var(--radius-lg); padding: clamp(var(--space-6), 4vw, var(--space-12)); }
.doc h2 { font-size: var(--text-xl); font-weight: 800; }
.doc__meta { color: var(--muted); margin-top: var(--space-2); font-size: var(--text-sm); }
.doc h3 { font-size: var(--text-base); font-weight: 700; margin: var(--space-8) 0 var(--space-3); }
.doc p + p { margin-top: var(--space-3); }
.doc > p { max-width: 72ch; }
.doc .facts + p { margin-top: var(--space-6); }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); margin-top: var(--space-8); }
.facts > div { background: var(--surface); border-radius: var(--radius-md); padding: var(--space-6); }
.facts h3 { margin: 0 0 var(--space-2); font-size: var(--text-sm); }
.facts p { font-size: var(--text-sm); color: var(--muted); }
.rules { margin: var(--space-6) 0 0; padding: 0; list-style: none; counter-reset: r; display: flex; flex-direction: column; }
.rules li { counter-increment: r; display: grid; grid-template-columns: 44px 1fr; padding: var(--space-4) 0; border-bottom: 1px solid var(--line); }
.rules li:last-child { border-bottom: 0; }
.rules li::before { content: counter(r, decimal-leading-zero); font-weight: 700; color: var(--primary); font-variant-numeric: tabular-nums; }
.doc--support { background: var(--ink); color: var(--ink-text); }
.doc--support p { color: var(--ink-muted); margin-top: var(--space-4); }
.doc--support code { background: rgba(255, 255, 255, .1); color: var(--ink-text); }
.doc--support .btn--line { color: var(--ink-text); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .22); }
.doc--support .btn--line:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.steps { list-style: none; margin: var(--space-6) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); counter-reset: s; }
.steps li { counter-increment: s; background: var(--ink-2); border-radius: var(--radius-md); padding: var(--space-6); font-size: var(--text-sm); color: var(--ink-muted); }
.steps li::before { content: counter(s); display: block; font-size: var(--text-xl); font-weight: 800; color: var(--cyan); margin-bottom: var(--space-3); line-height: 1; }
.steps b { display: block; color: var(--ink-text); margin-bottom: var(--space-1); }

/* ---------- подвал ---------- */
.footer { padding-block: var(--space-10); font-size: var(--text-xs); color: var(--muted); }
.footer__in { display: flex; justify-content: space-between; align-items: center; gap: var(--space-6); flex-wrap: wrap; }
.footer p { margin-top: var(--space-2); }
.footer__links { display: flex; gap: var(--space-6); flex-wrap: wrap; }
.footer__links a { color: var(--text); text-decoration: none; font-weight: 500; font-size: var(--text-sm); }
.footer__links a:hover { color: var(--primary); }

/* появление при прокрутке */
.in { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.in.is-in { opacity: 1; transform: none; }

/* ---------- адаптив ---------- */
@media (max-width: 980px) {
  .nav { display: none; }
  .header__in { justify-content: space-between; }
  .hero__grid { grid-template-columns: 1fr; }
  .chat { transform: none; max-width: 460px; }
  .compare { grid-template-columns: 1fr; }
  .docs__grid { grid-template-columns: 1fr; }
  .toc { position: static; flex-direction: row; flex-wrap: wrap; }
  .toc__label, .toc__date { width: 100%; }
}
@media (max-width: 720px) {
  .plans { grid-template-columns: 1fr; }
  .section__head { grid-template-columns: 1fr; }
  .section__head p { justify-self: start; }
  .facts, .steps { grid-template-columns: 1fr; }
  .table th, .table td { padding: var(--space-3) var(--space-2); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .arc { stroke-dashoffset: 0; }
  .reveal, .in { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
