/* ============================================================
   Nova — стартовые стили
   Меняйте переменные ниже, чтобы перекрасить весь сайт.
   ============================================================ */

:root {
  --accent: #7c5cff;
  --accent-2: #22d3ee;
  --radius: 20px;
  --container: 1120px;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Тёмная тема (по умолчанию) */
  --bg: #0b0d12;
  --bg-soft: #11141c;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-strong: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.1);
  --text: #eef1f7;
  --muted: #9aa3b5;
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8);
}

[data-theme="light"] {
  --bg: #f6f7fb;
  --bg-soft: #ffffff;
  --surface: rgba(13, 16, 26, 0.03);
  --surface-strong: rgba(13, 16, 26, 0.06);
  --border: rgba(13, 16, 26, 0.1);
  --text: #12151f;
  --muted: #5b6478;
  --shadow: 0 30px 80px -40px rgba(20, 24, 40, 0.35);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

img, svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }

p { margin: 0 0 1rem; }

code {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.9em;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.1em 0.4em;
}

.container {
  width: min(100% - 40px, var(--container));
  margin-inline: auto;
}

.muted { color: var(--muted); }

/* ---------- Фон ---------- */
.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.blob {
  position: absolute;
  width: 46vw;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.45;
  animation: float 18s ease-in-out infinite alternate;
}
.blob-1 { background: var(--accent); top: -12vw; left: -8vw; }
.blob-2 { background: var(--accent-2); top: 22vw; right: -14vw; animation-delay: -6s; opacity: 0.3; }
.blob-3 { background: #ff4d9d; bottom: -20vw; left: 25vw; animation-delay: -12s; opacity: 0.22; }

@keyframes float {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(3vw, 4vw, 0) scale(1.12); }
}

.grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--border) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 20%, transparent 75%);
  opacity: 0.5;
}

/* ---------- Шапка ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  transition: background 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 72px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}
.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: auto;
  font-size: 0.95rem;
  font-weight: 600;
}
.nav a { color: var(--muted); transition: color 0.2s ease; }
.nav a:hover { color: var(--text); }
.nav-cta {
  color: var(--text) !important;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.nav-cta:hover { border-color: var(--accent); background: var(--surface-strong); }

.header-actions { display: flex; gap: 8px; margin-left: auto; }
.nav + .header-actions { margin-left: 0; }
.menu-btn { display: none; }

.icon-btn {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.icon-btn:hover { background: var(--surface-strong); border-color: var(--accent); }
.icon-btn:active { transform: scale(0.94); }
.icon-btn svg, .btn svg, .menu-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

[data-theme="dark"] .i-sun { display: none; }
[data-theme="light"] .i-moon { display: none; }

/* ---------- Hero ---------- */
.hero {
  padding: clamp(48px, 9vw, 110px) 0 60px;
  text-align: center;
}
.badge {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  margin-bottom: 24px;
}
.gradient-text {
  background: linear-gradient(100deg, var(--accent) 0%, var(--accent-2) 60%, #ff4d9d 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lead {
  max-width: 640px;
  margin: 0 auto 32px;
  font-size: clamp(1rem, 1.6vw, 1.18rem);
  color: var(--muted);
}
.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.98rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.25s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn-primary {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #0a0c12;
  box-shadow: 0 14px 34px -12px color-mix(in srgb, var(--accent) 70%, transparent);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 20px 44px -12px color-mix(in srgb, var(--accent) 80%, transparent); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent); background: var(--surface-strong); }
.btn svg { transition: transform 0.2s ease; }
.btn-primary:hover svg { transform: translateX(3px); }

