/* MirageVPN — miragevpn.fun
   Стекло в духе iOS: размытые полупрозрачные поверхности, капсульные кнопки,
   мягкие радиусы. Палитра унаследована от Telegram Mini App. */

:root {
  --bg: #161826;
  --bg-deep: #0f111c;
  --surface: #1e2130;
  --surface-2: #282c3d;
  --text: #e9e9ed;
  --muted: #989aab;
  --line: rgba(233, 233, 237, .11);
  --line-strong: rgba(233, 233, 237, .2);
  --accent: #9184d9;
  --accent-dim: #b5abfc;
  --accent-soft: rgba(145, 132, 217, .13);
  --accent-soft-2: rgba(145, 132, 217, .24);

  /* стекло */
  --glass: rgba(233, 233, 237, .055);
  --glass-2: rgba(233, 233, 237, .1);
  --glass-line: rgba(233, 233, 237, .14);
  --glass-line-soft: rgba(233, 233, 237, .08);
  --glass-hi: rgba(255, 255, 255, .14);
  --blur: saturate(170%) blur(26px);
  --blur-lite: saturate(150%) blur(16px);

  --ok: #84d8ad;
  --ok-soft: rgba(132, 216, 173, .14);
  --shadow-lg: 0 26px 70px rgba(0, 0, 0, .5);
  --shadow-md: 0 14px 40px rgba(0, 0, 0, .34);
  --shadow-sm: 0 6px 18px rgba(0, 0, 0, .22);

  --font-display: Manrope, "Noto Sans Armenian", "Noto Sans Arabic", "Noto Sans SC", system-ui, sans-serif;
  --font-body: Inter, "Noto Sans Armenian", "Noto Sans Arabic", "Noto Sans SC", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 24px;
  --r-xl: 32px;
  --r-pill: 999px;

  --gutter: clamp(18px, 5vw, 76px);
  --maxw: 1240px;
  --ease: cubic-bezier(.32, .72, 0, 1);
}

[data-theme="light"] {
  --bg: #f2f2f7;
  --bg-deep: #e6e6ef;
  --surface: #ffffff;
  --surface-2: #ecedf4;
  --text: #1a1b25;
  --muted: #6b6d80;
  --line: rgba(26, 27, 37, .10);
  --line-strong: rgba(26, 27, 37, .2);
  --accent: #6b5dc0;
  --accent-dim: #5d4fb0;
  --accent-soft: rgba(107, 93, 192, .10);
  --accent-soft-2: rgba(107, 93, 192, .2);

  --glass: rgba(255, 255, 255, .58);
  --glass-2: rgba(255, 255, 255, .78);
  --glass-line: rgba(26, 27, 37, .09);
  --glass-line-soft: rgba(26, 27, 37, .06);
  --glass-hi: rgba(255, 255, 255, .9);

  --ok: #2c8f66;
  --ok-soft: rgba(44, 143, 102, .12);
  --shadow-lg: 0 26px 70px rgba(26, 27, 37, .14);
  --shadow-md: 0 14px 40px rgba(26, 27, 37, .09);
  --shadow-sm: 0 6px 18px rgba(26, 27, 37, .06);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background .45s ease, color .45s ease;
}

/* световая подложка, из-за которой стекло читается как стекло */
body::before {
  content: "";
  position: fixed;
  inset: -20% -10% auto -10%;
  height: 120vh;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(48% 38% at 14% 8%, rgba(145, 132, 217, .3) 0%, transparent 68%),
    radial-gradient(42% 34% at 86% 2%, rgba(181, 171, 252, .18) 0%, transparent 70%),
    radial-gradient(52% 40% at 60% 62%, rgba(145, 132, 217, .12) 0%, transparent 72%);
  opacity: .85;
}
[data-theme="light"] body::before { opacity: .5; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -.03em;
  line-height: 1.06;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent-dim); }

img { display: block; max-width: 100%; }
button { font-family: inherit; color: inherit; }

