:root {
  --bg: #f7f8fa;
  --card: #ffffff;
  --text: #16181d;
  --muted: #6b7280;
  --accent: #3d63dd;
  --accent-hover: #3151b8;
  --accent-soft: rgba(61, 99, 221, 0.08);
  --border: #e5e7eb;
  --danger: #dc2626;
  --ok: #16a34a;
}

* { box-sizing: border-box; }

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

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Навигация */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(247, 248, 250, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 960px;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px 20px;
}

.logo {
  font-size: 19px;
  font-weight: 700;
}

.nav-links {
  display: flex;
  gap: 20px;
  margin-right: auto;
  flex: 1;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
}

.nav-links a:hover { color: var(--text); }

.btn.nav-cta {
  width: auto;
  padding: 9px 18px;
  font-size: 14px;
  flex-shrink: 0;
}

/* Hero */

.hero {
  padding: 64px 0 48px;
  text-align: center;
}

.hero-title {
  font-size: 40px;
  line-height: 1.15;
  margin: 0 0 16px;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  color: var(--muted);
  font-size: 17px;
  max-width: 560px;
  margin: 0 auto 28px;
  line-height: 1.6;
}

.btn.hero-cta {
  display: inline-block;
  width: auto;
  padding: 14px 32px;
  font-size: 16px;
}

.hero-trust {
  margin-top: 16px;
  font-size: 13px;
  color: var(--muted);
}

/* Как это работает */

.section-title {
  font-size: 26px;
  text-align: center;
  margin: 0 0 32px;
  letter-spacing: -0.01em;
}

.how {
  padding: 20px 0 48px;
}

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

.step {
  text-align: center;
}

.step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
}

.step-title {
  font-weight: 600;
  margin-bottom: 6px;
}

.step-text {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

/* Преимущества */

.benefits {
  padding: 0 0 56px;
}

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

.benefit {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
}

.benefit-title {
  font-weight: 600;
  margin-bottom: 6px;
}

.benefit-text {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

/* Инструмент */

main.wrap {
  max-width: 640px;
}

.tool-title {
  font-size: 22px;
  text-align: center;
  margin: 0 0 24px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  margin: 0 0 40px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.dropzone {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 160px;
  border: 2px dashed var(--border);
  border-radius: 12px;
  cursor: pointer;
  padding: 20px;
  transition: border-color .15s ease, background .15s ease;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.dropzone strong {
  display: block;
  font-size: 16px;
  margin-bottom: 4px;
}

.dropzone span {
  display: block;
  color: var(--muted);
  font-size: 14px;
}

.dropzone .hint {
  margin-top: 10px;
  font-size: 12px;
}

.file-info {
  font-size: 15px;
  word-break: break-all;
}

.file-info strong {
  display: block;
}

.hidden { display: none !important; }

.format-choice {
  border: none;
  padding: 0;
  margin: 20px 0;
}

.format-choice legend {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
  padding: 0;
}

.radio {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: 20px;
  font-size: 15px;
  cursor: pointer;
}

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

.choice-hint {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.choice-hint.auto {
  color: var(--text);
}

.btn {
  display: block;
  width: 100%;
  padding: 14px 20px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background .15s ease, opacity .15s ease;
}

.btn:hover:not(:disabled) { background: var(--accent-hover); }

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn.secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  width: auto;
  padding: 10px 16px;
  font-size: 14px;
}

.btn.secondary:hover { border-color: var(--accent); }

.status {
  margin-top: 16px;
  font-size: 14px;
  color: var(--muted);
}

.status.error { color: var(--danger); }
.status.ok { color: var(--ok); }

.progress-block {
  margin-top: 16px;
}

.progress-track {
  width: 100%;
  height: 8px;
  background: var(--accent-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width .3s ease;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}

.result {
  margin-top: 20px;
}

.result-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.result-text {
  width: 100%;
  min-height: 260px;
  background: #f9fafb;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  resize: vertical;
}

.lead-form {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.lead-label {
  display: block;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 10px;
}

.lead-row {
  display: flex;
  gap: 10px;
}

.lead-input {
  flex: 1;
  padding: 11px 14px;
  background: #f9fafb;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 14px;
}

.lead-input:focus {
  outline: none;
  border-color: var(--accent);
}

.lead-status {
  margin-top: 10px;
  font-size: 13px;
}

.lead-status.error { color: var(--danger); }
.lead-status.ok { color: var(--ok); }

/* FAQ */

.faq {
  margin-bottom: 40px;
}

.faq-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 10px;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: '+';
  float: right;
  color: var(--muted);
  font-weight: 400;
}

.faq-item[open] summary::after {
  content: '–';
}

.faq-item p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin: 12px 0 0;
}

/* CTA на основные услуги */

.cta-card {
  background: linear-gradient(160deg, var(--accent-soft), rgba(61, 99, 221, 0.01));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  margin: 0 0 24px;
  text-align: center;
}

.cta-title {
  font-size: 19px;
  margin: 0 0 10px;
}

.cta-text {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 18px;
  line-height: 1.6;
}

.btn.cta-btn {
  display: inline-block;
  width: auto;
  padding: 12px 28px;
}

.footer {
  color: var(--muted);
  font-size: 13px;
  padding: 20px 0 40px;
  text-align: center;
}

@media (max-width: 640px) {
  .hero-title { font-size: 30px; }
  .hero-subtitle { font-size: 15px; }
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .benefit-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}

.lead-consent {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
