/* --- Variables (dark dev aesthetic) --- */
:root {
  --bg-base: #0d1117;
  --bg-elevated: #161b22;
  --bg-card: #21262d;
  --border-subtle: rgba(255, 255, 255, 0.06);
  --text-primary: #e6edf3;
  --text-secondary: #8b949e;
  --accent: #3fb950;
  --accent-hover: #56d364;
  --accent-muted: rgba(63, 185, 80, 0.15);
  --font-heading: "Manrope", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
  --section-padding: clamp(3rem, 8vw, 5rem);
  --hero-title-size: clamp(1.75rem, 5vw, 3.25rem);
  --container-max: 1140px;
}

/* --- Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-heading);
  background-color: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  margin: 0;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.font-heading { font-family: var(--font-heading); }
.font-mono { font-family: var(--font-mono); }

/* --- Language visibility (toggled by JS via body.lang-ru) --- */
.content-lang.lang-ru { display: none !important; }
p.content-lang.lang-en,
h1.content-lang.lang-en,
h2.content-lang.lang-en,
h3.content-lang.lang-en,
div.content-lang.lang-en { display: block; }
span.content-lang.lang-en { display: inline; }
body.lang-ru .content-lang.lang-en { display: none !important; }
body.lang-ru p.content-lang.lang-ru,
body.lang-ru h1.content-lang.lang-ru,
body.lang-ru h2.content-lang.lang-ru,
body.lang-ru h3.content-lang.lang-ru,
body.lang-ru div.content-lang.lang-ru { display: block !important; }
body.lang-ru span.content-lang.lang-ru { display: inline !important; }

/* --- Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-subtle);
}

.logo {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.lang-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}

.lang-btn:hover {
  color: var(--text-primary);
}

.lang-btn.active {
  color: var(--accent);
  font-weight: 600;
}

.lang-divider {
  color: var(--text-secondary);
  margin: 0 0.25rem;
  user-select: none;
}

/* --- Hero --- */
.hero {
  position: relative;
  padding: var(--section-padding) 1rem;
  overflow: hidden;
}

.hero-noise {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
}

.hero .hero-title {
  font-size: var(--hero-title-size);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

@media (min-width: 992px) {
  .hero .hero-title {
    font-size: clamp(2.5rem, 4vw, 4rem);
  }
}

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 36ch;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 0.75rem;
}

.hero-channels {
  font-size: 0.9rem;
  color: var(--accent);
  margin-bottom: 1rem;
}

.hero-channels .content-lang { display: inline; }
.hero-channels .content-lang.lang-ru { display: none; }
body.lang-ru .hero-channels .content-lang.lang-ru { display: inline; }
body.lang-ru .hero-channels .content-lang.lang-en { display: none; }

.hero-trust {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.hero-cta {
  margin-top: 0.5rem;
}

/* --- Buttons (CTA) --- */
.btn-cta {
  background-color: var(--accent) !important;
  border: none !important;
  color: #0d1117 !important;
  font-weight: 600 !important;
  padding: 0.75rem 1.5rem !important;
  border-radius: 8px !important;
  transition: background-color 0.2s, transform 0.2s, box-shadow 0.2s !important;
}

.btn-cta:hover {
  background-color: var(--accent-hover) !important;
  color: #0d1117 !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(63, 185, 80, 0.35);
}

/* --- Sections --- */
.section {
  padding: var(--section-padding) 1rem;
}

.section:nth-child(even) {
  background-color: var(--bg-elevated);
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

/* --- Pain list --- */
.pain-list {
  list-style: none;
  padding-left: 0;
  margin-top: 1.5rem;
  margin-bottom: 0;
}

.pain-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

.pain-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.pain-agitation {
  font-weight: 500;
  color: var(--text-primary);
}

.pain-agitation::before {
  background: var(--accent-muted);
}

/* --- Benefits --- */
.section-benefits .section-title {
  margin-bottom: 0;
}

.benefit-item {
  padding: 1rem 0;
}

.benefit-icon {
  display: inline-block;
  font-size: 1.5rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.benefit-title {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.benefit-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0;
}

/* --- Testimonial --- */
.testimonial-block {
  margin: 0;
  padding: 1.5rem 1.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  border-left: 3px solid var(--accent);
}

.testimonial-text {
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.testimonial-author {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-style: normal;
}

/* --- FAQ --- */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.faq-item {
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
}

.faq-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.faq-q {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.faq-a {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

/* --- Before/After cards --- */
.compare-card {
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1.5rem;
  height: 100%;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.compare-before {
  background: var(--bg-card);
  border-color: var(--border-subtle);
}

.compare-after {
  background: var(--bg-card);
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 4px 14px var(--accent-muted);
}

.compare-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.compare-after .compare-label {
  color: var(--accent);
}

.compare-body {
  font-size: 0.95rem;
  color: var(--text-primary);
  margin: 0;
}

/* --- Steps --- */
.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1.5rem;
  height: 100%;
  position: relative;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  background: var(--accent-muted);
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.step-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.step-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0;
}

/* --- Final CTA --- */
.section-cta {
  text-align: center;
}

.cta-text {
  font-size: clamp(1.1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.cta-note {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

/* --- Sticky CTA (mobile) --- */
.cta-sticky {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  padding: 0.75rem 1rem;
  padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
  background: rgba(13, 17, 23, 0.95);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--border-subtle);
}

.cta-sticky .btn {
  font-size: 1rem;
}

/* Mobile: full-width primary CTA, padding for sticky bar */
@media (max-width: 991.98px) {
  main {
    padding-bottom: 4.5rem;
  }
  .hero-cta .btn-cta-main,
  .section-cta .btn-cta-main {
    width: 100%;
    display: inline-block;
    text-align: center;
  }
}

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
}

.footer-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.footer-link:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.footer-sep {
  color: var(--text-secondary);
}

.footer-copy {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* --- Scroll reveal (respect reduced motion) --- */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.5s ease, transform 0.5s ease;
  }

  .reveal.revealed {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
  }
}
