:root {
  --bg: #FBF8F5;
  --bg-soft: #F4EFEA;
  --surface: #FFFFFF;
  --ink: #15161B;
  --ink-2: #4A4D57;
  --ink-3: #7D808A;
  --line: #E8E2DB;
  --red: #F14635;
  --red-dark: #D63524;
  --red-soft: #FFE9E6;
  --green: #1FA967;
  --tg: #2AABEE;
  --dark: #121318;
  --radius: 22px;
  --shadow: 0 1px 2px rgba(20, 20, 30, .04), 0 12px 32px -12px rgba(20, 20, 30, .12);
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Unbounded", var(--font);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
html, body { overflow-x: clip; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -.01em; }
h1, h2 { font-family: var(--display); font-weight: 700; }
h2 { font-size: clamp(28px, 4vw, 44px); }
h3 { font-size: 20px; font-weight: 800; }
p { margin: 0; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 24px; border-radius: 14px; border: 1.5px solid transparent;
  font: 700 16px/1 var(--font); text-decoration: none; cursor: pointer;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--sm { padding: 10px 16px; font-size: 15px; border-radius: 12px; }
.btn--lg { padding: 18px 28px; font-size: 17px; border-radius: 16px; }
.btn--block { width: 100%; }
.btn--primary { background: var(--red); color: #fff; box-shadow: 0 8px 20px -8px rgba(241, 70, 53, .6); }
.btn--primary:hover { background: var(--red-dark); }
.btn--ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--white { background: #fff; color: var(--red); }
.btn--white:hover { box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .35); transform: translateY(-1px); }
.tg { width: 20px; height: 20px; fill: currentColor; flex: none; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 248, 245, .82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav__inner { display: flex; align-items: center; gap: 32px; height: 72px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 700 20px/1 var(--display); }
.nav__links { display: flex; gap: 28px; margin-left: auto; }
.nav__links a { white-space: nowrap; text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: 15px; }
.nav__links a:hover { color: var(--ink); }
.nav__burger { display: none; }

/* ---------- Eyebrow ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: var(--red); margin-bottom: 16px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }

/* ---------- Hero ---------- */
.hero { padding: 56px 0 88px; position: relative; overflow-x: clip; }
.hero::before {
  content: ""; position: absolute; inset: -200px -10% auto auto; width: 720px; height: 720px;
  background: radial-gradient(closest-side, rgba(241, 70, 53, .14), transparent);
  pointer-events: none; z-index: -1;
}
.hero__grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(34px, 5.2vw, 62px); line-height: 1.06; }
.kaspi-word { color: var(--red); position: relative; white-space: nowrap; }
.kaspi-word::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: .04em; height: .14em;
  background: var(--red); opacity: .18; border-radius: 4px;
}
.lead { margin-top: 24px; font-size: 19px; color: var(--ink-2); max-width: 560px; }
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 36px; }
.hero__facts { list-style: none; padding: 0; margin: 44px 0 0; display: flex; gap: 36px; flex-wrap: wrap; }
.hero__facts li { display: flex; flex-direction: column; }
.hero__facts b { font: 700 26px/1.1 var(--display); }
.hero__facts span { color: var(--ink-3); font-size: 14px; margin-top: 4px; }

/* Phone mockup */
.hero__visual { position: relative; display: flex; justify-content: center; padding: 20px 0; }
.phone {
  width: 340px; max-width: 100%;
  background: #DDE7EE url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cpath d='M10 10h4v4h-4zM40 30h3v3h-3zM25 48h4v4h-4z' fill='%23c8d6e0'/%3E%3C/svg%3E");
  border-radius: 40px; border: 10px solid var(--dark);
  box-shadow: 0 40px 80px -30px rgba(20, 20, 40, .45);
  overflow: hidden;
}
.phone__head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: #fff; border-bottom: 1px solid #e5e8ec; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, #FF8A5B, var(--red));
  color: #fff; font-weight: 800; display: grid; place-items: center;
}
.phone__name { font-weight: 800; font-size: 15px; line-height: 1.2; }
.phone__status { font-size: 13px; color: var(--ink-3); }
.chat { padding: 14px 12px 18px; display: flex; flex-direction: column; gap: 8px; min-height: 470px; font-size: 14px; line-height: 1.45; }
.msg { max-width: 86%; padding: 9px 12px; border-radius: 16px; box-shadow: 0 1px 1px rgba(0, 0, 0, .06); }
.msg--in { background: #fff; align-self: flex-start; border-bottom-left-radius: 5px; }
.msg--out { background: #E2FFC7; align-self: flex-end; border-bottom-right-radius: 5px; }
.msg--file { display: flex; gap: 10px; align-items: center; }
.msg--file small { color: var(--ink-3); }
.file-ico {
  width: 40px; height: 40px; border-radius: 50%; background: var(--green); color: #fff;
  display: grid; place-items: center; font-size: 11px; font-weight: 800; flex: none;
}
.msg--ok { border-left: 3px solid var(--green); }
.kb { display: grid; gap: 5px; margin-top: 8px; }
.kb span {
  display: block; text-align: center; padding: 7px 10px; border-radius: 10px;
  background: #EEF6FC; color: #1B7DBD; font-weight: 700; font-size: 13px;
}
.kb .kb--kaspi { background: var(--red); color: #fff; }

.float-card {
  position: absolute; display: flex; align-items: center; gap: 12px;
  background: var(--surface); padding: 12px 16px; border-radius: 16px; box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.float-card small { display: block; color: var(--ink-3); font-size: 12px; line-height: 1.2; }
.float-card b { font-size: 15px; line-height: 1.3; }
.float-card--1 { top: 70px; left: -10px; }
.float-card--2 { bottom: 70px; right: -20px; }
.fc-ico {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  background: var(--red-soft); color: var(--red); font-weight: 800;
}
.fc-ico--green { background: #E3F6EC; color: var(--green); }

.anim { opacity: 0; transform: translateY(10px); animation: pop .5s cubic-bezier(.2, .8, .2, 1) forwards; animation-delay: calc(var(--d) * .55s + .3s); }
@keyframes pop { to { opacity: 1; transform: none; } }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section--tight { padding: 40px 0; }
.section--soft { background: var(--bg-soft); }
.section__head { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.section__head--left { text-align: left; margin: 0; }
.sub { margin-top: 16px; color: var(--ink-2); font-size: 18px; }
.sub a, .step a { color: var(--red); font-weight: 700; text-decoration: none; }

/* Lists */
.list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.list li { position: relative; padding-left: 32px; }
.list li::before {
  position: absolute; left: 0; top: 2px; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; font-size: 12px; font-weight: 800;
}
.list--ok li::before { content: "✓"; background: #E3F6EC; color: var(--green); }
.list--x li::before { content: "✕"; background: #F1EDEA; color: var(--ink-3); }

/* Pain */
.pain { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.pain__col { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 36px; }
.pain__col h2 { margin-bottom: 20px; font: 800 22px/1.15 var(--font); }
.pain__col:first-child { color: var(--ink-2); }
.pain__col--good { border-color: rgba(241, 70, 53, .35); box-shadow: 0 20px 50px -30px rgba(241, 70, 53, .45); }

/* Steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: s; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; position: relative; }
.step__n {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px;
  background: var(--red); color: #fff; font: 700 20px/1 var(--display); margin-bottom: 24px;
}
.step h3 { margin-bottom: 10px; }
.step p { color: var(--ink-2); }

/* Pay */
.pay { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.pay__card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; }
.pay__card h3 { margin: 20px 0 10px; }
.pay__card p { color: var(--ink-2); }
.pay__logo {
  display: inline-block; padding: 8px 14px; border-radius: 10px;
  font: 800 15px/1 var(--font); letter-spacing: .01em; color: #fff; background: var(--red);
}
.pay__logo--gold { background: linear-gradient(135deg, #F14635, #FF7A45); }
.pay__card--accent { background: var(--red); border-color: var(--red); color: #fff; }
.pay__card--accent p { color: rgba(255, 255, 255, .88); }
.pay__big { font: 800 48px/1 var(--display); }

/* Features */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px;
  transition: transform .2s, box-shadow .2s;
}
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.feature__ico {
  width: 52px; height: 52px; border-radius: 16px; background: var(--red-soft);
  display: grid; place-items: center; font-size: 26px; margin-bottom: 20px;
}
.feature h3 { font-size: 19px; margin-bottom: 8px; }
.feature p { color: var(--ink-2); font-size: 16px; }

/* Tags */
.tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; max-width: 900px; margin: 0 auto; }
.tags span {
  padding: 12px 20px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line);
  font-weight: 700; font-size: 16px;
}

/* Calculator */
.calc { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: center; }
.calc__box { background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: 36px; box-shadow: var(--shadow); }
.range { display: block; margin-bottom: 28px; }
.range__top { display: flex; justify-content: space-between; gap: 16px; font-weight: 600; color: var(--ink-2); margin-bottom: 12px; }
.range output { font-weight: 800; color: var(--ink); white-space: nowrap; }
input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border-radius: 8px;
  background: linear-gradient(to right, var(--red) var(--p, 50%), var(--line) var(--p, 50%));
  outline: none; cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%;
  background: #fff; border: 3px solid var(--red); box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
}
input[type="range"]::-moz-range-thumb {
  width: 20px; height: 20px; border-radius: 50%;
  background: #fff; border: 3px solid var(--red); box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
}
input[type="range"]:focus-visible { box-shadow: 0 0 0 4px var(--red-soft); }
.calc__result {
  margin-top: 8px; padding: 24px; border-radius: 20px; background: var(--red-soft);
  display: flex; flex-direction: column;
}
.calc__result span { font-weight: 700; color: var(--ink-2); }
.calc__result b { font: 800 clamp(32px, 4vw, 44px)/1.1 var(--display); color: var(--red); margin: 6px 0; }
.calc__result small { color: var(--ink-2); font-size: 15px; }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
.plan {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: 36px;
  display: flex; flex-direction: column;
}
.plan h3 { font-size: 18px; color: var(--ink-2); }
.plan__price { font: 800 40px/1.1 var(--display); margin: 14px 0 6px; }
.plan__price s { font: 600 18px var(--font); color: var(--ink-3); margin-left: 6px; }
.plan__desc { color: var(--ink-3); font-weight: 600; margin-bottom: 28px; }
.plan .list { margin-bottom: 32px; flex: 1; }
.plan--pro { border: 2px solid var(--red); box-shadow: 0 30px 60px -30px rgba(241, 70, 53, .5); }
.plan__badge {
  position: absolute; top: -14px; left: 36px; padding: 6px 14px; border-radius: 999px;
  background: var(--red); color: #fff; font-size: 13px; font-weight: 800;
}

/* FAQ */
.faq { display: grid; grid-template-columns: .8fr 1.2fr; gap: 56px; align-items: start; }
.faq__list { display: grid; gap: 12px; }
details { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 0 24px; transition: border-color .2s; }
details[open] { border-color: rgba(241, 70, 53, .4); }
summary {
  list-style: none; cursor: pointer; padding: 20px 0; font-weight: 800; font-size: 17px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+"; flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--bg-soft);
  display: grid; place-items: center; font-size: 20px; font-weight: 600; transition: transform .2s;
}
details[open] summary::after { transform: rotate(45deg); background: var(--red-soft); color: var(--red); }
details p { padding: 0 0 22px; color: var(--ink-2); }

/* Final CTA */
.final {
  text-align: center; border-radius: 36px; padding: 72px 32px;
  background: var(--red) radial-gradient(circle at 20% 0%, #FF7A5E, transparent 55%);
  color: #fff; position: relative; overflow: hidden;
}
.final h2 { max-width: 760px; margin: 0 auto; }
.final p { margin: 18px auto 36px; font-size: 19px; color: rgba(255, 255, 255, .9); max-width: 560px; }

/* Footer */
.footer { padding: 48px 0 40px; border-top: 1px solid var(--line); margin-top: 56px; }
.footer__inner { display: grid; grid-template-columns: auto 1fr; gap: 20px 40px; align-items: center; }
.footer__links { display: flex; gap: 24px; justify-content: flex-end; flex-wrap: wrap; }
.footer__links a { text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: 15px; }
.footer__links a:hover { color: var(--red); }
.footer__copy { grid-column: 1 / -1; color: var(--ink-3); font-size: 13px; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero__grid, .calc, .faq { grid-template-columns: 1fr; gap: 48px; }
  .features, .plans { grid-template-columns: 1fr 1fr; }
  .plan--pro { order: -1; grid-column: 1 / -1; }
  .section__head--left { text-align: center; margin: 0 auto; }
}

@media (max-width: 1000px) {
  .nav__links {
    position: fixed; inset: 72px 0 auto 0; flex-direction: column; gap: 0; padding: 8px 16px 20px;
    background: var(--bg); border-bottom: 1px solid var(--line);
    transform: translateY(-12px); opacity: 0; visibility: hidden; z-index: -1;
    transition: transform .2s ease, opacity .2s ease, visibility 0s linear .2s;
  }
  .nav__links a { padding: 14px 8px; font-size: 17px; border-bottom: 1px solid var(--line); }
  .nav.is-open .nav__links { transform: none; opacity: 1; visibility: visible; transition: transform .2s ease, opacity .2s ease; }
  .nav__inner { gap: 12px; }
  .nav__inner > .btn { margin-left: auto; }
  .nav__burger {
    display: grid; gap: 6px; place-content: center; width: 44px; height: 44px; border: 1px solid var(--line);
    background: var(--surface); border-radius: 12px; cursor: pointer; padding: 0;
  }
  .nav__burger span { display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s; }
  .nav.is-open .nav__burger span:first-child { transform: translateY(4px) rotate(45deg); }
  .nav.is-open .nav__burger span:last-child { transform: translateY(-4px) rotate(-45deg); }
}

@media (max-width: 860px) {
  .pain, .steps, .pay { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .container { padding: 0 16px; }
  .section { padding: 64px 0; }
  .section__head { margin-bottom: 36px; }
  .hero { padding: 32px 0 56px; }
  .lead { font-size: 17px; }
  .hero__cta .btn { flex: 1 1 100%; }
  .hero__facts { gap: 20px 28px; }
  .hero__facts b { font-size: 22px; }
  .features, .plans { grid-template-columns: 1fr; }
  .plan--pro { grid-column: auto; }
  .pain__col, .step, .pay__card, .plan, .calc__box { padding: 24px; }
  .float-card { display: none; }
  .nav__inner > .btn span { display: none; }
  .nav__inner > .btn { padding: 10px; }
  .final { padding: 56px 20px; border-radius: 28px; }
  .footer__inner { grid-template-columns: 1fr; }
  .footer__links { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .anim, .reveal { animation: none; opacity: 1; transform: none; transition: none; }
}

.section--pay { padding: 0 0 40px; }
