/* «an app» — лендинг (макет design/an-app-landing-ready, вёрстка по БЭМ).
   Плоско: без градиентов и теней. Веса шрифта только 400/500 (design.md §2). */

:root {
  --bg-primary: #0F0F12;
  --bg-secondary: #131318;
  --bg-surface: #1C1C22;
  --bg-border: #2A2A30;
  --text-primary: #FAFAFA;
  --text-default: #E4E4E7;
  --text-secondary: #D3D1C7;
  --text-muted: #B4B2A9;
  --text-disabled: #888780;
  --accent: #7F77DD;
  --accent-hover: #8D86E2;
  --accent-soft: rgba(127, 119, 221, 0.18);
  --radius-card: 12px;
  --radius-cta: 14px;
}

* { box-sizing: border-box; }

html,
body {
  margin: 0;
  background: var(--bg-primary);
  color: var(--text-default);
}

body {
  font-family: 'Roboto', -apple-system, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* ── container ── */

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ── icon (Material Symbols) ── */

.icon {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' -25, 'opsz' 24;
}

/* ── nav ── */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--bg-border);
}

.nav__inner {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.nav__name {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav__link {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 400;
  text-decoration: none;
}

.nav__link:hover { color: var(--text-primary); }

.nav__link--cta {
  background: var(--accent);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
  padding: 9px 16px;
  border-radius: var(--radius-cta);
  white-space: nowrap;
}

.nav__link--cta:hover { background: var(--accent-hover); }

/* ── hero ── */

.hero { padding: 72px 0 88px; }

.hero__grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 64px;
  align-items: center;
}

.hero__title {
  font-size: 52px;
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -1.2px;
  color: var(--text-primary);
  margin: 28px 0 20px;
  text-wrap: balance;
}

.hero__lede {
  font-size: 18px;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 520px;
  margin: 0 0 32px;
  text-wrap: pretty;
}

.hero__phone { width: 300px; margin: 0 auto; }

/* ── download (CTA + мета) ── */

.download {
  display: flex;
  align-items: stretch;
  gap: 20px;
  flex-wrap: wrap;
}

.download--center { justify-content: center; margin-top: 32px; }

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

.download__btn {
  background: var(--accent);
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 500;
  padding: 0 26px;
  height: 54px;
  border-radius: var(--radius-cta);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

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

.download__meta {
  font-size: 13px;
  color: var(--text-muted);
}

.download__meta-item { white-space: nowrap; }

.download__meta-sep {
  color: var(--text-disabled);
  padding: 0 6px;
}

/* ── qr ── */

.qr {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-cta);
  padding: 10px 16px 10px 10px;
}

.qr__box {
  width: 86px;
  height: 86px;
  background: #FAFAFA;
  border-radius: 8px;
  padding: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.qr__img {
  width: 72px;
  height: 72px;
  display: block;
}

.qr__label {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 150px;
}

/* ── phone (скриншот в рамке) ── */

.phone {
  border: 6px solid var(--bg-border);
  border-radius: 30px;
  overflow: hidden;
  background: #000;
  line-height: 0;
}

.phone__img {
  width: 100%;
  height: auto;
  display: block;
}

/* ── section ── */

.section { padding: 84px 0; }

.section--alt { background: var(--bg-secondary); }

.section__eyebrow {
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 1.6px;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.section__title {
  font-size: 34px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.6px;
  color: var(--text-primary);
  margin: 0 0 14px;
  text-wrap: balance;
}

.section__lede {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 600px;
  margin: 0;
  text-wrap: pretty;
}

/* ── steps (как это работает) ── */

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

.steps__item {
  background: var(--bg-surface);
  border-radius: var(--radius-card);
  padding: 26px;
}

.steps__num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 16px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.steps__title {
  font-size: 18px;
  font-weight: 500;
  color: var(--text-primary);
  margin: 0 0 8px;
}

.steps__text {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

/* ── features ── */

.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 48px;
}

.features__item {
  background: var(--bg-surface);
  border-radius: var(--radius-card);
  padding: 22px;
}

.features__icon {
  font-size: 24px;
  color: var(--accent);
}

.features__title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  margin: 16px 0 6px;
}

.features__text {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0;
}

/* ── screens (галерея скриншотов) ── */

.screens {
  display: flex;
  gap: 24px;
  justify-content: center;
  align-items: flex-start;
  margin-top: 48px;
  flex-wrap: wrap;
}

.screens__phone { width: 220px; }

.screens__caption {
  font-size: 12px;
  color: var(--text-disabled);
  text-align: center;
  margin-top: 12px;
  line-height: normal;
}

/* ── lostfilm (вход) ── */

.lostfilm {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 64px;
  align-items: center;
}

.lostfilm__points {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 32px;
}

.lostfilm__point {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.lostfilm__point-icon {
  font-size: 22px;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 1px;
}

.lostfilm__point-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  margin: 0 0 4px;
}

.lostfilm__point-text {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

/* ── install ── */

.install { max-width: 720px; }

.install__steps {
  display: flex;
  flex-direction: column;
  margin-top: 40px;
}

.install__step {
  display: flex;
  gap: 20px;
  padding: 22px 0;
  border-top: 1px solid var(--bg-border);
}

.install__step:last-child { border-bottom: 1px solid var(--bg-border); }

.install__num {
  font-size: 15px;
  font-weight: 500;
  color: var(--accent);
  width: 28px;
  flex-shrink: 0;
}

.install__title {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
  margin: 0 0 6px;
}

.install__text {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

.install__nowrap { white-space: nowrap; }

.install__note {
  margin-top: 28px;
  background: var(--bg-surface);
  border-radius: var(--radius-card);
  padding: 18px 22px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.install__note-icon {
  font-size: 20px;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-top: 2px;
}

.install__note-text {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

/* ── changelog ── */

.changelog { max-width: 760px; }

.changelog__rows {
  margin-top: 36px;
  display: flex;
  flex-direction: column;
}

.changelog__row {
  display: grid;
  grid-template-columns: 110px 88px 1fr;
  gap: 20px;
  padding: 16px 0;
  border-top: 1px solid var(--bg-border);
  align-items: baseline;
}

.changelog__row:last-child { border-bottom: 1px solid var(--bg-border); }

.changelog__row--hidden { display: none; }

.changelog__date {
  font-size: 13px;
  color: var(--text-disabled);
  white-space: nowrap;
}

.changelog__version {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
}

.changelog__text {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

.changelog__more {
  margin-top: 20px;
  background: none;
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-cta);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  padding: 11px 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.changelog__more:hover {
  color: var(--text-primary);
  border-color: var(--text-disabled);
}

/* ── video (share-страница тайтла /video/{id}) ── */

.video { min-height: 55vh; }

.video__grid {
  display: grid;
  /* Постеры lostfilm — широкие баннеры, узкая колонка их слишком мельчит. */
  grid-template-columns: 380px 1fr;
  gap: 48px;
  align-items: start;
}

.video__poster {
  width: 100%;
  border-radius: 10px;
  display: block;
}

/* Кнопка сразу под постером — чтобы не мотать вниз мимо описания. */
.video__cta {
  margin-top: 16px;
  width: 100%;
  justify-content: center;
}

.video__name {
  font-size: 34px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.6px;
  color: var(--text-primary);
  margin: 0 0 6px;
  text-wrap: balance;
}

.video__orig {
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.video__meta {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.video__meta-sep {
  color: var(--text-disabled);
  padding: 0 8px;
}

.video__desc {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 640px;
  margin: 0 0 32px;
  text-wrap: pretty;
}

.video__open {
  border-top: 1px solid var(--bg-border);
  padding-top: 28px;
}

.video__open-title {
  font-size: 20px;
  font-weight: 500;
  color: var(--text-primary);
  margin: 0 0 10px;
}

.video__open-hint {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 520px;
  margin: 0 0 24px;
}

.video__fallback {
  text-align: center;
  padding: 48px 0;
}

.video__fallback .video__open-hint {
  margin: 12px auto 0;
}

@media (max-width: 720px) {
  .video__grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .video__aside {
    max-width: 420px;
    margin: 0 auto;
    width: 100%;
  }

  .video__name { font-size: 27px; }
}

/* ── faq ── */

.faq {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 48px;
}

.faq__item {
  background: var(--bg-surface);
  border-radius: var(--radius-card);
  padding: 20px 24px;
}

.faq__question {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  margin: 0 0 8px;
}

.faq__answer {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

/* ── final (финальный CTA) ── */

.final {
  text-align: center;
  padding: 96px 0;
}

.final__title {
  font-size: 38px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.6px;
  color: var(--text-primary);
  margin: 24px 0 0;
  text-wrap: balance;
}

/* ── footer ── */

.footer {
  border-top: 1px solid var(--bg-border);
  padding: 40px 0 56px;
}

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

.footer__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-secondary);
}

.footer__links {
  display: flex;
  gap: 24px;
}

.footer__link {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
}

.footer__link:hover { color: var(--text-primary); }

.footer__disclaimer {
  font-size: 12px;
  color: var(--text-disabled);
  line-height: 1.7;
  max-width: 760px;
  margin: 0;
}

/* ── адаптив ── */

@media (max-width: 980px) {
  .hero__grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .hero__phone { width: 260px; }

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

  .steps { grid-template-columns: 1fr; }

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

  .lostfilm__phone {
    width: 280px;
    margin: 0 auto;
  }

  .nav__link:not(.nav__link--cta) { display: none; }
}

@media (max-width: 640px) {
  .container { padding: 0 20px; }

  .hero { padding: 48px 0 64px; }

  .hero__title {
    font-size: 36px;
    letter-spacing: -0.8px;
  }

  .section { padding: 60px 0; }

  .section__title { font-size: 27px; }

  .features { grid-template-columns: 1fr; }

  .faq { grid-template-columns: 1fr; }

  .qr { display: none; }

  .changelog__row { grid-template-columns: 92px 1fr; }

  .changelog__text { grid-column: 1 / -1; }

  .final { padding: 64px 0; }
}
