/* ===== Variables ===== */
:root {
  --bg: #0d1117;
  --bg-card: #161b22;
  --bg-elevated: #21262d;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --accent: #58a6ff;
  --accent-soft: rgba(88, 166, 255, 0.15);
  --green: #3fb950;
  --green-soft: rgba(63, 185, 80, 0.15);
  --orange: #d29922;
  --border: #30363d;
  --radius: 12px;
  --radius-lg: 20px;
  --font: 'Outfit', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  font-size: 16px; /* предотвращает зум при фокусе на input в iOS */
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 480px) {
  .container { padding: 0 16px; }
}

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s;
}
.nav a:hover { color: var(--text); }
.nav-cta { color: var(--accent) !important; }
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.burger span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
}
.burger {
  min-width: 44px;
  min-height: 44px;
  margin: -8px 0 -8px 0; /* увеличиваем зону нажатия */
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  min-height: 44px; /* удобная зона нажатия на мобильных */
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { box-shadow: 0 4px 20px var(--accent-soft); }
.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover { color: var(--text); border-color: var(--text-muted); }
.btn-block { width: 100%; }

/* ===== Hero ===== */
.hero {
  padding: 80px 0 120px;
  position: relative;
  overflow: hidden;
}
.hero-badge {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  padding: 6px 14px;
  background: var(--bg-elevated);
  border-radius: 999px;
  border: 1px solid var(--border);
}
.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  max-width: 700px;
  margin: 0 0 20px;
}
.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 0 32px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 40px; }
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  font-size: 0.95rem;
  color: var(--text-muted);
}
.hero-stats strong { color: var(--text); margin-right: 4px; }
.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 28px;
  margin-top: 28px;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.trust-item { color: var(--green); }
.hero-question {
  display: inline-block;
  margin-top: 24px;
  font-size: 0.95rem;
  color: var(--accent);
  text-decoration: none;
}
.hero-question:hover { text-decoration: underline; }
.why { padding: 80px 0; background: var(--bg-card); }
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 32px;
}
.why-item {
  padding: 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.why-item strong { color: var(--text); display: block; margin-bottom: 6px; }
.hero-visual,
.mockup,
.mockup-pdf { display: none; }
.product-grid-single { max-width: 560px; margin: 0 auto; }
.product-features-list { margin-bottom: 16px; }
.product-features-list li { margin: 0.5em 0; }
.product-bonus { font-size: 0.95rem; color: var(--green); margin: 0 0 16px; padding: 12px 16px; background: var(--green-soft); border-radius: var(--radius); }
.cta-box .product-price { margin: 12px 0; }

@media (max-width: 900px) {
  .hero-visual { display: none; }
  .hero { padding-bottom: 60px; }
}
@media (max-width: 600px) {
  .hero {
    padding: 48px 0 56px;
  }
  .hero-badge { font-size: 0.8rem; padding: 6px 12px; margin-bottom: 16px; }
  .hero-title { margin-bottom: 16px; }
  .hero-subtitle { font-size: 1.05rem; margin-bottom: 24px; }
  .hero-stats { gap: 16px; font-size: 0.9rem; }
  .hero-actions { gap: 12px; margin-bottom: 28px; }
  .hero-actions .btn { width: 100%; }
  .trust-strip { gap: 12px 20px; margin-top: 20px; font-size: 0.85rem; }
}

/* ===== Section titles ===== */
.section-title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}
.section-subtitle {
  color: var(--text-muted);
  margin: 0 0 40px;
  font-size: 1.05rem;
}
@media (max-width: 600px) {
  .section-title { font-size: 1.5rem; }
  .section-subtitle { margin-bottom: 28px; font-size: 0.95rem; }
}

/* ===== Products ===== */
.products { padding: 100px 0; }
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
@media (max-width: 600px) {
  .products { padding: 48px 0; }
  .product-grid { gap: 16px; }
  .product-card { padding: 20px; }
  .product-card h3 { font-size: 1.2rem; }
}
.product-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, transform 0.2s;
}
.product-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.product-card.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.product-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  background: var(--green-soft);
  color: var(--green);
  border-radius: 999px;
}
.product-card h3 {
  font-size: 1.35rem;
  margin: 0 0 10px;
  font-weight: 600;
}
.product-card > p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0 0 16px;
  flex-grow: 1;
}
.product-features {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.product-features li {
  padding: 6px 0;
  padding-left: 22px;
  position: relative;
}
.product-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
}
.product-price {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 16px;
  font-family: var(--font-mono);
}
.price-old {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-muted);
  text-decoration: line-through;
  margin-right: 8px;
}

