/* Стили сайта «Азакон» — общий файл для всех страниц.
   Повторяет стиль приложения: кремовая «бумага» светлой темы,
   чёрная тёмная тема, бордовый акцент, карточки со скруглениями. */

/* ---------- Темы ---------- */

:root {
  --accent: #8a1c2b;          /* бордовый — как аббревиатуры кодексов в приложении */
  --accent-dark: #6f1522;
  --radius: 14px;             /* скругление карточек — как в приложении */
  /* Шрифты как в приложении: SF Pro на устройствах Apple, Segoe UI на Windows */
  --font-body: -apple-system, 'SF Pro Text', 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  --font-display: -apple-system, 'SF Pro Display', 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}

html[data-theme='light'] {
  --bg: #f6efe0;              /* кремовая «бумага» */
  --bg-card: #fffdf8;         /* карточки — чуть светлее фона */
  --bg-group: rgba(0, 0, 0, 0.05);
  --bg-search: #ece5d6;
  --text: #171310;
  --text-secondary: #3a352f;
  --text-muted: #8a8378;
  --line: rgba(0, 0, 0, 0.09);
  --accent-ink: #8a1c2b;      /* акцентный текст */
  --btn-ink-bg: #171310;      /* «чернильная» кнопка — как кнопка активации в приложении */
  --btn-ink-text: #fffdf8;
  --shadow: 0 10px 30px rgba(58, 38, 20, 0.12);
  --grain-opacity: 0.35;
}

/* ---------- Базовое ---------- */

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  position: relative;
}

/* Лёгкая бумажная фактура поверх фона */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
}

main, header.site-header, footer.site-footer { position: relative; z-index: 1; }

a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Шапка ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: 22px;
  height: 60px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.brand:hover { text-decoration: none; }

.brand-logo { width: 54px; height: 54px; flex: none; }

.site-nav {
  display: flex;
  gap: 18px;
  margin-left: auto;
  align-items: center;
}

.site-nav a {
  color: var(--text-secondary);
  font-size: 15px;
}

/* ---------- Кнопки ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: var(--radius);
  padding: 14px 22px;
  font-size: 16px;
  font-weight: 600;
  font-family: var(--font-body);
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); opacity: 0.92; }
.btn:active { transform: translateY(0); }

.btn-accent { background: var(--accent); color: #fff; }
.btn-ink { background: var(--btn-ink-bg); color: var(--btn-ink-text); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--line);
}

.btn svg { width: 20px; height: 20px; flex: none; }

.btn .btn-sub {
  display: block;
  font-size: 11px;
  font-weight: 400;
  opacity: 0.75;
  line-height: 1.1;
  text-align: left;
}
.btn .btn-two-lines { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; }

/* ---------- Герой ---------- */

.hero {
  padding: 72px 0 56px;
  overflow: hidden;
}

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

.hero-eyebrow {
  display: inline-block;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-ink);
  font-weight: 600;
  margin-bottom: 18px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 18px;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent-ink);
}

.hero p.lead {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 34em;
  margin-bottom: 30px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 14px;
}

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

/* Подсказка про предупреждение Windows SmartScreen при установке */
.win-note {
  margin-top: 16px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
  background: var(--bg-group);
  border-radius: 10px;
  padding: 11px 14px;
}
.win-note strong { color: var(--text); }

/* ---------- Макет телефона ---------- */

.phone {
  width: 300px;
  margin: 0 auto;
  border-radius: 40px;
  border: 10px solid #171310;
  background: var(--bg);
  box-shadow: var(--shadow);
  overflow: hidden;
  transform: rotate(2.5deg);
}

.phone-screen { padding: 18px 14px 0; }

.phone-title {
  font-size: 21px;
  font-weight: 800;
  margin-bottom: 10px;
}

.phone-search {
  background: var(--bg-search);
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 13px;
  padding: 8px 12px;
  margin-bottom: 12px;
}

