/* ==========================================================================
   TG Factory - Стили витрины
   Шрифтовая пара: Onest / Golos Text (из out/fonts/fonts.css)
   ========================================================================== */

@import url('fonts/fonts.css');

:root {
  --font-heading: 'Onest', sans-serif;
  --font-body: 'Golos Text', sans-serif;

  /* Палитра */
  --bg-main: #090d16;
  --bg-surface: #0f172a;
  --bg-surface-elevated: #15213b;
  --bg-surface-hover: #1c2b4d;
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.16);
  --border-active: rgba(56, 189, 248, 0.5);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-tertiary: #64748b;

  --accent-cyan: #38bdf8;
  --accent-cyan-glow: rgba(56, 189, 248, 0.25);
  --accent-blue: #3b82f6;

  /* Категории */
  --cat-fresh: #60a5fa;
  --cat-fresh-bg: rgba(96, 165, 250, 0.15);
  --cat-3d: #34d399;
  --cat-3d-bg: rgba(52, 211, 153, 0.15);
  --cat-7d: #fbbf24;
  --cat-7d-bg: rgba(251, 191, 36, 0.15);
  --cat-14d: #c084fc;
  --cat-14d-bg: rgba(192, 132, 252, 0.15);

  --header-height: 80px;
  --container-max: 1240px;
  --transition-smooth: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Сброс и базовые настройки */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-main);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-body);
  background: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-smooth);
}

button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
}

img, svg {
  display: block;
  max-width: 100%;
}

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

/* ==========================================================================
   Шапка (Header) - держит ОДНУ строку при любой ширине
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  z-index: 100;
  background: rgba(9, 13, 22, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--transition-smooth), height var(--transition-smooth), border-color var(--transition-smooth);
}

.site-header.is-scrolled {
  background: rgba(9, 13, 22, 0.92);
  border-bottom-color: var(--border-medium);
  height: 72px;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 20px;
  flex-wrap: nowrap; /* Строго в одну строку */
}

/* Логотип: крупный (>= 44px на десктопе, >= 32px на мобильных) */
.header-logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  color: var(--text-primary);
  transition: transform var(--transition-smooth), opacity var(--transition-smooth);
}

.header-logo-link:hover {
  transform: scale(1.02);
  color: var(--accent-cyan);
}

.site-logo {
  height: 48px;
  width: auto;
  color: currentColor;
}

/* Десктопная навигация */
.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-shrink: 0;
}

.nav-link {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  padding: 6px 2px;
  transition: color var(--transition-smooth);
}

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

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

/* Кнопка CTA */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: 10px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--transition-smooth);
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.5);
  transform: translateY(-1px);
}

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

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--border-medium);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.88rem;
  border-radius: 8px;
}

.btn-icon {
  width: 18px;
  height: 18px;
}

/* Мобильный бургер (скрыт на широких экранах) */
.mobile-menu-btn {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
}

.mobile-menu-btn svg {
  width: 24px;
  height: 24px;
}

/* Мобильное выпадающее меню */
.mobile-drawer {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  background: rgba(9, 13, 22, 0.98);
  border-bottom: 1px solid var(--border-medium);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  z-index: 99;
  transform: translateY(-120%);
  transition: transform 0.3s ease;
  backdrop-filter: blur(20px);
}

.mobile-drawer.is-open {
  transform: translateY(0);
}

.mobile-drawer .nav-link {
  font-size: 1.15rem;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
}

/* ==========================================================================
   Секция Hero (Первый экран)
   ========================================================================== */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: calc(var(--header-height) + 40px);
  padding-bottom: 80px;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  position: relative;
  z-index: 10;
}

/* Текстовая часть hero */
.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-overline {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.4rem, 4vw, 3.5rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 24px;
}

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

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.hero-meta-row {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
  width: 100%;
}

.hero-meta-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.hero-meta-item svg {
  width: 18px;
  height: 18px;
  color: var(--accent-cyan);
  flex-shrink: 0;
}

/* ==========================================================================
   Слоистый параллакс сцены Hero (Фирменный приём)
   ========================================================================== */
.hero-visual-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero-parallax-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border-medium);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  background: #0d1322;
  perspective: 1000px;
}

/* Растровые слои одного кадра */
.parallax-layer {
  position: absolute;
  top: -5%;
  left: -5%;
  width: 110%;
  height: 110%;
  object-fit: cover;
  pointer-events: none;
  will-change: transform;
  transition: transform 0.15s ease-out;
}

.layer-bg {
  z-index: 1;
}

.layer-mid {
  z-index: 2;
}

.layer-fore {
  z-index: 3;
}

/* Мягкий световой оверлей: строго не темнее 25% */
.hero-light-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 75% 20%, rgba(255, 255, 255, 0.12) 0%, transparent 60%),
              linear-gradient(to bottom, rgba(9, 13, 22, 0.05) 0%, rgba(9, 13, 22, 0.22) 100%);
  z-index: 4;
  pointer-events: none;
}

