/* Troposguard — сайт. Дизайн-токены «Kinetic Vault» (см. ветку app, vault_colors.dart) */

:root {
  --bg: #0d1322;
  --surface-000: #0f1626;
  --surface-100: #151b2b;
  --surface-200: #1b2334;
  --surface-300: #1e2637;
  --outline: #33405c;
  --primary: #2aa8a8;
  --primary-dim: #2aa8a8;
  --primary-fixed: #5fe3eb;
  --on-primary: #ffffff;
  --text: #e6e9f0;
  --text-muted: #8a94ab;
  --text-faint: #6d7893;
  --green: #4ade80;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius: 16px;
  --container: 1120px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scrollbar-color: var(--surface-300) var(--bg); }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

::selection { background: var(--primary-dim); color: #e6e9f0; }

:focus-visible {
  outline: 2px solid var(--primary-fixed);
  outline-offset: 3px;
  border-radius: 4px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }
code { font-family: var(--mono); font-size: .9em; color: var(--primary-fixed); }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 760px; }

h1, h2, h3 { font-weight: 800; line-height: 1.15; letter-spacing: -0.01em; }
h1, h2 { text-wrap: balance; }
h1 { font-size: clamp(2.8rem, 7vw, 4.6rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); margin-bottom: 12px; }
h3 { font-size: 1.1rem; font-weight: 700; }

a { color: var(--primary); text-decoration: none; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px; border-radius: 999px;
  font-weight: 700; font-size: 1rem; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn svg { width: 20px; height: 20px; }
.btn-sm { padding: 10px 20px; font-size: .92rem; }
.btn-primary {
  background: var(--primary); color: var(--on-primary);
}
.btn-primary:hover { transform: translateY(-1px); filter: brightness(1.08); }
.btn-ghost {
  border: 1px solid var(--outline); color: var(--text);
}
.btn-ghost:hover { border-color: var(--primary-dim); color: var(--primary-fixed); }
.btn:active { transform: translateY(0) scale(.98); }

/* ---------- Шапка ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--surface-300);
  transition: box-shadow .25s ease;
}
.site-header.scrolled { box-shadow: 0 8px 24px rgba(0, 0, 0, .45); }
.header-inner {
  display: flex; align-items: center; gap: 32px;
  height: 64px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--text); font-weight: 800; font-size: 1.05rem;
}
.brand em { color: var(--primary); font-style: normal; }
.brand-mark { width: 26px; height: 26px; flex: none; }
.site-nav { display: flex; gap: 24px; margin-left: auto; align-items: center; }
.site-nav a { color: var(--text-muted); font-weight: 600; font-size: .95rem; }
.site-nav a:hover { color: var(--primary-fixed); }
.login-btn { flex: none; }
.nav-lk { display: none; }

/* Бургер (виден только на мобильных) */
.nav-toggle {
  display: none; margin-left: auto;
  width: 44px; height: 44px; border: none; background: none; cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav-toggle span {
  display: block; width: 22px; height: 2px; border-radius: 2px;
  background: var(--text); transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Якоря не прячутся под липкой шапкой */
section[id] { scroll-margin-top: 76px; }

/* ---------- Hero ---------- */
.hero { padding: 88px 0 64px; overflow: hidden; }

/* Появление hero каскадом при загрузке (один раз, только без reduced-motion) */
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * {
    opacity: 0; transform: translateY(14px);
    animation: rise .6s cubic-bezier(.22, .8, .36, 1) forwards;
  }
  .hero-copy > *:nth-child(1) { animation-delay: .05s; }
  .hero-copy > *:nth-child(2) { animation-delay: .13s; }
  .hero-copy > *:nth-child(3) { animation-delay: .21s; }
  .hero-copy > *:nth-child(4) { animation-delay: .29s; }
  .hero-copy > *:nth-child(5) { animation-delay: .37s; }
  .hero-visual { opacity: 0; animation: fade-in .9s ease .2s forwards; }
}
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes fade-in { to { opacity: 1; } }
.hero-grid {
  display: grid; grid-template-columns: 1.15fr .85fr;
  gap: 48px; align-items: center;
}
.lead { color: var(--text-muted); font-size: 1.13rem; margin: 20px 0 28px; max-width: 34em; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.trust-badge {
  display: inline-flex; align-items: center; gap: 9px;
  margin-top: 26px; padding: 8px 16px 8px 12px; border-radius: 999px;
  background: rgba(42, 168, 168, .14); border: 1px solid rgba(42, 168, 168, .16);
  color: var(--text-muted); font-size: .9rem; font-weight: 500;
}
.trust-badge .dot {
  width: 8px; height: 8px; border-radius: 50%; flex: none;
  background: var(--primary);
}

/* Глобус-орб */
.hero-visual { display: flex; justify-content: center; }
.orb { position: relative; width: min(360px, 80vw); aspect-ratio: 1; }
.orb-globe { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ---------- Секции ---------- */
.section { padding: 84px 0; }
.section-alt { background: var(--surface-000); }
.section-sub { color: var(--text-muted); max-width: 40em; margin-bottom: 40px; }

/* Карточки возможностей */
.cards {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
  margin-top: 36px;
}
.card {
  background: var(--surface-100);
  border: 1px solid var(--surface-300);
  border-radius: var(--radius);
  padding: 26px 24px;
  transition: border-color .2s ease, transform .2s ease;
}
.card:hover { border-color: var(--primary-dim); transform: translateY(-2px); }
.card-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-300); color: var(--primary);
  margin-bottom: 16px;
  transition: background .2s ease, color .2s ease;
}
.card:hover .card-icon { background: rgba(42, 168, 168, .14); color: var(--primary-fixed); }
.card-icon svg { width: 24px; height: 24px; }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--text-muted); font-size: .95rem; }

