/* ============ Токены ============ */
:root {
  --bg: #0d0a08;
  --surface: rgba(255, 240, 225, 0.03);
  --surface-2: rgba(255, 240, 225, 0.06);
  --border: rgba(234, 164, 122, 0.18);
  --border-strong: rgba(234, 164, 122, 0.45);
  --text: #f4ece4;
  --text-2: #d9cdc1;
  --muted: #c4b6a8;
  --muted-2: #b8aa9c;
  --accent: #eaa47a;
  --accent-light: #f6c9a8;
  --btn-grad: linear-gradient(180deg, #f2b993, #c98458);
  --card-grad: linear-gradient(160deg, rgba(60, 40, 28, 0.45), rgba(20, 15, 11, 0.6));
  --on-accent: #1a120c;
  --radius: 18px;
  --container: 1200px;
}

/* ============ База ============ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Manrope', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; }
a { color: var(--accent); }
a:hover { color: var(--accent-light); }
h1, h2, h3, p { margin: 0; }

.page { position: relative; min-height: 100vh; overflow: hidden; }
.container { max-width: var(--container); margin: 0 auto; padding-left: 20px; padding-right: 20px; }
.section { padding-top: clamp(56px, 8vw, 96px); }
.section-title { font-size: clamp(26px, 3.2vw, 36px); font-weight: 800; line-height: 1.15; }
.section-lead { margin: 10px 0 28px; max-width: 680px; font-size: 16px; line-height: 1.6; color: var(--muted); }
.section-title + .grid, .section-title + .faq-list { margin-top: 28px; }
.accent { color: var(--accent); }

/* Декоративные волны */
.waves { position: absolute; left: 0; width: 100%; pointer-events: none; z-index: 0; }
.waves--top { top: 0; height: 900px; }
.waves--mid { top: 1500px; height: 600px; }

/* ============ Кнопки ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 24px; border-radius: 12px;
  font-weight: 700; font-size: 16px; font-family: inherit; text-decoration: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn--primary { background: var(--btn-grad); color: var(--on-accent); border: 0; }
.btn--primary:hover { color: var(--on-accent); transform: translateY(-1px); box-shadow: 0 10px 30px rgba(234, 164, 122, .28); }
.btn--ghost { background: transparent; color: var(--text); border: 1px solid var(--border-strong); font-weight: 600; }
.btn--ghost:hover { color: var(--text); background: rgba(234, 164, 122, .1); }
.btn--sm { min-height: 40px; padding: 0 18px; font-size: 14px; border-radius: 10px; }
.btn--block { display: flex; width: 100%; min-height: 48px; }

.pill {
  align-self: flex-start; display: inline-block;
  padding: 6px 14px; border-radius: 999px;
  border: 1px solid rgba(234, 164, 122, .35); background: rgba(234, 164, 122, .08);
  font-size: 13px; font-weight: 600; color: #f0cdb3;
}

/* ============ Шапка ============ */
.header {
  position: relative; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding-top: 22px; padding-bottom: 22px;
}
.logo { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 800; font-size: 22px; letter-spacing: .5px; }
.logo:hover { color: var(--text); }
.nav { display: flex; gap: 32px; font-size: 14px; font-weight: 500; }
.nav-link { color: var(--text-2); text-decoration: none; transition: color .15s; }
.nav-link:hover { color: var(--accent-light); }
.header-actions { display: flex; align-items: center; gap: 20px; font-size: 14px; font-weight: 500; }

.burger {
  display: none; width: 44px; height: 44px; align-items: center; justify-content: center;
  border-radius: 10px; border: 1px solid rgba(234, 164, 122, .3);
  background: rgba(255, 240, 225, .04); color: var(--text); cursor: pointer;
}
.mobile-menu {
  position: relative; z-index: 6; display: none; flex-direction: column; gap: 4px;
  margin: 0 16px 16px; padding: 16px; border-radius: 16px;
  border: 1px solid rgba(234, 164, 122, .22); background: #17110d;
}
.mobile-menu .nav-link { padding: 12px 8px; font-size: 16px; font-weight: 600; }
.mobile-menu__actions { display: flex; gap: 10px; margin-top: 8px; }
.mobile-menu__actions .btn { flex: 1; min-height: 46px; font-size: 15px; }

/* ============ Hero ============ */
main { position: relative; z-index: 2; }
.hero {
  display: flex; flex-wrap: wrap; align-items: center; gap: 40px;
  padding-top: clamp(24px, 5vw, 56px); padding-bottom: clamp(40px, 6vw, 72px);
}
.hero__content { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.hero__title { font-size: clamp(32px, 5vw, 56px); line-height: 1.08; font-weight: 800; letter-spacing: -.5px; }
.hero__text { max-width: 560px; font-size: clamp(16px, 1.6vw, 18px); line-height: 1.6; color: var(--muted); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }
.checks { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 26px; font-size: 14px; color: var(--text-2); }
.checks li { display: flex; align-items: center; gap: 8px; }

.hero__visual { flex: 1 1 300px; display: flex; justify-content: center; align-items: center; min-height: clamp(220px, 30vw, 340px); }
.tile {
  width: clamp(180px, 22vw, 270px); aspect-ratio: 1 / 1; border-radius: 22%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(145deg, #3a2a20 0%, #1b130e 55%, #2a1d15 100%);
  border: 1px solid rgba(246, 201, 168, .35);
  box-shadow: 0 40px 80px rgba(0, 0, 0, .6), 0 0 90px rgba(234, 164, 122, .22), inset 0 2px 0 rgba(255, 225, 200, .25);
  transform: perspective(900px) rotateY(-16deg) rotateX(10deg) rotateZ(-6deg);
  animation: tile-float 6s ease-in-out infinite;
}
.tile svg { width: 56%; height: 56%; }
@keyframes tile-float {
  0%, 100% { transform: perspective(900px) rotateY(-16deg) rotateX(10deg) rotateZ(-6deg) translateY(0); }
  50% { transform: perspective(900px) rotateY(-12deg) rotateX(8deg) rotateZ(-5deg) translateY(-10px); }
}
@media (prefers-reduced-motion: reduce) { .tile { animation: none; } html { scroll-behavior: auto; } }

/* ============ Демо ============ */
.demo-wrap { padding-left: 16px; padding-right: 16px; }
.demo {
  display: flex; flex-wrap: wrap; align-items: center; gap: 32px;
  padding: clamp(22px, 4vw, 40px); border-radius: 24px;
  border: 1px solid rgba(234, 164, 122, .2);
  background: linear-gradient(160deg, rgba(60, 40, 28, .55), rgba(20, 15, 11, .75));
  box-shadow: 0 30px 80px rgba(0, 0, 0, .4);
}
.demo__info { flex: 1 1 300px; display: flex; flex-direction: column; gap: 18px; }
.demo__info .section-title { font-size: clamp(26px, 3.2vw, 36px); }
.demo__info p { font-size: 16px; line-height: 1.6; color: var(--muted); }
.demo__info .btn { align-self: flex-start; min-height: 50px; }

.editor { flex: 999 1 560px; min-width: 0; border-radius: 16px; border: 1px solid rgba(255, 240, 225, .14); background: #120d0a; overflow: hidden; font-size: 12px; }
.editor__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid rgba(255, 240, 225, .1); }
.editor__brand { display: flex; align-items: center; gap: 16px; min-width: 0; }
.editor__brand strong { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 800; }
.editor__path { color: var(--muted-2); white-space: nowrap; }
.tools { display: flex; gap: 4px; }
.tool {
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  border-radius: 7px; border: 1px solid rgba(255, 240, 225, .12); background: transparent;
  color: var(--text-2); font-weight: 700; font-size: 13px; font-family: inherit; cursor: pointer;
}
.tool.is-active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.share-btn { min-height: 30px; padding: 0 12px; border: 0; border-radius: 8px; background: var(--btn-grad); color: var(--on-accent); font-weight: 700; font-size: 12px; font-family: inherit; cursor: pointer; }

.editor__body { display: flex; flex-wrap: wrap; min-height: 260px; }
.panel { padding: 10px 12px; display: flex; flex-direction: column; gap: 10px; }
.panel--layers { flex: 0 0 180px; border-right: 1px solid rgba(255, 240, 225, .1); gap: 2px; padding: 10px; }
.panel--props { flex: 1 1 170px; max-width: 100%; border-left: 1px solid rgba(255, 240, 225, .1); }
.tabs { display: flex; gap: 14px; color: var(--muted-2); padding: 2px 4px 8px; }
.tabs .is-active { color: var(--text); font-weight: 700; border-bottom: 2px solid var(--accent); padding-bottom: 4px; }
.layer {
  display: block; width: 100%; text-align: left; padding: 6px 8px; border: 0; border-radius: 6px;
  background: transparent; color: var(--text-2); font-size: 12px; font-family: inherit; cursor: pointer;
}
.layer[data-depth="1"] { padding-left: 22px; }
.layer[data-depth="2"] { padding-left: 36px; }
.layer:hover { background: rgba(255, 240, 225, .05); }
.layer.is-active { background: rgba(234, 164, 122, .18); color: var(--accent-light); }

.canvas { flex: 1 1 260px; min-width: 0; padding: 18px; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 70% 30%, rgba(234, 164, 122, .08), transparent 60%); }
.frame {
  position: relative; width: 100%; max-width: 300px; aspect-ratio: 16 / 10; padding: 18px; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 6px;
  border-radius: 12px; border: 1px solid rgba(255, 240, 225, .14);
  background: linear-gradient(135deg, #2a1d15, #15100c); transition: border-color .2s;
}
.frame.is-selected { border-color: var(--accent); }
.frame__logo { position: absolute; top: 16px; left: 18px; }
.frame strong { font-size: 20px; font-weight: 800; }
.frame span { font-size: 12px; color: var(--text-2); }
.frame i { display: block; width: 80px; height: 14px; margin-top: 6px; border-radius: 6px; background: var(--btn-grad); }

.props-label { font-weight: 700; color: var(--text-2); }
.props-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.field { padding: 6px 8px; border-radius: 6px; background: var(--surface-2); }
.field b { color: var(--muted-2); font-weight: 400; margin-right: 4px; }

/* ============ Карточки ============ */
.grid { display: grid; gap: 18px; }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }

.card {
  padding: 26px; border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--card-grad); display: flex; flex-direction: column; gap: 12px;
  transition: border-color .2s, transform .2s;
}
.card:hover { border-color: rgba(234, 164, 122, .45); transform: translateY(-2px); }
.card__head { display: flex; align-items: center; gap: 16px; }
.card__head svg { flex-shrink: 0; }
.card h3 { font-size: 19px; font-weight: 700; line-height: 1.25; }
.card p { font-size: 15px; line-height: 1.6; color: var(--muted); }

.card--plain { background: var(--surface); padding: 24px; gap: 10px; }
.card--plain h3 { font-size: 18px; }
.card__num { font-size: 13px; font-weight: 700; color: var(--accent); }

/* ============ Сравнение ============ */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); -webkit-overflow-scrolling: touch; }
.compare { width: 100%; min-width: 620px; border-collapse: collapse; font-size: 15px; }
.compare th, .compare td { padding: 14px 22px; text-align: left; }
.compare thead th { padding-top: 18px; padding-bottom: 18px; font-size: 17px; font-weight: 700; }
.compare thead th:first-child { font-size: 15px; font-weight: 600; color: var(--muted-2); }
.compare tbody tr { border-top: 1px solid rgba(255, 240, 225, .08); }
.compare tbody th { font-weight: 600; }
.compare .col-nefig { background: rgba(234, 164, 122, .1); border-left: 1px solid rgba(234, 164, 122, .25); border-right: 1px solid rgba(234, 164, 122, .25); font-weight: 700; }
.compare .col-figma { color: var(--text-2); }
.cell { display: inline-flex; align-items: center; gap: 8px; }

