/* ============================================================
   Silent Guard — shared stylesheet
   Палитра: indigo (#6366f1 / #818cf8 / #4f46e5) на #0b0c10
   Фон: Sparkles canvas через #tsparticles
   ============================================================ */

:root {
  --bg:       #0b0c10;
  --bg-soft:  #11131a;
  --card:     rgba(20, 22, 32, 0.72);
  --card-strong: rgba(24, 26, 38, 0.92);
  --stroke:   rgba(255, 255, 255, 0.10);
  --stroke-2: rgba(129, 140, 248, 0.30);
  --text:     #eef0ff;
  --muted:    rgba(238, 240, 255, 0.62);
  --muted-2:  rgba(238, 240, 255, 0.40);

  --indigo:        #6366f1;
  --indigo-light:  #818cf8;
  --indigo-dark:   #4f46e5;
  --danger:        #ff6b8b;
  --warn:          #ffc96b;
  --success:       #34d399;

  --r-xl: 32px;
  --r-l:  24px;
  --r-m:  18px;
  --r-s:  12px;
  --max:  1160px;
  --nav-h: 68px;

  --shadow-card: 0 24px 90px rgba(0, 0, 0, 0.48);
  --shadow-btn:  0 12px 36px rgba(99, 102, 241, 0.28);
  --shadow-btn-hover: 0 18px 48px rgba(129, 140, 248, 0.38);
}

* { box-sizing: border-box; }
*::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Onest', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

/* ── Sparkles фон — контейнер для tsparticles ──────────────────────────── */
#tsparticles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
/* мягкая радиальная вуаль поверх частиц — добавляет глубины */
body::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 1;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(99, 102, 241, 0.14), transparent 60%),
    radial-gradient(ellipse at 50% 100%, rgba(79, 70, 229, 0.10), transparent 60%);
}

.page { position: relative; z-index: 2; }
.container { width: min(var(--max), 100% - 32px); margin: 0 auto; }

/* ── TOPBAR ──────────────────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(11, 12, 16, 0.78);
  border-bottom: 1px solid var(--stroke);
}
/* nav-inner = alias topbar-inner (имя класса в шаблоне) */
.topbar-inner,
.nav-inner {
  height: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}

/* Кнопки в навбаре чуть компактнее */
.nav-btn { min-height: 38px; padding: 8px 16px; font-size: 13.5px; }
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 16px; letter-spacing: -0.03em;
  color: var(--text); text-decoration: none;
}
.brand-mark {
  width: 36px; height: 36px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--indigo), var(--indigo-dark));
  display: grid; place-items: center;
  font-size: 11px; font-weight: 900; color: #fff;
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.36);
  flex-shrink: 0;
}
.desktop-nav { display: flex; gap: 2px; align-items: center; }
.desktop-nav a {
  padding: 6px 12px; border-radius: 9px;
  font-size: 14px; font-weight: 600;
  color: var(--muted); text-decoration: none;
  transition: color .18s, background .18s;
  white-space: nowrap;
}
.desktop-nav a:hover { color: var(--text); background: rgba(255, 255, 255, .07); }
.top-actions { display: flex; gap: 7px; flex-shrink: 0; }