.parallax-badge {
  position: absolute;
  bottom: 16px;
  left: 16px;
  z-index: 5;
  background: rgba(9, 13, 22, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.parallax-badge svg {
  width: 14px;
  height: 14px;
  color: var(--accent-cyan);
}

/* Демо-карточка каталога в Hero */
.hero-demo-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  position: relative;
  z-index: 10;
}

.demo-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.demo-tabs {
  display: flex;
  gap: 6px;
  background: rgba(0, 0, 0, 0.25);
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
}

.demo-tab-btn {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition-smooth);
}

.demo-tab-btn.active {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.demo-price {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
}

.demo-card-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 18px;
}

.demo-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.demo-progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

.demo-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #38bdf8 0%, #34d399 100%);
  border-radius: 4px;
  transition: width 0.4s ease;
}

.demo-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  font-size: 0.85rem;
}

.demo-meta-cell {
  background: rgba(255, 255, 255, 0.03);
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
}

.demo-meta-title {
  color: var(--text-tertiary);
  font-size: 0.75rem;
}

.demo-meta-value {
  color: var(--text-primary);
  font-weight: 600;
}

.demo-cta-btn {
  width: 100%;
}

/* ==========================================================================
   Секция: Печатающийся диалог (Главный эффект)
   ========================================================================== */
.section {
  padding: 100px 0;
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 56px auto;
}

.section-tag {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
  display: inline-block;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 3.2vw, 2.75rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 1.08rem;
  color: var(--text-secondary);
}

/* Контейнер диалога */
.dialog-container {
  max-width: 820px;
  margin: 0 auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  position: relative;
}

.dialog-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 20px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-subtle);
}

.dialog-channel-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dialog-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--bg-surface-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  border: 1px solid var(--border-subtle);
}

.dialog-avatar svg {
  width: 20px;
  height: 20px;
}

.dialog-name {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.dialog-status {
  font-size: 0.78rem;
  color: #34d399;
  display: flex;
  align-items: center;
  gap: 6px;
}

.dialog-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
}

.dialog-replay-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-smooth);
}

.dialog-replay-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-medium);
}

.dialog-replay-btn svg {
  width: 14px;
  height: 14px;
}

/* Лента сообщений диалога */
.dialog-messages {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 380px;
}

.dialog-msg {
  display: flex;
  flex-direction: column;
  max-width: 82%;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.dialog-msg.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.dialog-msg.user {
  align-self: flex-end;
  align-items: flex-end;
}

.dialog-msg.bot {
  align-self: flex-start;
  align-items: flex-start;
}

.dialog-bubble {
  padding: 14px 18px;
  border-radius: 14px;
  font-size: 0.98rem;
  line-height: 1.55;
  position: relative;
  word-break: break-word;
}

.dialog-msg.user .dialog-bubble {
  background: #0369a1;
  color: #ffffff;
  border-bottom-right-radius: 4px;
}

.dialog-msg.bot .dialog-bubble {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-bottom-left-radius: 4px;
}

.dialog-time {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  margin-top: 4px;
  padding: 0 4px;
}

/* Печатающийся курсор */
.typewriter-cursor {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  vertical-align: text-bottom;
  background-color: var(--accent-cyan);
  margin-left: 2px;
  animation: cursorBlink 0.8s infinite;
}

@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ==========================================================================
   Секция: Категории и цены
   ========================================================================== */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 36px;
}

.category-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all var(--transition-smooth);
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-medium);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4);
}

.category-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  width: fit-content;
  margin-bottom: 20px;
}

.badge-fresh {
  background: var(--cat-fresh-bg);
  color: var(--cat-fresh);
}

.badge-3d {
  background: var(--cat-3d-bg);
  color: var(--cat-3d);
}

.badge-7d {
  background: var(--cat-7d-bg);
  color: var(--cat-7d);
}

.badge-14d {
  background: var(--cat-14d-bg);
  color: var(--cat-14d);
}

.category-price-row {
  margin-bottom: 16px;
}

.category-price-prefix {
  font-size: 0.95rem;
  color: var(--text-tertiary);
  margin-right: 4px;
}

.category-price-val {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text-primary);
}

.category-progress-block {
  margin-bottom: 20px;
}

.category-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.category-progress-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}

.category-progress-bar {
  height: 100%;
  border-radius: 3px;
}

.category-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 24px;
  flex-grow: 1;
}

.category-card-footer {
  padding-top: 18px;
  border-top: 1px solid var(--border-subtle);
}

.category-btn {
  width: 100%;
}

.categories-note {
  text-align: center;
  font-size: 0.92rem;
  color: var(--text-tertiary);
  max-width: 640px;
  margin: 0 auto;
}

/* ==========================================================================
   Секция: Как купить (3 шага)
   ========================================================================== */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.step-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 32px 28px;
  position: relative;
  transition: border-color var(--transition-smooth);
}

.step-card:hover {
  border-color: var(--border-medium);
}

.step-number {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-cyan);
  background: var(--accent-cyan-glow);
  padding: 4px 10px;
  border-radius: 6px;
  display: inline-block;
  margin-bottom: 20px;
}

.step-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--bg-surface-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  margin-bottom: 20px;
  border: 1px solid var(--border-subtle);
}