::selection { background: var(--accent-soft-2); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.mono {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

.rule {
  height: 1px; border: 0; margin: 0;
  background: linear-gradient(90deg, transparent, var(--line-strong) 12%, var(--line-strong) 88%, transparent);
}

/* ---------- стеклянная поверхность ---------- */

.glass {
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--glass-line);
  box-shadow: inset 0 1px 0 var(--glass-hi), var(--shadow-sm);
}

/* ---------- кнопки ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: var(--r-pill);
  border: 1px solid var(--glass-line);
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur-lite);
  backdrop-filter: var(--blur-lite);
  box-shadow: inset 0 1px 0 var(--glass-hi);
  color: var(--text);
  font-size: 14.5px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background .24s var(--ease), border-color .24s, transform .16s var(--ease), color .2s;
}
.btn i { font-size: 18px; color: var(--accent); }
.btn:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.btn:active { transform: scale(.96); }
.btn-primary { border-color: color-mix(in oklab, var(--accent) 70%, transparent); background: var(--accent-soft); }
.btn-primary:hover { background: var(--accent-soft-2); }
.btn-ghost { border-color: transparent; background: transparent; box-shadow: none; color: var(--muted); }
.btn-ghost:hover { color: var(--text); background: var(--glass); border-color: transparent; }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 13px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.icon-btn {
  width: 44px; height: 44px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-pill);
  border: 1px solid var(--glass-line);
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur-lite);
  backdrop-filter: var(--blur-lite);
  box-shadow: inset 0 1px 0 var(--glass-hi);
  cursor: pointer; position: relative;
  transition: background .22s, border-color .22s, transform .16s var(--ease);
}
.icon-btn i { font-size: 18px; color: var(--accent); }
.icon-btn:hover { background: var(--accent-soft); border-color: var(--accent); }
.icon-btn:active { transform: scale(.94); }

.tag {
  display: inline-flex; align-items: center; gap: 7px;
  height: 30px; padding: 0 13px;
  border-radius: var(--r-pill);
  background: var(--accent-soft);
  border: 1px solid var(--glass-line-soft);
  color: var(--accent-dim);
  font-size: 12.5px; font-weight: 500;
}
.tag-ok { background: var(--ok-soft); color: var(--ok); }

.pulse { position: relative; width: 7px; height: 7px; flex: none; }
.pulse::before, .pulse::after { content: ""; position: absolute; border-radius: 50%; background: currentColor; }
.pulse::before { inset: 0; }
.pulse::after { inset: -4px; animation: breathe 2.4s ease-in-out infinite; }

@keyframes breathe { 0%, 100% { opacity: .3; transform: scale(1); } 50% { opacity: .7; transform: scale(1.15); } }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: none; } }
@keyframes shimmer { from { background-position: -220px 0; } to { background-position: 320px 0; } }
@keyframes toastIn { 0% { opacity: 0; transform: translateY(14px) scale(.96); } 12% { opacity: 1; transform: none; } 84% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-8px); } }
@keyframes sheetUp { from { transform: translateY(28px) scale(.985); opacity: 0; } to { transform: none; opacity: 1; } }

.reveal { opacity: 0; }
.reveal.in { animation: rise .7s var(--ease) both; }

/* ---------- шапка ---------- */

.site-head {
  position: sticky; top: 0; z-index: 50;
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  background: color-mix(in oklab, var(--bg) 62%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
  padding-top: env(safe-area-inset-top);
}
.site-head.stuck { border-bottom-color: var(--glass-line-soft); }
.head-inner { display: flex; align-items: center; gap: 10px; height: 74px; }

.brand { display: flex; align-items: center; gap: 11px; color: var(--text); min-width: 0; }
.brand:hover { color: var(--text); }
.brand img { width: 36px; height: 36px; border-radius: 11px; object-fit: cover; box-shadow: 0 3px 16px rgba(145, 132, 217, .4); }
.brand b { font-family: var(--font-display); font-size: 17px; font-weight: 600; letter-spacing: -.02em; }
.brand .dom { display: block; font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-family: var(--font-mono); }

.nav-links {
  display: flex; align-items: center; gap: 2px;
  margin-inline-start: auto;
  padding: 5px;
  border-radius: var(--r-pill);
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur-lite);
  backdrop-filter: var(--blur-lite);
  border: 1px solid var(--glass-line-soft);
}
.nav-links a {
  padding: 8px 14px;
  border-radius: var(--r-pill);
  color: var(--muted);
  font-size: 14px;
  transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--text); background: var(--glass-2); }
.nav-links.open a:hover { background: var(--surface-2); }
.head-tools { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }
.nav-links + .head-tools { margin-inline-start: 0; }
.burger { display: none; }

.lang-wrap { position: relative; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 44px; padding: 0 15px;
  border-radius: var(--r-pill);
  border: 1px solid var(--glass-line);
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur-lite);
  backdrop-filter: var(--blur-lite);
  box-shadow: inset 0 1px 0 var(--glass-hi);
  cursor: pointer; font-size: 13px; font-weight: 500;
  transition: background .2s, border-color .2s;
}
.lang-btn i { font-size: 17px; color: var(--accent); }
.lang-btn:hover { background: var(--accent-soft); border-color: var(--accent); }

