:root {
  --bg-dark: #0d0f12;
  --bg-card: #161a1f;
  --accent: #22c55e;
  --accent-hover: #16a34a;
  --text: #e4e6eb;
  --text-muted: #9ca3af;
  --border: #2d3239;
  --btn-text: #0d0f12;
}

[data-theme="light"] {
  --bg-dark: #f8fafc;
  --bg-card: #ffffff;
  --accent: #16a34a;
  --accent-hover: #15803d;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --btn-text: #0d0f12;
}

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

body {
  font-family: 'Manrope', sans-serif;
  background: var(--bg-dark);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

.hero .container {
  max-width: 1200px;
}

.section-how-it-works .container {
  max-width: 680px;
}

/* Hero */
.hero {
  min-height: 85vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 80px 0 60px;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(34, 197, 94, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.hero h1 span {
  color: var(--accent);
}

.hero-sub {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 32px;
  text-align: center;
}

.hero-preview {
  display: block;
  max-width: 100%;
  width: min(1120px, 96vw);
  height: auto;
  margin: 80px auto 0;
  border-radius: 16px;
  border: 2px solid var(--border);
  border-color: color-mix(in srgb, var(--text) 28%, var(--border));
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
}

.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  text-decoration: none;
}

.btn-cta:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
}

/* Section */
section {
  padding: 80px 0;
  border-top: 1px solid var(--border);
}

section h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
}

section h2 svg {
  color: var(--accent);
  width: 2.5rem;
  height: 2.5rem;
}

.pain-list, .benefit-list, .result-list {
  list-style: none;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 20px;
  background: var(--bg-card);
  max-width: 680px;
  margin: 0 auto;
  font-size: 1.0625rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.pain-list:hover,
.benefit-list:hover,
.result-list:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.09);
}

.pain-list li,
.benefit-list li,
.result-list li {
  position: relative;
  padding: 20px 0 20px 44px;
  border-bottom: none;
  color: var(--text-muted);
  transition: color 0.2s;
  width: 100%;
  box-sizing: border-box;
}

.pain-list li:nth-child(1) {
  --list-item-icon: #22c55e;
}

.pain-list li:nth-child(2) {
  --list-item-icon: #0ea5e9;
}

.pain-list li:nth-child(3) {
  --list-item-icon: #8b5cf6;
}

.pain-list li:nth-child(4) {
  --list-item-icon: #f59e0b;
}

.pain-list li:nth-child(5) {
  --list-item-icon: #ec4899;
}

.benefit-list li:nth-child(1) {
  --list-item-icon: #22c55e;
}

.benefit-list li:nth-child(2) {
  --list-item-icon: #0ea5e9;
}

.benefit-list li:nth-child(3) {
  --list-item-icon: #8b5cf6;
}

.benefit-list li:nth-child(4) {
  --list-item-icon: #f59e0b;
}

.result-list li:nth-child(1) {
  --list-item-icon: #22c55e;
}

.result-list li:nth-child(2) {
  --list-item-icon: #0ea5e9;
}

.result-list li:nth-child(3) {
  --list-item-icon: #8b5cf6;
}

.result-list li:nth-child(4) {
  --list-item-icon: #f59e0b;
}

.result-list li:nth-child(5) {
  --list-item-icon: #ec4899;
}

.pain-list li:not(:last-child)::after,
.benefit-list li:not(:last-child)::after,
.result-list li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  height: 0.5px;
  background: var(--border);
  pointer-events: none;
}

.pain-list li:hover,
.benefit-list li:hover,
.result-list li:hover {
  color: var(--text);
}

.pain-list li > i,
.pain-list li > svg,
.benefit-list li > i,
.benefit-list li > svg,
.result-list li > i,
.result-list li > svg {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  color: var(--list-item-icon);
  transition: color 0.2s, filter 0.2s, transform 0.2s;
}

.pain-list li:hover > i,
.pain-list li:hover > svg,
.benefit-list li:hover > i,
.benefit-list li:hover > svg,
.result-list li:hover > i,
.result-list li:hover > svg {
  color: var(--list-item-icon);
  filter: brightness(1.15);
}

.transition-text {
  text-align: center;
  font-size: 1.25rem;
  font-weight: 600;
  margin: 48px 0 24px;
  color: var(--text);
}

.keyphrase {
  color: var(--accent);
  font-weight: 700;
}

.section-premap-features h2 {
  margin-bottom: 10px;
}

.section-premap-features .transition-text {
  margin: 0 0 24px;
}

