/* === ПЕРЕМЕННЫЕ === */
:root {
  --bg-primary: #11181d;
  --bg-secondary: #182127;
  --bg-card: rgba(28, 35, 41, 0.8);
  --bg-card-hover: rgba(40, 50, 58, 0.9);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  /* 4.5:1 на нашем тёмном фоне — норма доступности. Прежний #64748b
     давал 4.0 и не проходил: мелкий серый текст в подвале и подписях. */
  --text-muted: #7c8aa3;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --accent-glow: rgba(26, 106, 224, 0.25);
  --purple: #7b8fa3;
  --purple-glow: rgba(120, 138, 156, 0.25);
  --border: rgba(96, 108, 118, 0.6);
  --border-light: rgba(96, 108, 118, 0.3);
  --radius: 20px;
  --radius-sm: 12px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  background: var(--bg-primary);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* === ЧАСТИЦЫ === */
#particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* === НАВИГАЦИЯ === */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 14px 0;
  background: rgba(17, 24, 29, 0.7);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition);
}

.navbar.scrolled {
  background: rgba(17, 24, 29, 0.95);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  /* Значок светлый, шапка на /new белая – без канта карточка растворяется.
     На старой главной шапка тёмная, там кант не нужен и его нет. */
  border: 1px solid rgba(10, 19, 23, 0.12);
  box-shadow: 0 2px 6px rgba(10, 19, 23, 0.08);
}

.nav-links {
  display: flex;
  gap: 28px;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition);
  border-radius: 1px;
}

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

.nav-links a:hover::after {
  width: 100%;
}

.lang-switcher {
  display: flex;
  gap: 2px;
  background: rgba(28, 35, 41, 0.8);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 3px;
}

.lang-switcher.mobile {
  margin-top: 16px;
  justify-content: center;
}

.lang-btn {
  padding: 6px 14px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 7px;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.lang-btn:hover {
  color: var(--text-secondary);
}

.lang-btn.active {
  /* Не var(--accent): белый по нему даёт 3.67 при норме 4.5 — буквы мелкие,
     11px. Синий потемнее выправляет контраст, не меняя вид кнопки. */
  background: #2563eb;
  color: white;
  box-shadow: 0 2px 10px var(--accent-glow);
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.mobile-menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  background: rgba(28, 35, 41, 0.98);
  backdrop-filter: blur(20px);
  padding: 24px;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  z-index: 99;
  border-bottom: 1px solid var(--border);
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 1.05rem;
  font-weight: 500;
}

/* === HERO === */
.hero {
  position: relative;
  padding: 130px 0 80px;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(26, 106, 224, 0.12) 0%, transparent 70%);
  top: -100px;
  left: -200px;
  animation: glow-float 8s ease-in-out infinite;
  pointer-events: none;
}

.hero-glow-2 {
  background: radial-gradient(circle, rgba(120, 138, 156, 0.1) 0%, transparent 70%);
  top: auto;
  bottom: -200px;
  left: auto;
  right: -200px;
  animation-delay: -4s;
  animation-duration: 10s;
}

@keyframes glow-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, -30px) scale(1.1); }
}

.hero-container {
  position: relative;
  z-index: 1;
  display: grid;
  /* Текстовой колонке отдали чуть больше места: заголовок длиннее прежнего,
     ровно пополам он не помещался и ломался на четыре строки */
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  padding: 6px 16px;
  background: rgba(26, 106, 224, 0.1);
  border: 1px solid rgba(26, 106, 224, 0.3);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 24px;
  letter-spacing: 0.02em;
}

.hero-content h1 {
  /* Размер подстраивается под ширину: заголовок стал длиннее прежнего,
     на 4rem строки ломались пополам и оставляли одинокое слово */
  font-size: clamp(1.4rem, 1.85vw, 2.25rem);
  font-weight: 900;
  line-height: 1.05;
  margin-bottom: 24px;
  letter-spacing: -0.03em;
}

.hero-line {
  display: block;
}

.hero-line-gradient {
  background: linear-gradient(135deg, var(--accent) 0%, var(--purple) 50%, #1a6ae0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 520px;
}

.hero-buttons {
  display: flex;
  gap: 14px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--purple));
  color: white;
  box-shadow: 0 4px 24px var(--accent-glow), 0 0 60px rgba(26, 106, 224, 0.1);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 40px var(--accent-glow), 0 0 80px rgba(26, 106, 224, 0.15);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  transform: translateY(-2px);
}

.hero-stats {
  display: flex;
  gap: 24px;
  align-items: center;
}

