* {
  box-sizing: border-box;
}

html {
  color-scheme: light only;
}

:root {
  --bg: #fafafa;
  --bg-soft: #f5f5f5;
  --surface: #ffffff;
  --surface-hover: #fafafa;
  --text: #0a0a0b;
  --text-muted: #737373;
  --accent: #0a0a0b;
  --accent-hover: #262626;
  --accent-soft: #e5e5e5;
  --border: #e5e5e5;
  --radius: 12px;
  --radius-lg: 1.5rem;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 250, 250, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.logo-icon {
  height: 32px;
  width: auto;
  flex-shrink: 0;
  vertical-align: middle;
  object-fit: contain;
}

.logo-full {
  height: 28px;
  width: auto;
  display: block;
  object-fit: contain;
  background: rgba(252, 252, 252, 0.92);
  border-radius: 10px;
  padding: 4px 8px;
}

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);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius);
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.12s;
  cursor: pointer;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

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

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-outline:hover {
  background: var(--accent-soft);
  border-color: var(--text-muted);
  transform: translateY(-1px);
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
}

/* Hero */
.hero {
  position: relative;
  padding: 88px 0 100px;
  text-align: center;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -30%;
  left: 50%;
  transform: translateX(-50%);
  width: 120%;
  height: 70%;
  background: radial-gradient(ellipse, var(--accent-soft) 0%, transparent 60%);
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 0 0 20px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 440px;
  margin: 0 auto 36px;
  line-height: 1.6;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}

/* Sections */
.section {
  padding: 72px 0;
  border-top: 1px solid var(--border);
}

.section-title {
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 44px;
  text-align: center;
}

/* How it works */
.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  counter-reset: step;
}

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

.steps li {
  position: relative;
  padding: 28px 24px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.steps li:hover {
  border-color: var(--text-muted);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.steps li::before {
  counter-increment: step;
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: 10px;
  margin-bottom: 18px;
}

.steps h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 8px;
}

.steps p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

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

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

.benefit {
  text-align: center;
  padding: 32px 24px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s, box-shadow 0.2s;
}

.benefit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.benefit-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0 auto 16px;
  font-size: 1.25rem;
  color: var(--text);
  background: var(--accent-soft);
  border-radius: 12px;
}

.benefit h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 6px;
}

.benefit p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* CTA section */
.cta-section {
  text-align: center;
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
}

.cta-section .section-title {
  margin-bottom: 10px;
}

.cta-text {
  color: var(--text-muted);
  margin: 0 0 28px;
  font-size: 1rem;
}

/* Lead form */
.lead-form {
  max-width: 400px;
  margin: 0 auto 20px;
  text-align: left;
}

.lead-field {
  margin-bottom: 18px;
}

.lead-field label {
  display: block;
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: var(--text);
}

.lead-field .optional {
  font-weight: 400;
  color: var(--text-muted);
}

.lead-field input,
.lead-field textarea {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--font);
  font-size: 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.2s;
}

.lead-field input:focus,
.lead-field textarea:focus {
  outline: none;
  border-color: var(--text-muted);
}

.lead-field textarea {
  resize: vertical;
  min-height: 60px;
}

.btn-block {
  width: 100%;
  margin-top: 8px;
}

.lead-message {
  margin: 16px 0 0;
  font-size: 0.95rem;
}

.lead-success {
  color: #15803d;
}

.lead-error {
  color: #b91c1c;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}

.modal[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  cursor: pointer;
}

.modal-content {
  position: relative;
  width: 100%;
  max-width: 420px;
  padding: 32px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  padding: 0;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  border-radius: var(--radius);
  transition: color 0.2s, background 0.2s;
}

.modal-close:hover {
  color: var(--text);
  background: var(--accent-soft);
}

.modal-title {
  margin: 0 0 8px;
  font-size: 1.35rem;
  font-weight: 700;
}

.modal-desc {
  margin: 0 0 24px;
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* Success modal */
.success-modal-content {
  text-align: center;
  padding: 40px 32px;
}

.success-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  background: #15803d;
  border-radius: 50%;
  line-height: 1;
}

.success-title {
  margin: 0 0 12px;
  font-size: 1.5rem;
  font-weight: 700;
}

.success-text {
  margin: 0 0 28px;
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.success-modal-content .btn {
  min-width: 160px;
}

/* Footer */
.footer {
  padding: 36px 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-brand {
  font-weight: 700;
  font-size: 1.05rem;
  margin: 0 0 4px;
}

.footer-copy {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Юридические страницы */
.legal-body {
  background: var(--bg);
}
.legal-header {
  border-bottom: 1px solid var(--border);
  background: rgba(250, 250, 250, 0.95);
}
.legal-header-inner {
  display: flex;
  align-items: center;
  height: 64px;
}
.legal-doc {
  max-width: 720px;
  padding-top: 2rem;
  padding-bottom: 3rem;
}
.legal-back {
  margin: 0 0 1.25rem;
  font-size: 0.9rem;
}
.legal-back a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
}
.legal-back a:hover {
  color: var(--text);
  text-decoration: underline;
}
.legal-doc h1 {
  font-size: 1.75rem;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
}
.legal-doc .legal-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 2rem;
}
.legal-doc h2 {
  font-size: 1.1rem;
  margin: 2rem 0 0.65rem;
}
.legal-doc p,
.legal-doc li,
.legal-doc ol {
  font-size: 0.95rem;
  color: var(--text);
  margin: 0 0 0.85rem;
  line-height: 1.6;
}
.legal-doc ol {
  padding-left: 1.35rem;
}
.legal-doc ol li {
  margin-bottom: 0.5rem;
}
.legal-doc a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.legal-doc a:hover {
  color: var(--accent-hover);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1.25rem;
  margin: 0.75rem 0 0.5rem;
  font-size: 0.8rem;
}
.footer-legal a {
  color: var(--text-muted);
  text-decoration: none;
}
.footer-legal a:hover {
  color: var(--text);
  text-decoration: underline;
}

.lead-consent {
  margin: 0 0 1rem;
}
.lead-consent-label {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--text-muted);
  cursor: pointer;
}
.lead-consent-label input {
  margin-top: 0.2rem;
  flex-shrink: 0;
}
.lead-consent-label a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (max-width: 640px) {
  nav {
    gap: 14px;
  }
  nav a:not(.btn) {
    display: none;
  }
  .hero {
    padding: 64px 0 80px;
  }
  .hero-cta {
    flex-direction: column;
  }
  .hero-cta .btn {
    width: 100%;
  }
  .section {
    padding: 56px 0;
  }
}