/* Features grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 32px;
}

.features-grid .feature-card:nth-child(1) {
  --feature-icon: #22c55e;
}

.features-grid .feature-card:nth-child(2) {
  --feature-icon: #0ea5e9;
}

.features-grid .feature-card:nth-child(3) {
  --feature-icon: #8b5cf6;
}

.features-grid .feature-card:nth-child(4) {
  --feature-icon: #f59e0b;
}

.features-grid .feature-card:nth-child(5) {
  --feature-icon: #14b8a6;
}

.features-grid .feature-card:nth-child(6) {
  --feature-icon: #ec4899;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  transition: border-color 0.2s;
}

.feature-card:hover {
  border-color: var(--feature-icon, var(--accent));
}

.feature-card .icon {
  width: 48px;
  height: 48px;
  background: color-mix(in srgb, var(--feature-icon, var(--accent)) 18%, transparent);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--feature-icon, var(--accent));
}

.feature-card strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Section pricing: три вертикальные карточки тарифов */
.section-pricing h2 {
  margin-bottom: 10px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 32px;
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}

.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 22px;
  text-align: center;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.pricing-card:nth-child(1) {
  --pricing-accent: #22c55e;
}

.pricing-card:nth-child(2) {
  --pricing-accent: #0ea5e9;
}

.pricing-card:nth-child(3) {
  --pricing-accent: #8b5cf6;
}

.pricing-card:hover {
  border-color: var(--pricing-accent, var(--accent));
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.pricing-card-icon {
  width: 48px;
  height: 48px;
  background: color-mix(in srgb, var(--pricing-accent, var(--accent)) 18%, transparent);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--pricing-accent, var(--accent));
}

.pricing-card-icon svg {
  width: 24px;
  height: 24px;
}

.pricing-card-title {
  margin: 0 0 12px;
  font-size: 1.0625rem;
  font-weight: 700;
}

.pricing-card-price {
  margin: 0 0 8px;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--pricing-accent, var(--accent));
  line-height: 1.2;
  /* Одна визуальная строка с тарифами «X ₽ / мес.», чтобы блок цены не отличался по высоте */
  min-height: calc(1.75rem * 1.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0 4px;
}

.pricing-card-period {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
}

.pricing-card-desc {
  margin: 0 0 16px;
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.45;
  /* Ровный старт списков преимуществ в трёх колонках при разной длине текста */
  min-height: calc(0.9375rem * 1.45 * 3);
  box-sizing: content-box;
}

.pricing-card-features {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  width: 100%;
  text-align: left;
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--text);
}

.pricing-card-features li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
}

.pricing-card-features li:last-child {
  margin-bottom: 0;
}

.pricing-card-features li svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--pricing-accent, var(--accent));
}

/* Кнопка CTA в карточке тарифа: outline, цвет акцента карточки, прижата к низу в сетке */
.pricing-card .btn-pricing-cta {
  margin-top: auto;
  padding: 11px 22px;
  width: 100%;
  max-width: 240px;
  justify-content: center;
  font-size: 0.9375rem;
  background: transparent;
  color: var(--pricing-accent, var(--accent));
  border: 2px solid var(--pricing-accent, var(--accent));
}

.pricing-card .btn-pricing-cta:hover {
  background: color-mix(in srgb, var(--pricing-accent, var(--accent)) 16%, transparent);
  border-color: var(--pricing-accent, var(--accent));
  color: var(--pricing-accent, var(--accent));
}

@media (max-width: 768px) {
  .pricing-grid {
    grid-template-columns: 1fr;
  }
}

/* How it works */
.steps-list {
  counter-reset: step;
  display: flex;
  flex-direction: column;
  gap: 20px;
  list-style: none;
  padding: 0;
  margin: 0;
  max-width: none;
  border: none;
  background: transparent;
  border-radius: 0;
  font-size: 1.0625rem;
}

.steps-list li:nth-child(1) {
  --step-color: #22c55e;
}

.steps-list li:nth-child(2) {
  --step-color: #0ea5e9;
}

.steps-list li:nth-child(3) {
  --step-color: #8b5cf6;
}

.steps-list li:nth-child(4) {
  --step-color: #f59e0b;
}

.steps-list li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.steps-list-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
  padding: 20px 18px 20px 20px;
  border-radius: 16px;
  box-sizing: border-box;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--step-color);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--border) 65%, transparent);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.steps-list-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.09);
  border-top-color: var(--accent);
  border-right-color: var(--accent);
  border-bottom-color: var(--accent);
  border-left-color: var(--step-color);
}

.steps-list-header {
  display: flex;
  align-items: center;
  gap: 20px;
}

.steps-list-header::before {
  counter-increment: step;
  content: counter(step);
  width: 48px;
  height: 48px;
  background: transparent;
  color: var(--step-color);
  font-weight: 700;
  font-size: 1.25rem;
  border: 2px solid var(--step-color);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.steps-list-header span {
  color: var(--text-muted);
  font-size: 1.0625rem;
}

.steps-list li .steps-list-placeholder {
  width: 100%;
  min-height: 200px;
  margin-left: 0;
  border-radius: 14px;
  border: 2px dashed color-mix(in srgb, var(--border) 85%, var(--accent) 15%);
  background: color-mix(in srgb, var(--bg-dark) 92%, var(--accent) 8%);
  box-sizing: border-box;
}

.steps-list-placeholder--has-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  padding: 28px 24px;
}

