/* «Судьба рядом» — общий стиль лендинга и правовых страниц */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --primary: #6C3CE1;
  --primary-light: #9B59FF;
  --secondary: #FF6B6B;
  --accent: #FFD700;
  --bg: #0D0D1A;
  --bg2: #1A1A2E;
  --card: rgba(255,255,255,0.05);
  --border: rgba(255,255,255,0.10);
  --text: #F5F5F5;
  --muted: #A0A0B0;
  --ok: #3ddc97;
}
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: radial-gradient(ellipse at 50% -10%, #1A1A2E 0%, #0B0B16 62%);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: var(--primary-light); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }

/* Шапка */
nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 18px;
  padding: 14px 20px;
  background: rgba(13,13,26,0.82); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
nav .brand { font-weight: 800; font-size: 18px; display: flex; align-items: center; gap: 9px; }
nav .brand .ic {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-size: 17px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
}
nav .sp { flex: 1; }
nav a.link { color: var(--muted); font-weight: 600; font-size: 15px; }
nav a.link:hover { color: var(--text); text-decoration: none; }
@media (max-width: 640px){ nav a.link.hide-sm { display: none; } }

/* Кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 700; font-size: 16px; cursor: pointer;
  padding: 13px 24px; border-radius: 14px; border: none;
  background: linear-gradient(90deg, var(--primary), var(--primary-light)); color: #fff;
  transition: .15s;
}
.btn:hover { filter: brightness(1.1); text-decoration: none; }
.btn.ghost { background: var(--card); border: 1px solid var(--border); color: var(--text); }
.btn.lg { padding: 16px 30px; font-size: 17px; }

/* Hero */
.hero { text-align: center; padding: 70px 0 40px; position: relative; }
.logoBig {
  width: 92px; height: 92px; margin: 0 auto 26px; border-radius: 26px;
  display: grid; place-items: center; font-size: 46px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  box-shadow: 0 0 60px rgba(108,60,225,0.5);
  animation: float 4s ease-in-out infinite;
}
@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-10px)} }
.hero h1 {
  font-size: clamp(34px, 7vw, 58px); font-weight: 800; letter-spacing: -0.5px;
  background: linear-gradient(90deg, #fff, var(--primary-light), var(--accent));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero .tagline { color: var(--muted); font-size: clamp(16px, 4vw, 20px); margin-top: 14px; }
.hero .cta { margin-top: 32px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Этапы */
.stages { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 30px 0; flex-wrap: wrap; }
.stage {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 16px 20px; border-radius: 18px; background: var(--card); border: 1px solid var(--border); min-width: 100px;
}
.stage .emoji { font-size: 28px; }
.stage .name { font-size: 13px; font-weight: 700; }
.stage.shadow .name { color: #8A8DF0; }
.stage.spark .name { color: #EC4899; }
.stage.meeting .name { color: var(--accent); }
.arrow { color: var(--muted); font-size: 22px; }

/* Секции */
section.block { padding: 54px 0; position: relative; }
section.block h2 { font-size: clamp(24px, 5vw, 34px); text-align: center; margin-bottom: 10px; }
section.block .lead { text-align: center; color: var(--muted); max-width: 640px; margin: 0 auto 34px; }

/* Фичи */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.feature { background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 22px; }
.feature .fic { font-size: 30px; }
.feature h3 { font-size: 17px; margin: 12px 0 6px; }
.feature p { color: var(--muted); font-size: 14px; }

/* Тарифы */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; max-width: 880px; margin: 0 auto; }
.plan {
  background: var(--card); border: 1px solid var(--border); border-radius: 22px; padding: 26px 24px;
  display: flex; flex-direction: column; position: relative;
}
.plan.best { border-color: var(--primary-light); box-shadow: 0 0 0 1px var(--primary-light), 0 14px 40px rgba(108,60,225,0.25); }
.plan .tag {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(90deg, var(--primary), var(--primary-light)); color: #fff;
  font-size: 12px; font-weight: 700; padding: 5px 14px; border-radius: 999px;
}
.plan .pname { font-size: 17px; font-weight: 700; color: var(--muted); }
.plan .price { font-size: 40px; font-weight: 800; margin: 10px 0 2px; }
.plan .price span { font-size: 16px; font-weight: 600; color: var(--muted); }
.plan .perm { color: var(--muted); font-size: 13px; }
.plan .save { color: var(--accent); font-size: 13px; font-weight: 700; margin-top: 6px; min-height: 18px; }
.plan ul { list-style: none; margin: 18px 0 22px; display: grid; gap: 9px; }
.plan ul li { font-size: 14px; padding-left: 26px; position: relative; }
.plan ul li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 800; }
.plan .btn { margin-top: auto; }

/* Шаги оплаты */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; counter-reset: s; }
.step { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 20px; }
.step .n {
  counter-increment: s; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-light)); font-weight: 800; margin-bottom: 10px;
}
.step .n::before { content: counter(s); }
.step h3 { font-size: 15px; margin-bottom: 4px; }
.step p { color: var(--muted); font-size: 13px; }

