/* ============================================================
   Соты — лендинг. Палитра "Бумага" (зеркалит native/src/theme/index.ts)
   ============================================================ */
:root {
  --bg:         #f6f4ef;
  --card:       #fbfaf6;
  --subtle:     #ede9df;
  --border:     rgba(40, 30, 20, 0.10);
  --ink:        #1a1916;
  --muted:      rgba(40, 30, 20, 0.55);
  --faint:      rgba(40, 30, 20, 0.25);
  --accent:     #b35a3c;
  --accent-dark:#974428;
  --accent-soft:#f3e3da;
  --on-accent:  #fffaf6;

  --maxw: 1080px;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(40, 30, 20, 0.06), 0 8px 24px rgba(40, 30, 20, 0.06);
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; }

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

h1, h2, h3 { margin: 0; line-height: 1.2; }

/* ---------- Шапка ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 244, 239, 0.85);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 700;
}
.brand-mark {
  background: var(--accent);
  border-radius: 10px;
  padding: 4px;
}
.brand-name { font-size: 20px; letter-spacing: 0.2px; }

.primary-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 24px;
}
.primary-nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  transition: color 0.15s ease;
}
.primary-nav a:hover { color: var(--ink); }
.primary-nav .nav-cta {
  color: var(--on-accent);
  background: var(--accent);
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 600;
}
.primary-nav .nav-cta:hover { background: var(--accent-dark); color: var(--on-accent); }

.nav-toggle {
  margin-left: auto;
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 0 auto;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: var(--shadow);
}
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-1px); }

.store-badges { display: flex; flex-wrap: wrap; gap: 10px; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  cursor: default;
  user-select: none;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
}
.cta-center { justify-content: center; }

.apk-note {
  margin: 14px 0 0;
  max-width: 34em;
  font-size: 13.5px;
  color: var(--muted);
}
.download .apk-note { margin-left: auto; margin-right: auto; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 120% at 85% -10%, var(--accent-soft) 0%, transparent 55%),
    var(--bg);
}
.hero::after {
  /* мягкий сото-мотив (по названию «Соты») */
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='100' viewBox='0 0 56 100'%3E%3Cg fill='none' stroke='%23b35a3c' stroke-opacity='0.10' stroke-width='2'%3E%3Cpath d='M28 0 L56 16 L56 50 L28 66 L0 50 L0 16 Z'/%3E%3Cpath d='M28 66 L56 82 L56 116 L28 132 L0 116 L0 82 Z'/%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.7;
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 48px;
  padding: 72px 20px 88px;
}
.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.hero h1 {
  font-size: clamp(44px, 8vw, 76px);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 16px;
}
.lead {
  font-size: clamp(17px, 2.2vw, 20px);
  color: var(--muted);
  max-width: 30em;
  margin: 0;
}
.hero-points {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  padding: 0;
  margin: 28px 0 0;
  color: var(--ink);
  font-weight: 500;
}
.hero-points li { display: flex; align-items: center; gap: 8px; }
.hero-points li::before {
  content: "✓";
  color: var(--accent);
  font-weight: 800;
}

/* ---------- Телефон-мокап / слот под скриншот ---------- */
.hero-visual { display: flex; justify-content: center; }
.phone {
  width: 280px;
  max-width: 78vw;
  aspect-ratio: 9 / 19;
  background: #2a2622;
  border-radius: 38px;
  padding: 12px;
  box-shadow: var(--shadow);
}
.phone-screen {
  width: 100%;
  height: 100%;
  border-radius: 28px;
  overflow: hidden;
  background: var(--card);
}
.phone img.phone-screen { object-fit: cover; }

/* ---------- Секции ---------- */
.section { padding: 72px 0; }
.section-alt { background: var(--subtle); }
.section-title {
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 800;
  letter-spacing: -0.5px;
  text-align: center;
}
.section-sub {
  text-align: center;
  color: var(--muted);
  font-size: 17px;
  max-width: 36em;
  margin: 12px auto 0;
}