.lang-menu {
  position: absolute;
  top: calc(100% + 10px);
  inset-inline-end: 0;
  min-width: 208px;
  padding: 7px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  display: none; z-index: 60;
}
.lang-menu.open { display: block; animation: pop .22s var(--ease) both; }
.lang-menu button {
  width: 100%;
  display: flex; align-items: center; gap: 11px;
  min-height: 46px; padding: 0 12px;
  border: 0; border-radius: 14px;
  background: transparent; cursor: pointer;
  font-size: 14.5px; text-align: start;
  transition: background .18s;
}
.lang-menu button:hover { background: var(--surface-2); }
.lang-menu button.on { color: var(--accent-dim); }
.lang-menu .code { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .12em; color: var(--muted); width: 26px; }
.lang-menu .native { flex: 1; }
.lang-menu i { font-size: 16px; color: var(--accent); opacity: 0; }
.lang-menu button.on i { opacity: 1; }

/* ---------- герой ---------- */

.hero { position: relative; padding: clamp(40px, 8vw, 108px) 0 clamp(40px, 6vw, 80px); }
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
  gap: clamp(28px, 6vw, 80px);
  align-items: start;
}
.hero h1 { font-size: clamp(40px, 6.6vw, 92px); margin-top: 18px; letter-spacing: -.045em; }
.hero h1 em {
  display: block;
  margin-top: clamp(18px, 2.2vw, 28px);
  padding-inline-start: clamp(16px, 2vw, 26px);
  border-inline-start: 2px solid var(--accent);
  font-style: normal;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(15px, 1.45vw, 20px);
  letter-spacing: 0;
  line-height: 1.45;
  color: var(--accent-dim);
  max-width: 24ch;
}
.hero-lede { margin-top: 20px; max-width: 46ch; font-size: clamp(15px, 1.35vw, 18px); color: var(--muted); }
.hero-cta { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 10px; }
.hero-note { margin-top: 16px; font-size: 12.5px; color: var(--muted); display: flex; align-items: flex-start; gap: 8px; }
.hero-note i { color: var(--accent); font-size: 15px; margin-top: 3px; flex: none; }

.hero-panel {
  border-radius: var(--r-xl);
  border: 1px solid var(--glass-line);
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  padding: clamp(18px, 2.4vw, 26px);
  box-shadow: var(--shadow-lg), inset 0 1px 0 var(--glass-hi);
  position: relative; overflow: hidden;
}
.panel-row { position: relative; display: flex; align-items: center; gap: 12px; }
.panel-title { font-family: var(--font-display); font-size: 20px; letter-spacing: -.02em; }
.bar { position: relative; margin-top: 12px; height: 8px; border-radius: var(--r-pill); background: var(--glass-2); overflow: hidden; }
.bar span {
  display: block; height: 100%; border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--accent), var(--accent-dim) 50%, var(--accent));
  background-size: 240px 100%;
  animation: shimmer 2.8s linear infinite;
  opacity: .92;
}
.panel-split {
  position: relative; margin-top: 20px; padding-top: 18px;
  border-top: 1px solid var(--glass-line-soft);
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}
.kv .k { font-size: 11.5px; color: var(--muted); }
.kv .v { font-size: 15px; font-weight: 500; margin-top: 3px; }
.kv .v.acc { color: var(--accent-dim); }

.stat-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: clamp(32px, 6vw, 68px);
  border-radius: var(--r-xl);
  border: 1px solid var(--glass-line-soft);
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur-lite);
  backdrop-filter: var(--blur-lite);
  overflow: hidden;
}
.stat { padding: 24px 20px; position: relative; }
.stat + .stat::before {
  content: ""; position: absolute; inset-inline-start: 0; top: 20%; bottom: 20%;
  width: 1px; background: var(--glass-line-soft);
}
.stat b {
  display: block; font-family: var(--font-display);
  font-size: clamp(26px, 3.4vw, 42px); font-weight: 500; letter-spacing: -.04em; line-height: 1;
}
.stat small { display: block; margin-top: 9px; font-size: 12.5px; color: var(--muted); }

/* ---------- секции ---------- */