/* Правовые документы */
.legal { padding: 40px 0 60px; }
.legal h1 { font-size: clamp(26px, 5vw, 36px); margin-bottom: 6px; }
.legal .updated { color: var(--muted); font-size: 13px; margin-bottom: 26px; }
.legal h2 { font-size: 20px; margin: 28px 0 10px; }
.legal h3 { font-size: 16px; margin: 18px 0 8px; }
.legal p, .legal li { color: #D8D8E4; font-size: 15px; margin-bottom: 10px; }
.legal ul, .legal ol { padding-left: 22px; }
.legal .note {
  background: rgba(255,215,0,0.08); border: 1px solid rgba(255,215,0,0.25);
  border-radius: 12px; padding: 14px 16px; color: var(--accent); font-size: 14px; margin: 18px 0;
}
.legal .req { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; }
.legal .req p { margin-bottom: 6px; }

/* Контакты */
.contacts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.contacts .c { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 20px; }
.contacts .c .fic { font-size: 26px; }
.contacts .c h3 { font-size: 15px; margin: 10px 0 4px; }
.contacts .c p, .contacts .c a { color: var(--muted); font-size: 14px; }

/* Подвал */
footer { border-top: 1px solid var(--border); padding: 34px 0; color: #6B6B80; font-size: 13px; }
footer .cols { display: flex; gap: 30px; flex-wrap: wrap; justify-content: space-between; }
footer .links { display: flex; flex-direction: column; gap: 8px; }
footer .links a { color: var(--muted); }
footer .legal-line { margin-top: 22px; color: #6B6B80; font-size: 12px; }

/* Звёзды */
.stars { position: fixed; inset: 0; overflow: hidden; z-index: -1; pointer-events: none; }
.star { position: absolute; width: 2px; height: 2px; background: #fff; border-radius: 50%; opacity: .6; animation: tw var(--d,3s) ease-in-out infinite; }
@keyframes tw { 0%,100%{opacity:.2; transform: scale(1)} 50%{opacity:.9; transform: scale(1.5)} }

/* ═══════════════ Премиальные SVG-иконки (спрайт в HTML) ═══════════════ */
nav .brand .ic svg { width: 19px; height: 19px; display: block; }
.logoBig svg { width: 52px; height: 52px; display: block; filter: drop-shadow(0 4px 12px rgba(0,0,0,.35)); }
.fic { line-height: 0; }
.fic svg { width: 1em; height: 1em; display: block; filter: drop-shadow(0 3px 9px rgba(123,97,255,.30)); transition: transform .3s ease; }
.stage .emoji { font-size: 0; line-height: 0; }
.stage .emoji svg { width: 30px; height: 30px; display: block; filter: drop-shadow(0 3px 9px rgba(255,107,107,.30)); transition: transform .3s ease; }
#premium .fic svg { filter: drop-shadow(0 3px 9px rgba(245,179,1,.32)); }
.btn .bic { width: 20px; height: 20px; flex: 0 0 auto; display: block; }
.tic { width: 18px; height: 18px; vertical-align: -.28em; display: inline-block; }

/* ═══════════════ Космос и анимации ═══════════════ */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .45s; }

/* Появление страницы.
   ⚠️ Только opacity, БЕЗ transform: анимация transform на <body> (даже завершённая,
   с fill-mode both) делает body containing block'ом для position:fixed — из-за этого
   лайтбокс галереи позиционировался по документу, а не по экрану (низ фото уезжал). */
@keyframes pageIn { from { opacity: 0; } to { opacity: 1; } }
body { animation: pageIn .5s ease both; }

/* Дрейфующие туманности (космический фон) */
.cosmos { position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; transition: transform .25s ease-out; }
.cosmos span { position: absolute; border-radius: 50%; filter: blur(72px); mix-blend-mode: screen; }
.cosmos .n1 { width: 52vw; height: 52vw; left: -12vw; top: -10vw; opacity: .50;
  background: radial-gradient(circle, #6C3CE1, transparent 65%); animation: drift1 26s ease-in-out infinite; }
.cosmos .n2 { width: 46vw; height: 46vw; right: -14vw; top: 16vh; opacity: .34;
  background: radial-gradient(circle, #FF6B6B, transparent 65%); animation: drift2 32s ease-in-out infinite; }
.cosmos .n3 { width: 42vw; height: 42vw; left: 22vw; bottom: -16vw; opacity: .40;
  background: radial-gradient(circle, #9B59FF, transparent 65%); animation: drift3 29s ease-in-out infinite; }
@keyframes drift1 { 0%,100%{transform:translate(0,0) scale(1)} 50%{transform:translate(6vw,4vh) scale(1.12)} }
@keyframes drift2 { 0%,100%{transform:translate(0,0) scale(1)} 50%{transform:translate(-5vw,5vh) scale(1.10)} }
@keyframes drift3 { 0%,100%{transform:translate(0,0) scale(1)} 50%{transform:translate(4vw,-4vh) scale(1.15)} }

/* Падающие звёзды (метеор: хвост строго по направлению движения, диагональ вниз-влево) */
.shooting-star { position: fixed; width: 130px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, #fff);
  filter: drop-shadow(0 0 6px rgba(255,255,255,.85));
  z-index: -1; pointer-events: none; opacity: 0; transform-origin: 100% 50%; }
@keyframes shoot {
  0%   { opacity: 0; transform: translate(0,0) rotate(135deg) scaleX(.25); }
  10%  { opacity: 1; }
  100% { opacity: 0; transform: translate(-300px,300px) rotate(135deg) scaleX(1); }
}

/* Большая луна-лого: пульсирующее свечение */
.logoBig { position: relative; }
.logoBig::after { content: ""; position: absolute; inset: -14px; border-radius: 34px; z-index: -1;
  background: radial-gradient(circle, rgba(155,89,255,.55), transparent 70%); animation: pulse 3.6s ease-in-out infinite; }
@keyframes pulse { 0%,100%{transform:scale(.9); opacity:.5} 50%{transform:scale(1.18); opacity:.95} }

/* Заголовок hero: мерцающий градиент */
.hero h1 { background-size: 220% auto; animation: shimmer 6s linear infinite; }
@keyframes shimmer { to { background-position: 220% center; } }

/* Кнопки: блик + подъём + свечение */
.btn { position: relative; overflow: hidden; transition: transform .18s ease, box-shadow .25s ease, filter .15s ease; will-change: transform; }
.btn::before { content: ""; position: absolute; top: 0; left: -120%; width: 60%; height: 100%;
  background: linear-gradient(110deg, transparent, rgba(255,255,255,.35), transparent); transform: skewX(-20deg); transition: left .55s ease; }
.btn:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 12px 30px rgba(108,60,225,.45); filter: brightness(1.08); }
.btn:hover::before { left: 130%; }
.btn:active { transform: translateY(-1px) scale(.99); }
.btn.ghost:hover { box-shadow: 0 10px 26px rgba(0,0,0,.4), 0 0 0 1px var(--primary-light); }

/* Навигация: подчёркивание-градиент */
nav a.link { position: relative; transition: color .2s; }
nav a.link::after { content: ""; position: absolute; left: 0; bottom: -4px; width: 0; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--primary-light), var(--accent)); transition: width .25s ease; }
nav a.link:hover::after { width: 100%; }

/* Карточки: подъём + свечение */
.feature, .plan, .step, .contacts .c, .stage { transition: transform .25s ease, box-shadow .3s ease, border-color .3s ease, background .3s ease; }
.feature:hover, .step:hover, .contacts .c:hover { transform: translateY(-6px); border-color: rgba(155,89,255,.5);
  box-shadow: 0 16px 38px rgba(108,60,225,.28); background: rgba(255,255,255,.07); }
.feature:hover .fic svg { transform: scale(1.12) rotate(-3deg); }
.stage:hover { transform: translateY(-5px) scale(1.03); box-shadow: 0 14px 32px rgba(255,107,107,.25); }
.stage:hover .emoji svg { transform: scale(1.1); }
.plan:hover { transform: translateY(-8px); box-shadow: 0 22px 50px rgba(108,60,225,.32); }
.plan.best:hover { box-shadow: 0 0 0 1px var(--primary-light), 0 26px 56px rgba(108,60,225,.4); }

/* Появление при скролле (progressive enhancement: скрыто только при включённом JS) */
.reveal { transition: opacity .7s ease, transform .7s ease; }
.js .reveal { opacity: 0; transform: translateY(28px); }
.reveal.in { opacity: 1; transform: none; }
.js .reveal .grid > *, .js .reveal .steps > *, .js .reveal .plans > *, .js .reveal .contacts > *, .js .reveal .stages > * {
  opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in .grid > *, .reveal.in .steps > *, .reveal.in .plans > *, .reveal.in .contacts > *, .reveal.in .stages > * {
  opacity: 1; transform: none; }
.reveal.in .grid > *:nth-child(2), .reveal.in .steps > *:nth-child(2), .reveal.in .plans > *:nth-child(2), .reveal.in .stages > *:nth-child(2) { transition-delay: .08s; }
.reveal.in .grid > *:nth-child(3), .reveal.in .steps > *:nth-child(3), .reveal.in .plans > *:nth-child(3), .reveal.in .stages > *:nth-child(3) { transition-delay: .16s; }
.reveal.in .grid > *:nth-child(4), .reveal.in .steps > *:nth-child(4), .reveal.in .stages > *:nth-child(4) { transition-delay: .24s; }
.reveal.in .grid > *:nth-child(5), .reveal.in .steps > *:nth-child(5) { transition-delay: .32s; }
.reveal.in .grid > *:nth-child(6) { transition-delay: .40s; }
.reveal.in .grid > *:nth-child(7) { transition-delay: .48s; }

/* Доступность: уважение к reduce-motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  .cosmos span, .logoBig::after, .hero h1 { animation: none !important; }
}


/* ── Галерея скриншотов приложения (#screens) ── */
.shots { display: flex; gap: 18px; overflow-x: auto; padding: 8px 4px 18px;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.shots::-webkit-scrollbar { height: 8px; }
.shots::-webkit-scrollbar-track { background: rgba(255,255,255,.05); border-radius: 4px; }
.shots::-webkit-scrollbar-thumb { background: linear-gradient(90deg, var(--primary-light), var(--accent)); border-radius: 4px; }
.shot { flex: 0 0 auto; scroll-snap-align: center; }
.shot img { display: block; height: 440px; width: auto; border-radius: 18px;
  border: 1px solid rgba(155,89,255,.35); box-shadow: 0 14px 36px rgba(0,0,0,.45);
  transition: transform .25s ease, box-shadow .3s ease, border-color .3s ease; }
.shot img:hover { transform: translateY(-6px) scale(1.02); border-color: rgba(155,89,255,.7);
  box-shadow: 0 20px 46px rgba(108,60,225,.4); }
@media (max-width: 640px) { .shot img { height: 340px; } }
.shot img { cursor: zoom-in; }
.shots-wrap { position: relative; }
.shots-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(155,89,255,.5);
  background: rgba(13,13,26,.82); color: #EDE6FF; font-size: 26px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center; padding-bottom: 4px;
  transition: background .2s, box-shadow .2s; }
.shots-nav:hover { background: rgba(108,60,225,.85); box-shadow: 0 0 22px rgba(155,89,255,.5); }
.shots-nav.prev { left: -8px; }
.shots-nav.next { right: -8px; }
@media (max-width: 640px) { .shots-nav { display: none; } } /* на тач-экранах листают пальцем */

/* Полноэкранный просмотр скриншота (лайтбокс) */
.lightbox { position: fixed; inset: 0; z-index: 60; display: none; align-items: center; justify-content: center;
  background: rgba(7,7,15,.94); backdrop-filter: blur(6px); overflow: auto; padding: 16px 0; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 90vh; margin: auto; border-radius: 14px;
  border: 1px solid rgba(155,89,255,.45); box-shadow: 0 24px 70px rgba(0,0,0,.6); }
.lb-close { position: absolute; top: 18px; right: 20px; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: #fff;
  font-size: 18px; cursor: pointer; transition: background .2s; }
.lb-close:hover { background: rgba(224,92,92,.6); }
.lb-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 54px; height: 54px;
  border-radius: 50%; border: 1px solid rgba(155,89,255,.5); background: rgba(13,13,26,.72);
  color: #EDE6FF; font-size: 32px; line-height: 1; cursor: pointer; padding-bottom: 5px;
  display: flex; align-items: center; justify-content: center; transition: background .2s, box-shadow .2s; }
.lb-arrow:hover { background: rgba(108,60,225,.85); box-shadow: 0 0 24px rgba(155,89,255,.5); }
.lb-arrow.prev { left: 3vw; }
.lb-arrow.next { right: 3vw; }
.lb-counter { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,.75); font-size: 14px; letter-spacing: 2px; }
@media (max-width: 640px) { .lb-arrow { width: 44px; height: 44px; font-size: 26px; }
  .lb-arrow.prev { left: 2vw; } .lb-arrow.next { right: 2vw; } }
