:root {
  --bg: #0c0f0d;
  --bg-elev: #121613;
  --bg-elev-2: #171c18;
  --border: #242b25;
  --text: #e8ece9;
  --text-dim: #9aa69d;
  --accent: #5be08a;
  --accent-dim: #3aa868;
  --accent-text: #06130a;
  --radius: 10px;
  --max: 1080px;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f6f8f6;
    --bg-elev: #ffffff;
    --bg-elev-2: #eef2ee;
    --border: #dbe3dc;
    --text: #15201a;
    --text-dim: #566358;
    --accent: #1f9d53;
    --accent-dim: #17813f;
    --accent-text: #ffffff;
  }
}

:root[data-theme="light"] {
  --bg: #f6f8f6;
  --bg-elev: #ffffff;
  --bg-elev-2: #eef2ee;
  --border: #dbe3dc;
  --text: #15201a;
  --text-dim: #566358;
  --accent: #1f9d53;
  --accent-dim: #17813f;
  --accent-text: #ffffff;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-text);
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 200;
}
.skip-link:focus { left: 0; }

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

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

/* header */
header.site {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
header.site .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
}
.brand:hover { text-decoration: none; }
.brand img { width: 28px; height: 28px; border-radius: 6px; }

nav.main-nav { display: flex; align-items: center; gap: 28px; }
nav.main-nav a { color: var(--text-dim); font-size: 14px; font-weight: 500; }
nav.main-nav a:hover { color: var(--text); text-decoration: none; }

.header-actions { display: flex; align-items: center; gap: 10px; }

.theme-toggle, .menu-toggle {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  color: var(--text);
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.theme-toggle:hover, .menu-toggle:hover { border-color: var(--accent); }
.theme-toggle svg, .menu-toggle svg { width: 18px; height: 18px; }

.menu-toggle { display: none; }

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 8px 0 16px;
  border-top: 1px solid var(--border);
}
.mobile-nav a {
  color: var(--text);
  padding: 10px 4px;
  font-size: 15px;
}
.mobile-nav a:hover { text-decoration: none; color: var(--accent); }
body.nav-open .mobile-nav { display: flex; }

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.08s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: var(--accent-text); }
.btn-primary:hover { background: var(--accent-dim); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-block { width: 100%; }

/* hero */
.hero {
  padding: 84px 0 56px;
  text-align: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(32px, 5vw, 50px);
  line-height: 1.12;
  margin: 0 0 18px;
  letter-spacing: -0.01em;
}
.hero p.lede {
  color: var(--text-dim);
  font-size: 18px;
  max-width: 620px;
  margin: 0 auto 32px;
}
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.hero-note {
  margin-top: 18px;
  font-size: 13px;
  color: var(--text-dim);
}

/* sections */
section { padding: 64px 0; }
section.alt { background: var(--bg-elev); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.section-head { text-align: center; max-width: 620px; margin: 0 auto 40px; }
.section-head h2 { font-size: clamp(26px, 3.6vw, 34px); margin: 0 0 10px; }
.section-head p { color: var(--text-dim); margin: 0; }

/* features */
.grid-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}
.feature {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.feature .icon {
  width: 38px; height: 38px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.feature .icon svg { width: 20px; height: 20px; }
.feature h3 { margin: 0 0 6px; font-size: 16px; }
.feature p { margin: 0; color: var(--text-dim); font-size: 14px; }

/* how it works */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}
.step { position: relative; padding: 22px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); }
.step .num {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 700;
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
}
.step h3 { margin: 0 0 6px; font-size: 15px; }
.step p { margin: 0; color: var(--text-dim); font-size: 14px; }

/* pricing */
.grid-pricing {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
}
.plan {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.plan.featured {
  border-color: var(--accent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 10%, var(--bg-elev)), var(--bg-elev));
  position: relative;
}
.plan.featured::before {
  content: "выгоднее всего";
  position: absolute;
  top: -11px;
  left: 22px;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 6px;
}
.plan .plan-name { font-size: 14px; font-weight: 600; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.04em; }
.plan .plan-price { font-size: 32px; font-weight: 700; }
.plan .plan-price span { font-size: 15px; font-weight: 500; color: var(--text-dim); }
.plan .plan-days { font-size: 13px; color: var(--text-dim); margin-top: -10px; }
.plan ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.plan li { font-size: 13px; color: var(--text-dim); display: flex; gap: 8px; align-items: flex-start; }
.plan li svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: 2px; color: var(--accent); }

.pricing-note { text-align: center; color: var(--text-dim); font-size: 13px; margin-top: 28px; }

/* faq */
.faq-list { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-elev); overflow: hidden; }
.faq-item summary {
  cursor: pointer;
  padding: 16px 18px;
  font-weight: 600;
  font-size: 15px;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .chev { transition: transform 0.15s ease; color: var(--text-dim); }
.faq-item[open] summary .chev { transform: rotate(180deg); }
.faq-item .faq-body { padding: 0 18px 16px; color: var(--text-dim); font-size: 14px; }

/* footer */
footer.site {
  border-top: 1px solid var(--border);
  padding: 36px 0;
}
footer.site .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
footer.site .legal-links { display: flex; gap: 18px; font-size: 13px; }
footer.site .legal-links a { color: var(--text-dim); }
footer.site .legal-links a:hover { color: var(--accent); }
footer.site .copy { font-size: 13px; color: var(--text-dim); }

/* back to top */
#top-btn {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-text);
  border: none;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
  z-index: 90;
}
#top-btn.show { display: flex; }
#top-btn svg { width: 18px; height: 18px; }

@media (max-width: 760px) {
  nav.main-nav { display: none; }
  .menu-toggle { display: inline-flex; }
  .hero { padding: 56px 0 40px; }
}

@media print {
  header.site, #top-btn, .hero-actions, .menu-toggle { display: none !important; }
}
