/* aplaw.ru — modern dark theme with glass morphism */
:root {
  --bg: #0f0f1a;
  --bg-card: rgba(255,255,255,0.04);
  --bg-card-hover: rgba(255,255,255,0.07);
  --border: rgba(255,255,255,0.08);
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --accent: #6366f1;
  --accent-2: #8b5cf6;
  --accent-grad: linear-gradient(135deg, #6366f1, #8b5cf6);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 32px rgba(0,0,0,0.3);
  --transition: 0.3s cubic-bezier(0.4,0,0.2,1);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Анимированный фон */
body::before {
  content: '';
  position: fixed;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle at 20% 50%, rgba(99,102,241,0.08), transparent 40%),
              radial-gradient(circle at 80% 20%, rgba(139,92,246,0.06), transparent 40%),
              radial-gradient(circle at 40% 80%, rgba(99,102,241,0.05), transparent 50%);
  z-index: -1;
  animation: drift 20s ease-in-out infinite alternate;
}
@keyframes drift {
  0% { transform: translate(0,0); }
  100% { transform: translate(-5%,-5%); }
}

/* Контейнер */
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* Навигация */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(15,15,26,0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; }
.nav-logo {
  font-size: 22px; font-weight: 700;
  background: var(--accent-grad);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
  letter-spacing: -0.5px;
}
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a {
  color: var(--text-muted); text-decoration: none; font-size: 14px; font-weight: 500;
  transition: color var(--transition);
}
.nav-links a:hover { color: var(--text); }
.nav-cta {
  padding: 10px 22px; border-radius: var(--radius-sm);
  background: var(--accent-grad); color: white !important;
  font-weight: 600; font-size: 14px;
  transition: transform var(--transition), box-shadow var(--transition);
}
.nav-cta:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(99,102,241,0.4); }

/* Hero */
.hero { padding: 80px 0 60px; text-align: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: 20px;
  background: var(--bg-card); border: 1px solid var(--border);
  font-size: 13px; color: var(--text-muted); margin-bottom: 24px;
}
.hero-badge .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #22c55e; box-shadow: 0 0 8px #22c55e;
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }

.hero h1 {
  font-size: 48px; font-weight: 800; line-height: 1.1;
  letter-spacing: -1.5px; margin-bottom: 20px;
}
.hero h1 .grad {
  background: var(--accent-grad);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  font-size: 18px; color: var(--text-muted); max-width: 560px;
  margin: 0 auto 36px;
}

/* Кнопки */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 16px 32px; border-radius: var(--radius-sm);
  font-size: 16px; font-weight: 600; text-decoration: none;
  border: none; cursor: pointer; transition: all var(--transition);
}
.btn-primary {
  background: var(--accent-grad); color: white;
  box-shadow: 0 4px 20px rgba(99,102,241,0.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(99,102,241,0.5); }
.btn-secondary {
  background: var(--bg-card); color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--bg-card-hover); }

/* Карточки */
.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
  transition: all var(--transition);
  backdrop-filter: blur(10px);
}
.card:hover { background: var(--bg-card-hover); border-color: rgba(99,102,241,0.3); transform: translateY(-4px); }
.card-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; margin-bottom: 16px;
  background: var(--accent-grad);
}
.card h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.card p { color: var(--text-muted); font-size: 14px; }

/* Сетка фич */
.features { padding: 60px 0; }
.features-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}

/* Тарифы */
.pricing { padding: 60px 0; }
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.price-card {
  text-align: center; padding: 36px 28px; position: relative;
}
.price-card.featured {
  border-color: var(--accent); box-shadow: 0 0 40px rgba(99,102,241,0.15);
}
.price-card .label {
  font-size: 14px; color: var(--text-muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 1px;
}
.price-card .amount { font-size: 42px; font-weight: 800; margin: 12px 0; }
.price-card .amount .currency { font-size: 20px; color: var(--text-muted); }
.price-card .desc { color: var(--text-muted); font-size: 14px; margin-bottom: 24px; }
.price-card ul { list-style: none; text-align: left; margin-bottom: 28px; }
.price-card ul li { padding: 8px 0; font-size: 14px; display: flex; align-items: center; gap: 10px; }
.price-card ul li::before { content: '✓'; color: #22c55e; font-weight: bold; }

/* Форма */
.form-section { padding: 60px 0; }
.form-card { max-width: 640px; margin: 0 auto; padding: 40px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.form-group input, .form-group textarea {
  width: 100%; padding: 14px 16px; border-radius: var(--radius-sm);
  background: rgba(0,0,0,0.3); border: 1px solid var(--border);
  color: var(--text); font-size: 15px; font-family: inherit;
  transition: border var(--transition);
}
.form-group input:focus, .form-group textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}
.form-group textarea { min-height: 160px; resize: vertical; }
.char-count { text-align: right; font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.form-error {
  background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3);
  color: #fca5a5; padding: 12px 16px; border-radius: var(--radius-sm);
  margin-bottom: 20px; font-size: 14px;
}

/* Результат */
.result-section { padding: 60px 0; }
.result-card { max-width: 800px; margin: 0 auto; }
.result-block { margin-bottom: 24px; }
.result-block h3 { font-size: 16px; color: var(--accent); margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
.result-block .content {
  background: rgba(0,0,0,0.2); padding: 20px; border-radius: var(--radius-sm);
  white-space: pre-wrap; line-height: 1.8; font-size: 15px;
}
.result-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }

/* Footer */
.footer {
  border-top: 1px solid var(--border); padding: 40px 0; margin-top: 60px;
}
.footer-inner { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 20px; }
.footer-info { font-size: 13px; color: var(--text-muted); line-height: 1.8; }
.footer-info a { color: var(--accent); text-decoration: none; }
.footer-info a:hover { text-decoration: underline; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--text-muted); text-decoration: none; font-size: 13px; transition: color var(--transition); }
.footer-links a:hover { color: var(--text); }

/* Адаптив */
@media (max-width: 768px) {
  .hero h1 { font-size: 32px; }
  .hero p { font-size: 16px; }
  .features-grid, .pricing-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .nav-links .nav-cta { display: flex; }
  .footer-inner { flex-direction: column; }
  .btn { width: 100%; justify-content: center; }
}

/* Юридические тексты */
.legal-content { max-width: 760px; margin: 0 auto; padding: 40px 0; }
.legal-content h1 { font-size: 28px; margin-bottom: 24px; }
.legal-content h2 { font-size: 18px; margin: 28px 0 12px; color: var(--accent); }
.legal-content p, .legal-content li { font-size: 14px; color: var(--text-muted); margin-bottom: 8px; line-height: 1.8; }
.legal-content ul { padding-left: 20px; margin-bottom: 16px; }
.legal-content strong { color: var(--text); }

/* Спиннер */
.spinner {
  display: inline-block; width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,0.2); border-top-color: white;
  border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-overlay {
  position: fixed; inset: 0; background: rgba(15,15,26,0.9);
  display: none; align-items: center; justify-content: center; z-index: 200;
  flex-direction: column; gap: 16px;
}
.loading-overlay.active { display: flex; }