.stat {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.stat-divider {
  width: 1px;
  height: 32px;
  background: var(--border);
}

/* === ТЕЛЕФОН 3D === */
.hero-phone-scene {
  display: flex;
  justify-content: center;
  perspective: 1200px;
}

.phone-3d-wrapper {
  position: relative;
  transform-style: preserve-3d;
  animation: phone-float 6s ease-in-out infinite;
}

@keyframes phone-float {
  0%, 100% { transform: translateY(0) rotateY(-5deg) rotateX(2deg); }
  50% { transform: translateY(-20px) rotateY(5deg) rotateX(-2deg); }
}

.phone-mockup {
  width: 280px;
  height: 570px;
  background: linear-gradient(145deg, #27313a, #151c21);
  border-radius: 40px;
  border: 2px solid rgba(148, 163, 184, 0.15);
  padding: 10px;
  box-shadow:
    0 40px 80px rgba(0, 0, 0, 0.5),
    0 0 60px var(--accent-glow),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
  position: relative;
}

.phone-notch {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 110px;
  height: 26px;
  background: #000;
  border-radius: 20px;
  z-index: 2;
}

.phone-screen {
  width: 100%;
  height: 100%;
  border-radius: 30px;
  overflow: hidden;
  background: var(--bg-secondary);
}

.phone-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Плавающие карточки вокруг телефона */
.floating-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: rgba(28, 35, 41, 0.9);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 14px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  z-index: 5;
}

.fc-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(26, 106, 224, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}

.fc-green { background: rgba(34, 197, 94, 0.15); color: #22c55e; }
.fc-purple { background: rgba(120, 138, 156, 0.15); color: #7b8fa3; }
.fc-amber { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }

.float-1 {
  /* ниже шапки экрана: в телефоне теперь древо, и карточка закрывала заголовок */
  top: 108px;
  left: -120px;
  animation: float-card 5s ease-in-out infinite;
}

.float-2 {
  top: 160px;
  right: -120px;
  animation: float-card 5s ease-in-out infinite;
  animation-delay: -1.2s;
}

.float-3 {
  bottom: 160px;
  /* сдвинута левее: карточка стала шире и наезжала на имя на экране телефона */
  left: -150px;
  animation: float-card 5s ease-in-out infinite;
  animation-delay: -2.4s;
}

.float-4 {
  bottom: 60px;
  right: -60px;
  animation: float-card 5s ease-in-out infinite;
  animation-delay: -3.6s;
}

@keyframes float-card {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* Скролл-индикатор */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  animation: scroll-bounce 2s ease-in-out infinite;
}

.scroll-mouse {
  width: 26px;
  height: 40px;
  border: 2px solid var(--text-muted);
  border-radius: 14px;
  display: flex;
  justify-content: center;
  padding-top: 8px;
}

.scroll-wheel {
  width: 3px;
  height: 8px;
  background: var(--text-muted);
  border-radius: 2px;
  animation: scroll-wheel 2s ease-in-out infinite;
}

@keyframes scroll-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

@keyframes scroll-wheel {
  0%, 100% { opacity: 1; transform: translateY(0); }
  50% { opacity: 0.3; transform: translateY(6px); }
}

/* === СЕКЦИИ — ОБЩИЕ === */
.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header.left {
  text-align: left;
}

.section-tag {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(26, 106, 224, 0.08);
  border: 1px solid rgba(26, 106, 224, 0.2);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 20px;
  letter-spacing: 0.02em;
}

.section-title {
  font-size: 2.8rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  line-height: 1.1;
}

.section-title.left {
  text-align: left;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

.section-subtitle.left {
  text-align: left;
  margin: 0;
}

/* === ВОЗМОЖНОСТИ === */
.features {
  position: relative;
  padding: 120px 0;
  z-index: 1;
}

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

.feature-card {
  position: relative;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 32px;
  transition: var(--transition);
  overflow: hidden;
  transform-style: preserve-3d;
}

.card-glow {
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow), transparent 70%);
  top: -100px;
  right: -100px;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.feature-card:hover .card-glow {
  opacity: 1;
}

.feature-card:hover {
  border-color: rgba(26, 106, 224, 0.4);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 30px var(--accent-glow);
}

.feature-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.feature-icon svg {
  width: 24px;
  height: 24px;
}

.icon-blue { background: rgba(26, 106, 224, 0.15); color: #3b82f6; }
.icon-green { background: rgba(34, 197, 94, 0.15); color: #22c55e; }
.icon-purple { background: rgba(120, 138, 156, 0.15); color: #7b8fa3; }
.icon-amber { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.icon-rose { background: rgba(244, 63, 94, 0.15); color: #f43f5e; }
.icon-cyan { background: rgba(6, 182, 212, 0.15); color: #06b6d4; }
.icon-emerald { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.icon-orange { background: rgba(249, 115, 22, 0.15); color: #f97316; }
.icon-teal { background: rgba(20, 184, 166, 0.15); color: #14b8a6; }

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* === GPS ПРОФИЛЬ — ГЛАВНАЯ ФУНКЦИЯ === */
.gps-section {
  position: relative;
  padding: 80px 0 140px;
  z-index: 1;
  overflow: hidden;
  background: linear-gradient(180deg, var(--bg-primary) 0%, #060b18 50%, var(--bg-primary) 100%);
}

/* Сетка на фоне */
.gps-bg-grid {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    linear-gradient(rgba(26, 106, 224, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26, 106, 224, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

.gps-bg-glow {
  position: absolute;
  width: 700px;
  height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(26, 106, 224, 0.1) 0%, transparent 60%);
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  animation: glow-float 10s ease-in-out infinite;
  pointer-events: none;
}

.gps-bg-glow-2 {
  background: radial-gradient(circle, rgba(34, 197, 94, 0.06) 0%, transparent 60%);
  top: auto;
  bottom: -300px;
  animation-delay: -5s;
}

/* Кольца GPS-сигнала */
.gps-signal-rings {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.gps-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(26, 106, 224, 0.08);
  animation: gps-ring-expand 4s ease-out infinite;
}

.gps-ring-1 {
  width: 300px;
  height: 300px;
  top: -150px;
  left: -150px;
  animation-delay: 0s;
}

.gps-ring-2 {
  width: 600px;
  height: 600px;
  top: -300px;
  left: -300px;
  animation-delay: -1.3s;
}

.gps-ring-3 {
  width: 900px;
  height: 900px;
  top: -450px;
  left: -450px;
  animation-delay: -2.6s;
}

@keyframes gps-ring-expand {
  0% { transform: scale(0.8); opacity: 0.6; }
  100% { transform: scale(1.4); opacity: 0; }
}

/* Проблема */
.gps-problem {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 700px;
  margin: 0 auto 48px;
  padding: 20px 28px;
  background: rgba(244, 63, 94, 0.06);
  border: 1px solid rgba(244, 63, 94, 0.15);
  border-radius: 16px;
  text-align: left;
}

.gps-problem-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(244, 63, 94, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f43f5e;
}

.gps-problem p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

.gps-tag {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.3);
  color: #22c55e;
}

.gps-title-gradient {
  background: linear-gradient(135deg, #22c55e 0%, var(--accent) 50%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Основной блок */
.gps-showcase {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  margin-bottom: 80px;
}

/* === 3D КАРТА === */
.gps-map-scene {
  position: relative;
  perspective: 1000px;
  padding: 30px;
}

.gps-map-3d {
  transform-style: preserve-3d;
  animation: map-hover 6s ease-in-out infinite;
}

@keyframes map-hover {
  0%, 100% { transform: rotateX(55deg) rotateZ(-5deg) translateY(0); }
  50% { transform: rotateX(55deg) rotateZ(-5deg) translateY(-10px); }
}

.gps-map-surface {
  position: relative;
  width: 380px;
  height: 380px;
  background: linear-gradient(145deg, #0d1829 0%, #111d32 50%, #0a1221 100%);
  border-radius: 20px;
  border: 1px solid rgba(26, 106, 224, 0.15);
  box-shadow:
    0 60px 100px rgba(0, 0, 0, 0.5),
    0 0 80px rgba(26, 106, 224, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
  overflow: hidden;
  transform-style: preserve-3d;
}

/* Линии сетки на карте */
.gps-map-grid-lines {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.gps-grid-h {
  position: absolute;
  width: 100%;
  height: 1px;
  background: rgba(26, 106, 224, 0.06);
}

.gps-grid-h:nth-child(1) { top: 25%; }
.gps-grid-h:nth-child(2) { top: 50%; }
.gps-grid-h:nth-child(3) { top: 75%; }
.gps-grid-h:nth-child(4) { top: 90%; }

.gps-grid-v {
  position: absolute;
  height: 100%;
  width: 1px;
  background: rgba(26, 106, 224, 0.06);
}

.gps-grid-v:nth-child(5) { left: 20%; }
.gps-grid-v:nth-child(6) { left: 45%; }
.gps-grid-v:nth-child(7) { left: 65%; }
.gps-grid-v:nth-child(8) { left: 85%; }

/* Блоки территорий */
.gps-terrain-block {
  position: absolute;
  border-radius: 4px;
  border: 1px solid rgba(26, 106, 224, 0.08);
}

.tb-1 { top: 15%; left: 10%; width: 25%; height: 20%; background: rgba(34, 197, 94, 0.04); border-color: rgba(34, 197, 94, 0.1); }
.tb-2 { top: 60%; left: 55%; width: 35%; height: 25%; background: rgba(26, 106, 224, 0.04); border-color: rgba(26, 106, 224, 0.1); }
.tb-3 { top: 30%; left: 60%; width: 20%; height: 15%; background: rgba(120, 138, 156, 0.04); border-color: rgba(120, 138, 156, 0.1); }
.tb-4 { top: 70%; left: 10%; width: 30%; height: 18%; background: rgba(26, 106, 224, 0.03); border-color: rgba(26, 106, 224, 0.08); }
.tb-5 { top: 10%; left: 50%; width: 15%; height: 12%; background: rgba(34, 197, 94, 0.03); border-color: rgba(34, 197, 94, 0.08); }

/* Пин локации */
.gps-pin-wrapper {
  position: absolute;
  top: 42%;
  left: 48%;
  transform: translate(-50%, -100%);
  z-index: 3;
}

.gps-pin {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: pin-bounce 2s ease-in-out infinite;
  transform: translateZ(40px);
}

@keyframes pin-bounce {
  0%, 100% { transform: translateZ(40px) translateY(0); }
  50% { transform: translateZ(40px) translateY(-8px); }
}

.gps-pin-head {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #22c55e, #10b981);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(34, 197, 94, 0.4);
}

.gps-pin-head svg {
  transform: rotate(45deg);
  color: white;
}

.gps-pin-stick {
  width: 2px;
  height: 20px;
  background: linear-gradient(to bottom, #22c55e, transparent);
}

.gps-pin-shadow {
  width: 30px;
  height: 8px;
  background: rgba(34, 197, 94, 0.2);
  border-radius: 50%;
  margin-top: -4px;
  filter: blur(4px);
  animation: pin-shadow 2s ease-in-out infinite;
}

@keyframes pin-shadow {
  0%, 100% { transform: scale(1); opacity: 0.3; }
  50% { transform: scale(0.7); opacity: 0.5; }
}

.gps-pin-pulse {
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid rgba(34, 197, 94, 0.3);
  animation: pin-pulse-ring 2s ease-out infinite;
}

.gps-pin-pulse-2 {
  animation-delay: -1s;
}

@keyframes pin-pulse-ring {
  0% { transform: translateX(-50%) scale(0.5); opacity: 0.8; }
  100% { transform: translateX(-50%) scale(2); opacity: 0; }
}

/* Бейдж координат */
.gps-coords-badge {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(17, 24, 29, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #22c55e;
  font-family: 'JetBrains Mono', 'SF Mono', monospace;
  letter-spacing: 0.02em;
  white-space: nowrap;
  z-index: 3;
}

.gps-coords-dot {
  width: 6px;
  height: 6px;
  background: #22c55e;
  border-radius: 50%;
  animation: dot-blink 1.5s ease-in-out infinite;
}

@keyframes dot-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* Плавающие данные */
.gps-float {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(28, 35, 41, 0.9);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-primary);
  z-index: 5;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.gps-float svg {
  flex-shrink: 0;
}

.gps-float-accuracy {
  top: 20px;
  left: 10px;
  color: #22c55e;
  animation: float-card 4s ease-in-out infinite;
}

.gps-float-accuracy svg { color: #22c55e; }

.gps-float-saved {
  bottom: 30px;
  right: 10px;
  color: var(--accent);
  animation: float-card 4s ease-in-out infinite;
  animation-delay: -2s;
}

.gps-float-saved svg { color: var(--accent); }

/* === ПРОФИЛЬ === */
.gps-profile-demo {
  display: flex;
  justify-content: center;
}

.gps-profile-card {
  width: 100%;
  max-width: 380px;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  box-shadow:
    0 40px 80px rgba(0, 0, 0, 0.4),
    0 0 40px rgba(26, 106, 224, 0.08);
}

.gps-profile-header {
  display: flex;
  gap: 16px;
  padding: 24px 24px 16px;
  align-items: center;
}

.gps-profile-avatar {
  flex-shrink: 0;
}

.gps-profile-info h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.gps-profile-dates {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.gps-profile-location {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  color: #22c55e;
  font-weight: 500;
}

.gps-profile-location svg {
  color: #22c55e;
}

.gps-profile-epitaph {
  padding: 0 24px 16px;
}

.gps-profile-epitaph p {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-style: italic;
}

.gps-profile-photos {
  display: flex;
  gap: 8px;
  padding: 0 24px 20px;
}

.gps-photo-thumb {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: rgba(26, 106, 224, 0.06);
  border: 1px solid rgba(26, 106, 224, 0.1);
}

.gps-photo-more {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  background: rgba(26, 106, 224, 0.08);
  border-color: rgba(26, 106, 224, 0.15);
}

.gps-profile-sections {
  display: flex;
  gap: 16px;
  padding: 16px 24px;
  border-top: 1px solid var(--border-light);
  flex-wrap: wrap;
}

.gps-psec {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.gps-psec svg {
  color: var(--accent);
}

.gps-profile-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  background: linear-gradient(135deg, #22c55e, #10b981);
  color: white;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
}

.gps-profile-btn:hover {
  filter: brightness(1.1);
}

/* Три факта */
.gps-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.gps-fact {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.gps-fact::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #22c55e, var(--accent));
  opacity: 0;
  transition: opacity var(--transition);
}

.gps-fact:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 197, 94, 0.3);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 30px rgba(34, 197, 94, 0.1);
}

.gps-fact:hover::before {
  opacity: 1;
}

.gps-fact-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 18px;
  border-radius: 16px;
  background: rgba(26, 106, 224, 0.1);
  border: 1px solid rgba(26, 106, 224, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.gps-fact-icon-purple {
  background: rgba(120, 138, 156, 0.1);
  border-color: rgba(120, 138, 156, 0.15);
  color: var(--purple);
}

.gps-fact-icon-green {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.gps-fact h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.gps-fact p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.6;
}

/* Адаптивность GPS */
@media (max-width: 1024px) {
  .gps-showcase {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .gps-map-scene {
    display: flex;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .gps-section {
    padding: 80px 0;
  }

  .gps-map-surface {
    width: 300px;
    height: 300px;
  }

  .gps-facts {
    grid-template-columns: 1fr;
  }

  .gps-float {
    display: none;
  }

  .gps-signal-rings {
    display: none;
  }

  .gps-showcase {
    margin-bottom: 48px;
  }
}

@media (max-width: 480px) {
  .gps-map-surface {
    width: 260px;
    height: 260px;
  }

  .gps-problem {
    flex-direction: column;
    text-align: center;
  }
}

/* === КНИГА ЖИЗНИ === */
.book-section {
  position: relative;
  padding: 140px 0;
  z-index: 1;
  overflow: hidden;
  background: linear-gradient(180deg, var(--bg-primary) 0%, #171e24 50%, var(--bg-primary) 100%);
}

.book-bg-glow {
  position: absolute;
  width: 800px;
  height: 800px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(120, 138, 156, 0.1) 0%, transparent 60%);
  top: -200px;
  right: -300px;
  animation: glow-float 12s ease-in-out infinite;
  pointer-events: none;
}

.book-bg-glow-2 {
  background: radial-gradient(circle, rgba(26, 106, 224, 0.08) 0%, transparent 60%);
  top: auto;
  bottom: -300px;
  right: auto;
  left: -300px;
  animation-delay: -6s;
}

/* Летающие частицы-звёзды */
.book-particles {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  overflow: hidden;
}

.book-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(120, 138, 156, 0.4);
  border-radius: 50%;
  animation: particle-float 8s ease-in-out infinite;
}

.bp-1 { top: 15%; left: 10%; animation-delay: 0s; width: 3px; height: 3px; }
.bp-2 { top: 25%; right: 15%; animation-delay: -1.5s; width: 5px; height: 5px; background: rgba(26, 106, 224, 0.3); }
.bp-3 { top: 60%; left: 20%; animation-delay: -3s; }
.bp-4 { top: 70%; right: 25%; animation-delay: -4.5s; width: 3px; height: 3px; background: rgba(236, 72, 153, 0.3); }
.bp-5 { top: 40%; left: 5%; animation-delay: -2s; width: 5px; height: 5px; }
.bp-6 { top: 80%; right: 10%; animation-delay: -5.5s; background: rgba(26, 106, 224, 0.3); }

@keyframes particle-float {
  0%, 100% { transform: translateY(0) translateX(0) scale(1); opacity: 0.4; }
  25% { transform: translateY(-30px) translateX(10px) scale(1.2); opacity: 0.8; }
  50% { transform: translateY(-15px) translateX(-15px) scale(0.8); opacity: 0.5; }
  75% { transform: translateY(-40px) translateX(5px) scale(1.1); opacity: 0.7; }
}

.book-tag {
  background: rgba(120, 138, 156, 0.12);
  border-color: rgba(120, 138, 156, 0.3);
  color: var(--purple);
}

.book-title-gradient {
  background: linear-gradient(135deg, var(--purple) 0%, #1a6ae0 50%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Основной блок */
.book-showcase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  margin-bottom: 80px;
}

/* === 3D КНИГА === */
.book-3d-scene {
  display: flex;
  justify-content: center;
  perspective: 1200px;
  position: relative;
  padding: 40px 0;
}

.book-3d-wrapper {
  position: relative;
  display: inline-block;
}

.book-3d {
  position: relative;
  width: 240px;
  height: 340px;
  transform-style: preserve-3d;
  animation: book-rotate 8s ease-in-out infinite;
}

@keyframes book-rotate {
  0%, 100% { transform: rotateY(-25deg) rotateX(5deg); }
  50% { transform: rotateY(-15deg) rotateX(0deg) translateY(-10px); }
}

@keyframes book-rotate-mobile {
  0%, 100% { transform: rotateY(-12deg) rotateX(3deg); }
  50% { transform: rotateY(-5deg) rotateX(0deg) translateY(-8px); }
}

@keyframes book-rotate-small {
  0%, 100% { transform: rotateY(-8deg) rotateX(2deg) scale(0.7); }
  50% { transform: rotateY(-3deg) rotateX(0deg) scale(0.7) translateY(-6px); }
}

@keyframes book-rotate-xs {
  0%, 100% { transform: rotateY(-5deg) rotateX(2deg) scale(0.58); }
  50% { transform: rotateY(-2deg) rotateX(0deg) scale(0.58) translateY(-5px); }
}

.book-cover {
  position: absolute;
  width: 100%;
  height: 100%;
  /* Цвета крышки — из приложения (BOOK_COLORS: coverA, coverAd) */
  background: linear-gradient(135deg, #414872 0%, #343a5e 45%, #23263f 100%);
  border-radius: 4px 16px 16px 4px;
  transform: translateZ(15px);
  box-shadow:
    0 0 40px rgba(214, 176, 110, 0.14),
    0 20px 60px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  border: 1px solid rgba(214, 176, 110, 0.3);
}

.book-cover-inner {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 22px 18px 18px;
  box-sizing: border-box;
  position: relative;
}

/* Рамка внутри крышки — как coverTrim на экране книги */
.book-cover-trim {
  position: absolute;
  inset: 6px;
  border-radius: 11px;
  border: 1px solid rgba(214, 176, 110, 0.26);
  pointer-events: none;
}

.book-cover-portrait {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(10, 9, 16, 0.45);
  border: 1px solid rgba(214, 176, 110, 0.18);
}
.book-cover-portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}
/* Уголки как на настоящем снимке в альбоме */
.bcp-corner {
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: rgba(214, 176, 110, 0.55);
}
.bcp-tl { top: 5px; left: 5px; border-top: 1.5px solid; border-left: 1.5px solid; }
.bcp-br { bottom: 5px; right: 5px; border-bottom: 1.5px solid; border-right: 1.5px solid; }

.book-cover-by {
  margin-top: 12px;
  font-family: Georgia, 'Times New Roman', serif;
  font-style: italic;
  font-size: 0.78rem;
  line-height: 1.45;
  color: #d6b06a;
  text-align: center;
}

.book-cover-ornament {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.5), transparent);
}

.book-cover-ornament-bottom {
  top: auto;
  bottom: 20px;
}

.book-cover-photo {
  margin-bottom: 20px;
  opacity: 0.7;
}

.book-cover-title {
  font-size: 0.75rem;
  color: rgba(212, 175, 55, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: 8px;
  font-weight: 600;
}

.book-cover-name {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.25rem;
  line-height: 1.3;
  color: #f1d79a;
  font-weight: 400;
  text-align: center;
  margin-bottom: 12px;
}

.book-cover-years {
  font-size: 0.8rem;
  color: rgba(212, 175, 55, 0.5);
  letter-spacing: 0.1em;
}

.book-spine {
  position: absolute;
  left: -14px;
  top: 0;
  width: 30px;
  height: 100%;
  background: linear-gradient(90deg, #11181d 0%, #1c252c 40%, #2c3a44 100%);
  transform: rotateY(-90deg) translateZ(0px);
  transform-origin: right center;
  border-radius: 4px 0 0 4px;
  box-shadow: inset -2px 0 8px rgba(0, 0, 0, 0.5);
}

.book-pages {
  position: absolute;
  width: calc(100% - 8px);
  height: calc(100% - 8px);
  top: 4px;
  left: 4px;
  transform: translateZ(-2px);
}

.book-page {
  position: absolute;
  width: 100%;
  height: 100%;
  background: rgba(30, 25, 40, 0.9);
  border-radius: 2px 12px 12px 2px;
  border: 1px solid rgba(255, 255, 255, 0.03);
  padding: 24px 20px;
}

.page-1 { transform: translateZ(10px); }
.page-2 { transform: translateZ(5px); }
.page-3 { transform: translateZ(0px); background: rgba(20, 15, 30, 0.9); }

.page-photo-placeholder {
  width: 100%;
  height: 80px;
  background: rgba(26, 106, 224, 0.05);
  border: 1px dashed rgba(26, 106, 224, 0.15);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.page-lines {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.page-line {
  height: 3px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 2px;
}

/* Плавающие теги у книги */
.book-float-tag {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(28, 35, 41, 0.9);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  z-index: 5;
}

.book-float-tag svg {
  color: var(--purple);
  flex-shrink: 0;
}

/* Плашки отодвинуты от книги: на обложке теперь портрет, имя и подпись –
   раньше там было пусто, и плашки лежали прямо поверх. */
/* Плашки стоят РЯДОМ с книгой, а не поверх: от края книги, а не на
   сколько-то точек внутрь – иначе ширина самой плашки решает, наедет она
   на имя и портрет или нет. */
.bf-1 {
  top: -14px;
  left: 100%;
  margin-left: 12px;
  animation: float-card 4s ease-in-out infinite;
}

.bf-2 {
  bottom: -10px;
  right: 100%;
  margin-right: 12px;
  animation: float-card 4s ease-in-out infinite;
  animation-delay: -1.5s;
}

.bf-3 {
  top: 58%;
  left: 100%;
  margin-left: 12px;
  animation: float-card 4s ease-in-out infinite;
  animation-delay: -3s;
}

@media (max-width: 1024px) {
  /* В одну колонку по бокам места нет – плашки встают над книгой и под ней */
  /* Плашка высотой 38 – выносим её целиком за край книги, иначе нижняя
     наезжает на подпись «Истории · Воспоминания · Фотографии» */
  .bf-1 { top: -48px; left: auto; right: -8px; margin-left: 0; }
  .bf-2 { bottom: -48px; right: auto; left: -8px; margin-right: 0; }
  .bf-3 { display: none; }
}

/* === Процесс создания книги === */
.book-process {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.book-process-item {
  position: relative;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 28px 28px 28px 28px;
  transition: var(--transition);
  overflow: hidden;
}

.book-process-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, var(--purple), var(--accent));
  border-radius: 4px 0 0 4px;
  opacity: 0;
  transition: opacity var(--transition);
}

.book-process-item:hover::before {
  opacity: 1;
}

.book-process-item:hover {
  border-color: rgba(120, 138, 156, 0.3);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3), 0 0 30px var(--purple-glow);
}

.bpi-number {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 2.5rem;
  font-weight: 900;
  color: rgba(120, 138, 156, 0.08);
  line-height: 1;
  letter-spacing: -0.05em;
}

.bpi-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(26, 106, 224, 0.1);
  border: 1px solid rgba(26, 106, 224, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: 16px;
}

.bpi-icon-purple {
  background: rgba(120, 138, 156, 0.1);
  border-color: rgba(120, 138, 156, 0.15);
  color: var(--purple);
}

.bpi-icon-rose {
  background: rgba(244, 63, 94, 0.1);
  border-color: rgba(244, 63, 94, 0.15);
  color: #f43f5e;
}

.book-process-item h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.book-process-item p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.65;
  margin-bottom: 14px;
}

.bpi-detail {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.bpi-badge {
  padding: 4px 12px;
  background: rgba(120, 138, 156, 0.08);
  border: 1px solid rgba(120, 138, 156, 0.15);
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--purple);
}

/* === Для живых и ушедших === */
.book-audience {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.book-audience-card {
  position: relative;
  padding: 36px;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  transition: var(--transition);
  overflow: hidden;
}

.book-audience-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
}

.bac-alive::after {
  background: linear-gradient(90deg, #22c55e, #10b981);
}

.bac-memorial::after {
  background: linear-gradient(90deg, var(--purple), #1a6ae0);
}

.book-audience-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.bac-alive:hover {
  border-color: rgba(34, 197, 94, 0.3);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 30px rgba(34, 197, 94, 0.15);
}

.bac-memorial:hover {
  border-color: rgba(120, 138, 156, 0.3);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 30px var(--purple-glow);
}

.bac-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #22c55e;
  margin-bottom: 16px;
}

.bac-icon-purple {
  background: rgba(120, 138, 156, 0.1);
  border-color: rgba(120, 138, 156, 0.2);
  color: var(--purple);
}

.bac-status {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #22c55e;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 14px;
}

.bac-status-purple {
  background: rgba(120, 138, 156, 0.1);
  border-color: rgba(120, 138, 156, 0.2);
  color: var(--purple);
}

.book-audience-card h3 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.book-audience-card p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.65;
  margin-bottom: 20px;
}

.bac-quote {
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.02);
  border-left: 3px solid rgba(120, 138, 156, 0.3);
  border-radius: 0 8px 8px 0;
}

.bac-alive .bac-quote {
  border-left-color: rgba(34, 197, 94, 0.3);
}

.bac-quote span {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.5;
}

/* === Адаптивность книги === */
@media (max-width: 1024px) {
  .book-showcase {
    grid-template-columns: 1fr;
    gap: 60px;
  }

  .book-3d-scene {
    order: -1;
  }
}

@media (max-width: 768px) {
  .book-section {
    padding: 80px 0;
  }

  .book-audience {
    grid-template-columns: 1fr;
  }

  .book-3d {
    width: 240px;
    height: 340px;
    animation: book-rotate-mobile 8s ease-in-out infinite;
  }

  .book-float-tag {
    padding: 5px 10px;
    font-size: 0.68rem;
    gap: 5px;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  }

  .book-float-tag svg {
    width: 14px;
    height: 14px;
  }

  .book-3d-scene {
    overflow: visible;
    padding: 30px 0;
  }

  /* Позиции относительно книги (через book-3d-wrapper). На обложке теперь
     портрет, имя и подпись – плашки выносим целиком выше и ниже книги,
     вбок на телефоне места нет. Книга нарисована в объёме и выходит за свою
     рамку, поэтому отступ с запасом. */
  .bf-1 {
    top: -14px;
    right: -8px;
    left: auto;
    margin-left: 0;
  }

  .bf-2 {
    bottom: -56px;
    left: -8px;
    right: auto;
    margin-right: 0;
  }

  .bf-3 {
    display: none;
  }

  .book-showcase {
    margin-bottom: 48px;
  }
}

/* === РЕЛИГИИ === */
.religions {
  position: relative;
  padding: 120px 0;
  z-index: 1;
  overflow: hidden;
}

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

.religion-card {
  text-align: center;
  padding: 40px 24px;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.religion-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--purple));
  opacity: 0;
  transition: opacity var(--transition);
}

.religion-card:hover {
  transform: translateY(-8px);
  border-color: rgba(26, 106, 224, 0.3);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.religion-card:hover::before {
  opacity: 1;
}

.rel-symbol {
  font-size: 3rem;
  margin-bottom: 16px;
  line-height: 1;
  filter: drop-shadow(0 0 20px var(--accent-glow));
}

.religion-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.religion-card p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.6;
}

/* Молитва — flow шаги */
.rel-prayer-tag {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.3);
  color: #f59e0b;
}

.rel-prayer-demo {
  margin-bottom: 60px;
}

.rel-prayer-flow {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 16px;
  margin-bottom: 32px;
}

.rel-flow-step {
  position: relative;
  flex: 1;
  max-width: 280px;
  text-align: center;
  padding: 28px 20px;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  transition: var(--transition);
}

.rel-flow-step:hover {
  border-color: rgba(26, 106, 224, 0.3);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
}

.rel-flow-step-active {
  border-color: rgba(245, 158, 11, 0.3);
  box-shadow: 0 0 40px rgba(245, 158, 11, 0.08);
}

.rel-flow-step-active:hover {
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3), 0 0 40px rgba(245, 158, 11, 0.12);
}

.rel-flow-num {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 1.8rem;
  font-weight: 900;
  color: rgba(26, 106, 224, 0.06);
  line-height: 1;
}

.rel-flow-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 16px;
  background: rgba(26, 106, 224, 0.1);
  border: 1px solid rgba(26, 106, 224, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.rel-flow-icon-purple {
  background: rgba(120, 138, 156, 0.1);
  border-color: rgba(120, 138, 156, 0.15);
  color: var(--purple);
}

.rel-flow-icon-amber {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.rel-flow-step h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.rel-flow-step p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.55;
}

.rel-flow-arrow {
  display: flex;
  align-items: center;
  padding-top: 50px;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* Уведомление */
.rel-prayer-notification {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 520px;
  margin: 0 auto;
  padding: 16px 24px;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 20px rgba(245, 158, 11, 0.06);
}

.rel-notif-bell {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 12px;
  background: rgba(245, 158, 11, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f59e0b;
  animation: bell-ring 3s ease-in-out infinite;
}

@keyframes bell-ring {
  0%, 80%, 100% { transform: rotate(0); }
  85% { transform: rotate(8deg); }
  90% { transform: rotate(-8deg); }
  95% { transform: rotate(4deg); }
}

.rel-notif-content {
  flex: 1;
}

.rel-notif-title {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.rel-notif-content p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.rel-notif-time {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Подзаголовок религий */
.rel-religions-subtitle {
  text-align: center;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 28px;
}

/* Тип молитвы в карточке */
.rel-prayer-type {
  margin-top: 12px;
  padding: 5px 14px;
  display: inline-block;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.15);
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #f59e0b;
}

/* Баннер "Каждый год" */
.rel-yearly-banner {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 48px;
  padding: 28px 36px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.06) 0%, rgba(26, 106, 224, 0.04) 100%);
  border: 1px solid rgba(245, 158, 11, 0.15);
  border-radius: var(--radius);
  transition: var(--transition);
}

.rel-yearly-banner:hover {
  border-color: rgba(245, 158, 11, 0.3);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3), 0 0 30px rgba(245, 158, 11, 0.08);
}

.rel-yearly-icon {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border-radius: 18px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f59e0b;
  animation: yearly-glow 3s ease-in-out infinite;
}

@keyframes yearly-glow {
  0%, 100% { box-shadow: 0 0 0 rgba(245, 158, 11, 0); }
  50% { box-shadow: 0 0 30px rgba(245, 158, 11, 0.15); }
}

.rel-yearly-text h4 {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 6px;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.rel-yearly-text p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.65;
}

/* Адаптивность молитв */
@media (max-width: 768px) {
  .rel-prayer-flow {
    flex-direction: column;
    align-items: center;
  }

  .rel-flow-arrow {
    transform: rotate(90deg);
    padding: 0;
  }

  .rel-flow-step {
    max-width: 100%;
  }

  .rel-yearly-banner {
    flex-direction: column;
    text-align: center;
    padding: 24px;
  }
}

/* === AI СЕКЦИЯ === */
.ai-section {
  position: relative;
  padding: 120px 0;
  z-index: 1;
}

.ai-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.ai-features-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 36px;
}

.ai-feat {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.ai-feat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(26, 106, 224, 0.1);
  border: 1px solid rgba(26, 106, 224, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}

.ai-feat h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.ai-feat p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.5;
}

/* AI Чат демо */
.ai-demo {
  perspective: 1000px;
}

.ai-chat-window {
  background: rgba(28, 35, 41, 0.9);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.4), 0 0 40px var(--accent-glow);
  transform: rotateY(-5deg) rotateX(2deg);
  transition: transform 0.5s ease;
}

.ai-chat-window:hover {
  transform: rotateY(0deg) rotateX(0deg);
}

.ai-chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  background: rgba(17, 24, 29, 0.5);
}

.ai-avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  color: white;
}

.ai-name {
  display: block;
  font-weight: 700;
  font-size: 0.95rem;
}

.ai-status {
  display: block;
  font-size: 0.75rem;
  color: #22c55e;
}

.ai-chat-messages {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 200px;
}

.ai-msg {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 0.88rem;
  line-height: 1.5;
  animation: msg-appear 0.5s ease forwards;
}

.ai-msg-bot {
  background: rgba(26, 106, 224, 0.1);
  border: 1px solid rgba(26, 106, 224, 0.2);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.ai-msg-user {
  background: rgba(120, 138, 156, 0.15);
  border: 1px solid rgba(120, 138, 156, 0.2);
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

@keyframes msg-appear {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.ai-quick-actions {
  display: flex;
  gap: 8px;
  padding: 16px 20px;
  border-top: 1px solid var(--border-light);
  flex-wrap: wrap;
}

.ai-quick-btn {
  padding: 8px 14px;
  background: rgba(26, 106, 224, 0.08);
  border: 1px solid rgba(26, 106, 224, 0.2);
  border-radius: 100px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.ai-quick-btn:hover {
  background: rgba(26, 106, 224, 0.15);
  transform: translateY(-2px);
}

/* === УСЛУГИ === */
.services-section {
  position: relative;
  padding: 120px 0;
  z-index: 1;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 60px;
}

.service-card {
  text-align: center;
  padding: 36px 20px;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  transition: var(--transition);
}

.service-card:hover {
  transform: translateY(-8px);
  border-color: rgba(26, 106, 224, 0.3);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.svc-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  background: rgba(26, 106, 224, 0.1);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.service-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.service-card p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.6;
}

/* Процесс заказа */
.order-process {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 40px;
}

.order-process h3 {
  text-align: center;
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 32px;
}

.process-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.process-step {
  text-align: center;
  flex: 1;
  min-width: 140px;
}

.ps-num {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  color: white;
}

.process-step p {
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.process-arrow {
  color: var(--text-muted);
  font-size: 1.5rem;
  font-weight: 300;
}

/* === КАК ЭТО РАБОТАЕТ (ТАЙМЛАЙН) === */
.how-section {
  position: relative;
  padding: 120px 0;
  z-index: 1;
}

.timeline {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 23px;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--purple), transparent);
}

.timeline-item {
  display: flex;
  gap: 24px;
  margin-bottom: 36px;
  position: relative;
}

.timeline-dot {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 0 20px var(--accent-glow);
  z-index: 1;
}

.timeline-content {
  flex: 1;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 24px;
  transition: var(--transition);
}

.timeline-content:hover {
  border-color: rgba(26, 106, 224, 0.3);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.timeline-content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.timeline-content p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 14px;
  line-height: 1.6;
}

.timeline-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.timeline-tags span {
  padding: 4px 12px;
  background: rgba(26, 106, 224, 0.08);
  border: 1px solid rgba(26, 106, 224, 0.15);
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
}

/* === СКАЧАТЬ === */
.download {
  position: relative;
  padding: 120px 0;
  z-index: 1;
}

.download-card {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.download-bg-orb {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(26, 106, 224, 0.15) 0%, transparent 70%);
  top: -200px;
  left: -100px;
  pointer-events: none;
  animation: glow-float 10s ease-in-out infinite;
}

.orb-2 {
  background: radial-gradient(circle, rgba(120, 138, 156, 0.12) 0%, transparent 70%);
  top: auto;
  bottom: -200px;
  left: auto;
  right: -100px;
  animation-delay: -5s;
}

.download-inner {
  position: relative;
  text-align: center;
  padding: 80px 40px;
}

.download-inner h2 {
  font-size: 2.8rem;
  font-weight: 900;
  margin-bottom: 16px;
  letter-spacing: -0.03em;
}

.download-inner p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 40px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.store-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.store-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 28px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 14px;
  text-decoration: none;
  color: var(--text-primary);
  transition: var(--transition);
}

.store-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3), 0 0 20px var(--accent-glow);
}

.store-icon {
  width: 30px;
  height: 30px;
}

.store-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.store-label {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.store-name {
  font-size: 1.15rem;
  font-weight: 700;
}

.download-features {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
}

.download-features > span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 500;
}

.download-features svg {
  color: #22c55e;
}

/* === ФУТЕР === */
.footer {
  padding: 48px 0;
  border-top: 1px solid var(--border-light);
  position: relative;
  z-index: 1;
}

.footer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-logo {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid rgba(10, 19, 23, 0.12);
}

.footer-name {
  font-weight: 800;
  font-size: 1.1rem;
}

.footer-tagline {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px 24px;
  margin-top: 4px;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color var(--transition);
  white-space: nowrap;
}

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

.footer-copy {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* === REVEAL ANIMATION === */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* === TILT 3D ЭФФЕКТ НА КАРТОЧКАХ === */
.tilt-card {
  transform-style: preserve-3d;
  will-change: transform;
}

/* === АДАПТИВНОСТЬ === */
/* Седьмой пункт меню «Цены» (сентябрь 2026) снова не влез: на 1025–1070 px
   английское меню переносилось на вторую строку, русское упиралось в
   переключатель языков. Сворачиваем шапку в бургер уже с 1100 px — только
   шапку, остальная вёрстка планшета по-прежнему начинается с 1024 px. */
@media (max-width: 1100px) {
  .nav-links { display: none; }
  .mobile-menu-btn { display: flex; }
}

@media (max-width: 1024px) {
  /* Шапка уходит в бургер уже здесь, а не с 768px: пунктов шесть, и один
     из них — «Игры и практики». В строку они перестают помещаться раньше,
     чем начинается мобильная вёрстка, и наезжали на логотип. */
  .nav-links { display: none; }
  .mobile-menu-btn { display: flex; }

  /* На планшете колонка становится слишком узкой для длинного заголовка —
     раскладываем первый экран в одну колонку, тексту достаётся вся ширина */
  .hero-container {
    grid-template-columns: 1fr;
    gap: 36px;
    text-align: center;
  }

  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-buttons,
  .hero-stats {
    justify-content: center;
  }

  .hero-phone-scene {
    display: flex;
    justify-content: center;
  }

  .hero-content h1 {
    font-size: 2.3rem;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .religion-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .ai-container {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .section-header.left {
    text-align: center;
  }

  .section-title.left {
    text-align: center;
  }

  .section-subtitle.left {
    text-align: center;
    margin: 0 auto;
  }

  .ai-features-list {
    max-width: 500px;
    margin: 36px auto 0;
  }
}

@media (max-width: 768px) {
  /* Навигация — убираем полупрозрачность чтобы частицы не мерцали сквозь шапку */
  .navbar {
    background: rgba(17, 24, 29, 0.97);
    padding: 12px 0;
  }
  .nav-links { display: none; }
  .mobile-menu-btn { display: flex; }
  /* На мобиле языки слева от бургера — компактный размер */
  .navbar .lang-switcher { padding: 2px; gap: 0; }
  .navbar .lang-btn { padding: 5px 9px; font-size: 0.7rem; }

  /* Hero */
  .hero { padding: 100px 0 50px; min-height: auto; }
  .hero-container { grid-template-columns: 1fr; gap: 32px; text-align: center; }
  .hero-content h1 { font-size: 2.1rem; }
  .hero-subtitle { margin: 0 auto 28px; font-size: 1rem; }
  .hero-buttons { justify-content: center; }
  .hero-stats { justify-content: center; gap: 20px; }
  .hero-phone-scene { max-width: 100%; display: flex; justify-content: center; }
  .phone-3d-wrapper { animation: phone-float 6s ease-in-out infinite; transform-origin: center; }
  .phone-mockup { width: 200px; height: 410px; }
  .floating-card { padding: 7px 10px; font-size: 0.7rem; border-radius: 10px; }
  .fc-icon { width: 26px; height: 26px; border-radius: 6px; }
  .fc-icon svg { width: 14px; height: 14px; }
  .floating-card span { max-width: 80px; overflow: hidden; text-overflow: ellipsis; }
  .float-1 { left: -30px; top: 50px; }
  .float-2 { right: -40px; top: 140px; }
  .float-3 { left: -35px; bottom: 140px; }
  .float-4 { right: -30px; bottom: 50px; }
  .scroll-indicator { display: none; }
  .hero-glow, .hero-glow-2 { display: none; }

  /* Общие */
  .section-title { font-size: 2rem; }
  .section-subtitle { font-size: 0.95rem; }
  .container { padding: 0 20px; }

  /* GPS профиль */
  .gps-section { padding: 70px 0; }
  .gps-map-surface { max-width: 90vw; }
  .gps-profile-card { max-width: 90vw; }
  .gps-bg-glow, .gps-bg-glow-2 { display: none; }
  .gps-fact-icon { width: 44px; height: 44px; }

  /* Книга жизни */
  .book-section { padding: 70px 0; }
  .book-bg-glow, .book-bg-glow-2 { display: none; }
  .book-3d { width: 240px; height: 340px; animation: book-rotate-mobile 8s ease-in-out infinite; }
  .book-audience-card { padding: 24px; }

  /* AI */
  .ai-container { gap: 30px; }
  .ai-chat-window { transform: none; max-width: 100%; }
  .ai-features-list { max-width: 100%; }

  /* Религии */
  .rel-symbol { font-size: 2.2rem; }
  .rel-yearly-icon { width: 48px; height: 48px; }

  /* Возможности */
  .features-grid, .religion-cards { grid-template-columns: 1fr; }
  .feature-card { padding: 24px; }
  .feature-icon { width: 44px; height: 44px; }

  /* Услуги */
  .services-grid { grid-template-columns: 1fr; }
  .process-arrow { display: none; }
  .process-steps { gap: 16px; flex-wrap: wrap; }
  .process-step { min-width: 120px; flex: 0 1 calc(50% - 8px); }

  /* Таймлайн */
  .timeline-dot { width: 40px; height: 40px; }
  .timeline-content { padding: 20px; }

  /* Скачать */
  .download-inner { padding: 40px 24px; }
  .download-inner h2 { font-size: 2rem; }
  .download-features { gap: 16px; flex-wrap: wrap; justify-content: center; }

  /* Исторические */
  .historical-section { padding: 70px 0; }
  .hist-showcase { gap: 40px; }
  .hist-profile-card { width: 280px; max-width: 90vw; }
  .hist-monument { min-height: 360px; }
  .hist-glow-ring { display: none; }
  .hist-pedestal { transform: rotateX(45deg) rotateZ(-45deg) scale(0.8); }

  /* Футер */
  .footer { padding: 32px 0; }

  /* Отключаем тяжёлые 3D на мобилках */
  .tilt-card { transform-style: flat !important; }
  .tilt-card:hover { transform: none !important; }
  .gps-map-3d { animation: none; }
}

/* === ИСТОРИЧЕСКИЕ ЛИЧНОСТИ === */
.historical-section {
  padding: 100px 0;
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--bg-primary) 0%, #182027 50%, var(--bg-primary) 100%);
}

.hist-tag {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.15), rgba(234, 179, 8, 0.05)) !important;
  color: #eab308 !important;
  border-color: rgba(234, 179, 8, 0.3) !important;
}

.hist-showcase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  margin-top: 60px;
}

/* 3D Монумент */
.hist-monument {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 460px;
  perspective: 1000px;
}

.hist-pedestal {
  position: absolute;
  bottom: 20px;
  width: 220px;
  height: 60px;
  transform-style: preserve-3d;
  transform: rotateX(55deg) rotateZ(-45deg);
}

.hist-pedestal-top {
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #27313a, #334155);
  border-radius: 8px;
  transform: translateZ(20px);
  box-shadow: 0 0 40px rgba(234, 179, 8, 0.15);
}

.hist-pedestal-front {
  position: absolute;
  width: 100%;
  height: 40px;
  background: linear-gradient(180deg, #334155, #27313a);
  border-radius: 0 0 8px 8px;
  transform: rotateX(-90deg) translateZ(-20px) translateY(-20px);
}

.hist-pedestal-side {
  position: absolute;
  width: 40px;
  height: 100%;
  right: 0;
  background: linear-gradient(180deg, #293548, #1a2332);
  border-radius: 0 8px 8px 0;
  transform: rotateY(90deg) translateZ(90px) translateX(20px);
}

/* Профиль-карточка */
.hist-profile-card {
  position: relative;
  z-index: 2;
  background: linear-gradient(145deg, rgba(28, 35, 41, 0.95), rgba(40, 50, 58, 0.9));
  border: 1px solid rgba(234, 179, 8, 0.25);
  border-radius: 20px;
  padding: 30px;
  width: 320px;
  text-align: center;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.4),
    0 0 40px rgba(234, 179, 8, 0.08),
    inset 0 1px 0 rgba(234, 179, 8, 0.1);
  animation: histCardFloat 6s ease-in-out infinite;
  transform-style: preserve-3d;
}

@keyframes histCardFloat {
  0%, 100% { transform: translateY(0) rotateX(2deg) rotateY(-2deg); }
  50% { transform: translateY(-12px) rotateX(-2deg) rotateY(2deg); }
}

.hist-profile-avatar {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0 auto 16px;
}

.hist-avatar-placeholder {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #27313a, #334155);
  border: 3px solid rgba(234, 179, 8, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
}

.hist-badge-star {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #eab308, #f59e0b);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #11181d;
  box-shadow: 0 2px 8px rgba(234, 179, 8, 0.4);
  animation: histStarPulse 2s ease-in-out infinite;
}

@keyframes histStarPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 2px 8px rgba(234, 179, 8, 0.4); }
  50% { transform: scale(1.15); box-shadow: 0 2px 16px rgba(234, 179, 8, 0.6); }
}

.hist-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #eab308;
  background: rgba(234, 179, 8, 0.1);
  border: 1px solid rgba(234, 179, 8, 0.2);
  border-radius: 20px;
  padding: 4px 12px;
  margin-bottom: 10px;
}

.hist-profile-name {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.hist-profile-dates {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  letter-spacing: 2px;
}

.hist-profile-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 16px;
}

.hist-profile-stats {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.hist-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.hist-stat svg {
  color: #eab308;
  opacity: 0.7;
}

/* Звезда-бейдж */
.hist-star-badge {
  position: absolute;
  top: 10px;
  right: calc(50% - 160px - 30px);
  font-size: 2rem;
  color: #eab308;
  filter: drop-shadow(0 0 12px rgba(234, 179, 8, 0.5));
  animation: histStarSpin 8s linear infinite;
  z-index: 3;
}

@keyframes histStarSpin {
  0% { transform: rotate(0deg) scale(1); }
  25% { transform: rotate(10deg) scale(1.1); }
  50% { transform: rotate(0deg) scale(1); }
  75% { transform: rotate(-10deg) scale(1.1); }
  100% { transform: rotate(0deg) scale(1); }
}

/* Кольца свечения */
.hist-glow-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 350px;
  height: 350px;
  border-radius: 50%;
  border: 1px solid rgba(234, 179, 8, 0.1);
  transform: translate(-50%, -50%);
  animation: histRingExpand 4s ease-out infinite;
}

.hist-glow-ring-2 {
  animation-delay: 2s;
}

@keyframes histRingExpand {
  0% { width: 200px; height: 200px; opacity: 0.4; border-color: rgba(234, 179, 8, 0.2); }
  100% { width: 500px; height: 500px; opacity: 0; border-color: rgba(234, 179, 8, 0); }
}

/* Карточки преимуществ */
.hist-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.hist-feat-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 24px;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.hist-feat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #eab308, transparent);
  opacity: 0;
  transition: opacity 0.4s;
}

.hist-feat-card:hover {
  border-color: rgba(234, 179, 8, 0.2);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(234, 179, 8, 0.08);
}

.hist-feat-card:hover::before {
  opacity: 1;
}

.hist-feat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(234, 179, 8, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: #eab308;
}

.hist-feat-icon-blue {
  background: rgba(26, 106, 224, 0.1);
  color: #3b82f6;
}

.hist-feat-icon-emerald {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.hist-feat-icon-rose {
  background: rgba(244, 63, 94, 0.1);
  color: #f43f5e;
}

.hist-feat-card h4 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.hist-feat-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Задержки анимации карточек */
.hist-feat-card-1 { transition-delay: 0s; }
.hist-feat-card-2 { transition-delay: 0.1s; }
.hist-feat-card-3 { transition-delay: 0.2s; }
.hist-feat-card-4 { transition-delay: 0.3s; }

/* Цитата */
.hist-quote {
  margin-top: 60px;
  text-align: center;
  position: relative;
  padding: 40px;
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.04), rgba(234, 179, 8, 0.01));
  border: 1px solid rgba(234, 179, 8, 0.1);
  border-radius: 20px;
}

.hist-quote-mark {
  font-size: 4rem;
  color: #eab308;
  opacity: 0.3;
  line-height: 1;
  margin-bottom: -10px;
  font-family: Georgia, serif;
}

.hist-quote p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 700px;
  margin: 0 auto;
  font-style: italic;
}

/* Фоновые частицы */
.hist-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hist-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: #eab308;
  border-radius: 50%;
  opacity: 0;
  animation: histParticleFloat 8s ease-in-out infinite;
}

.hist-p1 { top: 20%; left: 10%; animation-delay: 0s; }
.hist-p2 { top: 60%; left: 85%; animation-delay: 1.5s; }
.hist-p3 { top: 40%; left: 5%; animation-delay: 3s; }
.hist-p4 { top: 80%; left: 70%; animation-delay: 4.5s; }
.hist-p5 { top: 15%; left: 90%; animation-delay: 6s; }

@keyframes histParticleFloat {
  0% { opacity: 0; transform: translateY(20px) scale(0.5); }
  20% { opacity: 0.6; }
  80% { opacity: 0.6; }
  100% { opacity: 0; transform: translateY(-60px) scale(1.2); }
}

/* Адаптивность исторические */
@media (max-width: 1024px) {
  .hist-showcase {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hist-monument {
    min-height: 380px;
  }
}

@media (max-width: 768px) {
  .hist-features {
    grid-template-columns: 1fr;
  }

  .hist-profile-card {
    width: 280px;
    padding: 24px;
  }

  .hist-monument {
    min-height: 360px;
  }

  .hist-quote {
    padding: 24px;
  }

  .hist-quote p {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  /* Контейнер */
  .container { padding: 0 16px; }

  /* Hero */
  .hero { padding: 80px 0 40px; }
  .hero-content h1 { font-size: 1.35rem; }
  .hero-subtitle { font-size: 0.9rem; }
  .hero-stats { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .stat-number { font-size: 1.4rem; }
  .stat-label { font-size: 0.7rem; }
  .hero-buttons { flex-direction: column; align-items: center; }
  .btn { padding: 12px 24px; font-size: 0.9rem; }
  .phone-mockup { width: 160px; height: 330px; border-radius: 28px; padding: 6px; }
  .phone-screen { border-radius: 22px; }
  .floating-card { padding: 5px 8px; font-size: 0.65rem; gap: 6px; }
  .fc-icon { width: 22px; height: 22px; }
  .fc-icon svg { width: 12px; height: 12px; }
  .float-1 { left: -85px; top: 40px; }
  .float-2 { right: -90px; top: 120px; }
  .float-3 { left: -65px; bottom: 120px; }
  .float-4 { right: -70px; bottom: 40px; }

  /* Общие */
  .section-title { font-size: 1.7rem; }
  .section-subtitle { font-size: 0.85rem; }
  .section-tag { font-size: 0.7rem; padding: 6px 14px; }

  /* GPS профиль */
  .gps-section { padding: 50px 0; }
  .gps-map-surface { width: 240px; height: 240px; max-width: 85vw; }
  .gps-map-scene { min-height: 300px; }
  .gps-fact-icon { width: 36px; height: 36px; }
  .gps-fact { padding: 16px; }
  .gps-problem { padding: 16px; font-size: 0.9rem; }

  /* Книга жизни */
  .book-section { padding: 50px 0; }
  .book-3d { width: 240px; height: 340px; animation: book-rotate-small 8s ease-in-out infinite; }
  .book-3d-scene { min-height: 280px; }
  .book-audience-card { padding: 20px; }
  .book-process-item { padding: 16px; }

  /* AI */
  .ai-section { padding: 50px 0; }
  .ai-msg { max-width: 92%; font-size: 0.8rem; }
  .ai-feat { padding: 16px; }

  /* Религии */
  .religions-section { padding: 50px 0; }
  .rel-symbol { font-size: 1.8rem; }
  .religion-card { padding: 20px; }
  .rel-flow-step { padding: 16px; }
  .rel-yearly-banner { padding: 20px; }
  .rel-yearly-icon { width: 40px; height: 40px; }

  /* Возможности */
  .features { padding: 50px 0; }
  .feature-card { padding: 20px; }
  .feature-icon { width: 40px; height: 40px; }

  /* Таймлайн */
  .timeline-dot { width: 32px; height: 32px; }
  .timeline-dot svg { width: 16px; height: 16px; }
  .timeline-content { padding: 16px; }
  .timeline-item { padding-left: 52px; }

  /* Скачать */
  .store-buttons { flex-direction: column; align-items: center; }
  .store-btn { width: 100%; max-width: 280px; justify-content: center; }
  .download-inner { padding: 32px 16px; }
  .download-inner h2 { font-size: 1.7rem; }
  .download-features { gap: 8px; font-size: 0.8rem; }

  /* Исторические */
  .historical-section { padding: 50px 0; }
  .hist-monument { min-height: 300px; }
  .hist-profile-card { width: 260px; max-width: 88vw; padding: 20px; }
  .hist-profile-name { font-size: 1.1rem; }
  .hist-feat-card { padding: 18px; }
  .hist-quote { padding: 20px; }
  .hist-quote p { font-size: 0.9rem; }
  .hist-quote-mark { font-size: 3rem; }
  .hist-pedestal { display: none; }
  .hist-star-badge { font-size: 1.5rem; right: calc(50% - 130px - 20px); }
  .hist-particles { display: none; }

  /* Футер */
  .footer { padding: 24px 0; }
  .footer-name { font-size: 0.95rem; }
  .footer-tagline { font-size: 0.8rem; }
}

/* Очень маленькие экраны (SE, Galaxy S) */
@media (max-width: 375px) {
  .hero-content h1 { font-size: 1.25rem; }
  .hero-subtitle { font-size: 0.85rem; }
  .phone-mockup { width: 140px; height: 290px; border-radius: 24px; padding: 5px; }
  .phone-screen { border-radius: 19px; }
  .stat-number { font-size: 1.2rem; }
  .stat-label { font-size: 0.65rem; }
  .section-title { font-size: 1.5rem; }
  .section-subtitle { font-size: 0.8rem; }
  .gps-map-surface { width: 200px; height: 200px; }
  .book-3d { width: 240px; height: 340px; animation: book-rotate-xs 8s ease-in-out infinite; }
  .floating-card { padding: 4px 6px; font-size: 0.6rem; gap: 4px; }
  .fc-icon { width: 18px; height: 18px; }
  .fc-icon svg { width: 10px; height: 10px; }
  .float-1 { left: -72px; top: 30px; }
  .float-2 { right: -75px; top: 100px; }
  .float-3 { left: -55px; bottom: 100px; }
  .float-4 { right: -58px; bottom: 30px; }
  .hist-profile-card { width: 230px; padding: 16px; }
  .hist-profile-name { font-size: 1rem; }
}

/* === РОДОВОЕ ДРЕВО (большая секция) === */
.tree-section {
  position: relative;
  padding: 100px 0 30px;
  overflow: hidden;
  background: linear-gradient(180deg, var(--bg-primary), #0b1120 50%, var(--bg-primary));
}
.tree-bg-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 175, 110, 0.1), transparent 65%);
  top: -120px;
  left: -150px;
  pointer-events: none;
}
.tree-bg-glow-2 {
  background: radial-gradient(circle, rgba(180, 200, 255, 0.08), transparent 65%);
  top: auto;
  bottom: -150px;
  left: auto;
  right: -150px;
}
.tree-tag {
  background: rgba(212, 175, 110, 0.1);
  border-color: rgba(212, 175, 110, 0.28);
  color: #E8C88A;
}
.tree-title-gradient {
  background: linear-gradient(120deg, #F5D89E, #D4AF6E);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.tree-showcase {
  position: relative;
  z-index: 1;
  margin-top: 48px;
}

/* --- Сцена с древом --- */
.tree-stage-scene {
  display: flex;
  justify-content: center;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.tree-stage-scene.in {
  opacity: 1;
  transform: none;
}
.tree-stage {
  position: relative;
  width: 100%;
  max-width: 460px;
  padding: 30px 20px 16px;
  border-radius: 28px;
  background: #dfe4eb;
  border: 1px solid #d9dee6;
  box-shadow: 0 30px 80px rgba(15, 27, 45, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.tree-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

/* подписи узлов */
.t-name {
  text-anchor: middle;
  font-family: inherit;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.2px;
}
.t-role {
  text-anchor: middle;
  font-family: inherit;
  font-weight: 500;
  font-size: 9.5px;
}
.t-name-gold { fill: #0f1b2d; }
.t-role-gold { fill: #636d80; }
.t-name-blue { fill: #2e3a52; }
.t-role-blue { fill: #6b7794; }

/* анимация (стартует, когда сцена попадает в кадр) */
/* базовое (скрытое) состояние — пока сцена не в кадре */
.t-line {
  fill: none;
  stroke: #5f6b7e;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 300;
  stroke-dashoffset: 300;
}
.t-node {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}
.t-glow { opacity: 0; }
.t-selfglow {
  opacity: 0.5;
  transform-box: fill-box;
  transform-origin: center;
}
/* анимации запускаются (и переигрываются), когда сцена въезжает в кадр */
.tree-stage-scene.in .t-line {
  animation: tLineDraw 0.5s cubic-bezier(0.65, 0, 0.35, 1) both;
}
.tree-stage-scene.in .t-node {
  animation: tNodeIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.tree-stage-scene.in .t-glow {
  animation: tGlowIn 0.6s ease both;
}
.tree-stage-scene.in .t-selfglow {
  animation: tSelfBreath 3.4s ease-in-out 0.3s infinite;
}
@keyframes tLineDraw { to { stroke-dashoffset: 0; } }
@keyframes tNodeIn {
  from { opacity: 0; transform: translateY(9px) scale(0.85); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes tGlowIn { to { opacity: 1; } }
@keyframes tSelfBreath {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 0.78; transform: scale(1.07); }
}

/* плавающие плашки */
.tree-float-tag {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  background: rgba(28, 35, 41, 0.92);
  border: 1px solid rgba(212, 175, 110, 0.25);
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  white-space: nowrap;
}
.tree-float-tag svg { color: #a8742a; }
.tft-1 { top: 36px; right: -14px; animation: htreeFloat 5.5s ease-in-out infinite; }
.tft-2 { bottom: 70px; left: -18px; animation: htreeFloat 6.5s ease-in-out infinite 0.6s; }
@keyframes htreeFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

/* легенда */
.tree-legend {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 6px;
}
.tree-legend-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}
.tree-legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}
.tld-gold { background: #a8742a; box-shadow: none; }
.tld-blue { background: #7f93c4; box-shadow: none; }

/* три пункта под древом */
.tree-points {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 56px;
}
.tree-point {
  position: relative;
  padding: 28px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  transition: var(--transition);
}
.tree-point-soon {
  border-style: dashed;
  border-color: rgba(212, 175, 110, 0.3);
  background: rgba(212, 175, 110, 0.04);
}
.tp-soon {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 4px 11px;
  border-radius: 100px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #11181d;
  background: linear-gradient(120deg, #F5D89E, #D4AF6E);
  box-shadow: 0 4px 14px rgba(212, 175, 110, 0.35);
}
.tree-point:hover {
  border-color: rgba(212, 175, 110, 0.3);
  background: var(--bg-card-hover);
}
.tp-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  background: rgba(212, 175, 110, 0.12);
  color: #E8C88A;
}
.tp-icon-blue { background: rgba(180, 200, 255, 0.12); color: #B4C8FF; }
.tp-icon-amber { background: rgba(245, 158, 11, 0.12); color: #fbbf24; }
.tree-point h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}
.tree-point p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

@media (max-width: 900px) {
  .tree-points { grid-template-columns: 1fr; max-width: 480px; margin-left: auto; margin-right: auto; }
}
@media (max-width: 640px) {
  .tree-section { padding: 70px 0 20px; }
  .tree-stage { max-width: 360px; padding: 24px 14px 14px; }
  .tft-1 { right: 4px; }
  .tft-2 { left: 0; }
}

/* === МЕНЮ С РАЗДЕЛАМИ (выпадающие списки) ===
   Раньше в шапке были только якоря по главной, поэтому настоящие разделы —
   конструктор древа, гербовник, статьи — были не видны. Состав пунктов
   лежит в src/i18n/menu.ts. Открывается без JS: мышью — :hover,
   с клавиатуры — :focus-within, на телефоне — обычный <details>. */

.nav-links {
  align-items: center;
  gap: 24px;
}

/* Пункт, у которого есть выпадающий список */
.nav-group {
  position: relative;
}

.nav-group-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  transition: color var(--transition);
}

.nav-chevron {
  opacity: 0.7;
  transition: transform var(--transition);
}

.nav-group:hover .nav-group-btn,
.nav-group:focus-within .nav-group-btn {
  color: var(--text-primary);
}

.nav-group:hover .nav-chevron,
.nav-group:focus-within .nav-chevron {
  transform: rotate(180deg);
}

/* Сам список. Верхний отступ — «мостик»: пока мышь идёт от пункта
   к списку, она не выходит за пределы блока и список не схлопывается */
.nav-dropdown {
  position: absolute;
  top: 100%;
  left: -14px;
  padding-top: 14px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
}

.nav-group:hover .nav-dropdown,
.nav-group:focus-within .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-card {
  min-width: 268px;
  padding: 8px;
  /* Панель светлая: текст в ней берёт цвета темы, и на тёмной подложке
     он стал нечитаемым, когда сайт перешёл на светлую гамму. */
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(10, 19, 23, 0.16);
}

.nav-links a.nav-drop-link {
  display: block;
  padding: 10px 12px;
  border-radius: 11px;
  color: var(--text-secondary);
  transition: background var(--transition);
}

/* У обычных пунктов шапки есть подчёркивание на ховере — внутри списка оно лишнее */
.nav-links a.nav-drop-link::after {
  display: none;
}

.nav-links a.nav-drop-link:hover {
  background: rgba(26, 106, 224, 0.12);
}

.nav-drop-title {
  display: block;
  color: var(--text-primary);
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.3;
}

.nav-drop-hint {
  display: block;
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 0.775rem;
  font-weight: 400;
  line-height: 1.35;
}

/* «Скачать» — единственное действие, поэтому кнопкой, а не ссылкой */
.nav-links a.nav-cta {
  padding: 8px 16px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 14px var(--accent-glow);
  transition: background var(--transition), transform var(--transition);
}

.nav-links a.nav-cta::after {
  display: none;
}

.nav-links a.nav-cta:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

/* --- Телефон: те же разделы, но списком-гармошкой --- */
.mobile-menu {
  align-items: stretch;
  text-align: center;
}

/* Одиночные пункты держат тот же ритм, что и раскрывающиеся разделы */
.mobile-menu > a {
  padding: 4px 0 12px;
  border-bottom: 1px solid var(--border-light);
}

.mobile-menu > a.m-cta {
  border-bottom: none;
}

.mobile-menu a.m-cta {
  align-self: center;
  padding: 10px 26px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

.m-group {
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 12px;
}

.m-group-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 4px 0;
  color: var(--text-secondary);
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

/* Убираем стандартный треугольник <details> — у нас своя стрелка */
.m-group-title::-webkit-details-marker { display: none; }
.m-group-title::marker { content: ''; }

.m-group[open] .m-group-title {
  color: var(--text-primary);
}

.m-group[open] .nav-chevron {
  transform: rotate(180deg);
}

.m-group-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 12px;
}

.mobile-menu .m-group-links a {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* === ГИБРИД (21.09.2026): крупный первый экран + белые блоки ===
   Синий фон и движение остаются, телефон показывает семью с лицами,
   часть блоков ниже — белые, чтобы страница не сливалась в одну синеву. */

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #93c5fd;
  margin-bottom: 22px;
}

.hero-content h1 {
  font-size: clamp(2.6rem, 4.4vw, 4.1rem);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -0.035em;
  max-width: 640px;
  margin-bottom: 22px;
}

.hero-accent {
  background: linear-gradient(120deg, #60a5fa 0%, #3b82f6 45%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero .btn-primary {
  padding: 16px 30px;
  font-size: 1rem;
  font-weight: 700;
}

@media (max-width: 768px) {
  .hero { padding: 88px 0 40px; }
  /* На телефоне телефон-картинка идёт сразу за кнопками, цифры — под ней:
     две трети людей не листают дальше первого экрана */
  .hero-content { display: contents; }
  .hero-container { gap: 0; }
  .hero-kicker { order: 1; justify-content: center; font-size: 0.8rem; margin-bottom: 14px; }
  .hero-content h1 { order: 1; font-size: 2.35rem; margin: 0 auto 14px; }
  .hero-subtitle { order: 1; margin-bottom: 20px; }
  .hero-buttons { order: 1; margin-bottom: 28px; }
  .hero-buttons .btn { flex: 1 1 100%; justify-content: center; }
  .hero-phone-scene { order: 2; margin-bottom: 28px; }
  .hero-stats { order: 3; }
}

@media (max-width: 400px) {
  .hero-content h1 { font-size: 2.1rem; }
}

/* Белый блок: те же секции, переменные цвета перевёрнуты на светлые */
.section-light {
  --text-primary: #151c21;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --border: rgba(15, 23, 42, 0.1);
  --border-light: rgba(15, 23, 42, 0.06);
  position: relative;
  z-index: 1;
  background: #f5f7fb;
  color: var(--text-primary);
}

.section-light .section-tag {
  background: rgba(26, 106, 224, 0.08);
  border-color: rgba(26, 106, 224, 0.25);
  color: #2563eb;
}

/* Карточка «Книга жизни» у телефона ниже и правее: в телефоне теперь сын с подписью */
.hero .float-4 { bottom: 4px; right: -100px; }
@media (max-width: 768px) {
  .hero .float-4 { bottom: 24px; right: -34px; }
}

/* Окно Family Copilot остаётся тёмным и внутри белого блока: в приложении
   этот экран тёмно-золотой при любой теме, и сайт не должен обещать другого.
   Сцена древа, наоборот, следует теме приложения – она светлая. */
.section-light .ai-chat-window {
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #7c8aa3;
  --bg-card: rgba(28, 35, 41, 0.8);
  --border: rgba(96, 108, 118, 0.6);
  --border-light: rgba(96, 108, 118, 0.3);
  color: #f1f5f9;
  background: linear-gradient(160deg, #1b160f 0%, #0d1220 100%);
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.28);
}

/* Шапка над белыми блоками: полупрозрачная серела и глушила ссылки */
.navbar { background: rgba(17, 24, 29, 0.94); }

.section-light .ai-chat-window { background: #182127; }

/* Телефон на узком экране крупнее: на 200 px лица и подписи были не различить */
@media (max-width: 768px) {
  .hero .phone-mockup { width: 244px; height: 500px; border-radius: 36px; }
  .hero-subtitle { line-height: 1.55; }
  .hero-buttons { gap: 10px; }
  .hero-buttons .btn { padding-top: 13px; padding-bottom: 13px; }
  /* четвёртая карточка закрывала кнопку внутри телефона — на узком экране хватит трёх */
  .hero .float-4 { display: none; }
  .hero .float-1 { left: -26px; top: 70px; }
  .hero .float-2 { right: -34px; top: 190px; }
  .hero .float-3 { left: -30px; bottom: 120px; }
}
@media (max-width: 768px) {
  /* карточки уходят к краям экрана, чтобы не закрывать лица и плашку в телефоне */
  .hero .float-1 { left: -62px; top: 128px; }
  .hero .float-2 { right: -62px; top: 300px; }
  .hero .float-3 { left: -62px; bottom: 96px; }
}
@media (max-width: 768px) {
  /* три числа в один ряд: «101» больше не висит отдельной строкой */
  .hero-stats { flex-wrap: nowrap; gap: 6px; align-items: flex-start; }
  .hero-stats .stat { flex: 1 1 0; min-width: 0; }
  .hero-stats .stat-divider { display: none; }
  .hero-stats .stat-number { font-size: 1.65rem; }
  .hero-stats .stat-label { display: block; font-size: 0.72rem; line-height: 1.3; }
}


/* === ГРАФИТ ВМЕСТО СИНЕВЫ (21.09.2026, по образцу сайта Meta) ===
   Тёмные блоки — графит с лёгким серо-зелёным отливом, светлые — серо-белые,
   синий один и спокойный, только на кнопках и акцентах. Кнопки — таблетки. */
:root {
  --bg-primary: #11181d;
  --bg-secondary: #182127;
  --bg-card: rgba(255, 255, 255, 0.045);
  --bg-card-hover: rgba(255, 255, 255, 0.07);
  --text-primary: #f3f5f7;
  --text-secondary: #aab4bd;
  --text-muted: #8c979f;
  --accent: #1a6ae0;
  --accent-hover: #0457cb;
  --accent-glow: rgba(26, 106, 224, 0.2);
  --purple: #1a6ae0;
  --purple-glow: rgba(26, 106, 224, 0.15);
  --border: rgba(255, 255, 255, 0.1);
  --border-light: rgba(255, 255, 255, 0.06);
}

.btn { border-radius: 999px; }
.btn-primary,
.hero .btn-primary {
  background: #0457cb;
  box-shadow: none;
}
.btn-primary:hover { background: #0a4fb5; box-shadow: 0 8px 24px rgba(4, 87, 203, 0.3); }
.btn-ghost {
  background: rgba(241, 244, 247, 0.12);
  border: none;
  color: #f3f5f7;
}
.btn-ghost:hover { background: rgba(241, 244, 247, 0.2); }

.hero-accent {
  background: none;
  -webkit-text-fill-color: #4b8ef0;
  color: #4b8ef0;
}
.hero-kicker { color: #aab4bd; }

.stat-number {
  background: none;
  -webkit-text-fill-color: #f3f5f7;
  color: #f3f5f7;
}

.section-light {
  --text-primary: #0a1317;
  --text-secondary: #5d6c7b;
  --text-muted: #64717d;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --border: rgba(10, 19, 23, 0.08);
  --border-light: rgba(10, 19, 23, 0.05);
  background: #f1f4f7;
}
.section-light .section-tag {
  background: rgba(4, 87, 203, 0.07);
  border-color: rgba(4, 87, 203, 0.2);
  color: #0457cb;
}
.lang-btn.active { background: #0457cb; }

/* === СВЕТЛАЯ ГАММА (21.09.2026): светло-светло-серая основа, белые блоки через один ===
   Тёмными остаются только «экраны» внутри блоков: телефон, сцена древа, окно чата, карта. */
:root {
  --bg-primary: #f3f4f6;
  --bg-secondary: #e9ecef;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --text-primary: #0a1317;
  --text-secondary: #5d6c7b;
  --text-muted: #64717d;
  --accent: #0457cb;
  --accent-hover: #0a4fb5;
  --accent-glow: rgba(4, 87, 203, 0.14);
  --purple: #0457cb;
  --purple-glow: rgba(4, 87, 203, 0.1);
  --border: rgba(10, 19, 23, 0.09);
  --border-light: rgba(10, 19, 23, 0.06);
}

html, body { background: #f3f4f6; }

.section-light { background: #ffffff; }

/* Шапка — белая, как у Meta */
.navbar,
.navbar.scrolled {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(10, 19, 23, 0.07);
  box-shadow: none;
}
.nav-links a { color: #44525e; }
.nav-links a:hover { color: #0a1317; }
.lang-switcher { background: #eef1f4; border-color: rgba(10, 19, 23, 0.06); }
.lang-btn { color: #5d6c7b; }
.lang-btn.active { background: #0457cb; color: #fff; box-shadow: none; }
.mobile-menu { background: rgba(255, 255, 255, 0.98); }
.mobile-menu a { color: #1c2b33; }

/* Первый экран */
.hero-glow { background: radial-gradient(circle, rgba(4, 87, 203, 0.06) 0%, transparent 70%); }
.hero-glow-2 { background: radial-gradient(circle, rgba(10, 19, 23, 0.04) 0%, transparent 70%); }
.hero-kicker { color: #5d6c7b; }
.hero-accent { -webkit-text-fill-color: #0457cb; color: #0457cb; }
.stat-number { -webkit-text-fill-color: #0a1317; color: #0a1317; }
.btn-ghost { background: #e4e8ec; color: #0a1317; }
.btn-ghost:hover { background: #d9dee3; color: #0a1317; }
.scroll-mouse { border-color: #9aa5ae; }
.scroll-wheel { background: #9aa5ae; }

/* Карточки вокруг телефона — белые с мягкой тенью */
.floating-card {
  background: #ffffff;
  border: 1px solid rgba(10, 19, 23, 0.07);
  color: #0a1317;
  box-shadow: 0 10px 30px rgba(10, 19, 23, 0.1);
}

/* Телефон — тёмный экран на светлом фоне */
.phone-mockup {
  background: linear-gradient(145deg, #2a3238, #11181d);
  border-color: rgba(10, 19, 23, 0.25);
  box-shadow: 0 40px 80px rgba(10, 19, 23, 0.22);
}

/* Тёмные «экраны» на светлом сайте: сцена древа и окно чата */
.ai-chat-window {
  --text-primary: #f1f5f9;
  --text-secondary: #aab4bd;
  --text-muted: #8c979f;
  --bg-card: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.1);
  --border-light: rgba(255, 255, 255, 0.06);
  --accent: #6aa3f5;
  color: #f1f5f9;
}
/* Сцена древа светлая: фон и тень заданы выше, здесь перекрывать нечего. */
.ai-chat-window { background: #151c21; box-shadow: 0 30px 70px rgba(10, 19, 23, 0.2); }

/* Плавающие плашки у карты, книги и древа — белые, как карточки вокруг телефона */
.gps-float,
.book-float-tag,
.tree-float-tag {
  background: #ffffff;
  color: #0a1317;
  border: 1px solid rgba(10, 19, 23, 0.07);
  box-shadow: 0 10px 28px rgba(10, 19, 23, 0.12);
}
.tree-float-tag span, .book-float-tag span, .gps-float span { color: #0a1317; }

/* Герб на светлом: золото гуще, текст тёмный */
#crest .crest-bullets h3,
#crest .crest-free-title { color: #0a1317; }
#crest .section-tag,
#crest .crest-mark,
#crest figcaption { color: #8a6a2f; }
#crest .section-tag { background: rgba(184, 137, 58, 0.1); border-color: rgba(184, 137, 58, 0.3); }
#crest .crest-title-gold {
  background: linear-gradient(135deg, #b8893a 0%, #9a7433 55%, #7d5c26 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Молитвы и исторические личности: янтарь и жёлтый гуще */
.rel-prayer-type, .rel-prayer-tag { color: #b45309; }
.hist-tag { color: #a16207; }
.hist-profile-card {
  background: #ffffff;
  border: 1px solid rgba(10, 19, 23, 0.08);
  box-shadow: 0 20px 50px rgba(10, 19, 23, 0.1);
}

/* Зелёный на белом — темнее, иначе не читается */
.gps-profile-location, .bac-status { color: #15803d; }
.gps-profile-btn { background: linear-gradient(135deg, #15803d, #047857); }
#historical .hist-tag, #historical .hist-label { color: #a16207; }
#historical .hist-tag { background: rgba(161, 98, 7, 0.08); border-color: rgba(161, 98, 7, 0.25); }
/* У книги и исторических личностей были свои тёмные подложки посередине — на светлом они давали серую полосу */
#book { background: #f3f4f6; }
#historical { background: #ffffff; }

/* === Блок «Родословная» компактнее (21.09.2026): сцена слева, три пункта столбиком справа === */
@media (min-width: 901px) {
  #family-tree { padding-bottom: 96px; }
  #family-tree .section-header { margin-bottom: 0; }
  #family-tree .tree-showcase {
    display: grid;
    grid-template-columns: minmax(0, 440px) minmax(0, 1fr);
    gap: 56px;
    align-items: center;
    max-width: 1020px;
    margin: 44px auto 0;
  }
  #family-tree .tree-stage-scene { justify-content: flex-start; }
  #family-tree .tree-points {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-top: 0;
  }
  #family-tree .tree-point {
    display: grid;
    grid-template-columns: 48px 1fr;
    column-gap: 18px;
    align-items: start;
    padding: 20px 22px;
  }
  #family-tree .tp-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 0;
    grid-row: span 2;
  }
  #family-tree .tree-point h3 { margin: 2px 0 4px; }
}

/* Золото заголовка и иконок гуще: на белом светлое золото почти пропадало */
#family-tree .tree-title-gradient {
  background: linear-gradient(135deg, #b8893a 0%, #9a7433 55%, #7d5c26 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
#family-tree .tp-icon { background: rgba(184, 137, 58, 0.1); color: #9a7433; }
#family-tree .tp-icon-blue { background: rgba(4, 87, 203, 0.08); color: #0457cb; }
#family-tree .tp-icon-amber { background: rgba(180, 83, 9, 0.08); color: #b45309; }

/* Кнопка «Войти» в шапке — таблетка с тонкой рамкой, рядом с языками */
.nav-login {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 18px;
  margin-left: auto;
  margin-right: 12px;
  border-radius: 999px;
  border: 1px solid rgba(10, 19, 23, 0.16);
  color: #0a1317;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: var(--transition);
}
.nav-login:hover { background: #eef1f4; }
.m-login {
  width: 100%;
  max-width: 320px;
  text-align: center;
  padding: 12px 0;
  border-radius: 999px;
  border: 1px solid rgba(10, 19, 23, 0.16);
  font-weight: 700;
}
@media (max-width: 768px) {
  /* на узкой шапке места нет — «Войти» первым пунктом в меню */
  .nav-login { display: none; }
}

/* Фон блоков чередуется под новый порядок: серый — белый — серый */
#ai, #book, #features, #historical { background: transparent; }
#family-tree, #crest, #gps-profile, #religions, .how-section {
  position: relative;
  z-index: 1;
  background: #ffffff;
}
/* Меню и «Войти» делят свободное место поровну: логотип не липнет к меню */
@media (min-width: 769px) {
  .nav-container .nav-links { margin-left: auto; }
}

/* === «Сайт, а не только приложение» (22.09.2026) === */

/* Первый экран: окно браузера с древом и телефон рядом */
@media (min-width: 769px) {
  .hero-container { grid-template-columns: 1fr 1.05fr; }
  .hero-devices .phone-3d-wrapper {
    width: 100%;
    max-width: 560px;
    height: 470px;
    margin: 0 auto;
  }
  .hero-devices .browser-mock {
    position: absolute;
    left: 0;
    top: 20px;
    width: 470px;
    height: 330px;
  }
  .hero-devices .phone-mockup {
    position: absolute;
    right: 0;
    top: 60px;
    width: 196px;
    height: 400px;
    border-radius: 32px;
    padding: 7px;
  }
  .hero-devices .phone-screen { border-radius: 26px; }
  /* карточки вокруг: две по краям, остальные лишние рядом с двумя экранами */
  .hero-devices .float-1,
  .hero-devices .float-4 { display: none; }
  .hero-devices .float-2 { top: auto; bottom: 10px; right: auto; left: 40px; }
  .hero-devices .float-3 { bottom: auto; top: -8px; left: auto; right: 150px; }
}
.hero-devices { flex-direction: column; align-items: center; }
.hero-devices-caption {
  margin-top: 18px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #5d6c7b;
  text-align: center;
}
@media (max-width: 768px) {
  /* на телефоне окно браузера мелко и нечитаемо — остаётся телефон с семьёй и подпись */
  .hero-devices .browser-mock { display: none; }
  .hero-devices-caption { margin-top: 14px; }
}

/* Прямо здесь, на сайте — четыре плитки со ссылками */
.onsite-section { position: relative; z-index: 1; padding: 90px 0; }
.onsite-section .section-header { margin-bottom: 40px; }
.onsite-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.onsite-tile {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 24px 22px 20px;
  border-radius: 20px;
  background: #f3f4f6;
  border: 1px solid rgba(10, 19, 23, 0.05);
  color: #0a1317;
  text-decoration: none;
  transition: var(--transition);
}
.onsite-tile:hover {
  background: #ffffff;
  border-color: rgba(4, 87, 203, 0.25);
  box-shadow: 0 16px 40px rgba(10, 19, 23, 0.1);
  transform: translateY(-3px);
}
.onsite-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  background: rgba(4, 87, 203, 0.08);
  color: #0457cb;
}
.onsite-icon svg { width: 24px; height: 24px; }
.onsite-icon-shield { background: rgba(184, 137, 58, 0.12); color: #9a7433; }
.onsite-icon-dice { background: rgba(21, 128, 61, 0.1); color: #15803d; }
.onsite-icon-circles { background: rgba(180, 83, 9, 0.1); color: #b45309; }
.onsite-title { font-size: 1.1rem; font-weight: 800; letter-spacing: -0.01em; }
.onsite-hint { font-size: 0.9rem; line-height: 1.5; color: #5d6c7b; flex: 1; }
.onsite-open { margin-top: 10px; font-size: 0.9rem; font-weight: 700; color: #0457cb; }
@media (max-width: 1024px) { .onsite-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) {
  .onsite-section { padding: 64px 0; }
  .onsite-grid { grid-template-columns: 1fr; gap: 12px; }
}

/* Финальный призыв: главная кнопка — начать древо на сайте */
.download-inner .final-cta {
  margin: 8px auto 26px;
  padding: 16px 34px;
  font-size: 1.05rem;
  font-weight: 700;
}

/* Family Copilot в окне чата */
.copilot-orb {
  background: rgba(212, 175, 110, 0.14) !important;
  border: 1.5px solid #D4AF6E;
  color: #E8C88A !important;
  font-size: 15px;
}
.copilot-beta { font-size: 0.7rem; font-weight: 600; color: rgba(255, 255, 255, 0.5); margin-left: 4px; }
.copilot-toast {
  align-self: center;
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 4px auto 18px;
  width: fit-content;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(20, 16, 10, 0.9);
  border: 1px solid rgba(212, 175, 110, 0.45);
  color: #E8C88A;
  font-size: 0.85rem;
  font-weight: 700;
}
#ai .ai-msg-user { background: rgba(150, 110, 60, 0.32); border-color: rgba(212, 175, 110, 0.25); }

/* Возможности: осталось четыре карточки — в один ряд */
@media (min-width: 1025px) {
  #features .features-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Чередование фона под новый порядок: серый — белый — серый */
#onsite, #ai, #book, #features, .how-section { background: #ffffff; position: relative; z-index: 1; }
#family-tree, #crest, #gps-profile, #historical, #download { background: transparent; }
/* Шапка стала шире («Построить древо», «Войти») — логотип отодвигаем от меню */
@media (min-width: 769px) {
  .nav-container .logo { margin-right: 28px; }
  .nav-links { gap: 22px; }
}
/* Пункты шапки не переносятся на вторую строку */
.nav-links a, .nav-group-btn, .nav-plain, .nav-cta, .nav-login { white-space: nowrap; }
/* Шапке — чуть шире основной колонки, иначе пунктам тесно */
@media (min-width: 1100px) {
  .navbar .nav-container { max-width: 1320px; }
  .navbar .lang-btn { padding: 6px 11px; }
}

/* === «Книга жизни» короче (22.09.2026): книга слева, три коротких пункта справа === */
#book { padding: 96px 0; }
#book .section-header { margin-bottom: 36px; }
#book .book-showcase { margin-bottom: 0; }
#book .bpi-number,
#book .bpi-detail { display: none; }
#book .book-process { gap: 12px; }
#book .book-process-item {
  display: grid;
  grid-template-columns: 44px 1fr;
  column-gap: 16px;
  align-items: start;
  padding: 18px 20px;
}
#book .bpi-icon { width: 44px; height: 44px; margin-bottom: 0; grid-row: span 2; }
#book .book-process-item h3 { margin: 2px 0 4px; font-size: 1.05rem; }
#book .book-process-item p { font-size: 0.92rem; line-height: 1.5; }
#book .book-3d-scene { padding: 10px 0; }
@media (min-width: 901px) {
  #book .book-showcase {
    grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
    gap: 56px;
    max-width: 1020px;
    margin: 0 auto;
  }
}
@media (max-width: 768px) {
  #book { padding: 64px 0; }
}

/* После ухода «Исторических личностей» чередование фона: … — Возможности (белый) — Три шага (серый) — финал (белый) */
.how-section { background: transparent; }
#download { background: #ffffff; position: relative; z-index: 1; }
/* Финал остаётся на сером: белая карточка на белом фоне терялась */
#download { background: transparent; }
/* Плиток «на сайте» стало три — в один ряд, не шире основной колонки */
@media (min-width: 1025px) {
  .onsite-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 1020px; margin: 0 auto; }
}

/* === Каждый блок — в один экран (22.09.2026) ===
   На ноутбуке 1440×900 блок вместе с заголовком должен помещаться целиком:
   поля сверху и снизу меньше, заголовки чуть мельче, картинки компактнее. */
@media (min-width: 901px) {
  #onsite, #family-tree, #ai, #crest, #book, #gps-profile, #features, .how-section, #download {
    padding-top: 64px;
    padding-bottom: 64px;
  }
  main .section-header { margin-bottom: 32px; }
  main .section-title { font-size: 2.4rem; }
  #family-tree .tree-showcase { margin-top: 24px; }
  #family-tree .tree-stage { max-width: 400px; padding: 20px 16px 10px; }
  #gps-profile .gps-showcase { margin-bottom: 0; }
  #book .book-3d-scene { padding: 0; }
  #crest .crest-hero img { max-width: 300px; height: auto; }
}
@media (min-width: 901px) {
  /* герб: меньше воздуха между заголовком, пунктами и кнопкой */
  #crest .crest-main { margin-top: 28px; gap: 40px; }
  #crest .crest-bullets { gap: 14px; }
  #crest .crest-cta { margin-top: 28px; }
  /* место памяти: карта без лишней рамки воздуха */
  #gps-profile .gps-map-scene { padding: 8px; }
  /* три шага: плотнее */
  .how-section .timeline-item { margin-bottom: 16px; }
  .how-section .timeline-content { padding: 18px 22px; }
}

/* Блок «Прямо здесь, на сайте» убран (22.09.2026) — чередование фона заново:
   первый экран (серый) — Родословная (белый) — Copilot (серый) — Герб (белый) —
   Книга (серый) — Место памяти (белый) — Возможности (серый) — Три шага (белый) — финал (серый) */
#family-tree, #crest, #gps-profile, .how-section { background: #ffffff; position: relative; z-index: 1; }
#ai, #book, #features, #download { background: transparent; }

/* === Место памяти — карта проезда (22.09.2026): текст слева, картинка с витрины справа === */
.place-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 430px);
  gap: 64px;
  align-items: center;
  max-width: 1020px;
  margin: 0 auto;
}
.place-text .section-tag { margin-bottom: 18px; }
.place-accent {
  background: linear-gradient(135deg, #b8893a 0%, #9a7433 55%, #7d5c26 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.place-facts { list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.place-facts li { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; }
.place-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(21, 128, 61, 0.1); color: #15803d;
}
.place-icon svg { width: 22px; height: 22px; }
.place-facts h3 { font-size: 1.02rem; font-weight: 700; margin: 2px 0 2px; color: #0a1317; }
.place-facts p { font-size: 0.92rem; line-height: 1.5; color: #5d6c7b; margin: 0; }
.place-visual {
  margin: 0;
  /* Светлый снимок несёт собственную подложку и тень телефона, поэтому своей
     карточки у него больше нет: прежняя тёмная картинка просилась в рамку,
     эта в ней читается как рамка в рамке. */
  background: transparent;
}
.place-visual img { display: block; width: 100%; height: auto; }
@media (max-width: 900px) {
  .place-grid { grid-template-columns: 1fr; gap: 36px; }
  .place-visual { max-width: 360px; margin: 0 auto; }
}

/* === Пространство для всей семьи (22.09.2026): лента и календарь рядом === */
.family-section { position: relative; z-index: 1; padding: 64px 0; }
.family-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  max-width: 1020px;
  margin: 0 auto;
}
.family-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 22px;
  align-items: center;
  padding: 18px;
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid rgba(10, 19, 23, 0.06);
  box-shadow: 0 16px 40px rgba(10, 19, 23, 0.06);
}
.family-card img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
  /* Снимок с прозрачным фоном – подложка не нужна, иначе внутри белой
     карточки проступает серый прямоугольник. */
  background: transparent;
}
.family-card h3 { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.01em; color: #0a1317; margin: 0 0 8px; }
.family-card p { font-size: 0.95rem; line-height: 1.55; color: #5d6c7b; margin: 0; }
@media (max-width: 900px) {
  .family-grid { grid-template-columns: 1fr; max-width: 520px; }
}
@media (max-width: 520px) {
  .family-section { padding: 56px 0; }
  .family-card { grid-template-columns: 150px 1fr; gap: 14px; padding: 14px; }
  .family-card h3 { font-size: 1.05rem; }
  .family-card p { font-size: 0.88rem; }
}

/* Чередование фона с новым блоком и без «Возможностей»:
   первый экран (серый) — Родословная (белый) — Семья (серый) — Copilot (белый) —
   Герб (серый) — Книга (белый) — Место памяти (серый) — Три шага (белый) — финал (серый) */
#family-tree, #ai, #book, .how-section { background: #ffffff; position: relative; z-index: 1; }
#family, #crest, #gps-profile, #download { background: transparent; }

/* === Телефон: каждый блок — примерно в один экран (22.09.2026) ===
   Пункты, которые на компьютере стоят столбиком или сеткой, на телефоне
   встают в ряд и листаются пальцем вбок. Край следующей карточки виден —
   так понятно, что там есть ещё. Заголовки и поля блоков — компактнее. */
@media (max-width: 768px) {
  #family-tree, #family, #ai, #crest, #book, #gps-profile, .how-section, #download {
    padding-top: 52px;
    padding-bottom: 52px;
  }
  main .section-header { margin-bottom: 22px; }
  main .section-tag { margin-bottom: 12px; }
  main .section-title { font-size: 1.75rem; line-height: 1.12; margin-bottom: 10px; }
  main .section-subtitle { font-size: 0.95rem; line-height: 1.55; }

  /* ряд, который листается вбок */
  #family-tree .tree-points,
  #family .family-grid,
  #ai .ai-features-list,
  #crest .crest-bullets,
  #book .book-process,
  .how-section .timeline {
    display: flex;
    flex-direction: row;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin: 0 -20px;
    padding: 4px 20px 12px;
    max-width: none;
  }
  #family-tree .tree-points::-webkit-scrollbar,
  #family .family-grid::-webkit-scrollbar,
  #ai .ai-features-list::-webkit-scrollbar,
  #crest .crest-bullets::-webkit-scrollbar,
  #book .book-process::-webkit-scrollbar,
  .how-section .timeline::-webkit-scrollbar { display: none; }

  #family-tree .tree-point,
  #ai .ai-feat,
  #crest .crest-bullets li,
  #book .book-process-item,
  .how-section .timeline-item {
    flex: 0 0 78%;
    scroll-snap-align: start;
    margin: 0;
  }

  /* Родословная: сцена чуть меньше, пункты — карточки в ряд */
  #family-tree .tree-showcase { margin-top: 18px; }
  #family-tree .tree-stage { max-width: 330px; margin: 0 auto; padding: 18px 12px 10px; }
  #family-tree .tree-points { margin-top: 22px; }
  #family-tree .tree-point { padding: 18px; }
  #family-tree .tp-icon { width: 42px; height: 42px; margin-bottom: 10px; }

  /* Семья: картинка сверху, текст снизу */
  #family .family-card {
    flex: 0 0 72%;
    scroll-snap-align: start;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 12px;
  }
  #family .family-card img { max-height: 340px; width: auto; max-width: 100%; margin: 0 auto; }

  /* Copilot: пункты — карточки, окно чата компактнее */
  #ai .ai-container { gap: 22px; }
  #ai .ai-features-list { margin: 18px -20px 0; }
  #ai .ai-feat { background: #f3f4f6; border-radius: 16px; padding: 16px; }
  #ai .ai-chat-messages { padding: 14px; gap: 10px; }
  #ai .ai-msg p { font-size: 0.85rem; line-height: 1.45; }

  /* Герб: картинка меньше, пункты — карточки */
  #crest .crest-main { margin-top: 18px; gap: 20px; }
  #crest .crest-hero { max-width: 210px; margin: 0 auto; }
  #crest .crest-bullets li { background: #ffffff; border-radius: 16px; padding: 16px; box-shadow: 0 8px 22px rgba(10, 19, 23, 0.06); }
  #crest .crest-cta { margin-top: 18px; }

  /* Книга: обложка меньше */
  #book .book-3d-scene { padding: 0; height: 290px; }
  #book .book-3d-wrapper { transform: scale(0.8); transform-origin: top center; }
  #book .book-showcase { gap: 18px; }

  /* Место памяти: пункты — только заголовки, картинка меньше */
  #gps-profile .place-grid { gap: 22px; }
  #gps-profile .place-facts { margin-top: 16px; gap: 10px; }
  #gps-profile .place-facts p { display: none; }
  #gps-profile .place-facts li { grid-template-columns: 36px 1fr; align-items: center; }
  #gps-profile .place-icon { width: 36px; height: 36px; border-radius: 10px; }
  #gps-profile .place-icon svg { width: 18px; height: 18px; }
  #gps-profile .place-facts h3 { margin: 0; font-size: 0.98rem; }
  #gps-profile .place-visual { max-width: 270px; border-radius: 22px; }

  /* Три шага: без вертикальной линии, шаг — карточка с кружком сверху */
  .how-section .timeline::before { display: none; }
  .how-section .timeline-item { flex-direction: column; gap: 10px; }
  .how-section .timeline-dot { width: 38px; height: 38px; }
  .how-section .timeline-content { padding: 16px; }

  /* Финал */
  #download .download-inner { padding: 36px 20px; }
}
@media (max-width: 480px) {
  #family-tree .tree-points,
  #family .family-grid,
  #ai .ai-features-list,
  #crest .crest-bullets,
  #book .book-process,
  .how-section .timeline {
    margin-left: -16px;
    margin-right: -16px;
    padding-left: 16px;
    padding-right: 16px;
  }
  #ai .ai-features-list { margin-top: 18px; }
}
@media (max-width: 768px) {
  /* ряд с карточками не должен растягивать колонку шире экрана */
  #ai .ai-container,
  #crest .crest-main,
  #book .book-showcase,
  #family-tree .tree-showcase { grid-template-columns: minmax(0, 1fr) !important; }
  #ai .ai-content,
  #ai .ai-demo,
  #crest .crest-main > *,
  #book .book-showcase > *,
  #family-tree .tree-showcase > * { min-width: 0; }
}
@media (max-width: 768px) {
  #family-tree, #family, #ai, #crest, #book, #gps-profile, .how-section, #download {
    padding-top: 44px;
    padding-bottom: 44px;
  }
  main .section-title { font-size: 1.6rem; }
  main .section-subtitle { font-size: 0.9rem; line-height: 1.5; }

  /* Родословная: плашки поверх сцены закрывали людей, легенду заменяет сам рассказ */
  #family-tree .tree-float-tag,
  #family-tree .tree-legend { display: none; }
  #family-tree .tree-stage { max-width: 300px; padding: 14px 10px 8px; }
  #family-tree .tree-point h3 { font-size: 1rem; }
  #family-tree .tree-point p { font-size: 0.86rem; line-height: 1.45; }

  /* Copilot: пункты — только названия, в чате без приветствия */
  #ai .ai-feat { flex: 0 0 auto; max-width: 78%; align-items: center; padding: 12px 16px; }
  #ai .ai-feat p { display: none; }
  #ai .ai-feat h3 { margin: 0; font-size: 0.95rem; white-space: nowrap; }
  #ai .ai-feat-icon { width: 36px; height: 36px; }
  #ai .ai-chat-messages .ai-msg:first-child { display: none; }
  #ai .copilot-toast { margin: 0 auto 14px; }

  /* Книга: обложка ещё чуть меньше */
  #book .book-3d-scene { height: 250px; }
  #book .book-3d-wrapper { transform: scale(0.7); }
}
@media (max-width: 768px) {
  #family-tree .section-header,
  #book .section-header { margin-bottom: 16px; }
  #family-tree .tree-points { margin-top: 14px; }
  #family-tree .tree-point { padding: 16px; }
  #family-tree .tp-icon { margin-bottom: 8px; }
}
@media (max-width: 768px) {
  /* Место памяти: ярлык по центру, как заголовок; картинка и пункты плотнее */
  #gps-profile .place-text { text-align: center; }
  #gps-profile .place-facts { display: inline-flex; text-align: left; gap: 8px; margin-top: 14px; }
  #gps-profile .place-facts li { grid-template-columns: 32px 1fr; gap: 10px; }
  #gps-profile .place-icon { width: 32px; height: 32px; }
  #gps-profile .place-visual { max-width: 240px; }
  /* Герб: картинка меньше */
  #crest .crest-hero { max-width: 165px; }
  #crest .crest-main { margin-top: 12px; gap: 16px; }
}

/* «Три шага» на телефоне — короткий список сверху вниз, а не ряд вбок:
   шаги идут по порядку, листать их в сторону неестественно */
@media (max-width: 768px) {
  .how-section .timeline {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow: visible;
    scroll-snap-type: none;
    margin: 0;
    padding: 0;
  }
  .how-section .timeline-item {
    flex: none;
    flex-direction: row;
    align-items: flex-start;
    gap: 14px;
    margin: 0;
    padding: 14px 16px;
    border-radius: 16px;
    background: #f3f4f6;
  }
  .how-section .timeline-dot { width: 36px; height: 36px; box-shadow: none; }
  .how-section .timeline-dot svg { width: 18px; height: 18px; }
  .how-section .timeline-content {
    padding: 0;
    background: none;
    border: none;
    box-shadow: none;
    transform: none;
  }
  .how-section .timeline-content h3 { font-size: 1rem; margin: 6px 0 4px; }
  .how-section .timeline-content p { font-size: 0.88rem; line-height: 1.45; margin: 0; }
  .how-section .timeline-tags { display: none; }
}
@media (max-width: 768px) {
  /* заголовок финала — того же размера, что заголовки блоков */
  #download .download-inner h2 { font-size: 1.6rem; line-height: 1.15; }
  #download .download-inner p { font-size: 0.92rem; }
}

/* === Листание вбок не мешает прокрутке страницы (22.09.2026) ===
   1) Сцена древа больше не прячется и не выезжает снизу при каждом заезде
      в кадр — выезжая, она наползала на карточки под собой. Люди внутри
      сцены по-прежнему собираются заново.
   2) Карточки в рядах видны сразу, без анимации появления: спрятанные за
      правым краем её ждали и «догоняли» при листании.
   3) Ряд прилипает к карточке мягко (proximity, а не mandatory) и не отдаёт
      прокрутку дальше — вертикальный жест чаще уходит странице. */
.tree-stage-scene,
.tree-stage-scene.in { opacity: 1; transform: none; }
@media (max-width: 768px) {
  #family-tree .tree-points,
  #family .family-grid,
  #ai .ai-features-list,
  #crest .crest-bullets,
  #book .book-process {
    scroll-snap-type: x proximity;
    overscroll-behavior-x: contain;
  }
  #family-tree .tree-points > .reveal,
  #ai .ai-features-list > .reveal,
  #book .book-process > .reveal,
  #family .family-grid > .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Точки под рядами, которые листаются вбок — только на телефоне */
.swipe-dots { display: none; }
@media (max-width: 768px) {
  .swipe-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 4px;
  }
  .swipe-dots span {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: rgba(10, 19, 23, 0.18);
    transition: width 0.25s ease, background 0.25s ease;
    cursor: pointer;
  }
  .swipe-dots span.on {
    width: 20px;
    background: #0457cb;
  }
}

/* Copilot на телефоне: три пункта — обычным блоком сверху вниз, без листания.
   Названия короткие, в ряд их листать незачем (решение 22.09.2026) */
@media (max-width: 768px) {
  #ai .ai-features-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: visible;
    scroll-snap-type: none;
    margin: 16px 0 0;
    padding: 0;
  }
  #ai .ai-feat {
    flex: none;
    max-width: none;
    padding: 10px 14px;
  }
  #ai .ai-feat-icon { width: 32px; height: 32px; }
  #ai .ai-feat-icon svg { width: 18px; height: 18px; }
}

/* Выпадающий список в шапке на тёмных страницах игр – тоже тёмный */
body.dark-page .nav-dropdown-card {
  background: rgba(17, 20, 32, 0.97);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}
body.dark-page .nav-drop-title { color: #f3f5f7; }
body.dark-page .nav-drop-hint { color: #9aa6b2; }
body.dark-page .nav-links a.nav-drop-link { color: #c3ccd6; }
