@import url("/static/ui/tokens.css");

* { box-sizing: border-box; }
/* Inter (latin + cyrillic) — для Latin/кириллицы; остальные письменности берут системные шрифты по списку ниже */
:root { --site-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans', sans-serif; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.6 var(--site-font);
  font-feature-settings: 'cv11', 'ss03'; -webkit-font-smoothing: antialiased;
}
img { display: block; }
a { color: inherit; }
code { font-family: var(--mono); font-size: .9em; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px;
  border-radius: 12px; font-weight: 650; font-size: 15px; text-decoration: none; white-space: nowrap;
  border: 1px solid transparent; transition: background .15s, border-color .15s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn.lg { height: 52px; padding: 0 24px; font-size: 16px; border-radius: 14px; }
.btn.block { width: 100%; }
.btn.primary { background: var(--accent); color: var(--accent-text); box-shadow: 0 8px 24px -10px var(--accent), inset 0 1px 0 rgba(255,255,255,.15); }
.btn.primary:hover { background: var(--accent-2); }
.btn.ghost { border-color: var(--line-2); background: var(--surface); color: var(--text); }
.btn.ghost:hover { border-color: var(--text-3); }
.btn.on-dark { background: transparent; color: #fff; border-color: rgba(255,255,255,.3); }
.btn.on-dark:hover { border-color: #fff; }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- шапка ---------- */
.nav { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.nav.scrolled { border-bottom-color: var(--line); }
.nav-in { display: flex; align-items: center; gap: 24px; height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; font-weight: 750; font-size: 17px; letter-spacing: -0.02em; text-decoration: none; }
.logo i { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, #6366f1, #14b8a6); display: block; box-shadow: inset 0 0 0 1px rgba(255,255,255,.15); }
.logo img { height: 30px; max-width: 120px; object-fit: contain; display: block; }
.links { display: flex; gap: 2px; min-width: 0; overflow: hidden; }
.links a { color: var(--text-2); text-decoration: none; font-size: 14.5px; font-weight: 550; padding: 8px 11px; border-radius: 10px; white-space: nowrap; }
/* до 1440px — плотнее, чтобы разделы помещались в шапку на ноутбуках (1280–1440) */
@media (max-width: 1440px) { .nav-in { gap: 16px; } .links a { padding: 8px 9px; } }
.links a:hover { color: var(--text); background: var(--surface-3); }
.links .m-only { display: none; }
.nav-cta { margin-inline-start: auto; display: flex; gap: 8px; align-items: center; }
.burger { display: none; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; padding: 0; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.burger span { width: 18px; height: 2px; background: var(--text); border-radius: 2px; 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); }

/* названия разделов не помещаются в шапку (длинные на некоторых языках): site.js ставит .tight — прячем «Документацию»,
   не помогло — .compact: то же меню-«бургер», что на узком экране */
.nav.tight .links .opt { display: none; }
.nav.compact .links { display: none; }
.nav.compact .links.open { display: grid; position: absolute; top: 68px; left: 0; right: 0; padding: 12px 24px 20px; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); gap: 2px; max-height: calc(100dvh - 68px); overflow-y: auto; overscroll-behavior: contain; }
.nav.compact .links.open a { padding: 12px; font-size: 16px; }
.nav.compact .links.open .m-only { display: block; }
.nav.compact .links.open .m-only.cta { color: var(--accent); font-weight: 700; }
.nav.compact .links.open .lang-grid a { padding: 9px 12px; font-size: 14.5px; }
.nav.compact .burger { display: inline-flex; }
.nav.compact .nav-cta .btn.ghost, .nav.compact .nav-cta .lang { display: none; }

/* переключатель языка: <details> — открывается без JS; в мобильном меню — свой список (.m-lang) */
.lang { position: relative; }
.lang summary, .m-lang summary { list-style: none; cursor: pointer; user-select: none; }
.lang summary::-webkit-details-marker, .m-lang summary::-webkit-details-marker { display: none; }
.lang summary { display: inline-flex; align-items: center; gap: 6px; height: 42px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text-2); font-size: 13.5px; font-weight: 650; }
.lang summary:hover, .lang[open] summary { color: var(--text); border-color: var(--text-3); }
.lang svg, .m-lang svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lang-menu {
  position: absolute; top: calc(100% + 8px); inset-inline-end: 0; z-index: 30; width: 420px; max-width: calc(100vw - 32px);
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; padding: 8px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: 0 24px 48px -20px rgba(16, 24, 40, .35);
}
.lang-menu a, .lang-grid a { display: block; padding: 8px 12px; border-radius: 10px; text-decoration: none; color: var(--text-2); font-size: 14px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lang-menu a:hover, .lang-grid a:hover { background: var(--surface-3); color: var(--text); }
.lang-menu a[aria-current], .lang-grid a[aria-current] { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.m-lang { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 6px; }
.m-lang summary { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 10px; color: var(--text-2); font-size: 16px; font-weight: 550; }
.m-lang summary::after { content: ''; margin-inline-start: auto; width: 8px; height: 8px; border-right: 2px solid var(--text-3); border-bottom: 2px solid var(--text-3); transform: translateY(-2px) rotate(45deg); transition: transform .2s; }
.m-lang[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.lang-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; padding: 2px 0 6px; }

/* ---------- первый экран ---------- */
.hero { position: relative; overflow: hidden; padding: 64px 0 40px; }
.hero-bg {
  position: absolute; inset: -20% -10% auto; height: 900px; pointer-events: none;
  background:
    radial-gradient(40rem 26rem at 18% 18%, var(--glow-a), transparent 65%),
    radial-gradient(36rem 26rem at 85% 10%, var(--glow-b), transparent 65%);
}
.hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px; opacity: .35;
  mask-image: radial-gradient(60% 55% at 50% 30%, #000, transparent 75%);
}
.hero-in { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding-block: 6px; padding-inline: 10px 14px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--surface); font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); }
h1 { font-size: clamp(36px, 4.4vw, 56px); line-height: 1.04; letter-spacing: -0.045em; margin: 22px 0 20px; font-weight: 780; }
.lead { font-size: 19px; line-height: 1.55; color: var(--text-2); margin: 0 0 28px; max-width: 560px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-cta.center { justify-content: center; }
.ticks { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--text-2); font-size: 14.5px; }
.ticks li { display: flex; align-items: center; gap: 8px; }
.ticks li::before, .checks li::before {
  content: ''; width: 18px; height: 18px; flex: 0 0 18px; border-radius: 50%;
  background: var(--ok-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2312a150' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4L18 8'/%3E%3C/svg%3E") center / 12px no-repeat;
}

/* макет страницы оплаты */
.hero-art { position: relative; padding: 24px 28px 72px; }
.mock {
  position: relative; z-index: 1; max-width: 420px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line);
  border-radius: 24px; box-shadow: 0 40px 80px -30px rgba(16, 24, 40, .35), 0 2px 6px rgba(16,24,40,.05); padding: 18px; display: grid; gap: 14px;
  transform: rotate(-1.2deg);
}
.mock-top { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; border-bottom: 1px dashed var(--line-2); }
.mock-top b { display: block; font-size: 14px; }
.mock-top small { color: var(--text-3); font-size: 12px; }
.m-avatar { width: 32px; height: 32px; border-radius: 10px; background: linear-gradient(135deg, #f59e0b, #ef4444); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.m-amount { margin-inline-start: auto; font-weight: 750; font-size: 20px; letter-spacing: -0.02em; }
.m-amount small, .mf b small { font-size: 12px; color: var(--text-2); font-weight: 600; }
.mock-head { display: flex; align-items: center; gap: 12px; }
.mock-head b { font-size: 16px; }
.stackic { position: relative; width: 38px; height: 38px; flex: 0 0 38px; }
.stackic img:first-child { width: 38px; height: 38px; border-radius: 50%; }
.stackic img + img { position: absolute; inset-inline-end: -3px; bottom: -3px; width: 17px; height: 17px; border-radius: 50%; border: 2px solid var(--surface); }
.pills { display: flex; gap: 5px; margin-top: 4px; }
.pill { font-size: 11px; font-weight: 650; padding: 2px 8px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); }
.pill.soft { background: var(--surface-3); color: var(--text-2); }
.mock-body { display: grid; grid-template-columns: 132px 1fr; gap: 12px; align-items: start; }
.mock-qr { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px; }
.mock-qr svg { display: block; width: 100%; height: auto; }
.qr-logo { position: absolute; left: 50%; top: 50%; width: 30px; height: 30px; margin: -15px; padding: 2px; background: #fff; border-radius: 50%; }
.qr-logo img { width: 100%; height: 100%; border-radius: 50%; }
.mock-fields { display: grid; gap: 8px; min-width: 0; }
.mf { background: var(--surface-3); border-radius: 10px; padding: 8px 10px; }
.mf span { display: block; font-size: 11px; color: var(--text-3); }
.mf b { font-size: 17px; letter-spacing: -0.01em; }
.mf code { font-size: 11.5px; color: var(--text-2); word-break: break-all; }
.mf code b { font-size: inherit; color: var(--text); }
.mock-status { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--ok-soft); }
.mock-status b { display: block; font-size: 14px; }
.mock-status small { color: var(--text-2); font-size: 12px; }
.ok-ic { width: 30px; height: 30px; border-radius: 50%; background: var(--ok); display: grid; place-items: center; }
.ok-ic svg { width: 16px; height: 16px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.chip {
  position: absolute; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: 0 18px 40px -18px rgba(16, 24, 40, .35); font-size: 13px; white-space: nowrap;
  animation: float 6s ease-in-out infinite;
}
.chip img { width: 28px; height: 28px; border-radius: 50%; }
.chip b { display: block; font-size: 13.5px; }
.chip small { display: block; color: var(--text-3); font-size: 11.5px; }
.chip code { font-size: 11.5px; color: var(--accent); background: var(--accent-soft); padding: 2px 6px; border-radius: 6px; }
.chip em { font-style: normal; font-weight: 700; font-size: 11.5px; padding: 2px 8px; border-radius: 99px; }
.chip em.ok { background: var(--ok-soft); color: var(--ok); }
.chip em.wait { color: #e3a008; animation: blink 1.4s ease-in-out infinite; }
/* карточки лежат на свободных местах макета: справа от заголовка, справа от статуса, под макетом */
.c1 { top: 27%; inset-inline-end: -4%; }
.c3 { bottom: 22%; inset-inline-end: -6%; animation-delay: -4s; }
.c2 { bottom: 0; inset-inline-start: 0; animation-delay: -2s; }
@keyframes float { 50% { transform: translateY(-8px); } }
@keyframes blink { 50% { opacity: .3; } }

/* ---------- цифры ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; width: calc(100% - 48px); max-width: 1112px; margin: 40px auto; padding: 0; }
.stats div { background: var(--surface); padding: 22px 24px; display: flex; flex-direction: column; gap: 2px; }
.stats b { font-size: 32px; font-weight: 760; letter-spacing: -0.03em; }
.stats span { color: var(--text-2); font-size: 14px; }

/* ---------- секции ---------- */
.sec { padding: 88px 0; }
.sec.alt { background: var(--surface-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sec-head { max-width: 720px; margin: 0 auto 44px; text-align: center; }
.sec-head.left { text-align: start; margin: 0; }
.kicker { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
h2 { font-size: clamp(30px, 3.6vw, 44px); line-height: 1.1; letter-spacing: -0.035em; margin: 0 0 14px; font-weight: 760; }
.sec-head p, .sub { color: var(--text-2); font-size: 17px; margin: 0; }
h3 { font-size: 18px; letter-spacing: -0.015em; margin: 0 0 8px; font-weight: 700; }

.coins { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.coin { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; align-content: start; padding: 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); transition: border-color .15s, box-shadow .15s; }
.coin.wide { grid-column: span 2; }
.coin:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.coin > img { width: 40px; height: 40px; border-radius: 50%; }
.coin-t b { display: block; font-size: 16px; }
.coin-t span { display: block; color: var(--text-3); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.coin-n { white-space: nowrap; font-size: 12.5px; color: var(--text-2); font-weight: 600; background: var(--surface-3); padding: 3px 9px; border-radius: 99px; }
.nets { grid-column: 1 / -1; list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.nets li { display: inline-flex; align-items: center; gap: 6px; padding-block: 3px; padding-inline: 3px 9px; border-radius: 99px; background: var(--surface-3); font-size: 12.5px; font-weight: 550; color: var(--text-2); }
.nets img { width: 20px; height: 20px; border-radius: 50%; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.features.four { grid-template-columns: repeat(4, 1fr); }
.feat { padding: 26px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.feat p { margin: 0; color: var(--text-2); font-size: 15px; }
.f-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 18px; }
.f-ic svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: s; position: relative; }
.steps li { padding: 28px; border-radius: 20px; border: 1px solid var(--line); background: var(--surface); position: relative; }
.steps p { margin: 0; color: var(--text-2); font-size: 15px; }
.steps .n { width: 40px; height: 40px; border-radius: 12px; background: var(--text); color: var(--surface); display: grid; place-items: center; font-weight: 750; margin-bottom: 18px; }

.cases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.case { padding: 22px 24px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); display: grid; gap: 4px; }
.case b { font-size: 16.5px; }
.case span { color: var(--text-2); font-size: 14.5px; }

.dev { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 56px; align-items: center; }
.dev > *, .pricing > *, .faq-wrap > *, .hero-in > * { min-width: 0; }
.dev .sub { margin-bottom: 22px; }
.checks { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 12px; color: var(--text-2); font-size: 15.5px; }
/* обычный текст с иконкой слева: так фрагменты <code> внутри пункта переносятся вместе с текстом */
.checks li { position: relative; padding-inline-start: 28px; overflow-wrap: anywhere; }
.checks li::before { position: absolute; inset-inline-start: 0; top: 3px; }
.checks code { background: var(--surface-3); padding: 1px 6px; border-radius: 6px; color: var(--text); }
.code { border-radius: 20px; background: #0d1017; color: #d6dbe6; box-shadow: 0 40px 80px -36px rgba(16,24,40,.6); overflow: hidden; border: 1px solid #1d2230; }
.code-bar { display: flex; align-items: center; gap: 6px; padding: 12px 16px; border-bottom: 1px solid #1d2230; }
.code-bar span { width: 11px; height: 11px; border-radius: 50%; background: #2a3040; }
.code-bar em { font-style: normal; margin-inline-start: 10px; font-size: 12.5px; color: #6b7385; }
.code pre { margin: 0; padding: 20px; font: 13px/1.7 var(--mono); overflow-x: auto; }
.code .c { color: #6b7385; } .code .s { color: #a5e3b0; } .code .k { color: #8ab4ff; }

.pricing { display: grid; grid-template-columns: 1fr 1.25fr; gap: 24px; align-items: start; }
.price-card { position: sticky; top: 92px; padding: 32px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.price { display: flex; align-items: baseline; gap: 12px; margin: 4px 0 24px; }
.price b { font-size: 64px; font-weight: 800; letter-spacing: -0.05em; line-height: 1; }
.price span { color: var(--text-2); }
.fee-table { padding: 28px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); }
.fee-table .sub { font-size: 14.5px; margin-bottom: 14px; }
.fee-table table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.fee-table th { text-align: start; font-size: 12.5px; color: var(--text-3); font-weight: 600; padding: 8px 0; border-bottom: 1px solid var(--line); }
.fee-table td { padding: 10px 0; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.fee-table tr:last-child td { border-bottom: 0; }
.fee-table .r { text-align: end; }
.fee-table td.r { font-weight: 650; }
.net { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; }
.net img { width: 22px; height: 22px; border-radius: 50%; }
.net small { color: var(--text-3); font-weight: 500; font-size: 12px; }

.faq-wrap { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 56px; align-items: start; }
.faq-wrap .sec-head p { margin-top: 10px; }
.faq-wrap .sec-head a { color: var(--accent); }
.faq { display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 0 20px; }
.faq summary { cursor: pointer; list-style: none; padding-block: 18px; padding-inline: 0 28px; font-weight: 650; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; position: absolute; inset-inline-end: 2px; top: 50%; width: 9px; height: 9px; border-right: 2px solid var(--text-3); border-bottom: 2px solid var(--text-3); transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq p { margin: 0 0 18px; color: var(--text-2); }

.final { padding: 32px 0 96px; }
.final-in {
  text-align: center; padding: 64px 32px; border-radius: 28px; color: #fff; position: relative; overflow: hidden;
  background: radial-gradient(40rem 20rem at 20% 0%, rgba(124,131,255,.55), transparent 60%), radial-gradient(40rem 20rem at 90% 100%, rgba(20,184,166,.45), transparent 60%), #0f1222;
}
.final-in h2 { color: #fff; }
.final-in p { color: rgba(255,255,255,.75); font-size: 17px; margin: 0 0 28px; }

.foot { border-top: 1px solid var(--line); padding: 48px 0 28px; background: var(--surface); }
.foot-in { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 32px; }
.foot p { color: var(--text-3); font-size: 14px; margin: 12px 0 0; max-width: 260px; }
.foot nav, .foot .contacts { display: grid; gap: 8px; align-content: start; font-size: 14px; }
.foot b { font-size: 13px; color: var(--text); margin-bottom: 4px; }
.foot nav a, .contacts a, .contacts span { color: var(--text-2); text-decoration: none; }
.foot nav a:hover, .contacts a:hover { color: var(--text); }
.foot-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13px; color: var(--text-3); }

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

/* ---------- письменность справа налево (ar, fa) ---------- */
/* раскладка — на логических свойствах (inline-start/end), здесь — то, что зеркалить нужно отдельно */
[dir="rtl"] .btn svg { transform: scaleX(-1); }
[dir="rtl"] .mock { transform: rotate(1.2deg); }
/* код и адреса — всегда слева направо */
[dir="rtl"] .code { direction: ltr; }
[dir="rtl"] code { direction: ltr; unicode-bidi: isolate; }

/* ---------- шрифты и межбуквенные интервалы по письменности ---------- */
/* в Inter нет латиницы-расширения и казахских букв: целиком системный шрифт, чтобы слова не собирались из двух шрифтов */
:root:is(:lang(pl), :lang(tr), :lang(az), :lang(vi), :lang(kk)) { --site-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans', 'Helvetica Neue', Arial, sans-serif; }
:root:is(:lang(pl), :lang(tr), :lang(az), :lang(vi), :lang(kk)) body { font-feature-settings: normal; }
/* латиница — Inter, остальное — системные шрифты письменности */
:root:is(:lang(ar), :lang(fa)) { --site-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Tahoma, 'Noto Sans Arabic', 'Geeza Pro', sans-serif; }
:root:lang(hi) { --site-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Nirmala UI', 'Kohinoor Devanagari', 'Noto Sans Devanagari', sans-serif; }
:root:lang(th) { --site-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Leelawadee UI', Thonburi, 'Noto Sans Thai', sans-serif; }
:root:lang(zh) { --site-font: 'Inter', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', sans-serif; }
:root:lang(ja) { --site-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic UI', Meiryo, 'Noto Sans JP', sans-serif; }
:root:lang(ko) { --site-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', sans-serif; }
/* вязь, деванагари, тайский и CJK: без сжатого трекинга, с запасом высоты строки для надстрочных/подстрочных знаков */
:is(:lang(ar), :lang(fa), :lang(hi), :lang(th), :lang(zh), :lang(ja), :lang(ko)) :is(h1, h2, h3, .logo, .kicker, .stats b, .price b, .m-amount, .mf b) { letter-spacing: normal; }
:is(:lang(ar), :lang(fa), :lang(hi), :lang(th)) h1 { line-height: 1.3; }
:is(:lang(ar), :lang(fa), :lang(hi), :lang(th)) h2 { line-height: 1.3; }
:is(:lang(zh), :lang(ja), :lang(ko)) h1 { line-height: 1.2; }
:is(:lang(zh), :lang(ja), :lang(ko)) h2 { line-height: 1.25; }
/* японский: переносить заголовки по границам фраз, а не посреди слова (Chrome 119+, остальные игнорируют) */
:lang(ja) :is(h1, h2, h3) { word-break: auto-phrase; }

/* ---------- адаптив ---------- */
@media (max-width: 1080px) {
  .features.four { grid-template-columns: repeat(2, 1fr); }
  .foot-in { grid-template-columns: 1fr 1fr 1fr; }
  .foot-in > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 960px) {
  .links { display: none; }
  .links.open { display: grid; position: absolute; top: 68px; left: 0; right: 0; padding: 12px 24px 20px; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); gap: 2px; max-height: calc(100dvh - 68px); overflow-y: auto; overscroll-behavior: contain; }
  .links.open .lang-grid a { padding: 9px 12px; font-size: 14.5px; }
  .nav-cta .lang { display: none; }
  .links.open a { padding: 12px; font-size: 16px; }
  .links.open .m-only { display: block; }
  .links.open .m-only.cta { color: var(--accent); font-weight: 700; }
  .burger { display: inline-flex; }
  .nav-cta .btn.ghost { display: none; }
  .hero-in { grid-template-columns: 1fr; gap: 40px; }
  .hero-art { max-width: 520px; margin: 0 auto; width: 100%; }
  .features, .cases { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .dev, .pricing, .faq-wrap { grid-template-columns: 1fr; gap: 32px; }
  .price-card { position: static; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  .nav-cta .btn.primary { display: none; }
  .stats { width: calc(100% - 32px); margin: 28px auto; }
  .hero { padding: 36px 0 20px; }
  .lead { font-size: 17px; }
  .hero-cta .btn { flex: 1 1 100%; }
  .hero-art { padding: 16px 4px 28px; }
  .mock, [dir="rtl"] .mock { transform: none; }
  .mock-body { grid-template-columns: 112px 1fr; }
  .chip { font-size: 12px; padding: 8px 10px; }
  .chip img { width: 22px; height: 22px; }
  .hero-art { padding-bottom: 56px; }
  .c1 { top: 24%; inset-inline-end: -2px; } .c2 { display: none; } .c3 { bottom: 0; inset-inline-end: 8px; }
  .features, .features.four, .cases { grid-template-columns: 1fr; }
  .coin.wide { grid-column: auto; }
  .sec { padding: 64px 0; }
  .stats b { font-size: 26px; }
  .stats div { padding: 16px; }
  .price b { font-size: 52px; }
  .price-card, .fee-table { padding: 22px; }
  .foot-in { grid-template-columns: 1fr 1fr; }
  .final-in { padding: 44px 20px; border-radius: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
