/* ============================================================
   Лендинги аудиторий — общие компоненты поверх style.css
   ============================================================ */

/* --- Eyebrow / заголовок секции --- */
.lk-eyebrow {
  display: inline-block;
  margin: 0 0 16px;
  padding: 6px 12px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand-teal-700);
  background: var(--brand-teal-50);
  border: 1px solid var(--brand-teal-100);
  border-radius: var(--radius-pill);
}
.lk-head { max-width: 62ch; margin-bottom: 36px; }
.lk-head h2 { margin-bottom: 12px; }
.lk-head p { margin: 0; color: var(--text-muted); font-size: 1.05rem; line-height: 1.55; }

/* --- Появление hero при загрузке --- */
@media (prefers-reduced-motion: no-preference) {
  .lk-landing .hero-copy { animation: lkFadeUp 0.6s var(--ease-ui) both; }
  .lk-landing .hero-visual { animation: lkFadeUp 0.6s var(--ease-ui) 0.12s both; }
}
@keyframes lkFadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* --- Редактор в hero: воспроизведение реального интерфейса (editor + preview) --- */
.hero-visual-body { cursor: default; align-items: stretch; background: #f8f8f8; }
.lk-editor {
  --ed-bg: #f8f8f8;
  --ed-surface: #ffffff;
  --ed-border: #e0e0e0;
  --ed-text: #222;
  --ed-muted: #666;
  --ed-accent: #0d9488;      /* акцент оболочки (кнопки) */
  --ed-accent-hover: #0f766e;
  --ed-highlight: #f5f5f5;
  --ed-navy: #1f3249;        /* акцент контента лонгрида */
  width: 100%;
  height: 560px;
  display: flex;
  flex-direction: column;
  background: var(--ed-bg);
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 12px;
  line-height: 1.4;
  color: var(--ed-text);
  text-align: left;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.lk-editor svg { display: block; }

/* --- Кнопки панелей редактора --- */
.lk-editor-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 9px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  color: var(--ed-text);
  background: var(--ed-surface);
  border: 1px solid var(--ed-border);
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}
.lk-editor-btn .lk-editor-ico { width: 12px; height: 12px; flex-shrink: 0; color: currentColor; }
.lk-editor-btn.is-active { background: var(--ed-accent); border-color: var(--ed-accent); color: #fff; }

/* --- Body: палитра / редактор / превью --- */
.lk-editor-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 128px minmax(0, 0.95fr) minmax(0, 1.05fr);
  grid-template-rows: minmax(0, 1fr);
  background: var(--ed-bg);
}

/* Палитра блоков */
.lk-editor-palette {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--ed-surface);
  border-right: 1px solid var(--ed-border);
}
.lk-editor-palette-head {
  height: 30px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ed-muted);
  border-bottom: 1px solid var(--ed-border);
  flex-shrink: 0;
}
.lk-editor-palette-list { padding: 8px; display: flex; flex-direction: column; gap: 5px; overflow: hidden; }
.lk-editor-palette-item {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 8px;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--ed-text);
  background: var(--ed-surface);
  border: 1px solid var(--ed-border);
  border-radius: 6px;
  white-space: nowrap;
  overflow: hidden;
}
.lk-editor-palette-item svg { width: 12px; height: 12px; color: var(--ed-muted); flex-shrink: 0; }

/* Центральная панель — markdown-редактор */
.lk-editor-center {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--ed-surface);
  border-right: 1px solid var(--ed-border);
}
.lk-editor-center-head {
  height: 30px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  border-bottom: 1px solid var(--ed-border);
  flex-shrink: 0;
}
.lk-editor-nav { color: var(--ed-muted); font-size: 15px; line-height: 1; flex-shrink: 0; }
.lk-editor-title {
  flex: 1;
  min-width: 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--ed-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lk-editor-center-body {
  flex: 1;
  min-height: 0;
  padding: 12px 14px;
  font-family: ui-monospace, "Cascadia Code", SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10.5px;
  line-height: 1.6;
  color: #333;
  overflow: hidden;
}
.lk-editor-center-body .md-syn { color: var(--ed-navy); font-weight: 600; }
.lk-editor-center-body .md-caret { color: var(--ed-accent); }

/* Панель превью */
.lk-editor-preview {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--ed-bg);
}
.lk-editor-preview-head {
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  padding: 0 8px;
  background: var(--ed-surface);
  border-bottom: 1px solid var(--ed-border);
  flex-shrink: 0;
}
.lk-editor-preview-body {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 14px 16px 18px;
  display: flex;
  justify-content: center;
}
.lk-editor-preview-scroll { width: 100%; max-width: 300px; }