.steps-list li .steps-list-placeholder.steps-list-placeholder--generation-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  padding: 32px 20px;
  background: #e8eaed;
  border-style: dashed;
  border-width: 2px;
  border-color: color-mix(in srgb, var(--border) 55%, #c5cad3);
}

[data-theme="dark"] .steps-list li .steps-list-placeholder.steps-list-placeholder--generation-panel {
  background: #2d333b;
  border-color: color-mix(in srgb, var(--border) 75%, var(--text-muted) 25%);
}

.generation-status-panel {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: min(20rem, calc(100% - 1rem));
  padding: 8px 14px 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-card) 88%, var(--bg-dark) 12%);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.14);
  backdrop-filter: blur(10px);
  font-size: 0.875rem;
  line-height: 1.25;
  color: var(--text);
  pointer-events: none;
}

.generation-status-panel-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.generation-status-panel-label {
  font-weight: 600;
  letter-spacing: -0.01em;
}

.generation-status-panel-spinner {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  border: 2px solid color-mix(in srgb, var(--text-muted) 45%, transparent);
  border-top-color: var(--step-color, var(--accent));
  border-radius: 50%;
  animation: generation-panel-spin 0.75s linear infinite;
}

@keyframes generation-panel-spin {
  to {
    transform: rotate(360deg);
  }
}

.steps-list li .steps-list-placeholder:has(img) {
  min-height: 0;
  padding: 0;
  border-style: solid;
  border-width: 1px;
  border-color: color-mix(in srgb, var(--border) 92%, var(--text) 8%);
  background: var(--bg-card);
  overflow: hidden;
}

.steps-list li .steps-list-placeholder img {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 520px) {
  .steps-list li .steps-list-placeholder {
    min-height: 160px;
  }

  .steps-list li .steps-list-placeholder:has(img) {
    min-height: 0;
  }

  .steps-list li .steps-list-placeholder.steps-list-placeholder--generation-panel {
    min-height: 160px;
    padding: 24px 16px;
  }
}

/* Visualization placeholder */
.viz-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px 24px;
  margin-top: 32px;
  text-align: center;
}

.viz-flow {
  max-width: 100%;
  overflow: hidden;
}

.flow-diagram {
  width: 100%;
  max-width: 560px;
  height: auto;
}

.source-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 32px;
}

.source-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
  min-height: 100%;
  text-align: center;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.source-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.16);
}

.source-illustration {
  min-height: 120px;
  margin-bottom: 18px;
  border-radius: 16px;
  background-color: var(--bg-dark);
  border: 1px solid rgba(34, 197, 94, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 10px;
}

.source-illustration img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 104px;
  object-fit: contain;
  display: block;
}

.source-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1rem;
}

.source-card p {
  font-size: 0.9375rem;
  color: var(--text-muted);
}

/* Final CTA */
.offer-section {
  text-align: center;
  padding: 100px 0;
  background: linear-gradient(180deg, transparent 0%, rgba(34, 197, 94, 0.08) 100%);
}

.offer-section .container {
  max-width: 1200px;
}

.offer-section p {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.cta-hero-preview-wrap {
  margin-top: 72px;
}

.cta-hero-preview-wrap .hero-preview {
  margin-top: 0;
}

/* Footer */
.site-footer {
  padding: 48px 0;
  border-top: 1px solid var(--border);
  text-align: center;
  background: var(--bg-card);
}

.footer-company,
.footer-address,
.footer-reqs,
.footer-doc {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.footer-company {
  margin-bottom: 6px;
}

.footer-reqs {
  margin-bottom: 4px;
}

.site-footer .footer-doc:last-child,
.site-footer .footer-address:last-child {
  margin-bottom: 0;
}

.site-footer .footer-address a,
.site-footer .footer-doc a {
  color: inherit;
  text-decoration: underline;
}

/* Логотип слева */
.landing-brand {
  position: fixed;
  top: 20px;
  left: 24px;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: var(--text);
  transition: opacity 0.2s;
}

.landing-brand:hover {
  opacity: 0.92;
}

.landing-brand-icon-wrap {
  display: flex;
  flex-shrink: 0;
  color: var(--accent);
}

.landing-brand-text {
  font-weight: 800;
  font-size: 1.45rem;
  letter-spacing: -0.03em;
  line-height: 1;
}

@media (max-width: 480px) {
  .landing-brand-text {
    font-size: 1.2rem;
  }

  .landing-brand-icon {
    width: 30px;
    height: 30px;
  }
}

/* Top bar: вход + тема */
.landing-top-actions {
  position: fixed;
  top: 20px;
  right: 24px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-login-landing {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9375rem;
  background: var(--accent);
  border: none;
  border-radius: 12px;
  color: #ffffff;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-login-landing:hover {
  background: var(--accent-hover);
}

/* Theme toggle */
.theme-toggle {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }

[data-theme="light"] .theme-toggle .icon-sun { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }

@media (max-width: 768px) {
  .source-grid {
    grid-template-columns: 1fr;
  }
}
