/* ===================== TOKENS ===================== */
:root {
  --milk: #fbfcff;
  --blue: #3f3fbf;
  --blue-80: #3333a6;
  --blue-20: #d6d6f3;
  --blue-10: #ececfa;
  --green: #0bda51;
  --green-80: #0ac249;
  --on-green: #10123a;
  --ink: #171a3d;
  --muted: #555878;
  --line: rgba(63, 63, 191, .14);
  --on-dark: rgba(255, 255, 255, .82);
  --on-dark-line: rgba(255, 255, 255, .18);
  --container: 1160px;
  --gutter: 20px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--milk);
  color: var(--ink);
  font: 500 16px/1.55 "Manrope", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-x: clip;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
a[href^="tel"] { white-space: nowrap; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { color: var(--blue); font-weight: 800; letter-spacing: -.02em; line-height: 1.12; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid #8f8fe6; outline-offset: 2px; }
svg { flex: none; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.h2 { font-size: 28px; margin-bottom: 24px; }

/* ===================== BUTTONS ===================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 28px; border-radius: 14px; border: 0;
  font-weight: 800; font-size: 17px; text-decoration: none; text-align: center;
  transition: background .2s, transform .15s, border-color .2s;
}
.btn:active { transform: scale(.98); }
.btn--block { width: 100%; }
.btn--light { background: var(--green); color: var(--on-green); }
.btn--light:hover { background: var(--green-80); }
.btn--dark { background: var(--green); color: var(--on-green); }
.btn--dark:hover { background: var(--green-80); }
.btn--ghost { background: transparent; color: var(--milk); border: 1.5px solid rgba(255, 255, 255, .35); }
.btn--ghost:hover { border-color: var(--milk); }
.btn--ghost svg { width: 20px; height: 20px; fill: currentColor; }
.btn.is-loading { opacity: .65; pointer-events: none; }

.link-btn { border: 0; background: none; padding: 0; font-weight: 800; color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }

/* ===================== HEADER ===================== */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.header.is-scrolled { border-color: var(--line); }
.header__row { display: flex; align-items: center; gap: 12px; height: 64px; }

.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--blue); margin-right: auto; }
.logo__mark { width: 36px; height: 36px; border-radius: 10px; background: var(--blue); color: var(--milk); display: grid; place-items: center; }
.logo__mark svg { width: 22px; height: 22px; }
.logo__text { font-weight: 800; font-size: 17px; line-height: 1.1; letter-spacing: -.01em; }
.logo__text small { display: block; font-weight: 600; font-size: 11px; color: var(--muted); letter-spacing: .02em; }

.nav { display: none; }

.hmsgr { display: none; gap: 8px; }
.msgr { width: 36px; height: 36px; flex: none; border-radius: 50%; display: grid; place-items: center; color: #fff; transition: transform .15s, filter .15s; }
.msgr:hover { transform: translateY(-1px); filter: brightness(1.08); }
.msgr svg { width: 19px; height: 19px; fill: currentColor; }
.msgr--tg { background: #229ed9; }
.msgr--tg svg { margin-left: -2px; }
.msgr--viber { background: #7360f2; }
.msgr--wa { background: #25d366; }
.hero__msgr { display: flex; align-items: center; gap: 10px; margin: -6px 0 20px; }
.hero__msgr span { font-size: 14px; font-weight: 700; color: var(--muted); margin-right: 2px; }
.hero__msgr .msgr { width: 42px; height: 42px; }
.hero__msgr .msgr svg { width: 22px; height: 22px; }
.nowrap { white-space: nowrap; }
.header__phone { padding: 8px 0; text-decoration: none; display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; }
.header__phone span { font-weight: 800; font-size: 16px; color: var(--blue); }
.header__phone small { font-size: 11px; color: var(--muted); font-weight: 600; }

.burger { flex: none; width: 42px; height: 42px; border: 0; border-radius: 12px; background: var(--blue-10); display: flex; flex-direction: column; justify-content: center; gap: 5px; padding: 0 12px; }
.burger span { display: block; height: 2px; border-radius: 2px; background: var(--blue); transition: transform .2s; }
.burger[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

.nav.is-open {
  display: flex; flex-direction: column;
  position: absolute; top: 64px; left: 0; right: 0;
  background: var(--milk); border-bottom: 1px solid var(--line);
  padding: 4px var(--gutter) 12px;
  box-shadow: 0 20px 30px -24px rgba(63, 63, 191, .4);
}
.nav.is-open a { padding: 14px 0; font-weight: 700; font-size: 17px; text-decoration: none; color: var(--blue); border-bottom: 1px solid var(--line); }
.nav.is-open a:last-child { border-bottom: 0; }

/* ===================== HERO ===================== */
.hero { padding: 20px 0 44px; }
.hero__grid { display: grid; grid-template-areas: "copy" "form" "facts"; }
.hero__copy { grid-area: copy; }
.hero__form { grid-area: form; }
.hero__title { font-size: 34px; letter-spacing: -.03em; margin-bottom: 22px; }
.hl { background: linear-gradient(transparent 58%, var(--green) 58%, var(--green) 92%, transparent 92%); color: var(--ink); padding: 0 .08em; margin: 0 -.04em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }

.card-form { background: var(--blue); color: var(--milk); border-radius: 20px; padding: 22px 18px 18px; }
.card-form__title { font-size: 21px; font-weight: 800; line-height: 1.2; letter-spacing: -.01em; }
.card-form__sub { font-size: 14px; color: var(--blue-20); margin-top: 4px; }

.chips { border: 0; padding: 0; margin: 18px 0 16px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.chips legend { padding: 0; margin-bottom: 10px; font-size: 14px; font-weight: 700; color: var(--milk); }
.chip { display: block; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: flex; align-items: center; gap: 10px;
  min-height: 46px; padding: 6px 10px 6px 12px; border-radius: 12px;
  background: rgba(255, 255, 255, .06); border: 1.5px solid rgba(255, 255, 255, .2);
  font-size: 15px; font-weight: 700; line-height: 1.2; cursor: pointer; white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s;
}
/* радіо-кружечок, щоб було зрозуміло: це вибір, а не кнопка */
.chip span::before { content: ""; width: 18px; height: 18px; flex: none; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .5); transition: border .15s; }
.chip span:hover { border-color: rgba(255, 255, 255, .5); }
.chip input:checked + span { background: var(--green); color: var(--on-green); border-color: var(--green); }
.chip input:checked + span::before { border: 5.5px solid var(--on-green); }
.chip input:focus-visible + span { outline: 3px solid #8f8fe6; outline-offset: 2px; }

.field { display: block; margin-bottom: 12px; }
.field__label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.field input {
  width: 100%; height: 54px; padding: 0 16px; border-radius: 14px;
  border: 2px solid transparent; background: var(--milk); color: var(--blue);
  font: 700 18px/1 "Manrope", system-ui, sans-serif; letter-spacing: .01em;
}
.field input::placeholder { color: #8b8da8; font-weight: 600; }
.field input:focus { outline: none; border-color: #0bda51; }
.field__err { display: none; font-style: normal; font-size: 13px; font-weight: 700; color: #ffb3b3; margin-top: 6px; }
.field.is-error input { border-color: #ff8f8f; }
.field.is-error .field__err { display: block; }

.legal { font-size: 12px; line-height: 1.45; color: rgba(255, 255, 255, .62); text-align: center; margin-top: 12px; }
.legal a { color: inherit; }

.hero__info { grid-area: facts; }
.facts { list-style: none; margin: 22px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); }
.facts li { display: flex; flex-direction: column; gap: 2px; padding: 0 10px; border-left: 1px solid var(--line); }
.facts li:first-child { padding-left: 0; border-left: 0; }
.facts b { font-size: 22px; font-weight: 800; color: var(--blue); line-height: 1.15; white-space: nowrap; }
.facts span { font-size: 13px; color: var(--muted); line-height: 1.3; }

.trust { list-style: none; margin: 22px 0 0; padding: 18px 0 0; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.trust li { display: flex; align-items: flex-start; gap: 12px; font-size: 15px; font-weight: 500; line-height: 1.4; color: var(--ink); }
.trust b { font-weight: 800; color: var(--blue); }
.trust__check { width: 24px; height: 24px; flex: none; margin-top: -1px; border-radius: 50%; background: var(--green); display: grid; place-items: center; }
.trust__check svg { width: 16px; height: 16px; stroke: var(--on-green); stroke-width: 3; fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 20; stroke-dashoffset: 0; }
/* поява по черзі: рядок виїжджає, кружок «вистрибує», галочка домальовується */
.js .trust li { opacity: 0; transform: translateX(-14px); transition: opacity .45s ease, transform .45s cubic-bezier(.2, .8, .2, 1); transition-delay: calc(var(--i) * .35s + .15s); }
.js .trust__check { transform: scale(.3); transition: transform .4s cubic-bezier(.3, 1.6, .5, 1); transition-delay: calc(var(--i) * .35s + .25s); }
.js .trust__check svg { stroke-dashoffset: 20; transition: stroke-dashoffset .35s ease-out; transition-delay: calc(var(--i) * .35s + .5s); }
.js .trust.is-on li { opacity: 1; transform: none; }
.js .trust.is-on .trust__check { transform: none; }
.js .trust.is-on .trust__check svg { stroke-dashoffset: 0; }

/* ===================== SECTIONS ===================== */
.section { padding: 52px 0; }
.section--dark { background: var(--blue); color: var(--milk); }
.section--dark .h2, .section--dark h3 { color: var(--milk); }
.section--tint { background: #eff1fb; }
.section--line { border-top: 1px solid var(--line); }
.sec-head { margin-bottom: 26px; }
.sec-head .h2 { margin-bottom: 10px; }
.sec-lead { font-size: 16px; color: var(--muted); max-width: 520px; }
.section--dark .sec-lead { color: var(--on-dark); }
.sec-lead a { font-weight: 800; color: var(--blue); }

/* ----- what ----- */
.kinds { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.kinds li {
  display: flex; align-items: center; gap: 10px; min-width: 0;
  padding: 10px 10px; border-radius: 14px; background: #fff; border: 1px solid var(--line);
  font-size: 14.5px; font-weight: 700; color: var(--blue); line-height: 1.25;
}
.ico { width: 34px; height: 34px; flex: none; border-radius: 10px; background: var(--blue-10); display: grid; place-items: center; }
.ico svg { width: 19px; height: 19px; stroke: var(--blue); stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.bento { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.bento__item { position: relative; margin: 0; aspect-ratio: 1; border-radius: 16px; overflow: hidden; background: var(--blue); isolation: isolate; }
.bento__item--main, .bento__item--wide { grid-column: span 2; aspect-ratio: 16 / 10; }
.bento__item img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .5s ease; }
.bento__item::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(16, 18, 58, .85), rgba(16, 18, 58, .15) 55%, transparent); }
.bento__item.is-noimg img { display: none; }
.bento__item.is-noimg::after { display: none; }
.bento figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px; display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; color: #fff; }
.bento .ico { grid-row: span 2; background: var(--green); }
.bento .ico svg { stroke: var(--on-green); }
.bento figcaption b { font-size: 16px; font-weight: 800; line-height: 1.2; }
.bento figcaption small { font-size: 12.5px; font-weight: 600; color: var(--on-dark); line-height: 1.3; }
.what__more { margin-top: 20px; font-size: 15px; color: var(--muted); }

/* ----- how ----- */
.steps { list-style: none; margin: 0; padding: 0; position: relative; }
.step { display: grid; grid-template-columns: 40px 1fr; gap: 14px; padding: 0 0 26px; position: relative; }
.step:last-child { padding-bottom: 0; }
.step:not(:last-child)::before { content: ""; position: absolute; left: 19px; top: 44px; bottom: 6px; width: 2px; background: var(--on-dark-line); }
.step__n { width: 40px; height: 40px; border-radius: 50%; background: var(--green); color: var(--on-green); display: grid; place-items: center; font-weight: 800; font-size: 17px; }
.step h3 { font-size: 19px; margin: 8px 0 6px; }
.step p { font-size: 15.5px; color: var(--on-dark); }
.step__time { display: inline-block; margin-top: 10px; padding: 4px 10px; border-radius: 8px; background: rgba(255, 255, 255, .1); font-size: 13px; font-weight: 700; color: var(--milk); }

/* ----- receipt ----- */
.price__big { font-size: 44px; font-weight: 800; letter-spacing: -.03em; color: var(--blue); line-height: 1; margin: -2px 0 14px; }
.price__btn { margin-top: 22px; width: 100%; }
.receipt { margin-top: 32px; filter: drop-shadow(0 18px 28px rgba(63, 63, 191, .16)); }
.receipt__paper {
  --zz: 10px;
  position: relative; max-width: 420px; margin: 0 auto; padding: 26px 22px 30px; background: #fff;
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / calc(2 * var(--zz)) 100%;
          mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / calc(2 * var(--zz)) 100%;
}
.receipt__head { text-align: center; padding-bottom: 16px; border-bottom: 1.5px dashed var(--line); }
.receipt__head b { display: block; font-size: 19px; font-weight: 800; color: var(--blue); letter-spacing: -.01em; }
.receipt__head span { font-size: 13px; color: var(--muted); }
.receipt__rows { list-style: none; margin: 0; padding: 12px 0; }
.receipt__rows li { display: flex; align-items: baseline; gap: 8px; padding: 7px 0; font-size: 15px; color: var(--ink); }
.receipt__rows li span { flex: 1; display: flex; align-items: baseline; gap: 8px; }
.receipt__rows li span::after { content: ""; flex: 1; border-bottom: 1.5px dotted rgba(63, 63, 191, .25); transform: translateY(-4px); }
.receipt__rows b { font-weight: 800; color: var(--blue); font-variant-numeric: tabular-nums; }
.receipt__total { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0 6px; border-top: 1.5px dashed var(--line); font-weight: 800; color: var(--blue); font-size: 17px; }
.receipt__total b { font-size: 34px; letter-spacing: -.02em; }
.receipt__get { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 12px 14px; border-radius: 12px; background: var(--blue); color: var(--milk); font-size: 15px; line-height: 1.35; }
.receipt__get svg { width: 22px; height: 22px; stroke: var(--milk); stroke-width: 2.6; fill: none; stroke-linecap: round; stroke-linejoin: round; }

/* друк чека при прокрутці */
.js .receipt__rows li, .js .receipt__total, .js .receipt__get { opacity: 0; transform: translateY(-6px); transition: opacity .35s ease, transform .35s ease; transition-delay: calc(var(--i) * 140ms); }
.js .receipt.is-printed .receipt__rows li, .js .receipt.is-printed .receipt__total, .js .receipt.is-printed .receipt__get { opacity: 1; transform: none; }

/* ----- cases ----- */
.cases__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.sec-head--flush { margin-bottom: 24px; }
.sec-head--flush .h2 { margin-bottom: 0; }
.slider-nav { display: none; gap: 8px; margin-bottom: 24px; }
.slider-btn { width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid var(--line); background: #fff; display: grid; place-items: center; transition: border-color .2s; }
.slider-btn:hover { border-color: var(--blue); }
.slider-btn svg { width: 20px; height: 20px; stroke: var(--blue); stroke-width: 2.2; fill: none; stroke-linecap: round; stroke-linejoin: round; }

.cases {
  display: grid; grid-auto-flow: column; grid-auto-columns: 78%; gap: 14px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  padding: 0 var(--gutter) 4px; scroll-padding: 0 var(--gutter);
  -webkit-overflow-scrolling: touch;
}
.cases::-webkit-scrollbar { display: none; }
.cases img { -webkit-user-drag: none; user-select: none; pointer-events: none; }
@media (hover: hover) and (pointer: fine) { .cases { cursor: grab; } }
.cases.is-dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.slider-btn:disabled { opacity: .35; cursor: default; border-color: var(--line); }
.case { scroll-snap-align: start; min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; }
.case__img { aspect-ratio: 4 / 3; background: var(--blue-10); }
.case__img img { width: 100%; height: 100%; object-fit: cover; }
.case--noimg .case__img { display: none; }
.case__body { padding: 16px 16px 14px; display: flex; flex-direction: column; flex: 1; }
.case__tag { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px 5px 8px; border-radius: 8px; background: var(--blue-10); font-size: 13px; font-weight: 800; color: var(--blue); }
.case__tag svg { width: 16px; height: 16px; stroke: var(--blue); stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.case h3 { font-size: 18px; margin: 12px 0 2px; }
.case p { margin-top: auto; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.case p b { font-size: 17px; font-weight: 800; color: var(--blue); white-space: nowrap; }

/* ----- faq ----- */
.faq__head { margin-bottom: 22px; }
.faq__head .h2 { margin-bottom: 10px; }
.faq__list details { border-bottom: 1px solid var(--line); }
.faq__list details:first-child { border-top: 1px solid var(--line); }
.faq__list summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 17px 0; font-size: 16.5px; font-weight: 700; color: var(--blue); line-height: 1.35;
}
.faq__list summary::-webkit-details-marker { display: none; }
.faq__list summary::after {
  content: ""; width: 14px; height: 14px; flex: none;
  background: linear-gradient(var(--blue), var(--blue)) center / 14px 2px no-repeat, linear-gradient(var(--blue), var(--blue)) center / 2px 14px no-repeat;
  transition: transform .2s;
}
.faq__list details[open] summary::after { transform: rotate(45deg); }
.faq__list details p { padding: 0 30px 18px 0; font-size: 15.5px; color: var(--muted); }

/* ----- final ----- */
.final { background: var(--blue); color: var(--milk); padding: 52px 0; }
.final .h2 { color: var(--milk); margin-bottom: 12px; }
.final__copy p { font-size: 16px; color: var(--on-dark); max-width: 460px; }
.final__actions { margin-top: 26px; }
.final__alt { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--on-dark-line); }
.msgs { display: flex; justify-content: center; gap: 12px; margin-top: 14px; }
.msgs .msgr { width: 48px; height: 48px; }
.msgs svg { width: 22px; height: 22px; fill: #fff; }

/* ===================== FOOTER ===================== */
.footer { background: #1c1c5c; color: var(--on-dark); padding: 36px 0 calc(28px + env(safe-area-inset-bottom)); font-size: 15px; }
.footer__grid { display: grid; gap: 24px; }
.footer__label { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .5); margin-bottom: 6px; }
.footer__phone { font-size: 20px; font-weight: 800; color: var(--milk); text-decoration: none; }
.footer__muted { color: rgba(255, 255, 255, .55); font-size: 14px; margin-top: 2px; }
.footer__link { display: inline-block; margin-top: 4px; color: var(--milk); font-weight: 700; }
.footer__bottom { position: relative; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 28px; padding-top: 18px; font-size: 13px; color: rgba(255, 255, 255, .5); }
.footer__bottom::before { content: ""; position: absolute; top: 0; left: var(--gutter); right: var(--gutter); border-top: 1px solid var(--on-dark-line); }
.footer__bottom a { color: inherit; }
.form-fail { margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; background: #fff1f1; color: #9b1c1c; font-size: 14px; font-weight: 600; line-height: 1.4; }
.form-fail a { color: inherit; font-weight: 800; }

/* ===================== MOBILE BAR ===================== */
.mbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: grid; grid-template-columns: 52px 1fr 52px; gap: 8px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .96); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  transform: translateY(110%); transition: transform .25s ease;
}
.mbar.is-visible { transform: none; }
.mbar > * { height: 52px; border-radius: 14px; display: grid; place-items: center; text-decoration: none; position: relative; }
.mbar__call { border: 1.5px solid var(--blue); }
.mbar__call svg { width: 22px; height: 22px; fill: var(--blue); }
.mbar__price { background: var(--green); color: var(--on-green); font-weight: 800; font-size: 16px; }
.mbar__chat { border: 0; background: var(--blue-10); }
.mbar__chat svg { width: 22px; height: 22px; fill: var(--blue); }

/* ===================== CHAT ===================== */
.chatw { position: fixed; z-index: 80; inset: auto 0 0 0; pointer-events: none; }
.chatw > * { pointer-events: auto; }
.chatw__fab { display: none; }
.chatw__badge { position: absolute; top: -5px; right: -5px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: #e5484d; color: #fff; font-size: 12px; font-weight: 800; line-height: 20px; text-align: center; border: 2px solid var(--milk); }
.chatw__badge[hidden] { display: none; }

.chat { display: none; flex-direction: column; background: var(--milk); overflow: hidden; }
.chatw.is-open { inset: 0; }
.chatw.is-open .chat { display: flex; width: 100%; height: 100%; }
html.chat-lock, html.chat-lock body { overflow: hidden; }

.chat__head { display: flex; align-items: center; gap: 12px; padding: calc(12px + env(safe-area-inset-top)) 12px 12px 16px; background: var(--blue); color: var(--milk); flex: none; }
.chat__ava { width: 40px; height: 40px; border-radius: 50%; background: var(--milk); color: var(--blue); display: grid; place-items: center; }
.chat__ava svg { width: 22px; height: 22px; }
.chat__who { flex: 1; min-width: 0; line-height: 1.25; }
.chat__who b { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat__who small { font-size: 12px; color: var(--blue-20); }
.chat__close { width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .12); display: grid; place-items: center; }
.chat__close svg { width: 18px; height: 18px; stroke: var(--milk); stroke-width: 2.4; stroke-linecap: round; fill: none; }

.chat__body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 16px 14px; display: flex; flex-direction: column; gap: 8px; background: #f1f3fa; }
.chat__msg { max-width: 82%; padding: 10px 14px; border-radius: 18px; font-size: 15px; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat__msg--them { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.chat__msg--me { align-self: flex-end; background: var(--blue); color: var(--milk); border-bottom-right-radius: 6px; }
.chat__msg--sys { align-self: center; max-width: 92%; color: var(--muted); font-size: 13px; text-align: center; padding: 4px 8px; }
.chat__msg--img { padding: 4px; }
.chat__msg--img img { border-radius: 14px; max-height: 220px; object-fit: cover; }
.chat__msg.is-sending, .chat__msg.is-failed { opacity: .55; }

.chat__form { display: flex; align-items: flex-end; gap: 8px; padding: 10px 10px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--milk); flex: none; }
.chat__attach { width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center; cursor: pointer; background: var(--blue-10); position: relative; }
.chat__attach input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.chat__attach svg { width: 20px; height: 20px; stroke: var(--blue); stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.chat__attach:focus-within { outline: 3px solid #8f8fe6; }
.chat__form textarea { flex: 1; min-width: 0; resize: none; border: 1.5px solid var(--line); border-radius: 22px; padding: 11px 16px; font: 500 16px/1.35 "Manrope", system-ui, sans-serif; color: var(--ink); background: #fff; max-height: 120px; }
.chat__form textarea:focus { outline: none; border-color: #a3a3e6; }
.chat__send { width: 44px; height: 44px; flex: none; border: 0; border-radius: 50%; background: var(--blue); display: grid; place-items: center; }
.chat__send svg { width: 20px; height: 20px; fill: var(--milk); }

/* ===================== MODAL ===================== */
.modal { position: fixed; inset: 0; z-index: 100; background: rgba(16, 18, 58, .55); display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal__box { background: var(--milk); border-radius: 22px; padding: 32px 22px 18px; max-width: 400px; width: 100%; text-align: center; }
.modal__check { width: 60px; height: 60px; margin: 0 auto 16px; border-radius: 50%; background: var(--green); display: grid; place-items: center; }
.modal__check svg { width: 28px; height: 28px; stroke: var(--on-green); stroke-width: 3; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.modal__box h3 { font-size: 23px; margin-bottom: 8px; }
.modal__box p { color: var(--muted); font-size: 15.5px; margin-bottom: 20px; }
.modal__close { margin-top: 10px; padding: 10px; border: 0; background: none; color: var(--muted); font-weight: 700; }

/* ===================== SMALL PHONES ===================== */
@media (max-width: 374px) {
  :root { --gutter: 16px; }
  .hero__title { font-size: 30px; }
  .logo__text { font-size: 15px; }
  .header__row { gap: 10px; }
  .header__phone span { font-size: 15px; }
  .card-form { padding: 20px 14px 16px; }
  .card-form__title { font-size: 19px; }
  .chips .chip span { font-size: 13px; gap: 6px; padding: 6px 6px 6px 8px; }
  .chip span::before { width: 16px; height: 16px; }
  .facts b { font-size: 19px; }
  .kinds li { font-size: 13.5px; gap: 8px; padding: 8px; }
  .ico { width: 30px; height: 30px; }
  .h2 { font-size: 26px; }
  .price__big { font-size: 38px; }
  .receipt__paper { padding: 22px 16px 28px; }
  .receipt__rows li { font-size: 14px; }
}

/* на телефоні в шапці лише головне */
@media (max-width: 639px) {
  .header__phone small { display: none; }
  .chip span { font-size: 13.5px; gap: 8px; padding: 6px 6px 6px 10px; }
  .chip span::before { width: 16px; height: 16px; }
}

/* ===================== TABLET+ ===================== */
@media (min-width: 640px) {
  .hero__title { font-size: 44px; }
  .h2 { font-size: 36px; }
  .kinds { grid-template-columns: repeat(3, 1fr); }
  .bento { grid-template-columns: repeat(4, 1fr); grid-template-rows: 170px 170px; }
  .bento__item, .bento__item--main, .bento__item--wide { aspect-ratio: auto; }
  .bento__item--main { grid-column: 1 / 3; grid-row: 1 / 3; }
  .bento__item--wide { grid-column: 3 / 5; }
  .cases { grid-auto-columns: 46%; }
  .slider-nav { display: flex; }
  .hmsgr { display: flex; }
  .hero__msgr { display: none; }
  .price__btn { width: auto; }
  .final__actions { max-width: 440px; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

/* ===================== DESKTOP ===================== */
@media (min-width: 960px) {
  :root { --gutter: 32px; }
  body { font-size: 17px; }

  .header__row { height: 76px; gap: 32px; }
  .logo { margin-right: 0; }
  .logo__mark { width: 40px; height: 40px; }
  .logo__text { font-size: 18px; }
  .nav { display: flex; gap: 28px; margin-left: auto; }
  .nav a { text-decoration: none; font-weight: 700; font-size: 15px; color: var(--ink); }
  .nav a:hover { color: var(--blue); text-decoration: underline; text-underline-offset: 6px; }
  .header__phone span { font-size: 18px; }
  .header__phone small { font-size: 12px; }
  .burger { display: none; }
  html { scroll-padding-top: 90px; }

  .hero { padding: 72px 0 96px; }
  .hero__grid {
    grid-template-columns: 1fr 450px; column-gap: 80px;
    grid-template-areas: "copy form" "facts form";
    grid-template-rows: auto 1fr;
  }
  .hero__copy { align-self: end; }
  .hero__title { font-size: 66px; letter-spacing: -.035em; line-height: 1.04; margin-bottom: 0; }
  .hero__info { align-self: start; max-width: 540px; }
  .facts { margin-top: 44px; }
  .facts li { padding: 0 24px; }
  .facts b { font-size: 32px; }
  .facts span { font-size: 14px; }
  .trust { margin-top: 32px; padding-top: 28px; gap: 14px; }
  .trust li { font-size: 16px; }
  .trust__check { width: 26px; height: 26px; }
  .hero__form { position: relative; }
  .hero__form::before { content: ""; position: absolute; inset: 24px -24px -24px 24px; border-radius: 28px; background: var(--blue-10); z-index: -1; }
  .card-form { padding: 32px 30px 26px; border-radius: 26px; box-shadow: 0 30px 60px -30px rgba(63, 63, 191, .55); }
  .card-form__title { font-size: 25px; }

  .section, .final { padding: 104px 0; }
  .h2 { font-size: 46px; margin-bottom: 40px; }
  .sec-head { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: end; margin-bottom: 48px; }
  .sec-head .h2 { margin: 0; }
  .sec-lead { font-size: 18px; }
  .sec-head--flush { display: block; margin-bottom: 48px; }
  .sec-head--flush .h2 { margin-bottom: 0; }

  .bento { grid-template-rows: 230px 230px; gap: 12px; margin-bottom: 12px; }
  .bento__item, .bento__item--main, .bento__item--wide { border-radius: 20px; }
  .bento__item:hover img { transform: scale(1.04); }
  .bento figcaption { padding: 20px; column-gap: 14px; }
  .bento figcaption b { font-size: 19px; }
  .bento figcaption small { font-size: 14px; }
  .bento__item--main figcaption b { font-size: 26px; }
    .kinds { grid-template-columns: repeat(4, 1fr); gap: 12px; }
  .kinds li { padding: 16px; font-size: 16px; gap: 14px; border-radius: 16px; transition: border-color .2s, transform .2s; }
  .kinds li:hover { border-color: rgba(63, 63, 191, .35); transform: translateY(-2px); }
  .ico { width: 44px; height: 44px; border-radius: 12px; }
  .ico svg { width: 22px; height: 22px; }
  .what__more { font-size: 17px; margin-top: 32px; }

  .steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; }
  .steps::before { content: ""; position: absolute; top: 24px; left: 48px; right: calc(33.333% - 32px); height: 2px; background: var(--on-dark-line); }
  .step { grid-template-columns: 1fr; align-content: start; gap: 22px; padding: 0; }
  .step:not(:last-child)::before { display: none; }
  .step__n { width: 48px; height: 48px; font-size: 19px; position: relative; }
  .step h3 { font-size: 23px; margin: 0 0 10px; }
  .step p { font-size: 16.5px; }

  .price { display: grid; grid-template-columns: 1fr 440px; gap: 96px; align-items: center; }
  .price__big { font-size: 96px; margin: 4px 0 24px; }
  .price__copy .sec-lead { max-width: 480px; }
  .price__btn { margin-top: 32px; }
  .receipt { margin-top: 0; }
  .receipt__paper { padding: 32px 30px 36px; }
  .receipt__rows li { font-size: 16px; padding: 8px 0; }

  .slider-nav { display: flex; margin-bottom: 48px; }
  .cases {
    grid-auto-columns: 340px; gap: 24px;
    padding: 0 max(var(--gutter), calc((100% - var(--container)) / 2 + var(--gutter))) 4px;
    scroll-padding: 0 max(var(--gutter), calc((100% - var(--container)) / 2 + var(--gutter)));
  }
  .case__body { padding: 20px 20px 18px; }
  .case h3 { font-size: 20px; }
  .case p { font-size: 15px; }

  .faq { display: grid; grid-template-columns: 1fr 1.5fr; gap: 80px; align-items: start; }
  .faq__head { position: sticky; top: 120px; }
  .faq__head .h2 { margin-bottom: 16px; }
  .faq__list summary { font-size: 18px; padding: 22px 0; }
  .faq__list details p { font-size: 16px; padding-bottom: 22px; }

  .final__grid { display: grid; grid-template-columns: 1fr 440px; gap: 80px; align-items: center; }
  .final .h2 { font-size: 52px; }
  .final__copy p { font-size: 19px; }
  .final__actions { margin-top: 0; }

  .footer { padding: 44px 0; }

  .mbar { display: none; }

  .chatw { inset: auto 24px 24px auto; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
  .chatw.is-open { inset: auto 24px 24px auto; }
  .chatw__fab { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; border: 3px solid var(--milk); background: var(--blue); box-shadow: 0 14px 30px -10px rgba(63, 63, 191, .7); position: relative; transition: transform .2s; }
  .chatw__fab:hover { transform: scale(1.05); }
  .chatw__fab svg { width: 24px; height: 24px; fill: var(--milk); }
  .chatw.is-open .chatw__fab { display: none; }
  .chatw.is-open .chat { width: 370px; height: min(560px, calc(100vh - 120px)); border-radius: 22px; border: 1px solid var(--line); box-shadow: 0 30px 60px -20px rgba(63, 63, 191, .5); }
  .chat__head { padding-top: 14px; }
  .chat__form { padding-bottom: 10px; }
  html.chat-lock, html.chat-lock body { overflow: visible; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}