/* Приватность: сетка 2×2 */
#privacy .cards { grid-template-columns: repeat(2, 1fr); max-width: 940px; }

/* Полоса поддерживаемых платформ */
.support-title { text-align: center; }
.support-strip {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 22px 30px; margin-top: 36px;
}
.support-group { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; }
.support-sep { width: 1px; height: 46px; background: var(--surface-300); flex: none; }
.sup {
  display: inline-flex; flex-direction: column; align-items: center; gap: 9px;
  width: 68px; color: var(--text-faint); transition: color .2s ease;
}
.sup:hover { color: var(--text-muted); }
.sup svg { width: 27px; height: 27px; }
.sup span { font-size: .74rem; font-weight: 600; letter-spacing: .01em; text-align: center; }

/* Локации */
.locations {
  display: flex; flex-wrap: wrap; gap: 12px;
  list-style: none; margin-top: 36px;
}
.locations li {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px; border-radius: 12px;
  background: var(--surface-100); border: 1px solid var(--surface-300);
  color: var(--text); font-weight: 600; font-size: .95rem;
  transition: border-color .2s ease, transform .2s ease;
}
.locations li:hover { border-color: var(--primary-dim); transform: translateY(-2px); }
.flag {
  width: 22px; height: 15px; flex: none; border-radius: 3px; overflow: hidden;
  display: inline-block; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
}
.flag svg { display: block; width: 100%; height: 100%; }