.section { padding: clamp(52px, 8vw, 110px) 0; }
.section-head {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(20px, 5vw, 64px); align-items: end;
  margin-bottom: clamp(28px, 5vw, 56px);
}
.section-head h2 { font-size: clamp(27px, 4vw, 50px); margin-top: 14px; }
.section-head p { color: var(--muted); font-size: 15.5px; max-width: 44ch; }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.step {
  border-radius: var(--r-lg);
  border: 1px solid var(--glass-line-soft);
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur-lite);
  backdrop-filter: var(--blur-lite);
  padding: 26px 24px 30px;
  transition: background .3s, border-color .3s, transform .3s var(--ease);
}
.step:hover { background: var(--glass-2); border-color: var(--glass-line); transform: translateY(-3px); }
.step .n { font-family: var(--font-mono); font-size: 12px; color: var(--accent); letter-spacing: .12em; }
.step h3 { font-size: 20px; margin-top: 16px; }
.step p { margin-top: 10px; font-size: 14px; color: var(--muted); }

.plat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.plat {
  min-height: 112px; padding: 18px;
  border-radius: var(--r-lg);
  border: 1px solid var(--glass-line-soft);
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur-lite);
  backdrop-filter: var(--blur-lite);
  box-shadow: inset 0 1px 0 var(--glass-hi);
  color: var(--text);
  display: flex; flex-direction: column; justify-content: space-between;
  transition: border-color .22s, transform .22s var(--ease), background .22s;
}
.plat:hover { border-color: var(--accent); transform: translateY(-3px); background: var(--accent-soft); color: var(--text); }
.plat:active { transform: scale(.98); }
.plat i { font-size: 22px; color: var(--accent); }
.plat b { font-size: 15px; font-weight: 500; }
.plat small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 3px; }

.price-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.price {
  position: relative; padding: 24px 22px 22px;
  border-radius: var(--r-lg);
  border: 1px solid var(--glass-line-soft);
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur-lite);
  backdrop-filter: var(--blur-lite);
  box-shadow: inset 0 1px 0 var(--glass-hi);
  display: flex; flex-direction: column;
  transition: border-color .22s, background .22s, transform .22s var(--ease);
}
.price:hover { border-color: var(--glass-line); transform: translateY(-3px); }
.price.best { border-color: color-mix(in oklab, var(--accent) 70%, transparent); background: var(--accent-soft); }
.price .ribbon {
  position: absolute; top: 20px; inset-inline-end: 20px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent-dim);
}
.price .per { font-size: 13px; color: var(--muted); }
.price .amount { font-family: var(--font-display); font-size: 38px; font-weight: 500; letter-spacing: -.04em; margin-top: 14px; line-height: 1; }
.price .amount sup { font-size: 18px; font-weight: 400; color: var(--muted); vertical-align: super; margin-inline-start: 4px; }
.price .month { margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.price .btn { margin-top: 22px; }

.ref-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); gap: clamp(24px, 5vw, 72px); align-items: center; }
.ref-num { font-family: var(--font-display); font-size: clamp(72px, 13vw, 168px); line-height: .85; letter-spacing: -.05em; color: var(--accent-dim); }
.ref-list { display: flex; flex-direction: column; gap: 14px; margin-top: 26px; list-style: none; padding: 0; }
.ref-list li { display: flex; gap: 12px; font-size: 14.5px; color: var(--muted); align-items: flex-start; }
.ref-list i { color: var(--accent); font-size: 17px; margin-top: 2px; flex: none; }

.faq {
  border-radius: var(--r-xl);
  border: 1px solid var(--glass-line-soft);
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur-lite);
  backdrop-filter: var(--blur-lite);
  overflow: hidden;
}
.faq-item + .faq-item { border-top: 1px solid var(--glass-line-soft); }
.faq-q {
  width: 100%;
  display: flex; align-items: center; gap: 16px;
  padding: 22px clamp(18px, 2.4vw, 28px);
  border: 0; background: transparent; cursor: pointer; text-align: start;
  font-family: var(--font-display);
  font-size: clamp(16.5px, 1.8vw, 21px);
  font-weight: 500; letter-spacing: -.02em;
  transition: color .2s, background .2s;
}
.faq-q:hover { color: var(--accent-dim); background: var(--glass-2); }
.faq-q span { flex: 1; }
.faq-q i { font-size: 18px; color: var(--accent); flex: none; transition: transform .3s var(--ease); }
.faq-item.open .faq-q i { transform: rotate(45deg); }
.faq-a { display: none; padding: 0 clamp(18px, 2.4vw, 28px) 24px; max-width: 68ch; color: var(--muted); font-size: 14.5px; }
.faq-item.open .faq-a { display: block; animation: rise .35s var(--ease) both; }