.phone-list {
  background: var(--bg-card);
  border-radius: 12px;
  overflow: hidden;
}

.phone-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
}
.phone-row:last-child { border-bottom: none; }

.phone-abbr {
  color: var(--accent-ink);
  font-weight: 700;
  min-width: 40px;
  font-size: 13px;
}

/* Иконки законов из приложения (src/assets/icons) */
.phone-icon {
  width: 28px;
  height: 28px;
  flex: none;
  object-fit: contain;
}

.phone-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}

.phone-chevron { color: var(--text-muted); font-size: 15px; }

.phone-tabbar {
  display: flex;
  justify-content: space-around;
  padding: 10px 0 16px;
  margin-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 10px;
  text-align: center;
}
.phone-tab { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.phone-tab svg { width: 20px; height: 20px; }
.phone-tab.active { color: var(--text); }

/* ---------- Полоса цифр ---------- */

.stats {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg-group);
}

.stats .container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding-top: 26px;
  padding-bottom: 26px;
  text-align: center;
}

.stat-number {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--accent-ink);
}

.stat-label { font-size: 13.5px; color: var(--text-secondary); margin-top: 2px; }

/* ---------- Секции ---------- */

section { padding: 64px 0; }

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  font-weight: 700;
  margin-bottom: 10px;
}

.section-sub {
  color: var(--text-secondary);
  font-size: 16.5px;
  max-width: 40em;
  margin-bottom: 36px;
}

/* ---------- Возможности ---------- */

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

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}

.feature-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--bg-group);
  color: var(--accent-ink);
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  font-size: 18px;
}
.feature-icon svg { width: 20px; height: 20px; }

.feature-card h3 { font-size: 16.5px; margin-bottom: 6px; }
.feature-card p { font-size: 14.5px; color: var(--text-secondary); }

/* ---------- Блок ПК-версии ---------- */

.pc-section {
  border-top: 1px solid var(--line);
  background: var(--bg-group);
}

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

/* Мини-макет окна программы */
.window {
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-card);
  box-shadow: var(--shadow);
  overflow: hidden;
  font-size: 12px;
}

.window-titlebar {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--text-muted);
  gap: 8px;
}
.window-titlebar .win-buttons { margin-left: auto; display: flex; gap: 10px; letter-spacing: 2px; }

.window-body { display: flex; min-height: 210px; }

.window-sidebar {
  width: 34%;
  border-right: 1px solid var(--line);
  padding: 10px;
}
.window-side-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 8px;
  border-radius: 8px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.window-side-item.active { background: var(--bg-group); color: var(--text); font-weight: 600; }
.window-side-item .abbr { color: var(--accent-ink); font-weight: 700; margin-right: 6px; }
.window-side-item .side-icon {
  width: 18px;
  height: 18px;
  flex: none;
  object-fit: contain;
}

.window-content { flex: 1; padding: 14px 16px; }
.window-content h4 {
  font-family: var(--font-display);
  font-size: 13.5px;
  margin-bottom: 8px;
}
.window-line {
  height: 7px;
  border-radius: 4px;
  background: var(--bg-group);
  margin-bottom: 7px;
}
.window-line.w80 { width: 80%; }
.window-line.w95 { width: 95%; }
.window-line.w60 { width: 60%; }

/* Карточка цены */
.price-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 30px;
  box-shadow: var(--shadow);
}