/* ── Кнопки ──────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 42px; padding: 10px 18px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 13px;
  font-family: 'Onest', sans-serif;
  font-weight: 700; font-size: 14px;
  cursor: pointer; white-space: nowrap;
  text-decoration: none; color: var(--text);
  background: rgba(255, 255, 255, .06);
  transition: transform .18s ease, background .18s, border-color .18s, box-shadow .18s;
}
.btn:hover { transform: translateY(-1px); border-color: rgba(255, 255, 255, .22); background: rgba(255, 255, 255, .10); }
.btn:active { transform: translateY(0); }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

.btn-primary {
  background: linear-gradient(135deg, var(--indigo), var(--indigo-light) 50%, var(--indigo-dark));
  background-size: 200% 200%;
  border-color: transparent;
  color: #fff;
  box-shadow: var(--shadow-btn);
}
.btn-primary:hover { box-shadow: var(--shadow-btn-hover); transform: translateY(-2px); background-position: right center; }

.btn-ghost { background: transparent; border-color: rgba(255, 255, 255, .15); }
.btn-ghost:hover { background: rgba(255, 255, 255, .07); }

.btn-lg { min-height: 50px; padding: 13px 26px; font-size: 15.5px; border-radius: 15px; }
.btn-sm { min-height: 36px; padding: 7px 13px; font-size: 13px; border-radius: 10px; }

/* ── HERO ────────────────────────────────────────────────────────────── */
.hero { padding: 70px 0 56px; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--indigo-light);
  margin-bottom: 18px;
  padding: 5px 13px;
  border: 1px solid rgba(129, 140, 248, .26);
  border-radius: 99px;
  background: rgba(99, 102, 241, .08);
}
h1 {
  font-size: clamp(38px, 5vw, 66px);
  font-weight: 900; line-height: 1.02;
  letter-spacing: -.045em;
  margin-bottom: 20px;
}
.gradient-text {
  background: linear-gradient(135deg, var(--indigo-light), var(--indigo), var(--indigo-dark));
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.lead {
  font-size: 16px; line-height: 1.65;
  color: var(--muted); margin-bottom: 28px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 24px; }
.hero-badge-row { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--stroke);
  border-radius: 8px; padding: 4px 10px;
  font-size: 12px; color: var(--muted);
}

/* Visual card в hero */
.phone-card {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: var(--r-xl);
  backdrop-filter: blur(20px);
  padding: 24px;
  box-shadow: var(--shadow-card), 0 0 0 1px rgba(255, 255, 255, .04) inset;
  position: relative; overflow: hidden;
  animation: float 5s ease-in-out infinite;
}
.phone-card::before {
  content: ''; position: absolute;
  top: -40%; left: -10%; width: 120%; height: 60%;
  background: radial-gradient(ellipse at center, rgba(99, 102, 241, .14) 0%, transparent 70%);
  pointer-events: none;
}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }

.status-dot {
  display: inline-block; width: 8px; height: 8px;
  border-radius: 50%; background: var(--indigo-light);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 6px var(--indigo-light); }
  50% { box-shadow: 0 0 16px var(--indigo-light), 0 0 28px rgba(99, 102, 241, .35); }
}
.mock-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-radius: 14px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--stroke);
  margin-bottom: 8px;
}
.mock-row:last-child { margin-bottom: 0; }
.mock-label { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.mock-val { font-size: 12.5px; font-weight: 700; }
.mock-val.indigo { color: var(--indigo-light); }

/* ── Секции ──────────────────────────────────────────────────────────── */
section { padding: 72px 0; }
.section-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-bottom: 36px; flex-wrap: wrap; gap: 14px;
}
.section-head h2 {
  font-size: clamp(26px, 3.8vw, 40px);
  font-weight: 900; letter-spacing: -.04em; line-height: 1.06;
}
.section-head p {
  color: var(--muted); font-size: 15px;
  max-width: 320px; line-height: 1.55; text-align: right;
}

/* Cards */
.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.feat-card {
  padding: 24px; border: 1px solid var(--stroke);
  border-radius: var(--r-l); background: var(--card);
  backdrop-filter: blur(12px);
  transition: border-color .22s, transform .22s, box-shadow .22s;
}
.feat-card:hover {
  border-color: var(--stroke-2);
  transform: translateY(-3px);
  box-shadow: 0 18px 46px rgba(0, 0, 0, .35);
}
.feat-icon { font-size: 24px; margin-bottom: 12px; }
.feat-card h3 { font-size: 16px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 7px; }
.feat-card p { font-size: 13.5px; color: var(--muted); line-height: 1.55; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.step {
  padding: 22px; border: 1px solid var(--stroke);
  border-radius: var(--r-l); background: var(--card);
}
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, var(--indigo), var(--indigo-dark));
  color: #fff; font-weight: 900; font-size: 13px;
  margin-bottom: 12px;
}
.step h3 { font-size: 14.5px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 5px; }
.step p { font-size: 13px; color: var(--muted); line-height: 1.5; }

