* { box-sizing: border-box; }

:root{
  --bg: #faf7f2;
  --card: #ffffff;
  --text: #2b2b2b;
  --muted-text: #6b6b6b;

  --brand: #5a0f1b;
  --brand-dark: #2e0a12;
  --brand-soft: rgba(90, 15, 27, 0.08);

  --shadow: 0 12px 32px rgba(0,0,0,0.10);
  --shadow-soft: 0 10px 30px rgba(0,0,0,0.08);

  --radius-lg: 24px;
  --radius-md: 18px;

  --maxw: 1100px;
}

html, body { height: 100%; }

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

a { color: inherit; }

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

/* ---------------- Topbar ---------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(250, 247, 242, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.topbar-inner {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-mark {
  font-weight: 700;
  letter-spacing: 0.4px;
  color: var(--brand);
}

.topnav {
  display: flex;
  gap: 18px;
}

.topnav a {
  text-decoration: none;
  font-weight: 600;
  color: rgba(43,43,43,0.82);
  padding: 8px 10px;
  border-radius: 999px;
}

.topnav a:hover {
  background: rgba(0,0,0,0.05);
}

/* ---------------- Hero ---------------- */
.hero {
  background: linear-gradient(180deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #ffffff;
  padding: 64px 0 72px;
}

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

.hero-media {
  display: flex;
  justify-content: center;
}

.app-mockup {
  width: min(340px, 100%);
  border-radius: 34px;
  box-shadow: 0 22px 70px rgba(0,0,0,0.32);
}

.hero-title {
  margin: 0 0 10px;
  font-size: 44px;
  letter-spacing: 0.2px;
}

.hero-subtitle {
  margin: 0 0 18px;
  font-size: 16px;
  opacity: 0.92;
  max-width: 520px;
}

.hero-card {
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--radius-lg);
  padding: 18px 18px;
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 60px rgba(0,0,0,0.18);
  max-width: 520px;
}

.hero-text {
  margin: 0 0 10px;
  opacity: 0.94;
}

.hero-note {
  margin: 0;
  font-size: 13px;
  opacity: 0.78;
}

/* ---------------- Sections ---------------- */
.section { padding: 64px 0; }

.section-muted { background: #ffffff; }

.section-title {
  margin: 0 0 26px;
  font-size: 30px;
  letter-spacing: 0.2px;
  text-align: center;
}

/* ---------------- Stores ---------------- */
.store-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  max-width: 760px;
  margin: 0 auto;
}

.store-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 18px 18px;
  display: flex;
  gap: 14px;
  align-items: center;
  border: 1px solid rgba(0,0,0,0.06);
}

.store-icon {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
}

.store-icon img {
  height: 28px;
  width: auto;
  display: block;
}

.store-title { font-weight: 700; }

.store-subtitle {
  color: var(--muted-text);
  font-size: 14px;
}

.section-hint {
  text-align: center;
  margin: 18px 0 0;
  font-size: 13px;
  color: var(--muted-text);
}

/* ---------------- Docs links on index ---------------- */
.docs-grid {
  max-width: 760px;
  margin: 0 auto;
  display: grid;
  gap: 14px;
}

.doc-link {
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.07);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  text-decoration: none;
  font-weight: 700;
  color: var(--brand);
  box-shadow: var(--shadow-soft);
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.doc-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 42px rgba(0,0,0,0.12);
}

/* ---------------- Footer ---------------- */
.footer {
  background: #f0ece6;
  padding: 42px 0 20px;
  color: #555;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.footer-title {
  font-weight: 700;
  color: #3d3d3d;
  margin-bottom: 8px;
}

.footer-text {
  font-size: 14px;
  line-height: 1.65;
}

.footer-text a {
  color: var(--brand);
  text-decoration: none;
  font-weight: 700;
}

.footer-text a:hover { text-decoration: underline; }

.footer-bottom {
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px solid rgba(0,0,0,0.06);
  font-size: 13px;
  display: flex;
  justify-content: center;
}

/* ---------------- Document pages header ---------------- */
.doc-page-header {
  background: linear-gradient(180deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff;
  padding: 22px 0;
}

.doc-header-inner {
  display: flex;
  align-items: center;
  gap: 14px;
}

.back-link {
  color: rgba(255,255,255,0.92);
  text-decoration: none;
  font-weight: 700;
  border: 1px solid rgba(255,255,255,0.22);
  padding: 10px 14px;
  border-radius: 999px;
  white-space: nowrap;
}

.back-link:hover { border-color: rgba(255,255,255,0.40); }

.doc-title {
  margin: 0;
  font-size: 22px;
  letter-spacing: 0.2px;
}

/* ---------------- Document pages body ---------------- */
.doc-container { padding: 28px 0 64px; }

.doc-card {
  max-width: 920px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 26px 24px;
  border: 1px solid rgba(0,0,0,0.06);
}

.doc-meta {
  margin: 0 0 16px;
  color: var(--muted-text);
  font-size: 13px;
}

/* ✅ Это важное: стили для HTML внутри .doc-text */
.doc-text {
  font-size: 15px;
  color: #2f2f2f;
}

.doc-text h2 {
  margin: 18px 0 10px;
  font-size: 18px;
  line-height: 1.35;
}

.doc-text h3 {
  margin: 16px 0 8px;
  font-size: 16px;
  line-height: 1.35;
}

.doc-text p {
  margin: 10px 0;
}

.doc-text ul {
  margin: 10px 0 10px 18px;
  padding: 0;
}

.doc-text li {
  margin: 6px 0;
}

.doc-text strong {
  font-weight: 700;
}

.doc-text a {
  color: var(--brand);
  text-decoration: none;
  font-weight: 700;
}

.doc-text a:hover {
  text-decoration: underline;
}

/* ---------------- Responsive ---------------- */
@media (max-width: 900px) {
  .topnav { display: none; }
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero-title { font-size: 40px; }
  .store-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