.step-icon-wrap svg {
  width: 26px;
  height: 26px;
}

.step-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
}

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

/* ==========================================================================
   Секция: Прогрев и Оплата (Информационные блоки)
   ========================================================================== */
.info-duo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.info-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 36px;
}

.info-box-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.info-box-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--bg-surface-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  border: 1px solid var(--border-subtle);
}

.info-box-icon svg {
  width: 22px;
  height: 22px;
}

.info-box-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text-primary);
}

.info-box-paragraph {
  font-size: 0.98rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ==========================================================================
   Секция: Частые вопросы (FAQ - 4 вопроса)
   ========================================================================== */
.faq-accordion {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color var(--transition-smooth);
}

.faq-item.is-open {
  border-color: var(--border-medium);
}

.faq-question {
  width: 100%;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  text-align: left;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  background: none;
  cursor: pointer;
  transition: color var(--transition-smooth);
}

.faq-question:hover {
  color: var(--accent-cyan);
}

.faq-chevron {
  width: 20px;
  height: 20px;
  color: var(--text-secondary);
  transition: transform var(--transition-smooth);
  flex-shrink: 0;
}

.faq-item.is-open .faq-chevron {
  transform: rotate(180deg);
  color: var(--accent-cyan);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  font-size: 0.96rem;
  color: var(--text-secondary);
  line-height: 1.65;
  padding: 0 24px;
}

.faq-item.is-open .faq-answer {
  max-height: 200px;
  padding: 0 24px 22px 24px;
}

/* ==========================================================================
   Секция: Финальный CTA
   ========================================================================== */
.cta-banner {
  background: linear-gradient(135deg, #0f172a 0%, #152445 100%);
  border: 1px solid var(--border-medium);
  border-radius: 24px;
  padding: 64px 36px;
  text-align: center;
  max-width: 960px;
  margin: 0 auto;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.cta-banner-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.cta-banner-desc {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto 36px auto;
}

/* ==========================================================================
   Подвал (Footer)
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  background: #060910;
  padding: 48px 0 36px 0;
  font-size: 0.9rem;
  color: var(--text-tertiary);
}

.footer-facts-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 28px;
  padding-bottom: 32px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  font-size: 0.92rem;
  color: var(--text-secondary);
}

.footer-fact-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-fact-item svg {
  width: 16px;
  height: 16px;
  color: var(--accent-cyan);
}

.footer-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-nav {
  display: flex;
  gap: 20px;
}

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

.footer-legal-row {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.8rem;
}

.footer-requisites {
  color: var(--text-tertiary);
}

/* ==========================================================================
   Кнопка возврата наверх (Back to Top с кольцом прогресса)
   ========================================================================== */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px);
  transition: opacity var(--transition-smooth), transform var(--transition-smooth), background var(--transition-smooth), border-color var(--transition-smooth);
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.progress-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.progress-ring-circle {
  stroke: var(--accent-cyan);
  stroke-dasharray: 144.5;
  stroke-dashoffset: 144.5;
  transition: stroke-dashoffset 0.1s linear;
}

.back-to-top-icon {
  position: relative;
  z-index: 2;
  width: 20px;
  height: 20px;
}

/* ==========================================================================
   Адаптивность (1920, 1440, 1280, 960, 768, 360)
   ========================================================================== */
@media (max-width: 1080px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .hero-visual-wrapper {
    max-width: 680px;
    margin: 0 auto;
    width: 100%;
  }
  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 860px) {
  .site-nav, .header-actions {
    display: none;
  }
  .mobile-menu-btn {
    display: flex;
  }
  .steps-grid {
    grid-template-columns: 1fr;
  }
  .info-duo-grid {
    grid-template-columns: 1fr;
  }
  .footer-facts-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .footer-bottom-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  :root {
    --header-height: 68px;
  }
  .site-logo {
    height: 34px; /* >= 32px на телефоне */
  }
  .categories-grid {
    grid-template-columns: 1fr;
  }
  .dialog-container {
    padding: 20px 16px;
  }
  .dialog-msg {
    max-width: 92%;
  }
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }
  .hero-actions .btn {
    width: 100%;
  }
  .demo-tabs {
    flex-wrap: wrap;
  }
}

/* Строгое уважение prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .parallax-layer {
    transform: none !important;
    transition: none !important;
  }
  .typewriter-cursor {
    display: none !important;
  }
}

/* Неполный ряд карточек - по центру (замечание владельца 22.09.2026).
   Сетка заменена на flex-wrap: число колонок задаёт --cols, последний ряд центрируется. */
.categories-grid,
.steps-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}
.categories-grid { --cols: 4; --gap: 24px; }
.steps-grid { --cols: 3; --gap: 28px; }
.categories-grid > .category-card,
.steps-grid > .step-card {
  flex: 0 0 calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols));
  min-width: 0;
}
@media (max-width: 1080px) { .categories-grid { --cols: 2; } }
@media (max-width: 860px) { .steps-grid { --cols: 1; } }
@media (max-width: 640px) { .categories-grid { --cols: 1; } }