/* FAQ */
.faq-wrap { display: grid; grid-template-columns: 1fr 2fr; gap: 44px; align-items: start; }
.faq-aside { position: sticky; top: calc(var(--nav-h) + 18px); }
.faq-aside h2 {
  font-size: clamp(24px, 3.2vw, 36px);
  font-weight: 900; letter-spacing: -.04em; line-height: 1.06;
  margin-bottom: 11px;
}
.faq-aside p { color: var(--muted); font-size: 15px; line-height: 1.55; margin-bottom: 20px; }
.faq-list { display: grid; gap: 9px; }
details {
  border: 1px solid var(--stroke); border-radius: 18px;
  background: rgba(14, 17, 28, .82);
  overflow: hidden; transition: border-color .2s;
}
details[open] { border-color: var(--stroke-2); }
summary {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; list-style: none; cursor: pointer;
  padding: 18px 20px;
  font-size: 15.5px; font-weight: 800; letter-spacing: -.025em;
  user-select: none;
}
summary::-webkit-details-marker { display: none; }
.faq-icon {
  flex: 0 0 auto; width: 26px; height: 26px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--indigo), var(--indigo-dark));
  display: grid; place-items: center;
  color: #fff; font-size: 15px; font-weight: 900; line-height: 1;
  transition: transform .25s ease;
}
details[open] .faq-icon { transform: rotate(45deg); }
.faq-body { max-height: 0; overflow: hidden; transition: max-height .32s ease; }
details[open] .faq-body { max-height: 400px; }
details p { padding: 0 20px 18px; color: var(--muted); line-height: 1.6; font-size: 14px; }
details a { color: var(--indigo-light); }

/* Support */
.support-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.sup-card {
  padding: 22px; border: 1px solid var(--stroke);
  border-radius: var(--r-l); background: var(--card);
  display: flex; flex-direction: column; gap: 10px;
}
.sup-icon { font-size: 22px; }
.sup-card h3 { font-size: 17px; font-weight: 800; letter-spacing: -.025em; }
.sup-card p { font-size: 13px; color: var(--muted); line-height: 1.5; flex: 1; }

/* Footer */
footer { border-top: 1px solid var(--stroke); padding: 36px 0; }
.footer-grid { display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center; }
.footer-brand { font-size: 14px; font-weight: 800; letter-spacing: -.025em; margin-bottom: 5px; }
.footer-copy,
.footer-text { font-size: 12.5px; color: var(--muted-2); }
.footer-links { display: flex; flex-wrap: wrap; gap: 7px 16px; justify-content: flex-end; }
.footer-links a {
  font-size: 13px; color: var(--muted);
  text-decoration: none; transition: color .15s;
}
.footer-links a:hover { color: var(--indigo-light); }

/* ── Анимации появления ──────────────────────────────────────────────── */
@keyframes fade-up { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: translateY(0); } }
.anim-fade-up { opacity: 0; animation: fade-up .65s ease forwards; }
.delay-1 { animation-delay: .10s; }
.delay-2 { animation-delay: .20s; }
.delay-3 { animation-delay: .32s; }
.delay-4 { animation-delay: .44s; }
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .55s ease, transform .55s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── Proxy page ──────────────────────────────────────────────────────── */
.proxy-wrap {
  min-height: calc(100vh - var(--nav-h));
  display: flex; align-items: center; justify-content: center;
  padding: 56px 0;
}
.proxy-card {
  width: min(560px, 100% - 32px);
  background: var(--card-strong);
  border: 1px solid var(--stroke);
  border-radius: var(--r-xl);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-card);
  padding: 36px 30px;
}
.proxy-card h1 {
  font-size: clamp(26px, 4vw, 36px);
  margin-bottom: 10px;
}
.proxy-card .lead { font-size: 15px; margin-bottom: 24px; }

