/* dosbol.kz — ортақ стильдер */
:root {
  --bg: #ffffff;
  --bg-soft: #f5f8ff;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --border: #e2e8f0;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-soft: #e8efff;
  --wa: #25d366;
  --wa-hover: #1ebe5b;
  --price: #15803d;
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 8px 24px rgba(15, 23, 42, .06);
  --shadow-lg: 0 2px 4px rgba(15, 23, 42, .06), 0 20px 40px rgba(15, 23, 42, .10);
  --radius: 18px;
  --max: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1120;
    --bg-soft: #0f172a;
    --surface: #131c31;
    --text: #e2e8f0;
    --muted: #94a3b8;
    --border: #1e293b;
    --primary: #3b82f6;
    --primary-hover: #60a5fa;
    --primary-soft: #172554;
    --price: #4ade80;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, .3), 0 20px 40px rgba(0, 0, 0, .35);
  }
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }
h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

.skip-link {
  position: absolute; left: -9999px; top: 8px;
  background: var(--primary); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100;
}
.skip-link:focus { left: 8px; color: #fff; }

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

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; color: var(--text); }
.logo:hover { color: var(--text); }
.logo__mark {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg, #2563eb, #7c3aed); color: #fff; font-size: 16px;
}
.nav { display: flex; gap: 28px; }
.nav a { color: var(--muted); font-weight: 500; font-size: 15px; }
.nav a:hover { color: var(--text); }
@media (max-width: 820px) { .nav { display: none; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 12px 22px; border-radius: 12px; font-weight: 600; font-size: 15px;
  border: 1px solid transparent; cursor: pointer; transition: transform .15s, background .15s, box-shadow .15s;
  white-space: nowrap; font-family: inherit;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn--wa { background: var(--wa); color: #fff; }
.btn--wa:hover { background: var(--wa-hover); color: #fff; box-shadow: 0 6px 20px rgba(37, 211, 102, .35); }
.btn--tg { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn--tg:hover { color: var(--text); border-color: #229ed9; box-shadow: var(--shadow); }
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-hover); color: #fff; }
.btn--white { background: #fff; color: #1e3a8a; }
.btn--white:hover { background: #f1f5f9; color: #1e3a8a; }
.btn--sm { padding: 9px 16px; font-size: 14px; border-radius: 10px; }
.btn--block { width: 100%; white-space: normal; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1000px 500px at 85% 20%, rgba(59, 130, 246, .16), transparent 60%),
    radial-gradient(800px 400px at 10% 90%, rgba(124, 58, 237, .10), transparent 60%),
    var(--bg-soft);
  padding: 72px 0 88px;
  overflow: hidden;
}
.hero__grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary); font-weight: 600; font-size: 13px; margin-bottom: 20px;
}
.badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.hero h1 { font-size: clamp(34px, 5.5vw, 56px); font-weight: 800; margin-bottom: 18px; }
.hero h1 .accent {
  background: linear-gradient(90deg, #2563eb, #7c3aed);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__lead { font-size: clamp(17px, 2vw, 20px); color: var(--muted); max-width: 540px; margin-bottom: 32px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 32px; }
.hero__points { display: flex; flex-wrap: wrap; gap: 10px 24px; padding: 0; margin: 0; list-style: none; color: var(--muted); font-size: 15px; }
.hero__points li { display: flex; align-items: center; gap: 8px; }
.hero__points li::before { content: "✓"; color: var(--price); font-weight: 800; }
.hero__img { display: flex; justify-content: center; }
.hero__img img { width: 100%; max-width: 460px; height: auto; animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-12px); } }

@media (max-width: 820px) {
  .hero { padding: 40px 0 64px; text-align: center; }
  .hero__grid { grid-template-columns: 1fr; gap: 24px; }
  .hero__img { order: -1; }
  .hero__img img { max-width: 300px; }
  .hero__lead { margin-left: auto; margin-right: auto; }
  .hero__actions, .hero__points { justify-content: center; }
}

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
.section--soft { background: var(--bg-soft); }
.section__head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.section__head h2 { font-size: clamp(28px, 4vw, 38px); font-weight: 800; margin-bottom: 12px; }
.section__head p { color: var(--muted); font-size: 17px; }
@media (max-width: 820px) { .section { padding: 64px 0; } }

/* ---------- Service cards ---------- */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
@media (max-width: 720px) { .cards { grid-template-columns: 1fr; } }
.card {
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card__icon {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  font-size: 26px; margin-bottom: 18px; background: var(--primary-soft);
}
.card h3 { font-size: 21px; font-weight: 700; margin-bottom: 10px; }
.card__text { color: var(--muted); margin-bottom: 18px; }
.card__list { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 8px; font-size: 15px; }
.card__list li { display: flex; gap: 10px; }
.card__list li::before { content: "✓"; color: var(--price); font-weight: 800; }
.card__foot {
  margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-top: 20px; border-top: 1px dashed var(--border); flex-wrap: wrap;
}
.price { font-size: 24px; font-weight: 800; color: var(--price); }
.price small { display: block; font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: .02em; }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; list-style: none; padding: 0; margin: 0; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }
.step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; counter-increment: step; }
.step::before {
  content: counter(step); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--primary); color: #fff; font-weight: 800; margin-bottom: 16px;
}
.step h3 { font-size: 18px; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 15px; }

/* ---------- Benefits ---------- */
.benefits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .benefits { grid-template-columns: 1fr; } }
.benefit { display: flex; gap: 16px; align-items: flex-start; }
.benefit__icon { flex: none; width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; font-size: 24px; background: var(--primary-soft); }
.benefit h3 { font-size: 18px; margin-bottom: 6px; }
.benefit p { color: var(--muted); font-size: 15px; }

/* ---------- FAQ ---------- */
.faq { max-width: 760px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 0 22px; }
.faq details[open] { box-shadow: var(--shadow); }
.faq summary {
  list-style: none; cursor: pointer; padding: 18px 0; font-weight: 600; font-size: 17px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 24px; font-weight: 400; color: var(--primary); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding-bottom: 18px; }

/* ---------- CTA ---------- */
.cta {
  background: linear-gradient(135deg, #1d4ed8, #6d28d9); color: #fff; border-radius: 28px;
  padding: 56px 32px; text-align: center; position: relative; overflow: hidden;
}
.cta h2 { font-size: clamp(26px, 4vw, 36px); font-weight: 800; margin-bottom: 12px; }
.cta p { opacity: .9; font-size: 18px; margin-bottom: 28px; }
.cta__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.cta .btn--tg { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .3); }
.cta .btn--tg:hover { background: rgba(255, 255, 255, .2); color: #fff; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 32px 0; color: var(--muted); font-size: 14px; }
.footer__inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer__links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer__links a { color: var(--muted); }
.footer__links a:hover { color: var(--text); }

/* ---------- Payment page ---------- */
.pay { min-height: calc(100vh - 64px - 90px); display: grid; place-items: center; padding: 48px 0; background: var(--bg-soft); }
.pay__card {
  width: 100%; max-width: 480px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 24px; box-shadow: var(--shadow-lg); padding: 36px 28px; text-align: center;
}
.pay__card h1 { font-size: 30px; font-weight: 800; margin-bottom: 10px; }
.pay__card > p { color: var(--muted); margin-bottom: 28px; }
.kaspi-btn {
  display: flex; align-items: center; justify-content: center; padding: 18px; border-radius: 16px;
  border: 2px solid #f14635; background: #fff; transition: box-shadow .2s, transform .2s;
}
.kaspi-btn:hover { box-shadow: 0 8px 24px rgba(241, 70, 53, .25); transform: translateY(-2px); }
.pay__link { display: inline-block; margin: 14px 0 28px; font-size: 14px; word-break: break-all; }
.pay__steps { text-align: left; list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 14px; counter-reset: ps; }
.pay__steps li { display: flex; gap: 14px; align-items: flex-start; counter-increment: ps; color: var(--muted); }
.pay__steps li::before {
  content: counter(ps); flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary); font-weight: 700; font-size: 14px;
}
.pay__steps b { color: var(--text); }
.note {
  background: #fff7ed; color: #9a3412; border: 1px solid #fed7aa; border-radius: 12px;
  padding: 12px 14px; font-size: 14px; text-align: left; margin-bottom: 20px;
}
@media (prefers-color-scheme: dark) {
  .note { background: #2a1606; color: #fdba74; border-color: #7c2d12; }
}

/* ---------- Chat widget ---------- */
.chat-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 60; width: 60px; height: 60px; border-radius: 50%;
  border: 0; cursor: pointer; background: linear-gradient(135deg, #2563eb, #7c3aed); color: #fff;
  box-shadow: 0 10px 30px rgba(37, 99, 235, .45); display: grid; place-items: center; transition: transform .2s;
}
.chat-fab:hover { transform: scale(1.06); }
.chat-fab svg { width: 28px; height: 28px; }
.chat-fab .icon-close { display: none; }
.chat-fab[aria-expanded="true"] .icon-open { display: none; }
.chat-fab[aria-expanded="true"] .icon-close { display: block; }

.chat {
  position: fixed; right: 20px; bottom: 92px; z-index: 60; width: 360px; height: 520px; max-height: calc(100vh - 120px);
  background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; overflow: hidden;
  opacity: 0; transform: translateY(12px) scale(.98); pointer-events: none; visibility: hidden;
  transition: opacity .2s, transform .2s, visibility .2s;
}
.chat.is-open { opacity: 1; transform: none; pointer-events: auto; visibility: visible; }
@media (max-width: 480px) {
  .chat { right: 8px; left: 8px; width: auto; bottom: 88px; height: calc(100dvh - 104px); max-height: none; }
}
.chat__head {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  background: linear-gradient(135deg, #2563eb, #7c3aed); color: #fff;
}
.chat__avatar { width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, .2); display: grid; place-items: center; font-size: 20px; }
.chat__title { font-weight: 700; font-size: 15px; line-height: 1.2; }
.chat__status { font-size: 12px; opacity: .85; display: flex; align-items: center; gap: 6px; }
.chat__status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #4ade80; }
.chat__messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--bg-soft); }
.msg { max-width: 85%; padding: 10px 14px; border-radius: 16px; font-size: 14.5px; line-height: 1.45; white-space: pre-wrap; word-wrap: break-word; }
.msg--user { align-self: flex-end; background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.msg--bot { align-self: flex-start; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.msg--error { align-self: flex-start; background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.typing { display: inline-flex; gap: 4px; padding: 14px; }
.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .2s; }
.typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.chat__suggest { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 12px; background: var(--bg-soft); }
.chat__suggest button {
  border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 999px;
  padding: 6px 12px; font-size: 13px; cursor: pointer; font-family: inherit;
}
.chat__suggest button:hover { border-color: var(--primary); color: var(--primary); }
.chat__form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); background: var(--surface); }
.chat__form input {
  flex: 1; min-width: 0; border: 1px solid var(--border); background: var(--bg); color: var(--text);
  border-radius: 12px; padding: 11px 14px; font-size: 15px; font-family: inherit;
}
.chat__form input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.chat__form button {
  flex: none; width: 44px; border: 0; border-radius: 12px; background: var(--primary); color: #fff; cursor: pointer;
  display: grid; place-items: center;
}
.chat__form button:disabled { opacity: .5; cursor: default; }
.chat__form button svg { width: 20px; height: 20px; }

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}
