/* ============================================================
   Переменные — меняй цвета здесь, они применятся везде
   ============================================================ */
:root {
  --bg:            #08080c;
  --bg-soft:       #0e0e15;
  --card:          #12121b;
  --border:        #22222f;
  --border-bright: #33334a;

  --text:          #f0f0f5;
  --text-muted:    #9a9aae;

  --accent:        #7c5cff;
  --accent-2:      #22d3ee;
  --accent-soft:   rgba(124, 92, 255, 0.12);

  --radius:        16px;
  --container:     1100px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
}

/* ============================================================
   Сброс и база
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
.container--narrow { max-width: 680px; }

.gradient-text {
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ============================================================
   Кнопки
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: linear-gradient(100deg, var(--accent), #6d4dff);
  color: #fff;
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  box-shadow: 0 8px 24px -8px rgba(124, 92, 255, .7);
}
.btn:hover  { transform: translateY(-2px); box-shadow: 0 14px 32px -10px rgba(124, 92, 255, .85); }
.btn:active { transform: translateY(0); }

.btn--ghost {
  background: transparent;
  border-color: var(--border-bright);
  box-shadow: none;
  color: var(--text);
}
.btn--ghost:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  box-shadow: none;
}

.btn--small { padding: 10px 18px; font-size: 14px; }
.btn--full  { width: 100%; }

/* ============================================================
   Шапка
   ============================================================ */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(8, 8, 12, .72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 20px;
}

.logo {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.02em;
}
.logo__dot { color: var(--accent); }

.nav { display: flex; gap: 28px; }

.nav__link {
  font-size: 15px;
  color: var(--text-muted);
  transition: color .18s ease;
}
.nav__link:hover { color: var(--text); }

/* Кнопка мобильного меню — на десктопе скрыта */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.nav-toggle:hover { border-color: var(--border-bright); }

.header__actions { display: flex; align-items: center; gap: 10px; }

/* ============================================================
   Главный экран
   ============================================================ */
.hero {
  position: relative;
  padding: 110px 0 100px;
  overflow: hidden;
}

.hero__glow {
  position: absolute;
  top: -260px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 620px;
  background: radial-gradient(circle, rgba(124, 92, 255, .28), transparent 62%);
  filter: blur(30px);
  pointer-events: none;
}

.hero__inner { position: relative; max-width: 820px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  margin-bottom: 26px;
  border: 1px solid var(--border-bright);
  border-radius: 999px;
  background: var(--accent-soft);
  font-size: 13px;
  color: #cfc6ff;
}
.badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 4px rgba(52, 211, 153, .18);
}

.hero__title {
  margin: 0 0 22px;
  font-size: clamp(34px, 6vw, 62px);
  line-height: 1.08;
  letter-spacing: -.03em;
  font-weight: 800;
}

.hero__text {
  margin: 0 0 36px;
  max-width: 560px;
  font-size: 18px;
  color: var(--text-muted);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 64px;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 44px;
  margin: 0;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.stats__item { margin: 0; }

.stats__value {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -.02em;
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stats__label {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
}

/* ============================================================
   Секции
   ============================================================ */
.section { padding: 90px 0; }

.section__title {
  margin: 0 0 14px;
  font-size: clamp(26px, 3.4vw, 38px);
  letter-spacing: -.02em;
  font-weight: 800;
}

.section__lead {
  margin: 0 0 42px;
  max-width: 620px;
  font-size: 17px;
  color: var(--text-muted);
}

/* Навыки */
.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.skill {
  padding: 10px 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-soft);
  font-size: 14px;
  color: #c8c8d8;
  transition: border-color .18s ease, color .18s ease, transform .18s ease;
}
.skill:hover {
  border-color: var(--accent);
  color: var(--text);
  transform: translateY(-2px);
}

/* Карточки проектов */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}

.card {
  position: relative;
  display: block;
  padding: 30px 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  color: inherit;
  text-decoration: none;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.card:hover {
  border-color: var(--border-bright);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -24px rgba(0, 0, 0, .9);
}

.card__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 20px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 20px;
}

.card__title {
  margin: 0 0 10px;
  font-size: 19px;
  font-weight: 700;
}

.card__text {
  margin: 0 0 20px;
  font-size: 15px;
  color: var(--text-muted);
}

.card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.card__tags span {
  padding: 5px 11px;
  border-radius: 7px;
  background: #1a1a26;
  font-size: 12px;
  color: #a5a5bb;
}

.card__more {
  display: inline-block;
  margin-top: 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  transition: transform .18s ease, opacity .18s ease;
}

.card:hover .card__more {
  opacity: .85;
  transform: translateX(3px);
}

/* Шаги «как я работаю» */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}

.step {
  padding: 28px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--card), #0d0d14);
}

.step__num {
  display: block;
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--accent);
}

.step__title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
}

.step__text {
  margin: 0;
  font-size: 15px;
  color: var(--text-muted);
}