.proxy-state { display: none; }
.proxy-state.active { display: block; animation: fade-up .4s ease forwards; }

.cf-row {
  display: flex; justify-content: center;
  margin: 18px 0 22px;
}

.proxy-link-box {
  margin: 14px 0 18px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(99, 102, 241, .08);
  border: 1px solid var(--stroke-2);
  word-break: break-all;
  font-size: 13px; line-height: 1.5;
  color: var(--indigo-light);
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Consolas, monospace;
}
.proxy-meta {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  margin-bottom: 18px;
}
.proxy-meta > div {
  padding: 10px 12px;
  background: rgba(255, 255, 255, .04);
  border-radius: 10px; border: 1px solid var(--stroke);
}
.proxy-meta .label { font-size: 11px; color: var(--muted-2); text-transform: uppercase; letter-spacing: .05em; }
.proxy-meta .val { font-size: 14px; font-weight: 700; margin-top: 2px; }
.timer-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px;
  background: rgba(34, 211, 153, .12);
  border: 1px solid rgba(34, 211, 153, .35);
  border-radius: 99px;
  font-size: 12px; font-weight: 700;
  color: var(--success);
  margin-bottom: 12px;
}
.timer-pill.warn { color: var(--warn); background: rgba(255, 201, 107, .12); border-color: rgba(255, 201, 107, .35); }
.timer-pill.danger { color: var(--danger); background: rgba(255, 107, 139, .12); border-color: rgba(255, 107, 139, .35); }

.error-msg {
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 107, 139, .08);
  border: 1px solid rgba(255, 107, 139, .30);
  color: var(--danger);
  font-size: 14px; line-height: 1.5;
  margin-bottom: 12px;
}
.helper-text { font-size: 13px; color: var(--muted-2); line-height: 1.5; margin-top: 14px; }
.helper-text a { color: var(--indigo-light); }

.btn-row { display: flex; gap: 9px; flex-wrap: wrap; }
.btn-row .btn { flex: 1; min-width: 140px; }

/* ── Legal pages ─────────────────────────────────────────────────────── */
.legal-wrap { padding: 56px 0; }
.legal-card {
  background: var(--card-strong);
  border: 1px solid var(--stroke);
  border-radius: var(--r-l);
  backdrop-filter: blur(18px);
  padding: 36px 32px;
  box-shadow: var(--shadow-card);
}
.legal-h1 { font-size: clamp(26px, 3.8vw, 38px); font-weight: 900; letter-spacing: -.035em; margin: 6px 0 14px; }
.legal-meta { font-size: 13px; color: var(--muted); margin-bottom: 24px; }
.legal-meta a { color: var(--indigo-light); }
.plain-legal-text {
  font-size: 14px; line-height: 1.7;
  color: var(--muted); white-space: pre-wrap;
}
.plain-legal-text a { color: var(--indigo-light); }

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .cards-grid { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .support-grid { grid-template-columns: 1fr 1fr; }
  .faq-wrap { grid-template-columns: 1fr; gap: 28px; }
  .faq-aside { position: static; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .section-head p { text-align: left; max-width: 100%; }
}
@media (max-width: 640px) {
  :root { --nav-h: 62px; }
  .hero { padding: 44px 0 36px; }
  .hero-grid { grid-template-columns: 1fr; }
  .phone-card { display: none; }
  section { padding: 52px 0; }
  h1 { font-size: clamp(32px, 10.5vw, 48px); }
  .lead { font-size: 15px; }
  .cards-grid, .steps, .support-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 18px; }
  .footer-links { justify-content: flex-start; }
  .desktop-nav { display: none; }
  .top-actions .btn-ghost { display: none; }
  .btn-lg { min-height: 46px; padding: 12px 20px; font-size: 15px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .proxy-meta { grid-template-columns: 1fr; }
}