/* ---------- Карточки возможностей ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 44px;
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(40,30,20,0.08), 0 16px 36px rgba(40,30,20,0.10); }
.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  font-size: 26px;
  background: var(--accent-soft);
  border-radius: 12px;
  margin-bottom: 16px;
}
.card h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.card p { margin: 0; color: var(--muted); font-size: 14.5px; }

/* ---------- Персоны ---------- */
.cards-4 { grid-template-columns: repeat(4, 1fr); }

/* Нечётное число карточек — центрируем неполный последний ряд через flex */
.cards-features {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}
.cards-features .card { flex: 0 1 calc(25% - 15px); }
.persona {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}
.persona-emoji { font-size: 38px; display: block; margin-bottom: 12px; }
.persona h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.persona p { margin: 0; color: var(--muted); font-size: 14px; }

/* ---------- Как это работает ---------- */
.how-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 56px;
}
.how-copy .section-title { text-align: left; }
.steps {
  list-style: none;
  padding: 0;
  margin: 36px 0 0;
  display: grid;
  gap: 28px;
}
.steps li { display: flex; gap: 18px; }
.step-num {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 800;
  font-size: 18px;
}
.steps h3 { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.steps p { margin: 0; color: var(--muted); }

.how-visual {
  display: flex;
  justify-content: center;
  gap: 20px;
}
.phone-sm { width: 200px; }
.phone-sm:nth-child(2) { transform: translateY(28px); }

/* ---------- Приватность ---------- */
.privacy {
  background: var(--accent);
  color: var(--on-accent);
}
.privacy-inner { text-align: center; max-width: 42em; }
.privacy-emoji { font-size: 44px; display: block; margin-bottom: 16px; }
.privacy h2 {
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 800;
  margin-bottom: 14px;
}
.privacy p { margin: 0 auto; font-size: 18px; opacity: 0.92; }

/* ---------- Соты Pro (будущая платная версия) ---------- */
.pro { background: var(--accent-soft); }
.eyebrow-center { text-align: center; }
.pro-cards {
  grid-template-columns: repeat(2, 1fr);
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}
.pro-note {
  text-align: center;
  color: var(--muted);
  font-size: 15px;
  max-width: 42em;
  margin: 28px auto 0;
}

/* ---------- Скачать ---------- */
.download-inner { text-align: center; }

/* ---------- Футер ---------- */
.site-footer {
  background: var(--ink);
  color: rgba(255, 250, 246, 0.7);
  padding: 40px 0;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}
.site-footer .brand-name { color: var(--on-accent); }
.footer-note { margin: 0; font-size: 14px; }
.footer-meta {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}
.footer-meta a { color: var(--accent-soft); text-decoration: none; }
.footer-meta a:hover { text-decoration: underline; }

/* ============================================================
   Адаптив
   ============================================================ */
@media (max-width: 900px) {
  .cards, .cards-4 { grid-template-columns: repeat(2, 1fr); }
  .cards-features .card { flex-basis: calc(50% - 10px); }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .primary-nav {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    background: var(--card);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .primary-nav.open { max-height: 320px; }
  .primary-nav a {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    font-size: 16px;
  }
  .primary-nav .nav-cta {
    margin: 12px 20px;
    border-radius: 999px;
    text-align: center;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 48px 20px 64px;
    text-align: center;
  }
  .hero-copy { order: 1; }
  .hero-visual { order: 2; }
  .lead { margin-left: auto; margin-right: auto; }
  .cta-row { justify-content: center; }
  .hero-points { justify-content: center; }

  .how-inner { grid-template-columns: 1fr; gap: 36px; }
  .how-copy .section-title { text-align: center; }
  .phone-sm:nth-child(2) { transform: none; }
}

@media (max-width: 480px) {
  .cards, .cards-4 { grid-template-columns: 1fr; }
  .cards-features .card { flex-basis: 100%; }
  .section { padding: 56px 0; }
  .how-visual { gap: 14px; }
  .phone-sm { width: 46vw; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