/* Услуги и цены */
.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 22px;
  align-items: stretch;
}

.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 30px 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}

.plan--featured {
  border-color: var(--accent);
  background: linear-gradient(165deg, rgba(124, 92, 255, .14), var(--card) 55%);
  box-shadow: 0 24px 50px -30px rgba(124, 92, 255, .9);
}

.plan__badge {
  position: absolute;
  top: -12px;
  left: 24px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #fff;
}

.plan__title {
  margin: 0 0 12px;
  font-size: 19px;
  font-weight: 700;
}

.plan__price {
  margin: 0 0 4px;
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -.02em;
}
.plan__price span {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
}

.plan__term {
  margin: 0 0 20px;
  font-size: 13px;
  color: var(--text-muted);
}

.plan__list {
  flex: 1;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 9px;
}

.plan__list li {
  position: relative;
  padding-left: 22px;
  font-size: 14.5px;
  color: #b9b9cb;
}

.plan__list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent-2);
  font-weight: 700;
}

/* Блок про оплату */
.pay-note {
  margin-top: 26px;
  padding: 28px 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-soft);
}

.pay-note__title {
  margin: 0 0 10px;
  font-size: 17px;
  font-weight: 700;
}

.pay-note__text {
  margin: 0 0 14px;
  max-width: 640px;
  font-size: 15px;
  color: var(--text-muted);
}
.pay-note__text:last-child { margin-bottom: 0; }
.pay-note__text strong { color: var(--text); }

.pay-note__list {
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pay-note__list li {
  padding: 8px 14px;
  border: 1px solid var(--border-bright);
  border-radius: 999px;
  font-size: 13.5px;
  color: #c4c4d4;
}
.pay-note__list strong { color: var(--text); }

/* ============================================================
   Форма
   ============================================================ */
.section--contact { padding-bottom: 110px; }

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

.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.field {
  display: block;
  margin-bottom: 20px;
}

.field__label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #c4c4d4;
}

.field__input {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--border-bright);
  border-radius: 11px;
  background: #0b0b12;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.field__input::placeholder { color: #5c5c72; }

.field__input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, .18);
}

.field__input--area {
  resize: vertical;
  min-height: 130px;
}

.field__input--select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 42px;
  background-image: linear-gradient(45deg, transparent 50%, #8f8fa8 50%),
                    linear-gradient(135deg, #8f8fa8 50%, transparent 50%);
  background-position: calc(100% - 21px) calc(50% + 2px),
                       calc(100% - 15px) calc(50% + 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  cursor: pointer;
}

.field__hint {
  display: block;
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-muted);
}

/* Радиокнопки «как оплатить» */
.field--group {
  margin: 0 0 22px;
  padding: 0;
  border: 0;
}

.choices {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.choice {
  position: relative;
  cursor: pointer;
}

.choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice span {
  display: block;
  padding: 10px 18px;
  border: 1px solid var(--border-bright);
  border-radius: 11px;
  background: #0b0b12;
  font-size: 14px;
  color: #b9b9cb;
  transition: border-color .18s ease, color .18s ease, background .18s ease;
}

.choice:hover span { border-color: var(--accent); }

.choice input:checked + span {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--text);
  font-weight: 600;
}

.choice input:focus-visible + span {
  box-shadow: 0 0 0 3px rgba(124, 92, 255, .25);
}

/* Ссылки на юридические документы */
.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: 10px;
  font-size: 13px;
}

.legal-links a {
  color: var(--accent);
  border-bottom: 1px solid transparent;
  transition: border-color .18s ease;
}
.legal-links a:hover { border-bottom-color: var(--accent); }

/* Галочка согласия */
.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 18px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-muted);
  cursor: pointer;
}

