/* Токены — те же значения, что в Android-приложении и админ-панели
   (android/.../ui/theme/Color.kt, public/admin/admin.css): единая идентичность
   "ночная диспетчерская сети" для всего продукта, не только для инструмента. */
@font-face {
  font-family: 'Manrope';
  src: url('/fonts/manrope.ttf') format('truetype');
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --bg: #0A0D15;
  --bg-raised: #0D1119;
  --surface: #12151F;
  --surface-variant: #1B2030;
  --surface-hover: #202638;
  --text: #EEF1F8;
  --text-muted: #8A93A9;
  --text-faint: #5B6172;
  --outline: #262C3E;
  --outline-soft: rgba(238, 241, 248, 0.07);
  --accent: #C266C2;
  --accent-strong: #800080;
  --accent-hover: #660066;
  --accent-soft: rgba(194, 102, 194, 0.14);
  --success: #13A876;
  --success-glow: #34E0A8;
  --success-soft: rgba(19, 168, 118, 0.14);
  --warning: #D97706;
  --warning-soft: rgba(217, 119, 6, 0.14);
  --error: #DC2626;
  --error-soft: rgba(220, 38, 38, 0.14);
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --font-display: 'Manrope', -apple-system, 'Segoe UI', system-ui, sans-serif;
  --font-body: -apple-system, 'Segoe UI', system-ui, sans-serif;
  --container: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
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;
}
h1, h2, h3 { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.3px; margin: 0; text-wrap: balance; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 700; font-size: 15px; font-family: var(--font-display);
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent-strong); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { background: transparent; border-color: var(--outline); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.5; pointer-events: none; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 40;
  background: rgba(10, 13, 21, 0.82); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--outline-soft);
}
.nav-row { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 9px; font-family: var(--font-display); font-weight: 800; font-size: 18px; }
.brand-mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 16px var(--accent-soft);
}
.brand-mark svg { width: 16px; height: 16px; }
.nav-links { display: flex; align-items: center; gap: 32px; font-size: 14px; font-weight: 600; color: var(--text-muted); }
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav-toggle { display: none; background: none; border: 1px solid var(--outline); border-radius: 8px; padding: 8px; color: var(--text); }
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
}

/* ---------- Hero ---------- */
.hero { position: relative; padding: 96px 0 88px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }
.hero h1 { font-size: clamp(34px, 5vw, 52px); line-height: 1.08; margin: 18px 0 20px; }
.hero h1 .accent { color: var(--accent); }
.hero-sub { font-size: 17px; color: var(--text-muted); max-width: 480px; margin-bottom: 32px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-proof { display: flex; gap: 28px; margin-top: 40px; flex-wrap: wrap; }
.hero-proof-item { font-size: 13px; color: var(--text-faint); }
.hero-proof-item b { display: block; font-family: var(--font-display); font-size: 22px; color: var(--text); font-weight: 800; }

/* Сигнатурный визуал — REALITY-туннель: пульсирующий узел-граф, имитирующий
   "невидимое" HTTPS-соединение, замаскированное под обычный трафик. */
.tunnel { position: relative; aspect-ratio: 1 / 1; max-width: 440px; margin: 0 auto; }
.tunnel-ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 1px solid var(--outline-soft);
}
.tunnel-ring.r2 { inset: 12%; }
.tunnel-ring.r3 { inset: 26%; }
.tunnel-core {
  position: absolute; inset: 38%; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--accent) 0%, var(--accent-strong) 70%);
  box-shadow: 0 0 60px 10px var(--accent-soft), 0 0 0 1px rgba(255,255,255,0.06) inset;
  animation: tunnel-pulse 3.2s ease-in-out infinite;
}
@keyframes tunnel-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 60px 10px var(--accent-soft), 0 0 0 1px rgba(255,255,255,0.06) inset; }
  50% { transform: scale(1.06); box-shadow: 0 0 90px 18px var(--accent-soft), 0 0 0 1px rgba(255,255,255,0.08) inset; }
}
.tunnel-node {
  position: absolute; width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 12px var(--accent);
  animation: tunnel-orbit linear infinite;
}
.tunnel-node.n1 { top: 4%; left: 50%; animation-duration: 14s; }
.tunnel-node.n2 { top: 50%; left: 96%; animation-duration: 18s; animation-direction: reverse; }
.tunnel-node.n3 { top: 92%; left: 20%; animation-duration: 22s; }
.tunnel-node.n4 { top: 22%; left: 4%; animation-duration: 16s; animation-direction: reverse; }
@keyframes tunnel-orbit {
  from { transform: rotate(0deg) translateX(0); }
  to { transform: rotate(360deg) translateX(0); }
}
.tunnel-label {
  position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%);
  font-size: 12px; color: var(--text-faint); font-family: var(--font-display); font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap;
}