/* Сравнение */
.compare-wrap { margin-top: 36px; overflow-x: auto; }
.compare {
  width: 100%; min-width: 620px; border-collapse: collapse;
  border: 1px solid var(--surface-300); border-radius: var(--radius);
  overflow: hidden;
}
.compare th, .compare td {
  padding: 16px 20px; text-align: left; font-size: .95rem;
  border-bottom: 1px solid var(--surface-300);
}
.compare thead th {
  font-family: var(--mono); font-size: .8rem; letter-spacing: .04em;
  text-transform: uppercase; color: var(--text-faint); font-weight: 600;
}
.compare thead .col-us { padding-top: 14px; padding-bottom: 14px; }
.compare .brand-cell {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font); font-weight: 800; font-size: 1.05rem;
  letter-spacing: -0.01em; text-transform: none; color: var(--text);
}
.compare .brand-cell img { width: 22px; height: 22px; flex: none; }
.compare tbody th { font-weight: 600; color: var(--text); width: 32%; }
.compare td { color: var(--text-muted); }
.compare .col-us { background: rgba(42, 168, 168, .10); }
.compare thead .col-us { color: var(--primary-fixed); font-weight: 700; }
.compare tbody tr:last-child th, .compare tbody tr:last-child td { border-bottom: none; }
.compare .yes, .compare .no { display: inline-flex; align-items: flex-start; gap: 8px; }
.compare .yes { color: var(--text); }
.compare .yes::before {
  content: ""; flex: none; margin-top: 5px;
  width: 11px; height: 6px; border-left: 2px solid var(--primary);
  border-bottom: 2px solid var(--primary); transform: rotate(-45deg);
}
.compare .no::before {
  content: "✕"; flex: none; color: var(--text-faint); font-size: .85em; line-height: 1.4;
}

/* Способы оплаты */
.pay-methods {
  margin-top: 32px; padding-top: 26px; border-top: 1px solid var(--surface-300);
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.pay-label {
  font-family: var(--mono); font-size: .78rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text-faint);
}
.pay-label em {
  font-style: normal; color: var(--primary); margin-left: 4px;
}
.pay-methods ul {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; list-style: none;
}
.pay-methods li {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 10px;
  background: var(--surface-100); border: 1px solid var(--surface-300);
  color: var(--text-muted); font-size: .88rem; font-weight: 600;
}
.pay-methods li svg { width: 20px; height: 20px; flex: none; color: var(--text-faint); }

/* Шаги */
.steps {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
  margin-top: 36px;
}
.step {
  border: 1px solid var(--surface-300); border-radius: var(--radius);
  padding: 26px 24px;
}
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  font-family: var(--mono); font-weight: 500;
  color: var(--primary); border: 1px solid var(--primary-dim);
  margin-bottom: 14px;
}
.step h3 { margin-bottom: 8px; }
.step p { color: var(--text-muted); font-size: .95rem; }

/* Платформы */
.platforms {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
  margin-top: 36px;
}
.platform {
  background: var(--surface-100);
  border: 1px solid var(--surface-300);
  border-radius: var(--radius);
  padding: 26px 24px;
  display: flex; flex-direction: column; gap: 10px; align-items: flex-start;
}
.platform p { color: var(--text-muted); font-size: .92rem; flex: 1; }
.badge {
  font-family: var(--mono); font-size: .75rem; letter-spacing: .08em;
  padding: 6px 14px; border-radius: 999px;
  border: 1px dashed var(--outline); color: var(--text-faint);
}

/* Тарифы */
.pricing {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
  margin-top: 36px; align-items: start;
}
.plan {
  position: relative;
  background: var(--surface-100);
  border: 1px solid var(--surface-300);
  border-radius: var(--radius);
  padding: 30px 26px;
  display: flex; flex-direction: column; gap: 14px;
}
.plan-featured {
  border-color: var(--primary-dim);
  background: linear-gradient(180deg, rgba(42, 168, 168, .10), var(--surface-100) 60%);
}
.plan-badge {
  position: absolute; top: -11px; left: 26px;
  font-family: var(--mono); font-size: .72rem; letter-spacing: .06em;
  padding: 5px 12px; border-radius: 999px;
  background: var(--primary); color: var(--on-primary); font-weight: 700;
}
.plan h3 { font-size: 1.15rem; }
.plan-price { display: flex; align-items: baseline; gap: 6px; }
.plan-price .amount { font-size: 2.1rem; font-weight: 800; letter-spacing: -0.02em; }
.plan-price .per { color: var(--text-faint); font-size: .95rem; }
.plan-note { color: var(--text-faint); font-size: .9rem; margin-top: -6px; }
.plan-list { list-style: none; display: flex; flex-direction: column; gap: 10px; margin: 6px 0 4px; }
.plan-list li {
  color: var(--text-muted); font-size: .95rem; position: relative; padding-left: 26px;
}
.plan-list li::before {
  content: ""; position: absolute; left: 4px; top: 7px;
  width: 12px; height: 7px; border-left: 2px solid var(--primary);
  border-bottom: 2px solid var(--primary); transform: rotate(-45deg);
}
.plan-btn { margin-top: auto; justify-content: center; }
.plan-btn[disabled] { opacity: .5; cursor: not-allowed; pointer-events: none; }

