/* ============================================================
   Нейро ЛАНД — стили
   Палитра взята из макетов стратегии (зелёная гамма + янтарь)
   ============================================================ */

:root {
  /* Зелёная гамма */
  --green-900: #1f3527;
  --green-800: #234a32;
  --green-700: #1e5631;   /* основная кнопка / скачать */
  --green-600: #2e6b41;
  --green-500: #3a8a57;
  --green-400: #5aa874;
  --ink:       #2c3b2e;   /* основной текст (из документа) */
  --tint-50:   #f2f8f4;   /* светлый фон секций */
  --tint-100:  #e8f3ec;   /* заливка выбранного */
  --tint-200:  #d8e8de;

  /* Акценты */
  --amber:     #e6a23c;
  --amber-bg:  #fff7e6;
  --amber-bd:  #f0c873;
  --timer:     #c0392b;   /* таймер обратного отсчёта */

  /* CTA «Скачать программу» — оранжево-жёлтый, чтобы выделяться на зелёной странице
     (скачивание = цель воронки, должно перетягивать внимание с зелёных кнопок). */
  --cta:       #ff7a00;
  --cta-2:     #ffb300;
  --cta-dark:  #e86a00;

  /* Нейтральные */
  --white: #ffffff;
  --muted: #6b7c70;
  --line:  #dde6e0;
  --line-2:#ccd6cf;

  --green-50:  #f6fbf8;

  --radius-lg:20px;
  --radius:   14px;
  --radius-sm:10px;
  --shadow-xs:0 1px 2px rgba(31, 53, 39, 0.06);
  --shadow:   0 8px 28px rgba(31, 53, 39, 0.09);
  --shadow-lg:0 28px 70px rgba(31, 53, 39, 0.16);
  --ring:     0 0 0 4px rgba(58, 138, 87, 0.18);

  --container: 1140px;
  --font: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
/* Липкая шапка (66px) перекрывает цель якорного перехода — оставляем ей место */
section[id], h2[id] { scroll-margin-top: 82px; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden; /* страховка от горизонтального скролла на узких экранах */
}
h1, h2, h3 { overflow-wrap: break-word; }
::selection { background: var(--tint-200); color: var(--green-900); }

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

a { color: var(--green-700); text-decoration: none; }
a:hover { color: var(--green-500); }

h1, h2, h3 { line-height: 1.15; color: var(--ink); margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4vw, 3.1rem); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 2.6vw, 2.3rem); font-weight: 800; letter-spacing: -0.015em; }
h3 { font-size: 1.2rem; font-weight: 700; }

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

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font-family: inherit; font-weight: 700; font-size: 1rem;
  border: none; border-radius: var(--radius-sm); cursor: pointer;
  padding: 14px 24px; transition: transform .12s ease, background .15s ease, box-shadow .15s ease;
  text-align: center;
}
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 9px 16px; font-size: .9rem; }
.btn-lg { padding: 16px 30px; font-size: 1.08rem; }
.btn-block { display: flex; width: 100%; }

