/* ============ Базовые стили — светлый минимализм ============ */
:root {
  --bg: #ffffff;
  --bg-soft: #f5f5f7;
  --text: #1d1d1f;
  --text-soft: #6e6e73;
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --border: #d2d2d7;
  --radius: 18px;
  --shadow: 0 4px 24px rgba(0, 0, 0, .06);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, .12);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 760px; }

/* ============ Шапка ============ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .8);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, .06);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.logo-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, #0071e3, #42a1ff);
  color: #fff; font-weight: 800; font-size: 13px; letter-spacing: .5px;
}
.logo-text { font-weight: 700; font-size: 17px; }
.nav { display: flex; gap: 28px; }
.nav a { color: var(--text); text-decoration: none; font-size: 14px; font-weight: 500; transition: color .2s; }
.nav a:hover { color: var(--accent); }

/* ============ Hero ============ */
.hero { padding: 110px 0 90px; text-align: center; }
.hero-eyebrow {
  display: inline-block;
  font-size: 13px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase;
  color: var(--accent); background: rgba(0, 113, 227, .08);
  padding: 6px 14px; border-radius: 100px; margin-bottom: 24px;
}
.hero h1 {
  font-size: clamp(38px, 6vw, 64px);
  font-weight: 800; letter-spacing: -.02em; line-height: 1.08;
}
.hero-sub {
  max-width: 560px; margin: 22px auto 36px;
  font-size: 19px; color: var(--text-soft);
}

/* ============ Кнопки ============ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 30px; border-radius: 100px;
  font-size: 16px; font-weight: 600; text-decoration: none;
  border: none; cursor: pointer; transition: all .2s ease;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-secondary {
  background: transparent; color: var(--accent);
  border: 1px solid var(--accent);
}
.btn-secondary:hover { background: rgba(0, 113, 227, .06); }
.btn-lg { padding: 16px 40px; font-size: 17px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none !important; }

/* ============ Секции ============ */
.section { padding: 80px 0; }
.section-gray { background: var(--bg-soft); }
.section-title { font-size: 34px; font-weight: 700; letter-spacing: -.01em; margin-bottom: 8px; }
.section-sub { color: var(--text-soft); margin-bottom: 44px; }

/* ============ Сетка карточек ============ */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}
.app-card {
  display: flex; flex-direction: column;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  text-decoration: none; color: var(--text);
  transition: transform .25s ease, box-shadow .25s ease;
}
.app-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.app-card-cover {
  aspect-ratio: 16 / 9; width: 100%;
  object-fit: cover; background: var(--bg-soft);
}
.app-card-body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.app-card h3 { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.app-card .tagline { color: var(--text-soft); font-size: 15px; flex: 1; }
.app-card-meta {
  display: flex; gap: 16px; margin-top: 18px; padding-top: 16px;
  border-top: 1px solid var(--bg-soft);
  font-size: 13px; color: var(--text-soft);
}
.app-card-meta strong { color: var(--text); font-weight: 600; }

/* ============ Страница приложения ============ */
.back-link {
  display: inline-block; margin: 32px 0 24px;
  color: var(--text-soft); text-decoration: none; font-size: 15px;
  transition: color .2s;
}
.back-link:hover { color: var(--accent); }

.app-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; margin-bottom: 56px; }
.app-hero-cover {
  width: 100%; border-radius: var(--radius);
  box-shadow: var(--shadow-lg); background: var(--bg-soft);
}
.app-hero .app-version {
  display: inline-block; font-size: 13px; font-weight: 600;
  color: var(--accent); background: rgba(0, 113, 227, .08);
  padding: 4px 12px; border-radius: 100px; margin-bottom: 14px;
}
.app-hero h1 { font-size: clamp(30px, 4vw, 44px); font-weight: 800; letter-spacing: -.02em; margin-bottom: 12px; }
.app-hero .tagline { font-size: 18px; color: var(--text-soft); margin-bottom: 28px; }