.cta-band {
  position: relative;
  border-radius: var(--r-xl);
  border: 1px solid var(--glass-line);
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  box-shadow: var(--shadow-md), inset 0 1px 0 var(--glass-hi);
  padding: clamp(28px, 6vw, 68px);
  overflow: hidden;
}
.cta-band h2 { position: relative; font-size: clamp(26px, 4.2vw, 48px); max-width: 22ch; }
.cta-band p { position: relative; margin-top: 16px; color: var(--muted); max-width: 48ch; }
.cta-band .hero-cta { position: relative; }

.site-foot { border-top: 1px solid var(--glass-line-soft); padding: 40px 0 calc(48px + env(safe-area-inset-bottom)); margin-top: clamp(40px, 7vw, 92px); }
.foot-grid { display: flex; flex-wrap: wrap; gap: 26px; align-items: flex-start; justify-content: space-between; }
.foot-links { display: flex; flex-wrap: wrap; gap: 20px; }
.foot-links a { color: var(--muted); font-size: 14px; }
.foot-links a:hover { color: var(--text); }
.foot-note { margin-top: 24px; font-size: 12px; color: var(--muted); max-width: 60ch; }

/* ---------- кабинет ---------- */

.app-shell { display: grid; grid-template-columns: 272px minmax(0, 1fr); min-height: 100vh; }
.side {
  border-inline-end: 1px solid var(--glass-line-soft);
  padding: 20px 16px 24px;
  display: flex; flex-direction: column; gap: 24px;
  position: sticky; top: 0; height: 100vh;
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
}
.side-nav { display: flex; flex-direction: column; gap: 3px; }
.side-nav button {
  display: flex; align-items: center; gap: 12px;
  min-height: 48px; padding: 0 14px;
  border: 1px solid transparent; border-radius: var(--r-md);
  background: transparent; color: var(--muted);
  font-size: 14.5px; font-weight: 500; cursor: pointer; text-align: start;
  transition: background .22s, color .22s, border-color .22s;
}
.side-nav button i { font-size: 20px; }
.side-nav button:hover { background: var(--glass-2); color: var(--text); }
.side-nav button.on {
  background: var(--accent-soft);
  border-color: var(--glass-line-soft);
  color: var(--text);
  box-shadow: inset 0 1px 0 var(--glass-hi);
}
.side-nav button.on i { color: var(--accent); }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.side-card {
  padding: 14px; border-radius: var(--r-md);
  border: 1px solid var(--glass-line-soft);
  background: var(--glass);
  font-size: 12.5px; color: var(--muted);
}

.app-main { min-width: 0; padding: 0 0 72px; }
.app-bar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 8px;
  min-height: 74px;
  padding: env(safe-area-inset-top) clamp(16px, 3vw, 40px) 0;
  border-bottom: 1px solid var(--glass-line-soft);
  background: color-mix(in oklab, var(--bg) 62%, transparent);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
}
.app-bar h1 { font-size: 20px; margin-inline-end: auto; }
.app-body { padding: clamp(20px, 3.4vw, 44px) clamp(16px, 3vw, 40px) 0; max-width: 1080px; }

.view { display: none; }
.view.on { display: block; animation: rise .4s var(--ease) both; }

.card {
  border-radius: var(--r-lg);
  border: 1px solid var(--glass-line-soft);
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur-lite);
  backdrop-filter: var(--blur-lite);
  box-shadow: inset 0 1px 0 var(--glass-hi);
  padding: clamp(18px, 2.2vw, 24px);
}
.card-lit {
  position: relative; overflow: hidden;
  background: var(--glass);
  box-shadow: var(--shadow-md), inset 0 1px 0 var(--glass-hi);
}
.card-lit::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(110% 90% at 100% 0%, var(--accent-soft) 0%, transparent 58%);
  pointer-events: none;
}
.card > * { position: relative; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; align-items: center; gap: 12px; }
.spacer { flex: 1; }
.gap-lg { gap: 20px; }
.mt-lg { margin-top: 22px; }
.big-num { font-family: var(--font-display); font-size: clamp(38px, 5vw, 52px); font-weight: 500; letter-spacing: -.045em; line-height: 1; }
.big-num small { font-family: var(--font-body); font-size: 15px; letter-spacing: 0; color: var(--muted); margin-inline-start: 8px; }