.consent input {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  margin: 2px 0 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.consent a { color: var(--accent); }
.consent--invalid { color: #f87171; }
.consent--invalid input { outline: 2px solid #ef4444; outline-offset: 2px; }

/* Уведомление о cookies */
.cookie {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  max-width: 620px;
  margin: 0 auto;
  padding: 16px 20px;
  border: 1px solid var(--border-bright);
  border-radius: 14px;
  background: rgba(18, 18, 27, .97);
  backdrop-filter: blur(10px);
  box-shadow: 0 24px 50px -24px #000;
  font-size: 13.5px;
  color: var(--text-muted);
}
.cookie[hidden] { display: none; }
.cookie p { margin: 0; }
.cookie a { color: var(--accent); }

.field--invalid .field__input { border-color: #ef4444; }

.field__error {
  display: block;
  min-height: 18px;
  margin-top: 6px;
  font-size: 13px;
  color: #f87171;
}

.form__status {
  min-height: 22px;
  margin: 16px 0 0;
  font-size: 14px;
  text-align: center;
  color: #34d399;
}
.form__status--error { color: #f87171; }

/* Cloudflare Turnstile — невидимая проверка «я не робот» */
.turnstile-wrap {
  display: flex;
  justify-content: center;
  width: 100%;
  margin: 4px 0 14px;
  min-height: 66px;
}
.turnstile-wrap[hidden] { display: none; }
.turnstile-wrap > div { max-width: 100%; }

/* Ловушка для ботов — не видна человеку */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

/* Статистика посетителей (футер) */
.footer__stats {
  font-size: 13.5px;
  color: #7a7a8f;
  margin: 0 6px;
}
.footer__stats:empty { display: none; }

/* Стили песочницы */
.sandbox { padding: 64px 0 80px; }

.sandbox__section { margin-top: 46px; }

.sandbox__section-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
}

.sandbox__lead {
  margin: 0 0 22px;
  max-width: 620px;
  font-size: 15.5px;
  color: #b9b9cb;
}

.demo-card {
  max-width: 680px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--card);
}

.demo-fields {
  display: grid;
  gap: 18px;
}

.demo-field {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
}

.demo-field > span,
.demo-field > label {
  font-size: 15px;
  color: #d9d9e3;
  grid-column: 1;
}

.demo-field > span strong,
.demo-field > label strong { color: var(--text); }

.demo-field select,
.demo-field input[type="range"] {
  min-width: 0;
  width: 100%;
  grid-column: 2;
}

.demo-opts-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
  grid-column: 2;
}

.demo-opts-row label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  color: #b9b9cb;
  white-space: nowrap;
}

.demo-result {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 19px;
}

.demo-result strong {
  font-size: 24px;
  font-weight: 800;
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.demo-preview {
  display: grid;
  gap: 16px;
  max-width: 720px;
}

.demo-frame-wrap {
  overflow-x: auto;
  padding: 12px;
  border: 1px solid var(--border-bright);
  border-radius: 18px;
  background: var(--card);
}

#demo-frame {
  display: block;
  width: 375px;
  max-width: none;
  height: 420px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}

.demo-frame-controls {
  max-width: 420px;
}

.sandbox-cta {
  margin-top: 40px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ============================================================
   FAQ
   ============================================================ */
.faq { max-width: 680px; }

.faq__title {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
}

.faq__item {
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.faq__q {
  margin: 0 0 8px;
  font-size: 19px;
  font-weight: 700;
}

.faq__a {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.7;
  color: #b9b9cb;
}

.faq__q a { color: var(--accent); }

/* ============================================================
   Юридические страницы
   ============================================================ */
.legal { padding: 64px 0 90px; }

.legal__title {
  margin: 0 0 8px;
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 800;
  letter-spacing: -.02em;
}

.legal__updated {
  margin: 0 0 34px;
  font-size: 13.5px;
  color: var(--text-muted);
}

.legal h2 {
  margin: 34px 0 10px;
  font-size: 19px;
  font-weight: 700;
}

.legal p,
.legal li {
  font-size: 15.5px;
  color: #b9b9cb;
}

.legal p { margin: 0 0 14px; }

.legal ul,
.legal ol {
  margin: 0 0 16px;
  padding-left: 22px;
  display: grid;
  gap: 7px;
}

.legal a { color: var(--accent); }
.legal a:hover { text-decoration: underline; }

.legal__back {
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

/* ============================================================
   Подвал
   ============================================================ */
.footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  font-size: 14px;
  color: var(--text-muted);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer__links { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.footer__link { transition: color .18s ease; }
.footer__link:hover { color: var(--accent); }

/* ============================================================
   Появление при прокрутке (классы ставит script.js)
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .55s ease, transform .55s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ============================================================
   Адаптив
   ============================================================ */
@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }

  /* Меню — выпадающая панель под шапкой */
  .nav {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 6px 20px 14px;
    background: #0b0b11;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 22px 40px rgba(0, 0, 0, .45);
  }
  .nav.nav--open { display: flex; }
  .nav__link {
    padding: 13px 0;
    font-size: 16px;
    border-bottom: 1px solid var(--border);
  }
  .nav__link:last-child { border-bottom: 0; }

  .hero { padding: 70px 0 60px; }
  .hero__actions { margin-bottom: 46px; }
  .stats { gap: 28px; }
  .section { padding: 64px 0; }
  .form { padding: 22px; }
  .form__row { grid-template-columns: 1fr; gap: 0; }
  .pay-note { padding: 22px; }
  .plans { gap: 16px; }

  /* Песочница: подписи над полями, без сжатых колонок */
  .demo-card { padding: 20px; }
  .demo-field { grid-template-columns: 1fr; gap: 8px; }
  .demo-field > span,
  .demo-field > label,
  .demo-field select,
  .demo-field input[type="range"],
  .demo-field > input[type="checkbox"],
  .demo-opts-row { grid-column: 1; }

  .demo-field > input[type="checkbox"] { justify-self: start; }
}

/* Уважаем настройку «уменьшить анимацию» */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