.download-box {
  background: var(--bg-soft); border-radius: var(--radius);
  padding: 24px; margin-bottom: 20px;
}
.download-stats { display: flex; gap: 20px; font-size: 14px; color: var(--text-soft); margin-bottom: 18px; }
.download-stats strong { color: var(--text); }

.checksums { margin-top: 20px; }
.checksums h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .8px; color: var(--text-soft); margin-bottom: 10px; }
.checksum-row {
  display: flex; align-items: center; gap: 10px;
  font-family: "SF Mono", Consolas, monospace; font-size: 13px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 10px; padding: 8px 12px; margin-bottom: 8px;
}
.checksum-row .label { color: var(--text-soft); font-weight: 600; font-size: 11px; flex-shrink: 0; }
.checksum-row code { word-break: break-all; }
.copy-btn {
  margin-left: auto; flex-shrink: 0;
  background: none; border: 1px solid var(--border); border-radius: 6px;
  font-size: 11px; padding: 3px 9px; cursor: pointer; color: var(--text-soft);
  transition: all .2s;
}
.copy-btn:hover { color: var(--accent); border-color: var(--accent); }

.app-section { margin-bottom: 56px; }
.app-section h2 { font-size: 26px; font-weight: 700; margin-bottom: 18px; letter-spacing: -.01em; }
.app-section p { color: #424245; margin-bottom: 12px; }
.app-section ul { padding-left: 22px; color: #424245; }
.app-section li { margin-bottom: 6px; }

/* Скриншоты */
.screens-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px;
}
.screens-grid img {
  width: 100%; border-radius: 12px; cursor: zoom-in;
  border: 1px solid var(--border);
  transition: transform .2s ease, box-shadow .2s ease;
}
.screens-grid img:hover { transform: scale(1.02); box-shadow: var(--shadow-lg); }

/* Инструкция */
.steps { counter-reset: step; list-style: none; padding-left: 0; }
.steps li {
  counter-increment: step;
  position: relative; padding-left: 52px; margin-bottom: 20px;
}
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 1px;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px;
}
.steps li strong { display: block; margin-bottom: 2px; }

/* Требования */
.req-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.req-table td { padding: 10px 0; border-bottom: 1px solid var(--bg-soft); }
.req-table td:first-child { color: var(--text-soft); width: 220px; }

/* ============ FAQ ============ */
.faq-item { margin-bottom: 28px; }
.faq-item h3 { font-size: 18px; font-weight: 600; margin-bottom: 6px; }
.faq-item p { color: var(--text-soft); }

/* ============ Лайтбокс ============ */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0, 0, 0, .85);
  display: flex; align-items: center; justify-content: center;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 90vw; max-height: 85vh; border-radius: 8px; }
.lightbox-close, .lightbox-nav {
  position: absolute; background: rgba(255, 255, 255, .12);
  border: none; color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; transition: background .2s;
}
.lightbox-close:hover, .lightbox-nav:hover { background: rgba(255, 255, 255, .25); }
.lightbox-close { top: 24px; right: 24px; width: 44px; height: 44px; font-size: 26px; }
.lightbox-nav { top: 50%; transform: translateY(-50%); width: 52px; height: 52px; font-size: 32px; }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

/* ============ Подвал ============ */
.site-footer {
  border-top: 1px solid var(--bg-soft);
  padding: 32px 0; margin-top: 40px;
}
.footer-inner { text-align: center; font-size: 13px; color: var(--text-soft); }

/* ============ Тост «скопировано» ============ */
.toast {
  position: fixed; bottom: 32px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--text); color: #fff; font-size: 14px; font-weight: 500;
  padding: 10px 20px; border-radius: 100px; opacity: 0;
  pointer-events: none; transition: all .3s ease; z-index: 300;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============ Адаптив ============ */
@media (max-width: 820px) {
  .hero { padding: 70px 0 60px; }
  .app-hero { grid-template-columns: 1fr; gap: 28px; }
  .section { padding: 56px 0; }
  .nav { gap: 18px; }
}