.list-btn {
  width: 100%;
  display: flex; align-items: center; gap: 14px;
  min-height: 68px; padding: 12px 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--glass-line-soft);
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur-lite);
  backdrop-filter: var(--blur-lite);
  box-shadow: inset 0 1px 0 var(--glass-hi);
  color: var(--text); cursor: pointer; text-align: start;
  transition: border-color .22s, background .22s, transform .18s var(--ease);
}
.list-btn:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.list-btn:active { transform: scale(.99); }
.list-btn > i:first-child { font-size: 21px; color: var(--accent); flex: none; }
.list-btn .lb-txt { flex: 1; min-width: 0; }
.list-btn .lb-txt b { display: block; font-size: 14.5px; font-weight: 500; }
.list-btn .lb-txt small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.list-btn .lb-end { color: var(--muted); font-size: 15px; flex: none; }

.pick {
  border-radius: var(--r-md);
  border: 1px solid var(--glass-line-soft);
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur-lite);
  backdrop-filter: var(--blur-lite);
  box-shadow: inset 0 1px 0 var(--glass-hi);
  cursor: pointer; padding: 16px; text-align: start;
  transition: border-color .22s, background .22s, transform .16s var(--ease);
  display: flex; flex-direction: column; gap: 5px;
}
.pick:hover { border-color: var(--glass-line); background: var(--glass-2); }
.pick:active { transform: scale(.985); }
.pick.on { border-color: color-mix(in oklab, var(--accent) 70%, transparent); background: var(--accent-soft); }
.pick .p-lbl { font-size: 12.5px; color: var(--muted); }
.pick .p-val { font-size: 17px; font-weight: 500; letter-spacing: -.02em; }
.pick-row { flex-direction: row; align-items: center; gap: 12px; min-height: 58px; }
.pick-row i { font-size: 19px; color: var(--accent); }
.pick-row .p-val { flex: 1; font-size: 14.5px; }

.code-box {
  padding: 14px 15px;
  border-radius: var(--r-md);
  background: var(--glass-2);
  border: 1px solid var(--glass-line-soft);
  font-family: var(--font-mono);
  font-size: 12px; line-height: 1.6;
  color: var(--muted); word-break: break-all;
}

.tbl { width: 100%; border-collapse: collapse; }
.tbl th {
  text-align: start;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); font-weight: 400;
  padding: 0 14px 12px 0;
  border-bottom: 1px solid var(--glass-line-soft);
}
.tbl td { padding: 15px 14px 15px 0; border-bottom: 1px solid var(--glass-line-soft); font-size: 14px; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .num { font-family: var(--font-mono); font-size: 13px; }
.tbl .ok { color: var(--ok); font-size: 12.5px; }

.sess {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--glass-line-soft);
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur-lite);
  backdrop-filter: var(--blur-lite);
  box-shadow: inset 0 1px 0 var(--glass-hi);
}
.sess .av {
  width: 42px; height: 42px; flex: none;
  border-radius: 13px; background: var(--glass-2);
  display: flex; align-items: center; justify-content: center;
}
.sess .av i { font-size: 20px; color: var(--accent); }
.sess b { display: block; font-size: 14.5px; font-weight: 500; }
.sess small { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); margin-top: 3px; }
.dot { width: 6px; height: 6px; border-radius: 50%; flex: none; background: var(--muted); }
.dot.live { background: var(--ok); }

.empty { padding: 40px 0; text-align: center; color: var(--muted); font-size: 13.5px; }

/* модальное окно — iOS-лист */
.modal-back {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(8, 9, 14, .5);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  display: none; align-items: center; justify-content: center;
  padding: 24px;
}
.modal-back.open { display: flex; animation: fade .22s both; }
.modal {
  width: 100%; max-width: 560px;
  max-height: 86vh; overflow-y: auto;
  border-radius: var(--r-xl);
  border: 1px solid var(--glass-line);
  background: color-mix(in oklab, var(--surface) 70%, transparent);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  box-shadow: var(--shadow-lg), inset 0 1px 0 var(--glass-hi);
  padding: clamp(18px, 3vw, 26px);
  animation: sheetUp .36s var(--ease) both;
}
.modal-head { display: flex; align-items: center; gap: 13px; margin-bottom: 18px; }
.modal-head .av {
  width: 46px; height: 46px; flex: none; border-radius: 15px;
  background: var(--accent-soft); display: flex; align-items: center; justify-content: center;
}
.modal-head .av i { font-size: 22px; color: var(--accent); }
.modal-head h3 { font-size: 20px; }
.modal-head small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }

