/* Дело — лендинг. Mobile-first. Тёмная тема по умолчанию, переключатель светлой. */
@import url('https://fonts.googleapis.com/css2?family=Bad+Script&display=swap');

:root,
[data-theme="dark"] {
  --bg: #121212;
  --surface: #1e1e1e;
  --text: #e0e0e0;
  --text-secondary: #a0a0a0;
  --border: #333;
  --accent: #4caf50;
  --accent-hover: #66bb6a;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, Roboto, sans-serif;
}

[data-theme="light"] {
  --bg: #f5f5f5;
  --surface: #ffffff;
  --text: #1a1a1a;
  --text-secondary: #555;
  --border: #e0e0e0;
  --accent: #2e7d32;
  --accent-hover: #388e3c;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-width: 0;
}

/* Отступ под фиксированный хедер (высота шапки ~72px + safe-area) */
main {
  padding-top: calc(72px + env(safe-area-inset-top, 0px));
}

/* Удобнее тап на мобильных: убрать серое подсвечивание, оставить лёгкий отклик */
@media (hover: none) and (pointer: coarse) {
  a, button {
    -webkit-tap-highlight-color: rgba(76, 175, 80, 0.15);
    tap-highlight-color: rgba(76, 175, 80, 0.15);
  }
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

@media (max-width: 768px) {
  .container {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }

  /* Телефон по ширине блока — удобно разглядеть экран */
  .phone-mockup-wrapper {
    width: 100%;
    max-width: 100%;
  }
  .phone-mockup {
    width: min(300px, 92vw);
    max-width: 92vw;
    margin: 0 auto;
  }
  .hero .phone-mockup,
  .funnel-how-phones .phone-mockup,
  .showcase-row .phone-mockup {
    width: min(300px, 92vw);
    max-width: 92vw;
  }
}

/* ========== HEADER — фиксирован при скролле (mobile + desktop) ========== */
/* Элементы: .header-inner (лого + .header-actions: нав, тема, бургер), .scroll-progress, .nav-overlay. z-index: nav 99, overlay 98, progress 101 */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  overflow: visible;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--bg) 98%, transparent);
  box-shadow: 0 1px 0 var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: max(12px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-left)) 12px max(16px, env(safe-area-inset-right));
  flex-wrap: nowrap;
  min-width: 0;
  min-height: 56px;
}

.header-inner .logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  min-width: 0;
  min-height: 44px;
}

.theme-toggle {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
}
.theme-toggle:hover {
  background: color-mix(in srgb, var(--accent) 15%, var(--surface));
  border-color: var(--accent);
}
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .icon-dark { display: none; }
.theme-toggle .icon-light { display: block; }
[data-theme="light"] .theme-toggle .icon-dark { display: block; }
[data-theme="light"] .theme-toggle .icon-light { display: none; }

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.25rem;
}

.logo-img {
  display: block;
  border-radius: 10px;
}

.logo-text {
  letter-spacing: 0.02em;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.2s;
}
.nav-toggle:hover { background: rgba(255,255,255,0.06); }
.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.2s, opacity 0.2s;
}
.site-header.nav-open .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.site-header.nav-open .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}
.site-header.nav-open .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav {
  position: fixed;
  top: 0;
  right: 0;
  width: min(280px, 85vw);
  height: 100vh;
  height: 100dvh;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0;
  padding: max(60px, calc(14px + env(safe-area-inset-top))) 20px max(24px, env(safe-area-inset-bottom));
  background: var(--surface);
  border-left: 1px solid var(--border);
  z-index: 99;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  box-shadow: -8px 0 24px rgba(0,0,0,0.3);
  display: flex;
  overflow-y: auto;
}
.site-header.nav-open .nav {
  transform: translateX(0);
}

/* Кнопка «Назад» вверху выезжающей панели — зелёная стрелка */
.nav .nav-back {
  display: flex;
  align-items: center;
  padding: 16px 0;
  min-height: 48px;
  box-sizing: border-box;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s, background 0.2s;
  margin: 0 -20px;
  padding-left: 20px;
  padding-right: 20px;
}
.nav .nav-back:hover {
  color: var(--accent-hover);
}
.nav-back-arrow {
  width: 24px;
  height: 24px;
}

