:root {
  --bg: #0b0f14;
  --bg-2: #10161d;
  --card: #141c25;
  --card-2: #1a2430;
  --line: #233040;
  --text: #e8eef5;
  --muted: #8b9bb0;
  --accent: #26d07c;
  --accent-2: #1fb36a;
  --accent-soft: rgba(38, 208, 124, 0.12);
  --tg: #2aabee;
  --wa: #25d366;
  --danger: #ff6b6b;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  --container: 1140px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 68px; }
body {
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }

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

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 15, 20, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; letter-spacing: -0.02em; }
.logo__mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), #12a0d8);
  display: grid; place-items: center; color: #04140b; font-weight: 900; font-size: 15px;
}
.nav { display: flex; gap: 28px; font-size: 15px; color: var(--muted); }
.nav a:hover { color: var(--text); }
.header__actions { display: flex; gap: 10px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 22px; border-radius: 12px; border: 1px solid transparent;
  font-weight: 700; font-size: 15px; cursor: pointer; transition: .2s; white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn--primary { background: var(--accent); color: #04140b; }
.btn--primary:hover { background: var(--accent-2); }
.btn--ghost { border-color: var(--line); background: var(--card); }
.btn--ghost:hover { border-color: var(--muted); }
.btn--tg { background: var(--tg); color: #fff; }
.btn--tg:hover { filter: brightness(1.08); }
.btn--wa { background: var(--wa); color: #05220f; }
.btn--wa:hover { filter: brightness(1.08); }
.btn--sm { height: 40px; padding: 0 14px; font-size: 14px; }
.btn--block { width: 100%; }
.btn--lg { height: 54px; font-size: 16px; }
.btn:disabled { opacity: .6; cursor: progress; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 80px 0 70px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -200px -100px auto auto; width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(38, 208, 124, 0.18), transparent 60%); pointer-events: none;
}
.hero__grid { position: relative; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 99px;
  background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 700; margin-bottom: 22px;
}
.badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(38,208,124,.25); }
.hero h1 { font-size: clamp(34px, 5vw, 56px); line-height: 1.08; letter-spacing: -0.03em; font-weight: 800; margin-bottom: 20px; }
.hero h1 span { color: var(--accent); }
.hero p.lead { font-size: 18px; color: var(--muted); max-width: 540px; margin-bottom: 32px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 36px; }
.hero__stats { display: flex; gap: 36px; flex-wrap: wrap; }
.hero__stats b { display: block; font-size: 24px; font-weight: 800; }
.hero__stats span { color: var(--muted); font-size: 14px; }

.pairs { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 24px; box-shadow: var(--shadow); }
.pairs__title { font-size: 14px; color: var(--muted); margin-bottom: 14px; font-weight: 600; }
.pair {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px; border-radius: 14px; background: var(--card-2); border: 1px solid var(--line);
  margin-bottom: 10px; cursor: pointer; transition: .2s;
}
.pair:last-child { margin-bottom: 0; }
.pair:hover { border-color: var(--accent); transform: translateY(-1px); }
.pair__cur { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.coin { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; flex-shrink: 0; }
.coin--usdt { background: #26a17b; color: #fff; }
.coin--kgs { background: #e8343c; color: #fff; }
.coin--usd { background: #3a7bd5; color: #fff; }
.pair__arrow { color: var(--accent); font-size: 20px; }
.pair__go { font-size: 13px; color: var(--muted); }

/* ---------- Sections ---------- */
.section { padding: 80px 0; }
.section--alt { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section__head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.section__head h2 { font-size: clamp(28px, 3.6vw, 40px); letter-spacing: -0.02em; line-height: 1.15; margin-bottom: 12px; }
.section__head p { color: var(--muted); font-size: 17px; }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.step__num { width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 800; margin-bottom: 16px; }
.step h3 { font-size: 17px; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 14.5px; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature { padding: 26px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.feature__icon { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 16px; }
.feature__icon svg { width: 22px; height: 22px; }
.feature h3 { font-size: 17px; margin-bottom: 6px; }
.feature p { color: var(--muted); font-size: 14.5px; }

/* ---------- Form ---------- */
.order { display: grid; grid-template-columns: 1fr 1.25fr; gap: 40px; align-items: start; }
.order__info h2 { font-size: clamp(28px, 3.6vw, 40px); letter-spacing: -0.02em; line-height: 1.15; margin-bottom: 14px; }
.order__info > p { color: var(--muted); margin-bottom: 26px; }
.checklist { list-style: none; display: grid; gap: 12px; margin-bottom: 28px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; color: var(--text); }
.checklist li::before { content: "✓"; flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: 12px; font-weight: 800; margin-top: 2px; }
.note { padding: 16px; border-radius: 12px; background: var(--card); border: 1px dashed var(--line); color: var(--muted); font-size: 14px; }

.form { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 30px; box-shadow: var(--shadow); }
.form__title { font-size: 20px; font-weight: 800; margin-bottom: 20px; }
.field { margin-bottom: 18px; }
.field label, .field__label { display: block; font-size: 14px; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.field__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.input, .select, .textarea {
  width: 100%; height: 50px; padding: 0 16px; border-radius: 12px;
  background: var(--bg-2); border: 1px solid var(--line); outline: none; transition: .2s; font-size: 15px;
}
.textarea { height: 90px; padding: 12px 16px; resize: vertical; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5 6 6.5l5-5' stroke='%238b9bb0' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input.is-invalid, .select.is-invalid { border-color: var(--danger); }
.field__error { color: var(--danger); font-size: 13px; margin-top: 6px; display: none; }
.field.has-error .field__error { display: block; }

.dirs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dir { position: relative; }
.dir input { position: absolute; opacity: 0; pointer-events: none; }
.dir span {
  display: flex; align-items: center; justify-content: center; gap: 8px; height: 50px; border-radius: 12px;
  background: var(--bg-2); border: 1px solid var(--line); cursor: pointer; font-weight: 700; font-size: 15px; transition: .2s;
}
.dir span i { font-style: normal; color: var(--accent); }
.dir input:checked + span { border-color: var(--accent); background: var(--accent-soft); }
.dir input:focus-visible + span { box-shadow: 0 0 0 3px var(--accent-soft); }

.amount { position: relative; }
.amount .input { padding-right: 70px; }
.amount__cur { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 700; font-size: 14px; }
.estimate { margin-top: 8px; font-size: 14px; color: var(--muted); display: none; }
.estimate b { color: var(--accent); }

.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); margin: 6px 0 20px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); flex-shrink: 0; }
.check a { color: var(--accent); text-decoration: underline; }
.hp { position: absolute; left: -9999px; opacity: 0; }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 0 22px; }
.faq summary { list-style: none; cursor: pointer; padding: 20px 0; font-weight: 700; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 22px; line-height: 1; transition: .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding-bottom: 20px; }

/* ---------- Contacts ---------- */
.contacts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.contact { display: block; padding: 24px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); transition: .2s; }
a.contact:hover { border-color: var(--accent); transform: translateY(-2px); }
.contact__icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 16px; }
.contact__icon svg { width: 24px; height: 24px; }
.contact__icon--tg { background: rgba(42,171,238,.15); color: var(--tg); }
.contact__icon--wa { background: rgba(37,211,102,.15); color: var(--wa); }
.contact__icon--ph { background: var(--accent-soft); color: var(--accent); }
.contact__icon--mail { background: rgba(255,193,77,.14); color: #ffc14d; }
.contact small { display: block; color: var(--muted); font-size: 13px; margin-bottom: 4px; }
.contact b { font-size: 16px; word-break: break-word; }

/* ---------- Footer ---------- */
.footer { padding: 40px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.footer__inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.footer__links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer__links a:hover { color: var(--text); }
.footer__disc { margin-top: 20px; font-size: 12.5px; max-width: 820px; }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(0,0,0,.65); backdrop-filter: blur(4px); }
.modal.is-open { display: flex; }
.modal__box { width: 100%; max-width: 460px; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 30px; text-align: center; box-shadow: var(--shadow); position: relative; }
.modal__close { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 10px; background: var(--card-2); border: 1px solid var(--line); cursor: pointer; font-size: 18px; }
.modal__icon { width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: 30px; font-weight: 800; }
.modal h3 { font-size: 22px; margin-bottom: 10px; }
.modal p { color: var(--muted); margin-bottom: 22px; }
.modal__btns { display: grid; gap: 10px; }
.modal pre { text-align: left; white-space: pre-wrap; font-family: inherit; font-size: 13.5px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 18px; color: var(--text); max-height: 200px; overflow: auto; }

/* ---------- Floating buttons ---------- */
.float { position: fixed; right: 18px; bottom: 18px; z-index: 60; display: grid; gap: 10px; }
.float a { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; box-shadow: 0 10px 30px rgba(0,0,0,.4); transition: .2s; }
.float a:hover { transform: scale(1.06); }
.float a svg { width: 26px; height: 26px; }
.float__tg { background: var(--tg); color: #fff; }
.float__wa { background: var(--wa); color: #fff; }

/* ---------- Policy page ---------- */
.doc { padding: 56px 0 80px; }
.doc__grid { display: grid; grid-template-columns: 260px 1fr; gap: 40px; align-items: start; }
.doc__nav { position: sticky; top: 92px; display: grid; gap: 4px; padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.doc__nav a { padding: 10px 12px; border-radius: 10px; color: var(--muted); font-size: 14.5px; font-weight: 600; }
.doc__nav a:hover { background: var(--card-2); color: var(--text); }
.doc__nav a.is-active { background: var(--accent-soft); color: var(--accent); border-color: rgba(38, 208, 124, 0.4); }
.doc__body h1 { font-size: clamp(30px, 4vw, 42px); letter-spacing: -0.02em; line-height: 1.15; margin-bottom: 10px; }
.doc__updated { color: var(--muted); margin-bottom: 36px; font-size: 14px; }
.doc__section { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; margin-bottom: 20px; scroll-margin-top: 92px; }
.doc__section h2 { font-size: 24px; margin-bottom: 16px; letter-spacing: -0.01em; }
.doc__section h3 { font-size: 17px; margin: 22px 0 8px; }
.doc__section p, .doc__section li { color: #c5d0dc; font-size: 15.5px; }
.doc__section p + p { margin-top: 10px; }
.doc__section ul, .doc__section ol { padding-left: 22px; display: grid; gap: 6px; margin-top: 8px; }
.doc__section a { color: var(--accent); text-decoration: underline; }
.placeholder { background: rgba(255,193,77,.14); color: #ffc14d; padding: 0 6px; border-radius: 6px; }

/* ---------- Burger ---------- */
.burger {
  display: none; width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  background: var(--card); border: 1px solid var(--line); cursor: pointer; position: relative;
}
.burger span, .burger span::before, .burger span::after {
  position: absolute; left: 50%; width: 18px; height: 2px; margin-left: -9px; border-radius: 2px;
  background: var(--text); transition: .25s;
}
.burger span { top: 50%; margin-top: -1px; }
.burger span::before, .burger span::after { content: ""; left: 0; margin-left: 0; }
.burger span::before { top: -6px; }
.burger span::after { top: 6px; }
.menu-open .burger span { background: transparent; }
.menu-open .burger span::before { top: 0; transform: rotate(45deg); }
.menu-open .burger span::after { top: 0; transform: rotate(-45deg); }

.float { transition: opacity .25s, transform .25s; }
.float.is-hidden, .menu-open .float { opacity: 0; transform: translateY(20px); pointer-events: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .burger { display: block; }
  .nav {
    position: fixed; top: 68px; left: 0; right: 0; z-index: 49;
    flex-direction: column; gap: 0; padding: 8px 20px 20px;
    background: rgba(11, 15, 20, 0.98); border-bottom: 1px solid var(--line);
    font-size: 17px; color: var(--text);
    opacity: 0; transform: translateY(-10px); pointer-events: none; transition: .25s;
  }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav a:last-child { border-bottom: 0; }
  .menu-open .nav { opacity: 1; transform: none; pointer-events: auto; }
  .menu-open { overflow: hidden; }

  .hero__grid, .order, .doc__grid { grid-template-columns: minmax(0, 1fr); }
  .hero__grid { gap: 36px; }
  .order { gap: 28px; }
  .steps, .features, .contacts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section { padding: 64px 0; }
  .section__head { margin-bottom: 36px; }

  .doc { padding-top: 32px; }
  .doc__nav {
    position: sticky; top: 68px; z-index: 10; display: flex; gap: 8px; overflow-x: auto;
    margin: 0 -20px; padding: 12px 20px; border-radius: 0; border-width: 0 0 1px;
    background: rgba(11, 15, 20, 0.95); backdrop-filter: blur(12px);
    scrollbar-width: none;
  }
  .doc__nav::-webkit-scrollbar { display: none; }
  .doc__nav a { flex-shrink: 0; white-space: nowrap; padding: 8px 14px; border: 1px solid var(--line); border-radius: 99px; background: var(--card); font-size: 14px; }
  .doc__section { scroll-margin-top: 140px; }
}

@media (max-width: 600px) {
  html { scroll-padding-top: 60px; }
  .container { padding: 0 16px; }
  .header__inner { height: 60px; }
  .nav { top: 60px; padding: 4px 16px 16px; }
  .logo { font-size: 18px; }
  .logo__mark { width: 32px; height: 32px; }
  .header__actions { gap: 8px; }
  .header__actions .btn span { display: none; }
  .header__actions .btn { width: 40px; padding: 0; }

  .hero { padding: 36px 0 44px; }
  .hero p.lead { font-size: 16px; margin-bottom: 24px; }
  .badge { font-size: 12px; margin-bottom: 18px; }
  .hero__cta { flex-direction: column; margin-bottom: 28px; }
  .hero__cta .btn { width: 100%; }
  .hero__stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
  .hero__stats > div:nth-child(2) { grid-column: 1 / -1; order: 3; }
  .hero__stats b { font-size: 19px; }
  .pairs { padding: 16px; border-radius: 18px; }
  .pair { padding: 12px; }
  .pair__go { display: none; }

  .section { padding: 52px 0; }
  .section__head { margin-bottom: 28px; }
  .section__head p { font-size: 15.5px; }
  .steps, .features, .contacts { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .step, .feature { padding: 20px; }
  .step { display: grid; grid-template-columns: 40px 1fr; column-gap: 14px; }
  .step__num { grid-row: span 2; margin-bottom: 0; }
  .feature { display: grid; grid-template-columns: 44px 1fr; column-gap: 14px; }
  .feature__icon { grid-row: span 2; margin-bottom: 0; }
  .contact { display: flex; align-items: center; gap: 14px; padding: 16px; }
  .contact__icon { margin-bottom: 0; flex-shrink: 0; }

  .field__row { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .form { padding: 22px 16px; border-radius: 18px; }
  /* 16px — чтобы iOS не увеличивал страницу при фокусе на поле */
  .input, .select, .textarea { font-size: 16px; }
  .checklist { margin-bottom: 20px; }

  .faq details { padding: 0 16px; }
  .faq summary { padding: 16px 0; }

  .float { right: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); }
  .float a { width: 50px; height: 50px; }

  .modal { align-items: flex-end; padding: 0; }
  .modal__box { max-width: none; border-radius: 22px 22px 0 0; padding: 26px 16px calc(20px + env(safe-area-inset-bottom)); max-height: 92vh; overflow-y: auto; }
  .modal__icon { width: 52px; height: 52px; font-size: 24px; margin-bottom: 12px; }
  .modal h3 { font-size: 20px; }
  .modal p { margin-bottom: 16px; font-size: 15px; }

  .footer__inner { flex-direction: column; }
  .footer__links { flex-direction: column; gap: 10px; }

  .doc__nav { margin: 0 -16px; padding: 10px 16px; top: 60px; }
  .doc__section { padding: 22px 16px; }
  .doc__section h2 { font-size: 21px; }
  .doc__section p, .doc__section li { font-size: 15px; }
}

@media (max-width: 360px) {
  .dir span { font-size: 13.5px; gap: 5px; }
  .hero h1 { font-size: 30px; }
  .pair__cur { gap: 7px; font-size: 14px; }
  .coin { width: 30px; height: 30px; font-size: 12px; }
}

@media (max-height: 700px) and (min-width: 601px) {
  .modal__box { max-height: 94vh; overflow-y: auto; }
}