/* ============ Тарифы ============ */
.plan { position: relative; padding: 28px; border-radius: 20px; border: 1px solid var(--border); background: var(--surface); display: flex; flex-direction: column; gap: 16px; }
.plan--featured { border-color: rgba(234, 164, 122, .55); background: linear-gradient(160deg, rgba(90, 58, 38, .6), rgba(24, 17, 12, .8)); box-shadow: 0 20px 60px rgba(234, 164, 122, .12); }
.plan__badge { position: absolute; top: -13px; left: 28px; padding: 4px 12px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 12px; font-weight: 800; }
.plan h3 { font-size: 20px; font-weight: 700; }
.plan__price { font-size: 34px; font-weight: 800; }
.plan__price small { font-size: 15px; font-weight: 500; color: var(--muted); }
.plan p { font-size: 15px; line-height: 1.55; color: var(--muted); }
.plan ul { list-style: none; margin: 0; padding: 0; flex: 1; display: flex; flex-direction: column; gap: 10px; font-size: 15px; color: var(--text-2); }
.plan li { display: flex; gap: 10px; align-items: flex-start; }
.plan li::before { content: ''; flex-shrink: 0; width: 6px; height: 6px; margin-top: 8px; border-radius: 50%; background: var(--accent); }

/* ============ FAQ ============ */
.faq { max-width: 860px; }
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item { border-radius: 16px; border: 1px solid var(--border); background: var(--surface); overflow: hidden; }
.faq-q {
  width: 100%; min-height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 22px; background: transparent; border: 0; color: var(--text);
  font-weight: 700; font-size: 16px; font-family: inherit; text-align: left; cursor: pointer;
}
.faq-q svg { flex-shrink: 0; transition: transform .2s; }
.faq-item.is-open .faq-q svg { transform: rotate(45deg); }
.faq-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .25s ease; }
.faq-item.is-open .faq-a { grid-template-rows: 1fr; }
.faq-a > div { overflow: hidden; }
.faq-a p { padding: 0 22px 20px; font-size: 15px; line-height: 1.6; color: var(--muted); }