.nav .nav-link {
  display: block;
  padding: 16px 0;
  min-height: 48px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  font-size: 1.1rem;
  color: var(--text-secondary);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s;
}
.nav .nav-link:last-child {
  border-bottom: none;
}
.nav .nav-link:hover {
  color: var(--text);
}

.nav-link--support {
  color: var(--accent);
}
.nav-link--support:hover {
  color: var(--accent-hover);
}

.nav .nav-link.nav-link--story {
  color: var(--accent);
}
.nav .nav-link.nav-link--story:hover {
  color: var(--accent-hover);
}

.nav-overlay {
  display: block;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 98;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.site-header.nav-open .nav-overlay {
  opacity: 1;
  pointer-events: auto;
}

/* Прогресс-бар прокрутки под шапкой: красная линия плавно замещается зелёной */
.scroll-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: #e53935;
  overflow: hidden;
  z-index: 101;
  pointer-events: none;
}
.scroll-progress__bar {
  display: block;
  height: 100%;
  width: 0;
  background: #4caf50;
  transition: width 0.12s ease-out;
}

/* Desktop: хедер на всю ширину, логотип и кнопка у краёв */
@media (min-width: 769px) {
  .container {
    padding-left: 20px;
    padding-right: 20px;
  }
  .site-header .header-inner {
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 12px max(20px, env(safe-area-inset-left)) 12px max(20px, env(safe-area-inset-right));
    gap: 12px;
  }
  .nav-toggle {
    display: none;
  }
  .nav .nav-back {
    display: none;
  }
  .nav {
    position: static;
    width: auto;
    height: auto;
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    transform: none;
    display: flex;
    gap: 20px;
    min-height: 44px;
  }
  .site-header.nav-open .nav {
    transform: none;
  }
  .nav .nav-link {
    display: inline-flex;
    align-items: center;
    padding: 0;
    font-size: 0.9rem;
    line-height: 1;
    border-bottom: none;
    white-space: nowrap;
    min-height: 44px;
  }
  .nav-overlay {
    display: none;
  }
}

/* ========== HERO — mobile: одна колонка, текст + телефон ========== */
.hero {
  padding: 28px 0 40px;
  padding-top: max(28px, env(safe-area-inset-top));
  padding-bottom: max(40px, env(safe-area-inset-bottom));
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: center;
}