.step-card {
  padding: 16px 17px; border-radius: var(--r-md);
  border: 1px solid var(--glass-line-soft);
  background: var(--glass);
}
.step-card .sh { display: flex; align-items: center; gap: 10px; }
.step-card .sn {
  width: 24px; height: 24px; flex: none; border-radius: 8px;
  background: var(--accent-soft); color: var(--accent);
  font-family: var(--font-mono); font-size: 11px; line-height: 24px; text-align: center;
}
.step-card .st { font-size: 14px; font-weight: 500; }
.app-link {
  display: flex; align-items: center; gap: 11px;
  min-height: 48px; padding: 0 14px;
  border-radius: 14px; background: var(--glass-2);
  border: 1px solid transparent;
  color: var(--text);
  transition: border-color .2s, background .2s;
}
.app-link:hover { border-color: var(--accent); color: var(--text); background: var(--accent-soft); }
.app-link i { font-size: 17px; color: var(--accent); }
.app-link b { flex: 1; font-size: 13.5px; font-weight: 500; }
.app-link small { color: var(--muted); font-size: 11px; }

.qr-frame {
  align-self: center;
  padding: 16px; border-radius: var(--r-lg);
  background: #fff; border: 1px solid var(--glass-line);
  box-shadow: var(--shadow-md);
  animation: pop .4s var(--ease) both;
}
.qr-frame img { width: min(200px, 56vw); height: min(200px, 56vw); image-rendering: pixelated; }

.toast-host {
  position: fixed; inset-inline: 0;
  bottom: calc(34px + env(safe-area-inset-bottom));
  z-index: 120; display: flex; justify-content: center;
  pointer-events: none; padding-inline: 16px;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 18px;
  border-radius: var(--r-pill);
  background: color-mix(in oklab, var(--surface) 74%, transparent);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--glass-line);
  box-shadow: var(--shadow-md), inset 0 1px 0 var(--glass-hi);
  font-size: 13.5px; font-weight: 500;
  animation: toastIn 2.4s ease both;
}
.toast i { font-size: 17px; color: var(--ok); }

.notif {
  display: flex; align-items: flex-start; gap: 13px;
  padding: 14px; border-radius: var(--r-md);
  border: 1px solid var(--glass-line-soft);
  background: var(--glass);
}
.notif .av { width: 38px; height: 38px; flex: none; border-radius: 12px; background: var(--glass-2); display: flex; align-items: center; justify-content: center; }
.notif .av i { font-size: 18px; color: var(--accent); }
.notif b { display: block; font-size: 14px; font-weight: 500; }
.notif small { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; }
.notif .when { font-size: 11px; color: var(--muted); flex: none; }

.dot-badge {
  position: absolute; top: 9px; inset-inline-end: 9px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent-dim);
  box-shadow: 0 0 0 2px var(--bg);
}

.seg {
  display: inline-flex; padding: 4px; gap: 4px;
  border-radius: var(--r-pill);
  background: var(--glass-2);
  border: 1px solid var(--glass-line-soft);
}
.seg button {
  min-height: 42px; padding: 0 18px;
  border: 1px solid transparent; border-radius: var(--r-pill);
  background: transparent; cursor: pointer;
  font-size: 13.5px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 8px;
  transition: background .22s, border-color .22s;
}
.seg button i { font-size: 16px; color: var(--accent); }
.seg button.on {
  background: var(--accent-soft);
  border-color: color-mix(in oklab, var(--accent) 60%, transparent);
  box-shadow: inset 0 1px 0 var(--glass-hi);
}

/* ---------- адаптив ---------- */

@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 1fr; }
  .section-head { grid-template-columns: 1fr; align-items: start; }
  .plat-grid, .price-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: 1fr; }
  .ref-grid { grid-template-columns: 1fr; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .app-shell { grid-template-columns: 1fr; }
  .side {
    position: static; height: auto;
    border-inline-end: 0; border-bottom: 1px solid var(--glass-line-soft);
    flex-direction: row; align-items: center; gap: 14px;
    overflow-x: auto; padding: 12px 18px;
  }
  .side-nav { flex-direction: row; }
  .side-nav button { white-space: nowrap; }
  .side-foot, .side .side-card { display: none; }
  .side .brand .dom { display: none; }
}

@media (max-width: 1000px) {
  .nav-links { display: none; position: absolute; }
  .nav-links.open {
    display: flex; flex-direction: column; align-items: stretch;
    top: calc(74px + env(safe-area-inset-top)); inset-inline: var(--gutter);
    padding: 10px; border-radius: var(--r-lg);
    border: 1px solid var(--line-strong);
    background: var(--surface);
    box-shadow: var(--shadow-md);
  }
  .nav-links.open a { padding: 13px 15px; font-size: 15px; border-radius: 14px; }
  .burger { display: inline-flex; margin-inline-start: auto; }
  .nav-links + .head-tools { margin-inline-start: 0; }
  .brand .dom { display: none; }
}