/* --- Контент лонгрида (превью) --- */
.lk-lr {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--ed-text);
}
.lk-editor .lk-lr h2 { margin: 0 0 8px; font-size: 15px; font-weight: 600; line-height: 1.25; color: var(--ed-navy); }
.lk-lr p { margin: 0 0 8px; color: var(--ed-text); }
.lk-lr p:last-child { margin-bottom: 0; }
.lk-lr .lk-lr-num { font-size: 10px; color: #bbb; display: block; margin-bottom: 2px; }

/* Аккордеон */
.lk-lr-acc { border: 1px solid var(--ed-border); border-radius: 4px; overflow: hidden; background: var(--ed-surface); margin: 0 0 8px; }
.lk-lr-acc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 9px;
  font-weight: 500;
  color: var(--ed-text);
  cursor: pointer;
}
.lk-lr-acc-head .lk-lr-acc-plus { color: #bbb; font-size: 13px; line-height: 1; }
.lk-lr-acc-plus::before { content: "+"; }
.lk-lr-acc-item.is-open .lk-lr-acc-plus::before { content: "−"; }
.lk-lr-acc-body { display: none; padding: 0 9px 8px; color: #555; }
.lk-lr-acc-item.is-open .lk-lr-acc-body { display: block; }
.lk-lr-acc-item { border-bottom: 1px solid var(--ed-border); }
.lk-lr-acc-item:last-child { border-bottom: none; }

/* Вкладки */
.lk-lr-tabs { border: 1px solid var(--ed-border); border-radius: 4px; overflow: hidden; background: var(--ed-surface); margin: 0 0 8px; }
.lk-lr-tabs-head { display: flex; background: var(--ed-highlight); border-bottom: 1px solid var(--ed-border); }
.lk-lr-tab { flex: 1; text-align: center; padding: 6px 4px; font-size: 10.5px; font-weight: 500; color: #666; border-bottom: 2px solid transparent; cursor: pointer; }
.lk-lr-tab.is-active { color: var(--ed-text); border-bottom-color: var(--ed-navy); background: var(--ed-surface); }
.lk-lr-tabs-body { display: none; padding: 8px 9px; }
.lk-lr-tabs-body.is-active { display: block; }

/* Вопрос */
.lk-lr-test { border: 1px solid var(--ed-border); border-radius: 4px; padding: 8px 9px; background: var(--ed-surface); margin: 0 0 8px; }
.lk-lr-test h4 { margin: 0 0 6px; font-size: 11.5px; font-weight: 600; color: var(--ed-navy); }
.lk-lr-opt { display: flex; align-items: flex-start; gap: 6px; margin: 3px 0; font-size: 11px; color: var(--ed-text); }
.lk-lr-radio {
  width: 12px;
  height: 12px;
  margin-top: 2px;
  border-radius: 50%;
  border: 1.5px solid #bbb;
  background: #fff;
  flex-shrink: 0;
}
.lk-lr-opt.is-correct .lk-lr-radio { border-color: var(--ed-navy); background: var(--ed-navy); box-shadow: inset 0 0 0 2px #fff; }

/* Блок «Важно» */
.lk-lr-important {
  position: relative;
  margin: 0 0 8px;
  padding: 7px 9px 7px 26px;
  background: var(--ed-highlight);
  border: 1px solid var(--ed-border);
  border-radius: 4px;
  color: var(--ed-text);
}
.lk-lr-important::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  background: var(--ed-navy);
  -webkit-mask: var(--lr-important-icon) center / contain no-repeat;
  mask: var(--lr-important-icon) center / contain no-repeat;
  --lr-important-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2a10 10 0 100 20 10 10 0 000-20zm0 4.25a1.4 1.4 0 110 2.8 1.4 1.4 0 010-2.8zM11 10.5h2V18h-2v-7.5z'/%3E%3C/svg%3E");
}

/* Комментарий (как .comments-block в продукте) */
.lk-lr-comments {
  margin: 0 0 8px;
  border: 1px solid var(--ed-border);
  border-left: 3px solid var(--ed-navy);
  border-radius: 4px;
  background: var(--ed-highlight);
  overflow: hidden;
}
.lk-lr-comments-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 9px;
  font-size: 10.5px;
  font-style: italic;
  color: var(--ed-text);
}
.lk-lr-comments-head::after { content: "−"; font-style: normal; color: #bbb; }
.lk-lr-comments-body { padding: 6px 9px; border-top: 1px solid var(--ed-border); }
.lk-lr-comment { font-size: 10.5px; color: #444; margin-bottom: 4px; }
.lk-lr-comment:last-child { margin-bottom: 0; }
.lk-lr-comment .lk-lr-comment-meta { font-size: 9.5px; color: var(--ed-navy); display: block; }

/* Шаги */
.lk-lr-steps { display: flex; flex-direction: column; }
.lk-lr-step { display: flex; align-items: flex-start; gap: 7px; margin-bottom: 6px; }
.lk-lr-step-num {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--ed-navy);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lk-lr-step-text { min-width: 0; }
.lk-lr-step-title { font-weight: 600; color: var(--ed-navy); }
.lk-lr-step-desc { color: #555; font-size: 10.5px; }

/* --- Боль --- */
.lk-pain { background: var(--stone-50); }
.lk-pain-card {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(0, 1.15fr);
  gap: 48px;
  align-items: start;
}
.lk-pain-quote {
  margin: 0;
  font-size: clamp(1.45rem, 2.8vw, 2rem);
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -0.02em;
  color: var(--text);
}
.lk-pain-quote .lk-accent { color: var(--accent); }
.lk-pain-body p { margin: 0 0 14px; color: var(--text-muted); font-size: 1.05rem; line-height: 1.6; }
.lk-pain-body p:last-child { margin-bottom: 0; }
.lk-pain-body strong { color: var(--text); font-weight: 700; }
.lk-pain-list { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.lk-pain-list li {
  position: relative;
  padding-left: 28px;
  font-size: 0.98rem;
  line-height: 1.5;
  color: var(--text);
}
.lk-pain-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.4;
}

/* --- Решение --- */
.lk-solution { background: var(--bg); }
.lk-solution-card {
  max-width: 760px;
  padding: 32px 36px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}
.lk-solution-card p { margin: 0 0 14px; font-size: 1.05rem; line-height: 1.6; color: var(--text-muted); }
.lk-solution-card p:last-child { margin-bottom: 0; }
.lk-solution-card strong { color: var(--text); font-weight: 700; }

/* --- Возможности (feature grid) --- */
.lk-features .feature-item {
  transition: transform 0.15s var(--ease-ui), box-shadow 0.15s var(--ease-ui), border-color 0.15s var(--ease-ui);
}
@media (hover: hover) and (pointer: fine) {
  .lk-features .feature-item:hover {
    transform: translateY(-3px);
    border-color: var(--brand-teal-100);
    box-shadow: 0 16px 32px -22px rgba(28, 25, 23, 0.28);
  }
}
.lk-features .feature-icon svg { width: 24px; height: 24px; display: block; }

/* --- Шаги («Как работает») --- */
.lk-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 36px;
}
.lk-step {
  position: relative;
  padding: 24px;
  background: #fff;
  border: 1px solid #eceae8;
  border-radius: 16px;
}
.lk-step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: var(--brand-teal-50);
  color: var(--brand-teal-700);
  font-size: 0.9rem;
  font-weight: 800;
}
.lk-step h3 { margin: 0 0 6px; font-size: 1rem; font-weight: 700; }
.lk-step p { margin: 0; font-size: 0.9rem; color: var(--text-muted); line-height: 1.5; }

/* --- CTA-кнопки hero --- */
.lk-landing .hero-cta { align-items: center; }

/* --- Инлайн-код (MCP-эндпоинт и т.п.) --- */
.lk-code {
  display: inline-block;
  max-width: 100%;
  padding: 4px 9px;
  border-radius: 8px;
  background: var(--stone-100);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--stone-600);
  overflow-wrap: anywhere;
}

/* --- Адаптив --- */
@media (max-width: 900px) {
  .lk-pain-card { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 768px) {
  .lk-solution-card { padding: 24px; }
  .lk-editor { height: auto; min-height: 0; }
}

/* --- Сужение hero-визуала: 2 колонки, контент сжимается --- */
.hero-visual { container-type: inline-size; }
@container (max-width: 480px) {
  .lk-editor-body { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .lk-editor-palette { display: none; }
  .lk-editor-btn { padding: 0 7px; font-size: 10px; gap: 3px; }
  .lk-editor-btn .lk-editor-ico { width: 11px; height: 11px; }
  .lk-editor-center-body { padding: 10px 11px; font-size: 9.5px; }
  .lk-editor-preview-body { padding: 12px 12px 14px; }
  .lk-lr { font-size: 10.5px; }
  .lk-editor .lk-lr h2 { font-size: 13px; }
}