.hero-title {
  margin: 0 0 14px;
  font-size: clamp(1.5rem, 6vw, 1.75rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.hero-lead {
  margin: 0 0 22px;
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 480px;
}

.hero-cta {
  margin-top: 8px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.hero-cta .btn {
  width: 100%;
  min-height: 48px;
  padding: 14px 20px;
  -webkit-tap-highlight-color: transparent;
}
.hero-cta .btn-outline {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}
.hero-cta .btn-outline:hover {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

.hero-scroll-hint {
  margin: 24px 0 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
  opacity: 0.9;
}

/* Desktop: две колонки, крупнее заголовок */
@media (min-width: 769px) {
  .hero {
    padding: 60px 0 80px;
    padding-top: 60px;
  }
  .hero-inner {
    grid-template-columns: 1fr 1fr;
    gap: 60px;
  }
  .hero-title {
    font-size: clamp(2rem, 5vw, 2.75rem);
    margin-bottom: 20px;
  }
  .hero-lead {
    font-size: 1.1rem;
    margin-bottom: 28px;
  }
  .hero-cta .btn {
    width: auto;
    min-height: 0;
  }
  .hero-cta .btn-outline { width: auto; }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

/* Фон-ореол за телефонами в hero */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  min-height: 280px;
}

.hero-visual::before {
  content: '';
  position: absolute;
  inset: -20%;
  background: radial-gradient(
    ellipse 80% 70% at 50% 50%,
    rgba(76, 175, 80, 0.06) 0%,
    rgba(76, 175, 80, 0.02) 40%,
    transparent 70%
  );
  pointer-events: none;
}

/* Обёртка: мягкое свечение под телефоном */
.phone-mockup-wrapper {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 0;
  position: relative;
}

.phone-mockup-wrapper::before {
  content: '';
  position: absolute;
  width: 120%;
  height: 60%;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(
    ellipse at center bottom,
    rgba(0, 0, 0, 0.25) 0%,
    transparent 70%
  );
  pointer-events: none;
}

/* Телефон: корпус премиум-устройства */
.phone-mockup {
  position: relative;
  width: 120px;
  max-width: 52vw;
  margin: 0 auto;
  background: linear-gradient(165deg, #353535 0%, #262626 25%, #1c1c1c 60%, #141414 100%);
  border-radius: 36px;
  padding: 4px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.09),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    0 0 0 2px rgba(0, 0, 0, 0.2),
    0 4px 12px rgba(0, 0, 0, 0.25),
    0 12px 32px rgba(0, 0, 0, 0.35),
    0 24px 56px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -1px 0 rgba(0, 0, 0, 0.25);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.phone-mockup:hover {
  transform: translateY(-2px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 0 2px rgba(0, 0, 0, 0.15),
    0 0 0 3px rgba(76, 175, 80, 0.15),
    0 8px 24px rgba(0, 0, 0, 0.3),
    0 20px 48px rgba(0, 0, 0, 0.4),
    0 32px 64px rgba(0, 0, 0, 0.35),
    0 0 40px rgba(76, 175, 80, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

.phone-mockup:active {
  transform: translateY(0) scale(0.98);
}

/* Экран: стекло с бликом сверху */
.phone-mockup__screen {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 19.5;
  border-radius: 30px;
  overflow: hidden;
  background: #080808;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 0 0 1px rgba(0, 0, 0, 0.5),
    inset 0 4px 16px rgba(0, 0, 0, 0.2),
    0 1px 0 rgba(255, 255, 255, 0.04);
}

.phone-mockup__screen::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 12px 24px -8px rgba(255, 255, 255, 0.04);
}

/* Скриншот: обрезан под 9:19.5 — ровно в рамке экрана */
.phone-mockup__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  vertical-align: middle;
}

/* По теме лендинга: тёмная тема — тёмный скрин, светлая тема — светлый скрин */
.phone-mockup__screen .screenshot-dark { display: block !important; }
.phone-mockup__screen .screenshot-light { display: none !important; }
html[data-theme="dark"] .phone-mockup__screen .screenshot-dark { display: block !important; }
html[data-theme="dark"] .phone-mockup__screen .screenshot-light { display: none !important; }
html[data-theme="light"] .phone-mockup__screen .screenshot-dark { display: none !important; }
html[data-theme="light"] .phone-mockup__screen .screenshot-light { display: block !important; }

.phone-mockup__screen.placeholder .phone-mockup__img {
  display: none;
}

.phone-mockup__screen.placeholder::before {
  content: 'Скриншот';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #1a1a1a 0%, #141414 100%);
  color: var(--text-secondary);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

.phone-mockup__label {
  display: block;
  text-align: center;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.85;
}

/* iPhone 15 Pro Max — титановый корпус, Dynamic Island */
.phone-mockup--iphone {
  background: linear-gradient(160deg, #3d3d3d 0%, #2a2a2a 20%, #1f1f1f 50%, #181818 85%, #0d0d0d 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 0 0 2px rgba(0, 0, 0, 0.25),
    0 4px 16px rgba(0, 0, 0, 0.3),
    0 14px 36px rgba(0, 0, 0, 0.4),
    0 28px 60px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

.phone-mockup--iphone .phone-mockup__screen {
  border-radius: 28px 28px 26px 26px;
}

/* Samsung — корпус без выреза */
.phone-mockup--android {
  border-radius: 32px;
  padding: 4px;
  background: linear-gradient(165deg, #2c2c2e 0%, #1c1c1e 30%, #151518 70%, #0c0c0e 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 0 0 2px rgba(0, 0, 0, 0.22),
    0 4px 14px rgba(0, 0, 0, 0.28),
    0 12px 34px rgba(0, 0, 0, 0.38),
    0 24px 52px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -1px 0 rgba(0, 0, 0, 0.22);
}

.phone-mockup--android .phone-mockup__screen {
  border-radius: 24px;
}

/* Десктоп: крупнее, выразительные тени и hover */
@media (min-width: 769px) {
  .hero-visual::before {
    inset: -30%;
    background: radial-gradient(
      ellipse 70% 60% at 50% 50%,
      rgba(76, 175, 80, 0.08) 0%,
      rgba(76, 175, 80, 0.03) 45%,
      transparent 75%
    );
  }
  .phone-mockup-wrapper {
    padding: 32px 0;
  }
  .phone-mockup {
    width: 200px;
    padding: 5px;
    border-radius: 34px;
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.1),
      0 0 0 1px rgba(255, 255, 255, 0.06),
      0 0 0 2px rgba(0, 0, 0, 0.18),
      0 8px 24px rgba(0, 0, 0, 0.3),
      0 24px 56px rgba(0, 0, 0, 0.4),
      0 48px 96px rgba(0, 0, 0, 0.35),
      inset 0 1px 0 rgba(255, 255, 255, 0.12),
      inset 0 -1px 0 rgba(0, 0, 0, 0.22);
  }
  .phone-mockup:hover {
    transform: translateY(-4px);
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.14),
      0 0 0 1px rgba(255, 255, 255, 0.1),
      0 0 0 2px rgba(0, 0, 0, 0.12),
      0 0 0 4px rgba(76, 175, 80, 0.18),
      0 16px 40px rgba(0, 0, 0, 0.35),
      0 36px 72px rgba(0, 0, 0, 0.45),
      0 56px 112px rgba(0, 0, 0, 0.4),
      0 0 56px rgba(76, 175, 80, 0.15),
      inset 0 1px 0 rgba(255, 255, 255, 0.14),
      inset 0 -1px 0 rgba(0, 0, 0, 0.18);
  }
  .phone-mockup__screen {
    border-radius: 36px;
  }
  .phone-mockup--iphone .phone-mockup__screen {
    border-radius: 34px 34px 32px 32px;
  }
  .phone-mockup--android .phone-mockup__screen {
    border-radius: 28px;
  }
  .phone-mockup__label {
    font-size: 0.75rem;
    margin-bottom: 12px;
  }
}

/* Блок «боль» — яркий, в стиле обращения */
.funnel-pain {
  padding: 28px 0 32px;
  background: linear-gradient(180deg, #1f2a1f 0%, #1a231a 50%, #151d15 100%);
  border-top: 1px solid rgba(76, 175, 80, 0.2);
  border-bottom: 1px solid rgba(76, 175, 80, 0.15);
  box-shadow: inset 0 0 80px rgba(76, 175, 80, 0.04);
}
[data-theme="light"] .funnel-pain {
  background: linear-gradient(180deg, #e8f5e9 0%, #f1f8e9 50%, #f5f5f5 100%);
  border-top: 1px solid rgba(46, 125, 50, 0.25);
  border-bottom: 1px solid rgba(46, 125, 50, 0.15);
}

.funnel-pain-inner {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.funnel-pain-text {
  margin: 0;
  font-size: 1.05rem;
  color: #d8e0d8;
  line-height: 1.6;
  padding: 0 8px;
  letter-spacing: 0.01em;
}
[data-theme="light"] .funnel-pain-text { color: #2e5c2e; }
[data-theme="light"] .funnel-pain-text strong { color: #1b5e20; }

.funnel-pain-text strong {
  color: #fff;
  font-weight: 700;
}

@media (min-width: 769px) {
  .funnel-pain {
    padding: 48px 0;
  }
  .funnel-pain-text {
    font-size: 1.25rem;
    padding: 0;
    color: #e0e8e0;
  }
  .funnel-pain-text strong {
    color: #fff;
  }
}

/* Как это работает — mobile: два телефона столбиком */
.funnel-how {
  padding: 36px 0 48px;
}

.funnel-how-phones {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  margin-top: 20px;
}

.funnel-how-phones .phone-mockup {
  flex-shrink: 0;
}

@media (min-width: 769px) {
  .funnel-how {
    padding: 64px 0 80px;
  }
  .funnel-how-phones {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    margin-top: 32px;
  }
}

/* Sections common — mobile размеры */
.section-title {
  margin: 0 0 12px;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-lead {
  margin: 0 0 28px;
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 560px;
}

@media (min-width: 769px) {
  .section-title {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
  }
  .section-lead {
    font-size: 1.05rem;
    margin-bottom: 40px;
  }
}

/* Showcase — блок «В действии», телефоны с лёгким ореолом */
.screens-showcase {
  padding: 40px 0 48px;
  padding-bottom: max(48px, env(safe-area-inset-bottom));
  background: var(--surface);
}

.screens-showcase .phone-mockup-wrapper {
  padding: 20px 12px;
  border-radius: 24px;
  background: radial-gradient(
    ellipse 100% 80% at 50% 50%,
    rgba(0, 0, 0, 0.08) 0%,
    transparent 70%
  );
}

.showcase-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: center;
  margin-bottom: 36px;
}

.showcase-row:last-child {
  margin-bottom: 0;
}

.showcase-content {
  max-width: none;
  text-align: center;
}

.showcase-title {
  margin: 0 0 10px;
  font-size: 1.15rem;
  font-weight: 600;
}

.showcase-content p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.showcase-row .phone-mockup-wrapper {
  margin: 0 auto;
  width: fit-content;
}

@media (min-width: 769px) {
  .screens-showcase {
    padding: 64px 0 80px;
  }
  .showcase-row {
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    margin-bottom: 56px;
  }
  .showcase-content {
    max-width: 400px;
    text-align: left;
  }
  .showcase-title {
    font-size: 1.35rem;
  }
  .showcase-content p {
    font-size: 1rem;
  }
  .showcase-row--reverse .showcase-content { order: 2; }
  .showcase-row--reverse .phone-mockup { order: 1; }
}

/* Features — mobile: одна колонка */
.features {
  padding: 40px 0 48px;
}

.features-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 18px;
  transition: border-color 0.2s;
}

.feature-card:hover {
  border-color: rgba(76, 175, 80, 0.4);
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
  background: rgba(76, 175, 80, 0.15);
  color: var(--accent);
  font-size: 1.1rem;
  border-radius: 12px;
}

.feature-icon--arrows {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 0;
}
.feature-icon--arrows .feature-arrow {
  display: block;
  flex-shrink: 0;
}
.feature-icon--arrows .feature-arrow--up {
  color: var(--accent);
}
.feature-icon--arrows .feature-arrow--down {
  color: #c62828;
}

.feature-card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 600;
}

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

@media (min-width: 640px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}

@media (min-width: 769px) {
  .features {
    padding: 80px 0;
  }
  .feature-card {
    padding: 24px;
  }
  .feature-icon {
    width: 44px;
    height: 44px;
    font-size: 1.25rem;
  }
  .feature-icon--arrows .feature-arrow {
    width: 16px;
    height: 16px;
  }
  .feature-card h3 {
    font-size: 1.15rem;
  }
  .feature-card p {
    font-size: 0.95rem;
  }
}

@media (min-width: 900px) {
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Screenshots (legacy grid — не используется в текущем HTML) */
.screenshots {
  padding: 80px 0;
  background: var(--surface);
}

.screenshots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.screenshot-item {
  margin: 0;
  background: var(--bg);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.screenshot-item img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 9 / 19;
  object-fit: cover;
}

.screenshot-item.placeholder img {
  display: none;
}

.screenshot-item.placeholder {
  min-height: 320px;
}

.screenshot-item.placeholder::before {
  content: 'Скриншот';
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 9 / 19;
  min-height: 320px;
  background: var(--bg);
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.screenshot-item figcaption {
  padding: 14px 18px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* FAQ */
.faq {
  padding: 48px 0 56px;
  background: var(--surface);
}
.faq-download {
  padding-bottom: max(56px, env(safe-area-inset-bottom));
}

.faq-download-row {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

@media (max-width: 768px) {
  .faq-download .download-in-section {
    margin-top: 28px;
    padding-top: 28px;
  }
  .download-cta-text {
    max-width: none;
  }
  .btn-store {
    min-height: 52px;
    padding: 14px 16px;
  }
}
.faq-column {
  min-width: 0;
}
.download-column {
  min-width: 0;
}

/* Единый размер шрифтов и ровный блок в секции FAQ + Скачать */
.faq-download .section-title,
.faq-download .download-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.faq-download .section-lead,
.faq-download .download-lead,
.faq-download .download-extra,
.faq-download .download-cta-text {
  font-size: 1rem;
  color: var(--text-secondary);
}
.faq-download .download-cta-text { color: var(--text); }
.faq-download .section-lead { margin-bottom: 20px; }
.faq-download .download-lead { margin-bottom: 4px; }
.faq-download .download-extra { margin-bottom: 6px; }
.faq-download .download-cta-text { margin-bottom: 20px; }

@media (min-width: 900px) {
  .faq-download-row {
    flex-direction: row;
    align-items: stretch;
    gap: 48px;
  }
  .faq-column {
    flex: 1 1 50%;
    max-width: 520px;
    min-height: 360px;
  }
  .faq-column .faq-list {
    margin-left: 0;
    margin-right: 0;
  }
  .download-column {
    flex: 1 1 50%;
    min-width: 280px;
    padding-left: 32px;
    border-left: 2px solid var(--accent);
  }
}

.faq-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 640px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-item:first-child { border-top: 1px solid var(--border); }

.faq-question {
  width: 100%;
  padding: 18px 44px 18px 0;
  min-height: 52px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  line-height: 1.4;
  transition: color 0.2s;
}
.faq-question:hover { color: var(--accent); }
.faq-question::after {
  content: '';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--text-secondary);
  border-bottom: 2px solid var(--text-secondary);
  transition: transform 0.2s, border-color 0.2s;
}
.faq-item.is-open .faq-question::after {
  transform: translateY(-30%) rotate(-135deg);
  border-color: var(--accent);
}
.faq-answer {
  padding: 0 0 16px 0;
  margin: 0;
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.5;
  display: none;
}
.faq-item.is-open .faq-answer { display: block; }

@media (min-width: 769px) {
  .faq { padding: 64px 0 80px; }
  .faq-question { padding: 18px 48px 18px 0; }
  .faq-answer { padding: 0 0 18px 0; }
}

/* Лёгкая анимация появления при скролле */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Download — mobile: кнопки столбиком на всю ширину */
.download {
  padding: 32px 0 40px;
  padding-bottom: max(40px, env(safe-area-inset-bottom));
  background: var(--surface);
  border-top: 2px solid var(--accent);
  text-align: center;
}
[data-theme="light"] .download {
  background: color-mix(in srgb, var(--accent) 0.06%, var(--bg));
}

/* Блок «Скачать» внутри объединённой секции FAQ + Download */
.faq-download .download-in-section {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 2px solid var(--accent);
  text-align: center;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}
[data-theme="light"] .faq-download .download-in-section {
  border-top-color: var(--accent);
}
@media (min-width: 900px) {
  .faq-download .download-in-section {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
    margin-left: 0;
    margin-right: 0;
    text-align: left;
  }
}

.download-inner,
.download-in-section {
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
}
.download-inner {
  margin: 0 auto;
}

.download-title {
  margin: 0 0 2px;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.download-lead {
  margin: 0 0 4px;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.download-extra {
  margin: 0 0 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  opacity: 0.9;
}

.download-cta-text {
  margin: 0 0 20px;
  font-size: 1rem;
  color: var(--text);
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
}

.download-buttons {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 10px;
  margin-bottom: 14px;
}

.btn-store {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 20px;
  min-height: 52px;
  min-width: 0;
  width: 100%;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s, transform 0.1s;
  text-align: left;
}

.btn-store:hover {
  border-color: var(--accent);
  background: rgba(76, 175, 80, 0.1);
}

.btn-store:active {
  transform: scale(0.98);
}

.btn-store--play .store-icon { color: #a0a0a0; }
.btn-store--play:hover .store-icon { color: var(--accent); }

.btn-store--apple .store-icon { color: #e0e0e0; }
.btn-store--apple:hover .store-icon { color: var(--text); }

.store-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.store-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.store-label {
  font-size: 0.65rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.store-name {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

@media (min-width: 769px) {
  .download {
    padding: 40px 0 48px;
    padding-bottom: 48px;
  }
  .faq-download .download-in-section {
    margin-top: 48px;
    padding-top: 40px;
  }
  .download-inner,
  .download-in-section {
    padding-left: 20px;
    padding-right: 20px;
  }
  .download-title {
    font-size: 1.5rem;
  }
  .download-buttons {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    width: auto;
    gap: 12px;
    margin-bottom: 16px;
  }
  .btn-store {
    width: auto;
    min-width: 180px;
    min-height: 0;
    padding: 10px 18px 10px 14px;
  }
}

/* Footer — mobile: столбик по центру */
.site-footer {
  padding: 24px 0;
  padding-bottom: max(24px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
}

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

.footer-brand {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.footer-brand-link {
  color: var(--text-secondary);
  text-decoration: none;
}
.footer-brand-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

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

@media (min-width: 769px) {
  .site-footer {
    padding: 28px 0;
    padding-bottom: 28px;
  }
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
  .footer-links {
    gap: 24px;
  }
  .footer-links a {
    min-height: 0;
    display: inline;
  }
}

/* Очень узкие экраны (320–380px) */
@media (max-width: 380px) {
  .hero-title {
    font-size: 1.4rem;
  }
  .hero-lead {
    font-size: 0.9375rem;
  }
  .phone-mockup,
  .hero .phone-mockup,
  .funnel-how-phones .phone-mockup,
  .showcase-row .phone-mockup {
    width: min(280px, 90vw);
    max-width: 90vw;
  }
  .showcase-row .phone-mockup-wrapper {
    padding: 16px 8px;
  }
  .feature-card {
    padding: 16px 14px;
  }
  .feature-icon {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }
  .faq-download-row {
    gap: 24px;
  }
}

/* ========== Страница «История одного дела» ========== */
.story-page .story-main {
  padding-top: calc(72px + max(28px, env(safe-area-inset-top)));
  padding-bottom: max(48px, env(safe-area-inset-bottom));
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
}

.story-article {
  max-width: 640px;
  margin: 0 auto;
}

.story-title {
  margin: 0 0 12px;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.story-lead {
  margin: 0 0 32px;
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.story-body {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text);
}

.story-body p {
  margin: 0 0 1.25em;
}

.story-body p:last-child {
  margin-bottom: 0;
}

.story-byline {
  padding-left: 1rem;
  border-left: 3px solid var(--accent);
  color: var(--text-secondary);
  font-size: 1rem;
}

.story-highlight {
  padding: 1.25rem 1rem;
  background: color-mix(in srgb, var(--accent) 8%, var(--bg));
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--border));
}

.story-icon {
  display: inline-block;
  width: 1.15em;
  height: 1.15em;
  vertical-align: -0.2em;
  margin-right: 0.35em;
  color: var(--text-secondary);
}

.story-icon svg {
  width: 100%;
  height: 100%;
}

.story-icon--accent {
  color: var(--accent);
}

.story-ps {
  margin: 2rem 0 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.story-ps--closing {
  margin-top: 0.75rem;
  font-size: 1rem;
  color: var(--text);
}

.story-ps__link {
  color: var(--accent);
  text-decoration: none;
}

.story-ps__link:hover {
  text-decoration: underline;
}

.story-cta {
  margin: 2rem 0 0;
  text-align: center;
}

.story-cta .btn {
  display: inline-block;
}

.nav-link--story {
  font-family: 'Bad Script', cursive;
  font-size: 1.05em;
  letter-spacing: 0.02em;
  color: var(--accent);
}

.nav-link--story:hover {
  color: var(--accent-hover);
}

.nav-link--current {
  font-weight: 500;
}

.nav-link--current:not(.nav-link--story) {
  color: var(--text);
}

@media (min-width: 769px) {
  .story-page .story-main {
    padding-top: calc(80px + 32px);
    padding-left: 24px;
    padding-right: 24px;
  }
  .story-title {
    font-size: 2rem;
  }
  .story-lead {
    font-size: 1.1rem;
    margin-bottom: 40px;
  }
  .story-body {
    font-size: 1.1rem;
  }
}

@media (max-width: 340px) {
  .container {
    padding-left: 12px;
    padding-right: 12px;
  }
  .hero-cta {
    gap: 10px;
  }
  .hero-cta .btn {
    padding: 12px 16px;
    font-size: 0.9375rem;
  }
}