/* ============ CTA ============ */
.cta-wrap { padding-left: 16px; padding-right: 16px; padding-bottom: clamp(48px, 6vw, 80px); }
.cta {
  position: relative; overflow: hidden; display: flex; flex-wrap: wrap; align-items: center; gap: 28px 48px;
  padding: clamp(28px, 5vw, 56px); border-radius: 24px; border: 1px solid rgba(234, 164, 122, .25);
  background: linear-gradient(160deg, rgba(60, 40, 28, .6), rgba(18, 13, 10, .85));
}
.cta__wave { position: absolute; right: 0; bottom: 0; width: 60%; height: 100%; pointer-events: none; }
.cta__title { position: relative; flex: 1 1 360px; font-size: clamp(32px, 4.6vw, 52px); line-height: 1.1; font-weight: 800; }
.cta__side { position: relative; flex: 1 1 320px; display: flex; flex-direction: column; gap: 18px; padding-left: clamp(0px, 3vw, 32px); border-left: 1px solid rgba(234, 164, 122, .25); }
.cta__side p { font-size: 16px; line-height: 1.6; color: var(--text-2); }
.cta__side .btn { align-self: flex-start; }

/* ============ Подвал ============ */
.footer { position: relative; z-index: 2; border-top: 1px solid rgba(255, 240, 225, .08); }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding-top: 32px; padding-bottom: 32px; font-size: 14px; color: var(--muted-2); }
.footer .logo { font-size: 16px; gap: 8px; }
.footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }

/* Анимация появления при скролле */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ============ Адаптив ============ */
@media (max-width: 900px) {
  .nav, .header-actions { display: none; }
  .burger { display: inline-flex; }
  .mobile-menu.is-open { display: flex; }
}
@media (max-width: 640px) {
  .hide-sm { display: none !important; }
  .hero__actions .btn { flex: 1 1 100%; }
  .cta__side { padding-left: 0; border-left: 0; padding-top: 20px; border-top: 1px solid rgba(234, 164, 122, .25); }
  .cta__side .btn { align-self: stretch; }
}

/* ===== Модальное окно: сбор контактов ===== */
.lead-modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; }
.lead-modal[hidden] { display: none; }
.lead-modal__backdrop { position: absolute; inset: 0; background: rgba(10, 7, 5, .72); backdrop-filter: blur(4px); }
.lead-modal__dialog {
  position: relative; width: 100%; max-width: 440px; padding: 32px 28px 28px;
  background: #17110d; border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
}
.lead-modal__dialog h2 { margin: 14px 0 8px; font-size: 24px; line-height: 1.2; }
.lead-modal__text { color: var(--muted); line-height: 1.6; margin: 0 0 20px; }
.lead-modal__close {
  position: absolute; top: 10px; right: 12px; width: 36px; height: 36px;
  border: 0; background: transparent; color: var(--muted); font-size: 26px; line-height: 1;
  cursor: pointer; border-radius: 8px;
}
.lead-modal__close:hover { color: var(--text); background: var(--surface-2); }
.lead-modal__form { display: flex; flex-direction: column; gap: 12px; }
.lead-modal__input {
  min-height: 48px; padding: 0 16px; font: inherit; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; outline: none;
}
.lead-modal__input:focus { border-color: var(--border-strong); }
.lead-modal__input.is-error { border-color: #e0705a; }
.lead-modal__status { margin: 14px 0 0; font-size: 14px; line-height: 1.5; }
.lead-modal__status.is-ok { color: #9ed8a8; }
.lead-modal__status.is-error { color: #e0705a; }
