/* ============================================================
   LAYOUT — фон, навигация, hero, секции, подвал
   ============================================================ */

/* ---------------- Живой фон ---------------- */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(1200px 700px at 50% -10%, rgba(99, 102, 241, 0.22), transparent 70%),
    var(--bg);
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  animation: drift 26s ease-in-out infinite;
}

.orb--1 {
  width: 46vw; height: 46vw;
  top: -12vw; left: -8vw;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.75), transparent 65%);
}

.orb--2 {
  width: 40vw; height: 40vw;
  top: 24vh; right: -10vw;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.6), transparent 65%);
  animation-duration: 32s;
  animation-direction: reverse;
}

.orb--3 {
  width: 38vw; height: 38vw;
  bottom: -10vw; left: 26%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.35), transparent 65%);
  animation-duration: 38s;
}

/* Сетка + зернистость поверх свечения */
.backdrop::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 20%, transparent 75%);
}

/* ---------------- Индикатор прокрутки ---------------- */

.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: var(--grad-brand);
  z-index: 100;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.7);
}

/* ---------------- Навигация ---------------- */

.nav {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: min(calc(100% - 2 * var(--gutter)), var(--maxw));
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 10px 10px 18px;
  border-radius: var(--r-full);
  border: 1px solid transparent;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease), backdrop-filter 0.4s var(--ease);
}

.nav.is-stuck {
  background: rgba(8, 10, 22, 0.72);
  border-color: var(--border);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
}

.nav-brand img {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  object-fit: cover;
  box-shadow: 0 0 0 1px var(--border-strong), 0 6px 16px rgba(0, 0, 0, 0.4);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  position: relative;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--r-full);
  transition: color 0.25s var(--ease), background 0.25s var(--ease);
}

.nav-links a:hover {
  color: var(--text);
  background: var(--surface-2);
}

.nav-cta { flex-shrink: 0; }

/* Мобильное меню */
.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  border-radius: var(--r-full);
  border: 1px solid var(--border);
  background: var(--surface);
  align-items: center;
  justify-content: center;
}

.nav-toggle span {
  display: block;
  width: 17px; height: 1.5px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.35s var(--ease), opacity 0.2s linear;
}

.nav-toggle span + span { margin-top: 4.5px; }

.nav.is-open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav.is-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav.is-open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------------- HERO ---------------- */

.hero {
  position: relative;
  padding-top: clamp(130px, 18vh, 190px);
  padding-bottom: var(--section-y);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}

.hero-copy { max-width: 620px; }

.hero h1 { margin: 22px 0 20px; }

.hero h1 .line { display: block; }

.hero-lead {
  color: var(--text-muted);
  font-size: clamp(16px, 2vw, 18.5px);
  line-height: 1.75;
  margin-bottom: 34px;
  max-width: 54ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 22px;
}

.hero-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  font-size: 13.5px;
  color: var(--text-dim);
}

.hero-note span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.hero-note svg { width: 15px; height: 15px; color: var(--brand-play); }

/* Правая колонка — сцена с телефоном */
.hero-stage {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 560px;
}

.hero-stage::before {
  content: '';
  position: absolute;
  width: 340px; height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.35), transparent 70%);
  filter: blur(50px);
}

/* ---------------- Полоса статистики ---------------- */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* ---------------- Сетки секций ---------------- */

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 32px);
  counter-reset: step;
}

.faq-list {
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ---------------- Финальный призыв ---------------- */

.cta {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: clamp(48px, 7vw, 88px) var(--gutter);
  border-radius: var(--r-xl);
  border: 1px solid var(--border-strong);
  background:
    radial-gradient(circle at 50% 0%, rgba(168, 85, 247, 0.28), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-lg);
}

.cta::before {
  content: '';
  position: absolute;
  top: -1px; left: 15%; right: 15%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent);
}

.cta h2 { margin-bottom: 16px; }

.cta p {
  color: var(--text-muted);
  max-width: 46ch;
  margin: 0 auto 34px;
}

.cta .download-buttons { justify-content: center; }

/* ---------------- Подвал ---------------- */

.footer {
  border-top: 1px solid var(--border);
  margin-top: var(--section-y);
  padding-block: 48px 40px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 18px;
}

.footer-brand img {
  width: 40px; height: 40px;
  border-radius: 13px;
  box-shadow: 0 0 0 1px var(--border-strong);
}

.footer-tagline {
  color: var(--text-dim);
  font-size: 14px;
  margin-top: 10px;
  max-width: 34ch;
}

.footer-links {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  font-size: 14px;
}

.footer-links a {
  color: var(--text-muted);
  transition: color 0.25s var(--ease);
}

.footer-links a:hover { color: var(--text); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 26px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-dim);
}