.price-card .price-label {
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.price-value {
  font-family: var(--font-display);
  font-size: 46px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 4px;
}
.price-value span { font-size: 18px; font-family: var(--font-body); font-weight: 400; color: var(--text-muted); }

.price-includes {
  list-style: none;
  margin: 20px 0 24px;
  display: grid;
  gap: 10px;
  font-size: 15px;
  color: var(--text-secondary);
}
.price-includes li { display: flex; gap: 10px; align-items: baseline; }
.price-includes li::before {
  content: '✓';
  color: var(--accent-ink);
  font-weight: 700;
}

.price-card .btn { width: 100%; }
.price-foot { margin-top: 12px; font-size: 12.5px; color: var(--text-muted); text-align: center; }

/* ---------- Шаги ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  counter-reset: step;
}

.step-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  counter-increment: step;
}

.step-card::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  color: var(--accent-ink);
  display: block;
  margin-bottom: 10px;
}

.step-card h3 { font-size: 16px; margin-bottom: 6px; }
.step-card p { font-size: 14.5px; color: var(--text-secondary); }

/* ---------- Вопросы и ответы ---------- */

.faq-list { display: grid; gap: 12px; max-width: 760px; }

.faq-list details {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0;
  overflow: hidden;
}

.faq-list summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 22px;
  font-weight: 600;
  font-size: 15.5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: '+';
  font-size: 20px;
  color: var(--text-muted);
  flex: none;
  transition: transform 0.2s ease;
}
.faq-list details[open] summary::after { transform: rotate(45deg); }

.faq-list details p {
  padding: 0 22px 18px;
  color: var(--text-secondary);
  font-size: 14.5px;
}

/* ---------- Подвал ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 34px 0 44px;
  font-size: 14px;
  color: var(--text-muted);
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  align-items: center;
}

.site-footer .foot-brand {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text);
  font-size: 16px;
}

.site-footer nav { display: flex; flex-wrap: wrap; gap: 18px; margin-left: auto; }
.site-footer a { color: var(--text-muted); }

/* ---------- Страницы покупки / успеха ---------- */

.narrow-page {
  max-width: 520px;
  margin: 0 auto;
  padding: 56px 20px 80px;
}

.narrow-page h1 {
  font-family: var(--font-display);
  font-size: 30px;
  margin-bottom: 8px;
}

.narrow-page .page-sub { color: var(--text-secondary); margin-bottom: 26px; font-size: 15.5px; }

.order-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 26px;
  box-shadow: var(--shadow);
}

.order-summary {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  padding-bottom: 16px;
  margin-bottom: 20px;
  border-bottom: 1px dashed var(--line);
  font-size: 15px;
}
.order-summary .order-price { font-family: var(--font-display); font-size: 26px; font-weight: 700; }

.field-label {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.field-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  padding: 13px 15px;
  font-family: var(--font-body);
  margin-bottom: 14px;
}
.field-input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }

.form-error {
  color: #d64545;
  font-size: 14px;
  margin: -4px 0 12px;
  display: none;
}
.form-error.visible { display: block; }

.order-card .btn { width: 100%; }

.order-agree {
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--text-muted);
  text-align: center;
}

/* Статусы на странице успеха */
.status-box { text-align: center; padding: 10px 0; }

.spinner {
  width: 34px;
  height: 34px;
  margin: 6px auto 18px;
  border-radius: 50%;
  border: 3px solid var(--bg-group);
  border-top-color: var(--accent);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.key-view {
  background: var(--bg-group);
  border: 1.5px dashed var(--accent-ink);
  border-radius: var(--radius);
  padding: 18px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: center;
  font-family: 'SF Mono', Consolas, 'Courier New', monospace;
  margin: 18px 0 12px;
  user-select: all;
  word-break: break-all;
}

.copy-btn { margin-bottom: 8px; }

.success-note { font-size: 13.5px; color: var(--text-muted); }

.activate-steps {
  text-align: left;
  margin: 22px 0 0;
  padding-left: 20px;
  color: var(--text-secondary);
  font-size: 14.5px;
  display: grid;
  gap: 8px;
}

/* ---------- Появление при прокрутке ---------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Адаптивность ---------- */

@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; gap: 40px; }
  .phone { transform: none; }
  .features-grid { grid-template-columns: 1fr 1fr; }
  .pc-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .stats .container { grid-template-columns: 1fr 1fr; }
  .site-nav a { display: none; }
}

@media (max-width: 480px) {
  .features-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 48px; }
  .hero-actions .btn { width: 100%; }
}
