:root {
  --bg:           #FFFFFF;
  --ink:          #0F172A;
  --muted:        #334155;
  --line:         #E2E8F0;

  --accent:       #0B61A4;
  --accent-hover: #033E6B;
  --accent-light: #3F92D2;

  --radius: 18px;
  --max: 1200px;
  --pad: clamp(20px, 5vw, 64px);
}

[data-theme="dark"] {
  --bg:           #0B1120;
  --ink:          #F8FAFC;
  --muted:        #94A3B8;
  --line:         #1E293B;

  --accent:       #3B82F6;
  --accent-hover: #60A5FA;
  --accent-light: #93C5FD;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  /* Отключаем нативный smooth, так как плавность делает JS */
  scroll-behavior: auto;
  scroll-padding-top: 84px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-x: clip;
  transition: background-color 0.2s ease, color 0.2s ease;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ---------- АНИМАЦИИ ТЕКСТА ---------- */

.hero__accent {
  display: inline-block;
  color: var(--accent);
  animation: textGlow 3s ease-in-out infinite;
}

@keyframes textGlow {
  0%, 100% { text-shadow: 0 0 0px rgba(11, 97, 164, 0); }
  50% { text-shadow: 0 0 25px rgba(11, 97, 164, 0.3); }
}

.hero-dot {
  display: inline-block;
  position: relative;
  color: var(--accent);
  line-height: 1;
  margin-left: 0.05em;
  animation: heroDotPulse 3s ease-in-out infinite;
}

@keyframes heroDotPulse {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.hero__accent:hover .hero-dot {
  animation: heroDotSpin 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes heroDotSpin {
  0% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.5) rotate(180deg); }
  100% { transform: scale(1) rotate(360deg); }
}

/* ИСПРАВЛЕНИЕ БАГА С "Д" И ЗАПЯТОЙ */
.hero__title .line {
  display: block;
  overflow: hidden;
  /* Добавляем место для хвостиков букв 'д', 'у', запятых */
  padding-bottom: 0.15em;
  margin-bottom: -0.15em;
}

.hero__title .line > span {
  display: inline-block;
  transform: translateY(110%);
  animation: slideUpText 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  /* Добавляем место для хвостиков внутри самого span */
  padding-bottom: 0.15em;
}

.hero__title .line:nth-child(1) > span { animation-delay: 0.1s; }
.hero__title .line:nth-child(2) > span { animation-delay: 0.2s; }
.hero__title .line:nth-child(3) > span { animation-delay: 0.3s; }

@keyframes slideUpText {
  to { transform: translateY(0); }
}

@keyframes heroLoad {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-anim {
  opacity: 0;
  animation: heroLoad 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero__eyebrow.hero-anim { animation-delay: 0.4s; }
.hero__lead.hero-anim { animation-delay: 0.5s; }
.hero__actions.hero-anim { animation-delay: 0.6s; }

@keyframes pulseBadge {
  0% { box-shadow: 0 0 0 0 rgba(11, 97, 164, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(11, 97, 164, 0); }
  100% { box-shadow: 0 0 0 0 rgba(11, 97, 164, 0); }
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.services__list .service:nth-child(1) { transition-delay: 0.05s; }
.services__list .service:nth-child(2) { transition-delay: 0.1s; }
.services__list .service:nth-child(3) { transition-delay: 0.15s; }
.services__list .service:nth-child(4) { transition-delay: 0.2s; }

.pricing__grid .pricing__card:nth-child(1) { transition-delay: 0.05s; }
.pricing__grid .pricing__card:nth-child(2) { transition-delay: 0.1s; }
.pricing__grid .pricing__card:nth-child(3) { transition-delay: 0.15s; }

.process__steps .step:nth-child(1) { transition-delay: 0.05s; }
.process__steps .step:nth-child(2) { transition-delay: 0.1s; }
.process__steps .step:nth-child(3) { transition-delay: 0.15s; }
.process__steps .step:nth-child(4) { transition-delay: 0.2s; }

/* ---------- NAV ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px var(--pad);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

[data-theme="dark"] .nav {
  background: rgba(11, 17, 32, 0.85);
}

.nav__brand {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.nav__brand span {
  color: var(--accent);
}

.nav__right {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
}

.nav__links a {
  transition: color 0.2s ease;
}

.nav__links a:hover {
  color: var(--accent);
}

.nav__links a.is-active {
  color: var(--accent);
}

.nav__cta {
  color: var(--ink) !important;
  border: 1px solid var(--ink);
  border-radius: 999px;
  padding: 8px 18px;
  transition: all 0.2s ease;
}

.nav__cta:hover {
  background: var(--ink);
  color: var(--bg) !important;
}

.theme-toggle {
  background: none;
  border: none;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 50%;
  transition: background-color 0.2s ease;
}

.theme-toggle:hover {
  background-color: var(--line);
}

.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }

[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* ---------- HERO ---------- */

.hero {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(60px, 8vw, 100px) var(--pad) clamp(60px, 6vw, 80px);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
}

.hero-visual {
  position: absolute;
  top: 50%;
  right: 5%;
  transform: translateY(-50%);
  width: 450px;
  height: 450px;
  z-index: 0;
  pointer-events: none;
  opacity: 0.85;
}

.ring {
  position: absolute;
  border-radius: 50%;
  border: 1px dashed rgba(11, 97, 164, 0.35);
  transition: border-color 0.2s ease;
}

[data-theme="dark"] .ring {
  border-color: rgba(255, 255, 255, 0.15);
}

.ring-1 { width: 200px; height: 200px; top: calc(50% - 100px); left: calc(50% - 100px); }
.ring-2 { width: 400px; height: 400px; top: calc(50% - 200px); left: calc(50% - 200px); }

.visual-dot {
  position: absolute;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  z-index: 2;
  transition: background-color 0.2s ease;
}

.center-dot {
  top: calc(50% - 8px);
  left: calc(50% - 8px);
  width: 16px;
  height: 16px;
  background: #FFFFFF;
  border: 2px solid var(--accent-light);
  box-shadow: 0 0 20px var(--accent-light), inset 0 0 4px var(--accent-light);
  animation: centerPulse 4s ease-in-out infinite alternate;
}

@keyframes centerPulse {
  from { transform: scale(1); }
  to { transform: scale(1.15); box-shadow: 0 0 30px var(--accent-light); }
}

.orbit {
  position: absolute;
  border-radius: 50%;
  will-change: transform;
}

.orbit-1-1, .orbit-1-2 { width: 200px; height: 200px; top: calc(50% - 100px); left: calc(50% - 100px); }
.orbit-1-1 { animation: spin 60s linear infinite; }
.orbit-1-2 { animation: spin-reverse 80s linear infinite; }

.orbit-2-1, .orbit-2-2, .orbit-2-3, .orbit-2-4 { width: 400px; height: 400px; top: calc(50% - 200px); left: calc(50% - 200px); }
.orbit-2-1 { animation: spin 120s linear infinite; }
.orbit-2-2 { animation: spin-reverse 150s linear infinite; }
.orbit-2-3 { animation: spin 200s linear infinite; }
.orbit-2-4 { animation: spin-reverse 240s linear infinite; }

.dot-1 { top: -4px; left: 50%; transform: translateX(-50%); }
.dot-2 { bottom: -4px; left: 50%; transform: translateX(-50%); }
.dot-3 { top: -4px; left: 50%; transform: translateX(-50%); }
.dot-4 { right: -4px; top: 50%; transform: translateY(-50%); }
.dot-5 { bottom: -4px; left: 50%; transform: translateX(-50%); }
.dot-6 { left: -4px; top: 50%; transform: translateY(-50%); }

@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes spin-reverse { 0% { transform: rotate(0deg); } 100% { transform: rotate(-360deg); } }

/* ---------- ОСТАЛЬНЫЕ СТИЛИ ---------- */

.hero__eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.hero__title {
  font-size: clamp(40px, 6vw, 80px);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.hero__lead {
  max-width: 560px;
  margin-top: 24px;
  font-size: clamp(16px, 1.5vw, 18px);
  color: var(--muted);
  line-height: 1.6;
}

.hero__actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn--primary {
  background: var(--ink);
  color: var(--bg);
  border: 1px solid var(--ink);
}

.btn--primary:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.btn--ghost {
  border: 1px solid var(--line);
  color: var(--ink);
  background: transparent;
}

.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(11, 97, 164, 0.03);
}

.btn--large { padding: 18px 36px; font-size: 17px; }
.btn--full { width: 100%; }

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(60px, 8vw, 100px) var(--pad);
  border-top: 1px solid var(--line);
  transition: border-color 0.2s ease;
}

.section__head {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  margin-bottom: clamp(32px, 4vw, 56px);
}

.section__index {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.08em;
  padding-top: 10px;
}

.section__title {
  font-size: clamp(32px, 4vw, 56px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
}

.services__list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.service {
  background: var(--bg);
  padding: clamp(24px, 3vw, 40px);
  transition: background-color 0.15s ease;
}

.service:hover {
  background-color: rgba(15, 23, 42, 0.02);
}

[data-theme="dark"] .service:hover {
  background-color: rgba(255, 255, 255, 0.02);
}

.service__num { font-size: 12px; font-weight: 600; color: var(--accent); letter-spacing: 0.08em; display: inline-block; }
.service h3 { margin-top: 14px; font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.service p { margin-top: 8px; font-size: 15px; color: var(--muted); line-height: 1.6; }

.pricing__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: stretch; }
.pricing__card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 3vw, 40px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.2s ease;
}

.pricing__card:hover {
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
  border-color: var(--accent-light);
}

[data-theme="dark"] .pricing__card:hover {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.pricing__card--popular {
  border-color: var(--accent);
  box-shadow: 0 12px 32px rgba(11, 97, 164, 0.08);
}

[data-theme="dark"] .pricing__card--popular {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.pricing__badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  white-space: nowrap;
  animation: pulseBadge 3s infinite;
}

.pricing__label { font-size: 12px; font-weight: 600; color: var(--accent); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 16px; }
.pricing__price { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.pricing__from { font-size: 16px; font-weight: 500; color: var(--muted); }
.pricing__amount { font-size: clamp(32px, 3vw, 44px); font-weight: 800; letter-spacing: -0.04em; line-height: 1; color: var(--ink); }
.pricing__tagline { font-size: 14px; color: var(--muted); margin-bottom: 24px; min-height: 40px; }
.pricing__list { list-style: none; border-top: 1px solid var(--line); padding-top: 24px; margin-bottom: 32px; flex-grow: 1; transition: border-color 0.2s ease; }
.pricing__list li { position: relative; padding-left: 20px; padding-bottom: 12px; font-size: 15px; color: var(--ink); line-height: 1.5; }
.pricing__list li::before { content: ""; position: absolute; left: 0; top: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

.process__steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.step { border-top: 1px solid var(--line); padding-top: 20px; transition: border-color 0.15s ease; }
.step:hover { border-color: var(--accent); }
.step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #F1F5F9;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  transition: all 0.15s ease;
}

[data-theme="dark"] .step__num {
  background: #1E293B;
}

.step:hover .step__num { background: var(--accent); color: #FFFFFF; }
.step h3 { margin-top: 16px; font-size: 18px; font-weight: 700; letter-spacing: -0.02em; }
.step p { margin-top: 8px; font-size: 14px; color: var(--muted); line-height: 1.6; }

.contact { border-top: 1px solid var(--line); transition: border-color 0.2s ease; }
.contact__layout { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 80px); align-items: start; }
.contact__info { max-width: 480px; padding-top: 20px; }
.contact__title { font-size: clamp(28px, 3.5vw, 42px); font-weight: 800; line-height: 1.1; letter-spacing: -0.04em; margin-top: 16px; margin-bottom: 20px; }
.contact__lead { font-size: 16px; color: var(--muted); line-height: 1.6; margin-bottom: 28px; }
.contact__features { list-style: none; margin-bottom: 32px; }
.contact__features li { position: relative; padding-left: 24px; padding-bottom: 10px; font-size: 15px; color: var(--ink); }
.contact__features li::before { content: ""; position: absolute; left: 0; top: 6px; width: 8px; height: 8px; border-radius: 50%; border: 2px solid var(--accent); }
.contact__phone { font-size: 15px; color: var(--muted); line-height: 1.8; }
.contact__phone a { font-weight: 700; color: var(--accent); transition: opacity 0.15s; }
.contact__phone a:hover { opacity: 0.7; }

.contact__form-wrapper { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 3vw, 40px); box-shadow: 0 12px 32px rgba(15, 23, 42, 0.04); transition: all 0.2s ease; }
[data-theme="dark"] .contact__form-wrapper { box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2); }

.alert { padding: 12px 16px; border-radius: 8px; font-size: 14px; font-weight: 500; margin-bottom: 24px; }
.alert--success { background: rgba(16, 185, 129, 0.1); color: #065F46; border: 1px solid rgba(16, 185, 129, 0.2); }
[data-theme="dark"] .alert--success { color: #34D399; }

.form { display: flex; flex-direction: column; gap: 20px; }
.form__group { display: flex; flex-direction: column; gap: 8px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form__label { font-size: 14px; font-weight: 600; color: var(--ink); }
.form__input { width: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; font-family: inherit; font-size: 15px; color: var(--ink); background: var(--bg); transition: all 0.15s ease; }
.form__input::placeholder { color: var(--muted); opacity: 0.6; }
.form__input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(11, 97, 164, 0.1); }
[data-theme="dark"] .form__input:focus { box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2); }

.form__input.is-invalid {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.form__input.is-valid {
  border-color: #10b981 !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
}

.form__textarea { min-height: 120px; resize: vertical; }
.form__checkbox-group { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; margin-bottom: 8px; }
.form__checkbox-label { display: flex; align-items: flex-start; gap: 12px; font-size: 13px; color: var(--muted); cursor: pointer; line-height: 1.5; }
.form__checkbox-label input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; flex-shrink: 0; }
.form__checkbox-label a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

.footer { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; max-width: var(--max); margin: 0 auto; padding: 32px var(--pad); border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); transition: border-color 0.2s ease; }
.footer a { transition: color 0.15s ease; }
.footer a:hover { color: var(--accent); }

/* ---------- FAQ АККОРДЕОН ---------- */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.faq-item[open] {
  border-color: var(--accent);
}

.faq-item summary {
  padding: 20px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 24px;
  color: var(--accent);
  line-height: 1;
  transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item p {
  padding: 0 20px 20px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

@media (max-width: 1024px) { .hero-visual { display: none; } }
@media (max-width: 900px) {
  .pricing__grid { grid-template-columns: 1fr; gap: 32px; }
  .pricing__card--popular { box-shadow: none; }
  .contact__layout { grid-template-columns: 1fr; }
  .contact__info { max-width: 100%; }
}
@media (max-width: 860px) {
  .services__list { grid-template-columns: 1fr; }
  .process__steps { grid-template-columns: repeat(2, 1fr); row-gap: 32px; }
}
@media (max-width: 600px) {
  .nav__links { display: none; }
  .process__steps { grid-template-columns: 1fr; }
  .section__head { flex-direction: column; gap: 12px; }
  .hero__actions .btn { width: 100%; }
  .form__row { grid-template-columns: 1fr; }

  .theme-toggle {
    margin-left: 12px; /* Можно увеличить до 16px, если хотите больше отступа */
  }