.btn-primary { background: var(--green-700); color: #fff; }
.btn-primary:hover { background: var(--green-600); color: #fff; }

.btn-download { background: linear-gradient(135deg, var(--cta), var(--cta-2)); color: #fff; box-shadow: 0 8px 24px rgba(255, 122, 0, .34); }
.btn-download:hover { background: linear-gradient(135deg, var(--cta-dark), #ff9d00); color: #fff; box-shadow: 0 10px 28px rgba(255, 122, 0, .42); }

.btn-ghost { background: #fff; color: var(--ink); border: 1.5px solid var(--line-2); }
.btn-ghost:hover { border-color: var(--green-500); color: var(--green-700); }

.link-muted {
  background: none; border: none; color: var(--muted); font-family: inherit;
  font-size: .92rem; cursor: pointer; text-decoration: underline; padding: 6px;
}
.link-muted:hover { color: var(--green-700); }

.badge {
  display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .02em;
  text-transform: uppercase; color: var(--green-700); background: var(--tint-100);
  padding: 6px 12px; border-radius: 100px; margin-bottom: 14px;
}
.badge-dark { color: #cfe8d8; background: rgba(255,255,255,.12); }

/* ============ ШАПКА ============ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 16px; height: 66px; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.2rem; color: var(--ink); flex: none; }
.logo-mark { font-size: 1.4rem; }
.logo-text strong { color: var(--green-700); font-weight: 800; }
.logo-light, .logo-light .logo-text strong { color: #fff; }

.main-nav { display: flex; gap: 18px; margin-left: 6px; flex-shrink: 0; }
.main-nav a { color: var(--ink); font-weight: 600; font-size: .92rem; white-space: nowrap; }
.main-nav a:hover { color: var(--green-700); }

.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; flex: none; }

.usage-pill {
  display: flex; align-items: center; gap: 7px; white-space: nowrap;
  background: var(--tint-50); border: 1px solid var(--tint-200);
  border-radius: 100px; padding: 6px 12px; font-size: .82rem; color: var(--ink);
}
.usage-label { color: var(--muted); }
.usage-count b { color: var(--green-700); }
.usage-dots { display: inline-flex; gap: 4px; }
.usage-dots i {
  width: 9px; height: 9px; border-radius: 50%; background: var(--green-500);
  display: inline-block; transition: background .2s;
}
.usage-dots i.spent { background: var(--line-2); }

/* ============ HERO ============ */
.hero {
  padding: 56px 0 0; position: relative; overflow: hidden;
  background:
    radial-gradient(900px 380px at 50% -120px, var(--tint-100), transparent 70%),
    linear-gradient(180deg, var(--tint-50), #fff 58%);
}
.hero-head { max-width: 820px; margin: 0 auto; text-align: center; }
.hero-head h1 { margin: 0 0 .4em; text-wrap: balance; }
.hero-lead { font-size: 1.18rem; color: #46584b; margin: 0 auto 26px; max-width: 600px; text-wrap: balance; }
.hero-points {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 12px;
}
.hero-points li {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: .94rem;
  background: #fff; border: 1px solid var(--line); border-radius: 100px;
  padding: 8px 16px; box-shadow: var(--shadow-xs);
}
.hero-points span { font-size: 1.1rem; line-height: 1; }

/* Студия — широкий центральный блок */
.studio-wrap { margin-top: 36px; }

/* ---------- Студия генерации ---------- */
.studio {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.studio-tabs { display: flex; gap: 8px; padding: 14px 16px 0; background: var(--tint-50); }
.studio-tab {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  background: #fff; border: 1.5px solid var(--line); border-bottom: none;
  border-radius: 12px 12px 0 0; padding: 14px 10px; font-family: inherit;
  font-weight: 700; font-size: .95rem; color: var(--muted); cursor: pointer;
  transition: color .15s, border-color .15s, box-shadow .15s;
}
.studio-tab span { font-size: 1.05rem; line-height: 1; }
.studio-tab:hover { color: var(--ink); border-color: var(--line-2); }
.studio-tab.is-active { color: var(--green-700); border-color: var(--green-500); background: #fff; box-shadow: inset 0 -3px 0 var(--green-500); }

.studio-body {
  display: grid; grid-template-columns: minmax(300px, 420px) 1fr;
  gap: 24px; padding: 24px;
}
.studio-inputs { display: flex; flex-direction: column; gap: 14px; }

.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; border: 2px dashed var(--line-2); border-radius: var(--radius);
  padding: 30px 16px; text-align: center; cursor: pointer; background: var(--tint-50);
  transition: border-color .15s, background .15s; min-height: 184px; position: relative;
}
.dropzone:hover, .dropzone.dragover { border-color: var(--green-500); background: var(--tint-100); }
.dropzone.dragover { box-shadow: var(--ring); }
.dropzone-icon { font-size: 2rem; }
.dropzone-title { font-weight: 700; }
.dropzone-hint { font-size: .85rem; color: var(--muted); }
.dropzone-preview { position: absolute; inset: 6px; width: calc(100% - 12px); height: calc(100% - 12px); object-fit: cover; border-radius: 8px; }

.field {
  width: 100%; font-family: inherit; font-size: .95rem; color: var(--ink);
  border: 1.5px solid var(--line-2); border-radius: var(--radius-sm);
  padding: 11px 13px; background: #fff; transition: border-color .15s;
}
.field:focus { outline: none; border-color: var(--green-500); box-shadow: var(--ring); }
.textarea { resize: vertical; min-height: 150px; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7c70' stroke-width='1.6' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field-label { display: flex; flex-direction: column; gap: 5px; font-size: .8rem; font-weight: 600; color: var(--muted); }

.btn-generate {
  margin-top: auto; width: 100%; padding: 16px; font-size: 1.05rem;
  background: linear-gradient(180deg, var(--green-600), var(--green-700));
  box-shadow: 0 8px 20px rgba(30, 86, 49, .25);
}
.btn-generate:hover { background: linear-gradient(180deg, var(--green-500), var(--green-600)); }
.btn-generate span { font-size: 1.1rem; }

/* Сетка стилей (режим 3) */
.style-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.style-chip {
  border: 1.5px solid var(--line-2); border-radius: 10px; padding: 10px 6px;
  background: #fff; cursor: pointer; font-family: inherit; font-size: .82rem; font-weight: 600;
  color: var(--ink); display: flex; flex-direction: column; align-items: center; gap: 4px;
  transition: all .15s;
}
.style-chip span { font-size: 1.3rem; }
.style-chip:hover { border-color: var(--green-400); }
.style-chip.is-active { border-color: var(--green-600); background: var(--tint-100); box-shadow: 0 0 0 2px var(--tint-100); }

/* ---------- Панель результата ---------- */
.studio-result {
  background:
    radial-gradient(120% 90% at 50% 0%, #fff, var(--tint-50) 80%);
  border: 1px solid var(--line); border-radius: var(--radius);
  min-height: 360px; display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.result-placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; text-align: center; color: var(--muted); padding: 28px;
}
.result-ico { font-size: 2.6rem; line-height: 1; opacity: .9; }
.result-ph-title { margin: 8px 0 0; font-weight: 700; font-size: 1.05rem; color: var(--ink); }
.result-ph-hint { margin: 0; font-size: .9rem; max-width: 260px; }
.result-left {
  margin-top: 12px; font-size: .8rem; display: inline-flex; align-items: center; gap: 7px;
  background: #fff; border: 1px solid var(--line); border-radius: 100px; padding: 6px 12px;
}
.result-left i { width: 8px; height: 8px; border-radius: 50%; background: var(--green-500); display: inline-block; margin: 0 1px; }
.result-left i.spent { background: var(--line-2); }

.spinner {
  width: 42px; height: 42px; border: 4px solid var(--tint-200);
  border-top-color: var(--green-600); border-radius: 50%; margin: 0 auto 12px;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.result-figure { margin: 0; width: 100%; height: 100%; position: relative; }
.result-figure img { width: 100%; height: 100%; object-fit: cover; }
/* Водяной знак вшивается в сам JPEG на canvas (bakeWatermark в app.js) */
.result-actions {
  position: absolute; left: 10px; bottom: 10px; display: flex; gap: 8px; flex-wrap: wrap;
}
.result-actions .btn-ghost { background: rgba(255,255,255,.92); backdrop-filter: blur(2px); }

/* ---------- Прогресс генерации (длинное ожидание ИИ) ---------- */
.result-loading { position: absolute; inset: 0; padding: 0; }
.gen-skeleton {
  position: absolute; inset: 0; overflow: hidden;
  background: linear-gradient(135deg, #e9f1ec 0%, #dfeae2 100%);
}
.gen-shimmer {
  position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent);
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer { 100% { transform: translateX(100%); } }
.gen-overlay {
  position: absolute; inset: 0; z-index: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; padding: 24px; text-align: center;
}
.gen-stage {
  margin: 0; font-weight: 700; color: var(--green-800); font-size: 1.02rem;
  min-height: 1.4em; transition: opacity .2s;
}
.gen-bar {
  width: min(86%, 320px); height: 8px; border-radius: 100px;
  background: rgba(31,53,39,.12); overflow: hidden;
}
.gen-bar-fill {
  height: 100%; width: 0; border-radius: 100px;
  background: linear-gradient(90deg, var(--green-500), var(--green-700));
  transition: width .2s ease;
}
.gen-meta {
  display: flex; align-items: center; gap: 14px;
  font-size: .82rem; color: var(--muted);
}
.gen-percent { font-weight: 800; color: var(--green-700); font-variant-numeric: tabular-nums; }
.gen-elapsed b { color: var(--ink); font-variant-numeric: tabular-nums; }

/* ---------- Ошибка генерации ---------- */
.result-error { text-align: center; color: var(--muted); padding: 24px; }
.result-error p { margin: 4px 0 16px; }

/* ---------- Спиннер на кнопке ---------- */
.btn-spinner {
  width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.45);
  border-top-color: #fff; border-radius: 50%; display: inline-block;
  animation: spin .7s linear infinite;
}
.btn.is-loading { opacity: .92; cursor: progress; }

/* ---------- Аккаунт в шапке ---------- */
.auth-btn { white-space: nowrap; }
.auth-btn.is-account {
  display: inline-flex; align-items: center; gap: 8px;
  border-color: var(--green-500); color: var(--green-700); background: var(--tint-50);
  padding-left: 8px;
}
.auth-ava {
  width: 22px; height: 22px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--green-700); color: #fff; font-size: .78rem; font-weight: 800;
}
.auth-mail { max-width: 150px; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }

.usage-pill.is-empty { border-color: var(--amber-bd); background: var(--amber-bg); }
.usage-pill.is-empty .usage-count b { color: var(--timer); }

/* ---------- Подёргивание при ошибке валидации ---------- */
.shake { animation: shake .4s ease; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}
.anketa-sub { text-align: center; color: var(--muted); font-size: .92rem; margin: 6px 0 0; }

/* ---------- Trust bar ---------- */
.trust-bar {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  margin-top: 48px; padding: 28px 20px 8px;
}
.trust-item { text-align: center; position: relative; }
.trust-item + .trust-item::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  height: 38px; width: 1px; background: var(--line);
}
.trust-item b { display: block; font-size: 1.7rem; font-weight: 800; color: var(--green-700); letter-spacing: -.02em; }
.trust-item span { font-size: .85rem; color: var(--muted); }

/* ============ СЕКЦИИ ============ */
.section { padding: 80px 0; }
.section-tint { background: var(--tint-50); }
.section-head { text-align: center; max-width: 700px; margin: 0 auto 44px; }
.section-head p { color: var(--muted); font-size: 1.08rem; margin: 0; }

/* 3 режима */
.modes-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: mode; }
.mode-card {
  position: relative; counter-increment: mode;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 26px 28px; box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.mode-card::before {
  content: counter(mode); position: absolute; top: 22px; right: 22px;
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--tint-100); color: var(--green-700); font-weight: 800; font-size: .95rem;
}
.mode-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--tint-200); }
.mode-emoji {
  display: inline-flex; align-items: center; justify-content: center;
  width: 54px; height: 54px; border-radius: 14px; background: var(--tint-100); font-size: 1.7rem;
}
.mode-card h3 { margin-top: 18px; }
.mode-card p { color: #46584b; font-size: .96rem; margin: 0; }

/* ============ ГАЛЕРЕЯ ДО/ПОСЛЕ ============ */
.gallery-filters { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 26px; }
.gallery-filter {
  border: 1.5px solid var(--line-2); background: #fff; color: var(--ink);
  border-radius: 100px; padding: 8px 16px; font-family: inherit; font-weight: 600;
  font-size: .9rem; cursor: pointer; transition: all .15s;
}
.gallery-filter:hover { border-color: var(--green-400); }
.gallery-filter.is-active { background: var(--green-700); color: #fff; border-color: var(--green-700); }

.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.ba {
  position: relative; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); aspect-ratio: 4 / 3; user-select: none; background: #ccc;
}
.ba img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.ba .ba-after { clip-path: inset(0 0 0 50%); }
.ba-divider {
  position: absolute; top: 0; bottom: 0; left: 50%; width: 3px; background: #fff;
  transform: translateX(-50%); box-shadow: 0 0 0 1px rgba(0,0,0,.1);
}
.ba-handle {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 34px; height: 34px; border-radius: 50%; background: #fff; color: var(--green-700);
  display: flex; align-items: center; justify-content: center; font-size: .9rem; font-weight: 700;
  box-shadow: 0 2px 8px rgba(0,0,0,.25); cursor: ew-resize;
}
.ba-range { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.ba-tag {
  position: absolute; top: 10px; font-size: .72rem; font-weight: 700; color: #fff;
  background: rgba(31,53,39,.65); padding: 4px 9px; border-radius: 6px; pointer-events: none;
}
.ba-tag.before { left: 10px; }
.ba-tag.after { right: 10px; background: rgba(30,86,49,.85); }
.ba-style { position: absolute; bottom: 10px; left: 10px; color: #fff; font-weight: 700; font-size: .9rem; text-shadow: 0 1px 4px rgba(0,0,0,.5); pointer-events: none; }

/* Мои проекты */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.project-card { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow); position: relative; }
.project-card img { aspect-ratio: 4/3; object-fit: cover; }
.project-card .p-meta { padding: 8px 12px; font-size: .82rem; color: var(--muted); }

/* ============ ПРОГРАММА 3D ============ */
.section-software { background: linear-gradient(160deg, var(--green-800), var(--green-900)); color: #eaf3ed; }
.section-software h2 { color: #fff; }
.software-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 44px; align-items: center; }
.software-copy p { color: #c6dccd; font-size: 1.05rem; }
.feature-list { list-style: none; padding: 0; margin: 18px 0 26px; display: grid; gap: 10px; }
.feature-list li { position: relative; padding-left: 28px; color: #dcefe2; }
.feature-list li::before { content: "✓"; position: absolute; left: 0; color: var(--green-400); font-weight: 800; }
.software-os { font-size: .85rem; color: #9fc0ac; margin-top: 12px; }

/* Графика программы в блоке #software (вместо таблицы — таблица ушла в поп-ап) */
.software-shot {
  position: relative; margin: 0; background: #fff; border-radius: var(--radius);
  padding: 10px; box-shadow: var(--shadow-lg); color: var(--ink);
}
.software-shot img {
  width: 100%; height: auto; border-radius: var(--radius-sm); display: block;
  aspect-ratio: 4 / 3; object-fit: cover; background: var(--tint-50);
}
.software-shot-badge {
  position: absolute; top: 20px; left: 20px; z-index: 1;
  background: linear-gradient(135deg, var(--cta), var(--cta-2)); color: #fff;
  font-size: .78rem; font-weight: 800; padding: 6px 12px; border-radius: 999px;
  box-shadow: 0 6px 16px rgba(255, 122, 0, .35);
}
.software-shot figcaption { color: var(--muted); font-size: .9rem; padding: 12px 8px 6px; text-align: center; }

/* Таблица сравнения */
.compare-card { background: #fff; border-radius: var(--radius); padding: 8px; box-shadow: var(--shadow-lg); color: var(--ink); }
.compare-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.compare-table th, .compare-table td { padding: 12px 10px; text-align: center; border-bottom: 1px solid var(--line); }
.compare-table thead th { font-weight: 700; color: var(--ink); }
.compare-table tbody th { text-align: left; font-weight: 600; color: var(--muted); }
.compare-table .col-highlight { background: var(--tint-50); color: var(--green-700); font-weight: 700; }
.compare-table thead .col-highlight { border-radius: 8px 8px 0 0; }
.compare-table tbody tr:last-child td, .compare-table tbody tr:last-child th { border-bottom: none; }

/* ============ FAQ ============ */
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 4px 20px; box-shadow: var(--shadow); }
.faq-item summary { cursor: pointer; font-weight: 700; padding: 16px 0; list-style: none; position: relative; padding-right: 30px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font-size: 1.4rem; color: var(--green-600); transition: transform .2s; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { margin: 0 0 16px; color: #46584b; }

/* ============ ФУТЕР ============ */
.site-footer { background: var(--green-900); color: #b9d2c2; padding: 44px 0; }
.footer-inner { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 30px; }
.footer-brand p { font-size: .9rem; margin-top: 10px; }
.footer-nav, .footer-legal { display: flex; flex-direction: column; gap: 10px; }
.footer-nav a, .footer-legal a { color: #b9d2c2; font-size: .92rem; }
.footer-nav a:hover, .footer-legal a:hover { color: #fff; }
.copyright { font-size: .82rem; color: #7fa28d; margin-top: 8px; }

/* ============ ПОП-АПЫ ============ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100; background: rgba(31,53,39,.55);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: fade .2s ease;
}
@keyframes fade { from { opacity: 0; } }
.modal {
  background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg);
  width: 100%; max-width: 440px; padding: 30px 28px; position: relative; text-align: center;
  animation: pop .25s ease;
}
@keyframes pop { from { transform: translateY(12px) scale(.97); opacity: 0; } }
.modal-close { position: absolute; top: 14px; right: 16px; background: none; border: none; color: var(--muted); font-size: .9rem; cursor: pointer; font-family: inherit; }
.modal-close:hover { color: var(--ink); }
.modal-mark { font-size: 2rem; display: block; margin-bottom: 6px; }
.modal-sub { color: var(--muted); font-size: .95rem; margin: 4px 0 18px; }
.modal-mini { font-size: .82rem; color: var(--muted); margin: 10px 0 0; }
.compare-compact { margin: 6px 0 18px; font-size: .85rem; }
.compare-compact th, .compare-compact td { padding: 8px 6px; }
.countdown-line { margin: 16px 0 0; font-size: .9rem; color: var(--muted); }
.countdown { color: var(--timer); font-variant-numeric: tabular-nums; font-size: 1.05rem; letter-spacing: .02em; }

/* Анкета */
.modal-anketa { max-width: 460px; text-align: left; }
.anketa-head { text-align: center; margin-bottom: 18px; }
.anketa-emoji { font-size: 1.8rem; }
.anketa-progress { display: flex; gap: 6px; justify-content: center; margin-top: 12px; }
.anketa-progress span { width: 34px; height: 4px; border-radius: 4px; background: var(--line-2); transition: background .2s; }
.anketa-progress span.done { background: var(--green-600); }
.anketa-q { font-weight: 700; text-align: center; margin: 0 0 16px; color: var(--muted); font-size: .9rem; }
.anketa-options { display: flex; flex-direction: column; gap: 10px; }
.anketa-opt {
  border: 1.5px solid var(--line-2); background: #fff; border-radius: var(--radius-sm);
  padding: 13px; font-family: inherit; font-size: .98rem; font-weight: 600; color: var(--ink);
  cursor: pointer; transition: all .15s; text-align: center;
}
.anketa-opt:hover { border-color: var(--green-400); }
.anketa-opt.is-active { border-color: var(--green-600); background: var(--tint-100); }
.anketa-hint { font-size: .82rem; color: var(--muted); margin: 8px 0 16px; text-align: center; }
.anketa-promo {
  margin-top: 16px; background: var(--amber-bg); border: 1.5px solid var(--amber-bd);
  border-radius: var(--radius-sm); padding: 14px; font-size: .9rem; color: #8a6516; text-align: center;
}

/* ============ ВОРОНКА: путь концепция → проект ============ */
.pathway { background: var(--tint-50); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pathway-inner {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
  gap: 14px; padding: 22px 20px;
}
.pathway-node {
  display: inline-flex; align-items: center; gap: 9px; font-weight: 600; font-size: .95rem;
  background: #fff; border: 1px solid var(--line); border-radius: 100px;
  padding: 10px 18px; box-shadow: var(--shadow-xs);
}
.pathway-node.is-goal { background: var(--green-700); color: #fff; border-color: var(--green-700); }
.pathway-arrow { color: var(--green-500); font-weight: 800; font-size: 1.3rem; line-height: 1; }
.pathway-cta { flex: none; }

/* ============ АПСЕЛЛ ПОСЛЕ ГЕНЕРАЦИИ ============ */
.studio-upsell {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, var(--tint-100), #fff);
  display: flex; align-items: center; gap: 26px; padding: 24px;
  animation: upsellIn .35s ease;
}
@keyframes upsellIn { from { opacity: 0; transform: translateY(8px); } }
.upsell-copy { flex: 1; min-width: 0; }
.upsell-title { margin: 0 0 5px; font-weight: 800; font-size: 1.12rem; color: var(--green-800); }
.upsell-title span { color: var(--green-500); }
.upsell-sub { margin: 0 0 12px; color: #46584b; font-size: .95rem; }
.upsell-feats { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0; padding: 0; }
.upsell-feats li { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .9rem; }
.studio-upsell .btn { flex: none; box-shadow: 0 8px 20px rgba(30, 86, 49, .25); }

/* ============ STICKY-ПОЛОСА СКАЧИВАНИЯ ============ */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
  background: linear-gradient(180deg, var(--green-800), var(--green-900)); color: #eaf3ed;
  box-shadow: 0 -12px 32px rgba(0, 0, 0, .2);
  transform: translateY(115%); transition: transform .32s ease; will-change: transform;
}
.sticky-cta.is-visible { transform: translateY(0); }
.sticky-cta-inner { display: flex; align-items: center; gap: 16px; padding: 12px 20px; }
.sticky-cta-text { font-size: .95rem; }
.sticky-cta-text b { color: #fff; }
.sticky-cta-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.sticky-cta-close {
  background: rgba(255, 255, 255, .12); border: none; color: #cfe8d8;
  width: 32px; height: 32px; border-radius: 8px; cursor: pointer; font-size: .85rem; flex: none;
}
.sticky-cta-close:hover { background: rgba(255, 255, 255, .22); color: #fff; }

[hidden] { display: none !important; }

/* ============ Бургер-меню (шапка ≤1180px) ============ */
.nav-burger {
  display: none; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  width: 42px; height: 42px; flex: none;
  background: #fff; border: 1px solid var(--line); border-radius: 10px; cursor: pointer;
}
.nav-burger span {
  display: block; width: 18px; height: 2px; border-radius: 2px;
  background: var(--ink); transition: transform .2s ease, opacity .2s ease;
}
.site-header.nav-open .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-header.nav-open .nav-burger span:nth-child(2) { opacity: 0; }
.site-header.nav-open .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-cta { display: none; }

/* ============ АДАПТИВ ============ */
/* Меню при ≤1180px сворачивается в бургер (панель под шапкой) */
@media (max-width: 1180px) {
  .main-nav { display: none; }
  .nav-burger { display: flex; }
  .site-header.nav-open .main-nav {
    display: flex; flex-direction: column; gap: 0;
    position: absolute; top: 100%; left: 0; right: 0; margin: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lg); padding: 6px 20px 14px;
  }
  .site-header.nav-open .main-nav a {
    padding: 12px 4px; font-size: 1rem; border-bottom: 1px solid var(--tint-50);
  }
  .site-header.nav-open .main-nav a:last-child { border-bottom: 0; }
  /* CTA «Скачать программу» внутри панели (в шапке она скрыта на мобильных) */
  .site-header.nav-open .main-nav .nav-cta {
    display: inline-flex; justify-content: center; margin-top: 10px;
    border-bottom: 0; padding: 12px 18px; font-size: .95rem;
  }
}
@media (max-width: 980px) {
  .software-grid { grid-template-columns: 1fr; gap: 30px; }
  .modes-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .studio-body { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .hero { padding: 32px 0 0; }
  .hero-head h1 { font-size: clamp(1.6rem, 7vw, 2.1rem); }
  .hero-lead { font-size: 1.02rem; }
  .section { padding: 56px 0; }
  .studio-body { grid-template-columns: 1fr; padding: 16px; gap: 16px; }
  .studio-tabs { padding: 12px 12px 0; gap: 6px; }
  .studio-tab { flex: 1 1 0; min-width: 0; font-size: .76rem; padding: 11px 4px; gap: 4px; }
  .studio-tab span { font-size: .95rem; }
  .trust-bar { grid-template-columns: 1fr 1fr; gap: 24px 18px; }
  .trust-item:nth-child(3)::before { display: none; }
  .gallery-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .header-actions .btn-download { display: none; }
  .usage-pill .usage-dots { display: none; }
  .auth-btn.is-account .auth-mail { display: none; }

  .pathway-arrow { transform: rotate(90deg); }
  .pathway-node { font-size: .9rem; }
  .studio-upsell { flex-direction: column; align-items: stretch; text-align: center; padding: 20px; }
  .upsell-feats { justify-content: center; }
  .studio-upsell .btn { width: 100%; }
  .sticky-cta-text { display: none; }
  .sticky-cta-inner { justify-content: center; padding: 10px 14px; }
  .sticky-cta-actions { margin: 0; width: 100%; }
  .sticky-cta-actions .btn { flex: 1; }
}

/* ============ Кнопка «Наверх» (все страницы) ============ */
.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 60;
  width: 46px; height: 46px; border: none; border-radius: 50%;
  background: var(--green-700); color: #fff; font-size: 1.3rem; line-height: 1;
  cursor: pointer; box-shadow: 0 6px 18px rgba(30,86,49,.35);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .2s, transform .2s, visibility .2s;
}
.to-top:hover { background: var(--green-800, #163f24); }
.to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
@media (max-width: 680px) { .to-top { right: 14px; bottom: 14px; width: 42px; height: 42px; } }