@media (max-width: 760px) {
  .head-inner { height: 64px; gap: 8px; }
  .brand img { width: 34px; height: 34px; }
  .brand b { font-size: 16px; }
  .head-tools .btn span { display: none; }
  .head-tools .btn { padding: 0 16px; min-height: 44px; }
  .head-tools { gap: 6px; }
  .lang-btn { padding: 0 12px; }

  .hero { padding-top: 24px; }
  .hero h1 { font-size: clamp(34px, 9.8vw, 48px); }
  .hero h1 em { font-size: 15px; margin-top: 16px; padding-inline-start: 14px; }
  .hero-lede { font-size: 15px; }
  .hero-cta .btn { flex: 1 1 100%; }

  .stat-band { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { padding: 20px 16px; }
  .stat + .stat::before { display: none; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--glass-line-soft); }
  .stat:nth-child(even) { border-inline-start: 1px solid var(--glass-line-soft); }

  .plat-grid, .price-grid, .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .price .amount { font-size: 34px; }
  .section { padding: 44px 0; }
  .section-head { margin-bottom: 24px; }
  .cta-band .hero-cta .btn { flex: 1 1 100%; }
  .foot-links { gap: 14px 20px; }

  /* кабинет: нижняя панель вкладок, как в iOS */
  .app-main { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
  .side {
    position: fixed; inset: auto 0 0 0; z-index: 60;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    border-bottom: 0; border-top: 1px solid var(--glass-line);
    background: color-mix(in oklab, var(--bg) 68%, transparent);
    -webkit-backdrop-filter: var(--blur);
    backdrop-filter: var(--blur);
    box-shadow: 0 -10px 30px rgba(0, 0, 0, .22);
    overflow: visible; gap: 0;
  }
  .side .brand { display: none; }
  .side-nav { flex: 1; display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; }
  .side-nav button {
    flex-direction: column; gap: 4px;
    min-height: 54px; padding: 6px 2px;
    border-radius: var(--r-md);
    font-size: 10.5px; font-weight: 500; text-align: center;
    white-space: normal; line-height: 1.15;
  }
  .side-nav button i { font-size: 21px; }
  .side-nav button.on { background: var(--accent-soft); }

  .app-bar { min-height: 62px; gap: 6px; }
  .app-bar h1 { font-size: 18px; }
  .app-body { padding-top: 18px; }
  .big-num { font-size: 40px; }
  .card { padding: 18px 16px; }
  .modal-back { padding: 12px; align-items: flex-end; }
  .modal { max-height: 92vh; padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); border-radius: var(--r-xl) var(--r-xl) 0 0; }
  .tbl th:nth-child(2), .tbl td:nth-child(2) { display: none; }
  .tbl td { padding: 13px 10px 13px 0; font-size: 13.5px; }
  .code-box { font-size: 11px; }
  .seg { width: 100%; }
  .seg button { flex: 1; justify-content: center; padding: 0 10px; }
  .toast-host { bottom: calc(96px + env(safe-area-inset-bottom)); }
}

@media (max-width: 420px) {
  .hero h1 { font-size: 32px; }
  .ref-num { font-size: 76px; }
  .list-btn { padding: 12px 14px; min-height: 64px; }
  .modal-head .av { width: 40px; height: 40px; border-radius: 13px; }
  .modal-head h3 { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; }
}

/* ---- auth gate ---- */
.hidden { display: none !important; }
.auth-gate {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 16px;
  background:
    radial-gradient(80% 60% at 50% -10%, rgba(145,132,217,.18), transparent 60%),
    var(--bg);
}
.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 28px 24px;
  border-radius: var(--r-xl, 22px);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 24px 60px rgba(0,0,0,.28);
}
.auth-card h1 {
  margin: 14px 0 0;
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: -.02em;
  text-align: center;
}
.auth-sub {
  margin: 8px 0 18px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.5;
  text-align: center;
}
.tg-login { display: flex; justify-content: center; min-height: 44px; }
.auth-or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: var(--muted);
  font-size: 12px;
}
.auth-or::before, .auth-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 14px;
}
.auth-tabs button {
  min-height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: 500 13px/1 var(--font, inherit);
}
.auth-tabs button.on {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--text);
}
.auth-form label {
  display: block;
  margin-bottom: 12px;
  font-size: 12px;
  color: var(--muted);
}
.auth-form input {
  display: block;
  width: 100%;
  margin-top: 6px;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface2, var(--bg));
  color: var(--text);
  font: 500 14px/1 var(--font, inherit);
}
.auth-back {
  display: block;
  margin-top: 18px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