/* FAQ */
#faq details {
  border-bottom: 1px solid var(--surface-300);
  padding: 4px 0;
}
#faq summary {
  cursor: pointer; font-weight: 700; font-size: 1.05rem;
  padding: 16px 0; list-style: none; position: relative; padding-right: 36px;
  transition: color .15s ease;
}
#faq summary:hover { color: var(--primary-fixed); }
#faq summary::-webkit-details-marker { display: none; }
#faq summary::after {
  content: "+"; position: absolute; right: 4px; top: 50%;
  transform: translateY(-50%);
  color: var(--primary); font-weight: 400; font-size: 1.4rem;
  transition: transform .2s ease;
}
#faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
#faq details p { color: var(--text-muted); padding: 0 0 18px; max-width: 60em; }
@media (prefers-reduced-motion: no-preference) {
  #faq details[open] p { animation: faq-in .25s ease; }
}
@keyframes faq-in { from { opacity: 0; transform: translateY(-4px); } }

/* CTA */
.cta-inner { text-align: center; display: flex; flex-direction: column; align-items: center; }
.cta .section-sub { margin-bottom: 28px; }

/* ---------- Подвал ---------- */
.site-footer { border-top: 1px solid var(--surface-300); padding: 56px 0 32px; }
.footer-top {
  display: grid; grid-template-columns: 1.3fr 2.7fr; gap: 48px;
  padding-bottom: 40px; border-bottom: 1px solid var(--surface-300);
}
.footer-brand p { color: var(--text-faint); font-size: .92rem; margin-top: 14px; max-width: 22em; }
.footer-cols {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px;
}
.footer-col { display: flex; flex-direction: column; gap: 12px; }
.footer-col h4 {
  font-family: var(--mono); font-size: .74rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-faint); font-weight: 600;
  margin-bottom: 2px;
}
.footer-col a { color: var(--text-muted); font-size: .92rem; }
.footer-col a:hover { color: var(--primary-fixed); }
.footer-bottom {
  padding-top: 24px; color: var(--text-faint); font-size: .9rem;
}

/* ---------- Адаптив ---------- */
@media (max-width: 960px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .platforms { grid-template-columns: repeat(2, 1fr); }
  .pricing { grid-template-columns: 1fr; max-width: 460px; }
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-visual { order: -1; margin-bottom: 40px; }
  .orb { width: min(260px, 68vw); }
  .orb-location { bottom: -34px; font-size: .95rem; }
  .footer-top { grid-template-columns: 1fr; gap: 32px; }
  .footer-cols { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .nav-toggle { display: flex; }
  .header-inner > .btn { display: none; }
  .site-nav {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--surface-100);
    border-bottom: 1px solid var(--surface-300);
    padding: 8px 0;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 14px 24px; font-size: 1.05rem; }
  .nav-lk { display: block; color: var(--primary-fixed); }
  .cards, .steps, .platforms { grid-template-columns: 1fr; }
  #privacy .cards { grid-template-columns: 1fr; }
  .support-sep { display: none; }
  .support-strip { gap: 20px; }
  .support-group { gap: 18px 22px; }
  .hero { padding: 44px 0 48px; }
  .section { padding: 60px 0; }
  .hero-actions .btn { flex: 1 1 100%; justify-content: center; }
  .platform .btn { align-self: stretch; justify-content: center; }
  .cta .btn { width: 100%; justify-content: center; }
  .lead { font-size: 1.05rem; }
  .footer-cols { grid-template-columns: 1fr; }
}