/* ---------- Section shell ---------- */
.section { padding: 88px 0; border-top: 1px solid var(--outline-soft); }
.section-head { max-width: 620px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 36px); margin-top: 14px; }
.section-head p { color: var(--text-muted); margin-top: 14px; font-size: 16px; }

/* ---------- How it works ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }
.step-card {
  background: var(--surface); border: 1px solid var(--outline); border-radius: var(--radius);
  padding: 28px;
}
.step-num {
  width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 800; margin-bottom: 18px;
}
.step-card h3 { font-size: 17px; margin-bottom: 10px; }
.step-card p { color: var(--text-muted); font-size: 14.5px; line-height: 1.55; }

/* ---------- Pricing ---------- */
.pricing-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 980px) { .pricing-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .pricing-grid { grid-template-columns: 1fr; } }
.plan-card {
  background: var(--surface); border: 1px solid var(--outline); border-radius: var(--radius);
  padding: 26px; display: flex; flex-direction: column; position: relative;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.plan-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.plan-card.featured { border-color: var(--accent); background: linear-gradient(180deg, var(--surface-variant), var(--surface)); }
.plan-badge {
  position: absolute; top: -12px; right: 20px; background: var(--accent-strong); color: #fff;
  font-size: 11px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 999px;
}
.plan-name { font-size: 15px; font-weight: 700; color: var(--text-muted); }
.plan-price { font-family: var(--font-display); font-size: 32px; font-weight: 800; margin: 10px 0 4px; }
.plan-price span { font-size: 14px; font-weight: 600; color: var(--text-faint); }
.plan-period { font-size: 13px; color: var(--text-faint); margin-bottom: 20px; }
.plan-features { list-style: none; margin: 0 0 24px; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 13.5px; color: var(--text-muted); }
.plan-features li { display: flex; align-items: flex-start; gap: 8px; }
.plan-features li::before { content: '✓'; color: var(--success); font-weight: 800; flex-shrink: 0; }
.pricing-loading { color: var(--text-faint); font-size: 14px; }

/* ---------- Download ---------- */
.download-card {
  background: var(--surface); border: 1px solid var(--outline); border-radius: var(--radius-lg);
  padding: 44px; display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center;
}
@media (max-width: 700px) { .download-card { grid-template-columns: 1fr; text-align: center; } }
.download-card h3 { font-size: 22px; margin-bottom: 10px; }
.download-card p { color: var(--text-muted); font-size: 14.5px; max-width: 420px; }
.platform-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.platform-pill {
  display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px;
  border: 1px solid var(--outline); font-size: 13px; color: var(--text-faint);
}

/* ---------- FAQ ---------- */
.faq { display: flex; flex-direction: column; gap: 12px; max-width: 760px; }
.faq-item { background: var(--surface); border: 1px solid var(--outline); border-radius: var(--radius); overflow: hidden; }
.faq-q {
  width: 100%; background: none; border: none; color: var(--text); text-align: left;
  padding: 20px 24px; font-family: var(--font-display); font-weight: 700; font-size: 15px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq-q .plus { color: var(--accent); font-size: 20px; transition: transform 0.2s ease; flex-shrink: 0; }
.faq-item[data-open="true"] .plus { transform: rotate(45deg); }
.faq-a { padding: 0 24px; max-height: 0; overflow: hidden; color: var(--text-muted); font-size: 14.5px; line-height: 1.6; transition: max-height 0.25s ease, padding 0.25s ease; }
.faq-item[data-open="true"] .faq-a { padding: 0 24px 20px; max-height: 240px; }

/* ---------- Final CTA ---------- */
.cta-band {
  background: linear-gradient(135deg, var(--surface-variant), var(--surface));
  border: 1px solid var(--outline); border-radius: var(--radius-lg);
  padding: 56px; text-align: center;
}
.cta-band h2 { font-size: clamp(24px, 3vw, 32px); margin-bottom: 14px; }
.cta-band p { color: var(--text-muted); margin-bottom: 28px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--outline-soft); padding: 48px 0 32px; }
.footer-row { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-brand { color: var(--text-faint); font-size: 13px; max-width: 320px; }
.footer-links { display: flex; gap: 40px; flex-wrap: wrap; }
.footer-col { display: flex; flex-direction: column; gap: 10px; font-size: 13.5px; }
.footer-col-title { color: var(--text-faint); font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px; }
.footer-col a { color: var(--text-muted); }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--outline-soft); color: var(--text-faint); font-size: 12.5px; }

/* ---------- Mobile drawer ---------- */
.mobile-drawer {
  position: fixed; inset: 68px 0 0 0; background: var(--bg); z-index: 39;
  padding: 24px; display: flex; flex-direction: column; gap: 4px;
}
.mobile-drawer a { padding: 16px 4px; border-bottom: 1px solid var(--outline-soft); font-weight: 600; }
[hidden] { display: none !important; }