/* ===== How ===== */
.how { padding: 100px 0; background: var(--bg-card); }
.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-top: 48px;
}
.how-step {
  text-align: center;
  padding: 24px 16px;
}
.how-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 1.25rem;
  border-radius: 50%;
  margin-bottom: 16px;
}
.how-step h3 {
  font-size: 1.2rem;
  margin: 0 0 8px;
  font-weight: 600;
}
.how-step p {
  color: var(--text-muted);
  margin: 0;
  font-size: 0.95rem;
}

@media (max-width: 700px) {
  .how-grid { grid-template-columns: 1fr; gap: 24px; margin-top: 32px; }
  .how { padding: 48px 0; }
}
@media (max-width: 600px) {
  .how-step { padding: 20px 12px; }
  .how-num { width: 44px; height: 44px; font-size: 1.1rem; }
}

/* ===== Email block ===== */
.email-block { padding: 100px 0; }
.email-box {
  max-width: 520px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
}
.email-box h2 {
  font-size: 1.75rem;
  margin: 0 0 12px;
  font-weight: 600;
}
.email-box > p {
  color: var(--text-muted);
  margin: 0 0 24px;
  font-size: 1rem;
}
.email-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.email-form input {
  padding: 14px 18px;
  font-family: var(--font);
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
}
.email-form input:focus { border-color: var(--accent); }
.email-form input::placeholder { color: var(--text-muted); }
.email-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 16px 0 0;
}
@media (max-width: 600px) {
  .email-block { padding: 48px 0; }
  .email-box { padding: 24px 20px; }
  .email-box h2 { font-size: 1.4rem; }
}
@media (min-width: 500px) {
  .email-form { flex-direction: row; }
  .email-form input { flex: 1; }
}

/* ===== Testimonials ===== */
.testimonials { padding: 100px 0; background: var(--bg-card); }
.reviews { padding: 100px 0; }
.review-card .review-author { display: block; margin-top: 12px; }
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 40px;
}
.testimonial {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin: 0;
}
.testimonial p {
  font-size: 1rem;
  margin: 0 0 16px;
  font-style: italic;
  color: var(--text);
}
.testimonial cite {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-style: normal;
}
@media (max-width: 600px) {
  .testimonials,
  .reviews { padding: 48px 0; }
  .testimonials-grid { margin-top: 28px; gap: 16px; }
  .testimonial { padding: 20px; }
}

/* ===== FAQ ===== */
.faq { padding: 100px 0; }
.faq-list { max-width: 640px; margin-top: 32px; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
}
.faq-item summary {
  padding: 18px 20px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 1.2rem;
  color: var(--text-muted);
}
.faq-item[open] summary::after { content: '−'; }
.faq-item p {
  padding: 0 20px 20px;
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}
@media (max-width: 600px) {
  .faq { padding: 48px 0; }
  .faq-item summary { padding: 14px 16px; font-size: 0.95rem; }
  .faq-item p { padding: 0 16px 16px; font-size: 0.9rem; }
}

/* ===== Footer ===== */
.footer {
  padding: 48px 0;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
}
.footer-inner {
  text-align: center;
}
.footer-tagline {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 8px 0 24px;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px 24px;
  margin-bottom: 24px;
}
.footer-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  padding: 4px 0; /* удобнее нажимать на мобильных */
}
.footer-nav a:hover { color: var(--text); }
@media (max-width: 600px) {
  .footer { padding: 32px 0 40px; }
  .footer-tagline { margin: 6px 0 20px; font-size: 0.9rem; }
  .footer-nav { gap: 12px 20px; margin-bottom: 20px; }
  .footer-copy { font-size: 0.8rem; }
}
.footer-copy {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}
.footer-inn {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 8px 0 0;
}