/* ---------- Окно с кодом ---------- */
.hero-card {
  max-width: 760px;
  margin: 0 auto 56px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-soft) 88%, transparent);
  box-shadow: var(--shadow);
  overflow: hidden;
  text-align: left;
}
.card-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.dots { display: inline-flex; gap: 6px; }
.dots i {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--border);
}
.dots i:nth-child(1) { background: #ff5f57; }
.dots i:nth-child(2) { background: #febc2e; }
.dots i:nth-child(3) { background: #28c840; }
.card-title { font-size: 0.8rem; color: var(--muted); font-family: ui-monospace, Consolas, monospace; }
.code { margin: 0; padding: 22px; overflow-x: auto; font-size: 0.88rem; line-height: 1.7; }
.code code { background: none; border: 0; padding: 0; font-size: inherit; }
.c-tag { color: #ff7b72; }
.c-attr { color: #d2a8ff; }
.c-str { color: #7ee787; }

.stats {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 760px;
  margin-inline: auto;
}
.stats li {
  padding: 18px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.stats strong { display: block; font-size: 1.5rem; font-weight: 800; }
.stats span { font-size: 0.85rem; color: var(--muted); }

/* ---------- Секции ---------- */
.section { padding: clamp(56px, 9vw, 100px) 0; }
.section-head { max-width: 640px; margin-bottom: 44px; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-2);
  margin-bottom: 10px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.feature {
  padding: 26px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.feature:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
  background: var(--surface-strong);
}
.feature-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  border-radius: 14px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  margin-bottom: 16px;
}
.feature p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.split {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 40px;
  align-items: center;
}
.checklist { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); }
.checklist li::before {
  content: "✓";
  flex: 0 0 auto;
  width: 22px; height: 22px;
  display: grid; place-items: center;
  font-size: 0.75rem;
  border-radius: 50%;
  color: #0a0c12;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
}

.panel {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 10px;
  box-shadow: var(--shadow);
}
.panel-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.88rem;
}
.panel-row + .panel-row { border-top: 1px solid var(--border); }
.tag {
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-strong);
}

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 12px; max-width: 780px; }
.faq details {
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 0 20px;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.faq details[open] { background: var(--surface-strong); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 0;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-size: 1.3rem;
  line-height: 1;
  color: var(--accent-2);
  transition: transform 0.25s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 18px; color: var(--muted); }

/* ---------- CTA + форма ---------- */
.cta {
  border-radius: 28px;
  border: 1px solid var(--border);
  background:
    radial-gradient(120% 120% at 0% 0%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 55%),
    radial-gradient(120% 120% at 100% 100%, color-mix(in srgb, var(--accent-2) 18%, transparent), transparent 55%),
    var(--bg-soft);
  padding: clamp(28px, 5vw, 56px);
  box-shadow: var(--shadow);
}
.form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 26px;
}
.field { display: grid; gap: 6px; }
.field-full { grid-column: 1 / -1; }
.field label { font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.field input,
.field textarea {
  width: 100%;
  padding: 13px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  color: var(--text);
  font: inherit;
  resize: vertical;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field input::placeholder,
.field textarea::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
}
.field input.invalid,
.field textarea.invalid { border-color: #ff5f57; }
.form-foot { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.form-note { margin: 0; font-size: 0.9rem; color: var(--accent-2); }
.form-note.error { color: #ff7b72; }

/* ---------- Футер ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 28px 0; margin-top: 40px; }
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.9rem;
}
.footer-inner p { margin: 0; }

/* ---------- Анимация появления ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
  will-change: opacity, transform;
}
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Адаптив ---------- */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .menu-btn { display: grid; }
  .nav {
    position: absolute;
    top: calc(100% + 8px);
    left: 20px;
    right: 20px;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--bg-soft) 96%, transparent);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  }
  .nav.open { opacity: 1; visibility: visible; transform: none; }
  .nav a { padding: 11px 14px; border-radius: 10px; }
  .nav a:hover { background: var(--surface-strong); }
  .nav-cta { text-align: center; margin-top: 4px; }
  .header-actions { margin-left: auto; }
  .header-inner { position: relative; }

  .grid-3 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .form { grid-template-columns: 1fr; }
  .hero-card { display: none; }
  .site-footer { text-align: center; }
  .footer-inner { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