/* ===== Текстовые / юридические страницы ===== */
.article-page h1,
.legal-page h1 { font-size: 1.75rem; margin-bottom: 16px; }
.article-page h2,
.legal-page h2 { font-size: 1.2rem; margin-top: 28px; margin-bottom: 10px; }
.article-page p,
.legal-page p { margin: 0 0 14px; color: var(--text-muted); line-height: 1.65; }
.article-page a,
.legal-page a { color: var(--accent); }
.article-lead { font-size: 1.05rem; color: var(--text); }
.legal-page { padding: 60px 24px 80px; max-width: 640px; margin: 0 auto; }
.legal-update { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 24px !important; }
.blog-list { list-style: none; padding: 0; margin: 24px 0; }
.blog-list li { margin-bottom: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.blog-list li:last-child { border-bottom: none; }
.blog-list a { color: var(--text); text-decoration: none; font-size: 1.1rem; }
.blog-list a:hover { color: var(--accent); }
.blog-meta { display: block; font-size: 0.9rem; color: var(--text-muted); margin-top: 6px; }
.article-body { line-height: 1.7; }
.article-body h2 { font-size: 1.2rem; margin-top: 1.5em; margin-bottom: 0.5em; }
.article-body p { margin: 0 0 1em; color: var(--text-muted); }
.article-body a { color: var(--accent); }
@media (max-width: 600px) {
  .article-page h1,
  .legal-page h1 { font-size: 1.4rem; margin-bottom: 12px; }
  .article-page h2,
  .legal-page h2 { font-size: 1.1rem; margin-top: 24px; }
  .article-page .container,
  .legal-page { padding-left: 16px; padding-right: 16px; padding-top: 40px; padding-bottom: 60px; }
  .article-body h2 { font-size: 1.1rem; }
}

/* ===== Exit-intent popup (скидка 30%) ===== */
.exit-intent-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s, visibility 0.25s;
}
.exit-intent-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.exit-intent-modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 420px;
  width: 100%;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4);
  position: relative;
  transform: scale(0.95);
  transition: transform 0.25s;
}
.exit-intent-overlay.is-open .exit-intent-modal {
  transform: scale(1);
}
.exit-intent-modal h2 {
  margin: 0 0 12px;
  font-size: 1.5rem;
  color: var(--text);
}
.exit-intent-modal p {
  margin: 0 0 20px;
  color: var(--text-muted);
  line-height: 1.5;
}
.exit-intent-discount {
  display: inline-block;
  background: var(--green-soft);
  color: var(--green);
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius);
  margin-bottom: 16px;
}
.exit-intent-modal .btn {
  display: inline-block;
  width: 100%;
  text-align: center;
  margin-bottom: 10px;
}
.exit-intent-promo-code {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 12px 0 16px !important;
}
.exit-intent-promo-code strong {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  letter-spacing: 0.05em;
  color: var(--green);
}
.exit-intent-modal .btn-copy {
  width: auto;
  padding: 8px 16px;
}
.exit-intent-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--radius);
  font-size: 1.5rem;
  line-height: 1;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, background 0.2s;
}
.exit-intent-close:hover {
  color: var(--text);
  background: var(--bg-elevated);
}

.price-old {
  color: var(--text-muted);
  margin-right: 8px;
}

.checkout-discount-note {
  color: var(--green);
  font-size: 0.95rem;
  margin: 8px 0 0;
}

.checkout-promo-label {
  display: block;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.checkout-promo-row {
  display: flex;
  gap: 10px;
  align-items: center;
}
.checkout-promo-input {
  flex: 1;
  max-width: 200px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
}
.checkout-promo-input:focus {
  outline: none;
  border-color: var(--accent);
}
.checkout-promo-message {
  font-size: 0.9rem;
  margin: 8px 0 0;
}

.checkout-email-label {
  display: block;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.checkout-email-input {
  width: 100%;
  max-width: 320px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  margin-bottom: 8px;
}
.checkout-email-input:focus {
  outline: none;
  border-color: var(--accent);
}
.checkout-email-error {
  font-size: 0.9rem;
  margin: 0 0 12px;
}
#pay-form .btn {
  margin-top: 8px;
}
@media (max-width: 600px) {
  .checkout-page {
    padding: 24px 16px 48px;
    min-height: calc(100vh - 56px);
    align-items: flex-start;
    padding-top: 32px;
  }
  .checkout-box {
    padding: 24px 20px;
  }
  .checkout-box h1 { font-size: 1.3rem; }
  .checkout-box .price { font-size: 1.5rem; }
  .checkout-promo-row { flex-wrap: wrap; }
  .checkout-promo-input { max-width: 100%; }
}

/* ===== Mobile nav ===== */
@media (max-width: 700px) {
  .nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-card);
    padding: 20px 16px 24px;
    border-bottom: 1px solid var(--border);
    gap: 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  }
  .nav.open { display: flex; }
  .nav a {
    display: block;
    padding: 14px 12px;
    font-size: 1rem;
    border-radius: var(--radius);
    min-height: 44px;
    line-height: 1.25;
    display: flex;
    align-items: center;
  }
  .nav a:hover { background: var(--bg-elevated); }
  .nav-cta { margin-top: 8px; }
  .burger { display: flex; }
}
@media (max-width: 600px) {
  .header-inner { height: 56px; padding: 0 4px; }
  .nav.open { top: 56px; }
  .logo { font-size: 1.1rem; }
}
