/* ============================================================
   OmniSync — секции: проблема/решение, возможности, шаги,
   нейроредактор, тарифы, FAQ, форма, футер, CMS, адаптив
   ============================================================ */

/* ============ Проблема и решение ============ */
.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.compare-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 34px;
  background: var(--surface);
}
.compare-card.bad-side { border-color: color-mix(in oklab, var(--bad) 30%, transparent); }
.compare-card.good-side {
  border-color: color-mix(in oklab, var(--ok) 30%, transparent);
  background: linear-gradient(160deg, color-mix(in oklab, var(--ok) 6%, transparent), var(--surface));
}
.compare-card h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 21px;
  font-weight: 800;
  margin-bottom: 22px;
}
.compare-badge {
  width: 30px; height: 30px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
  flex-shrink: 0;
}
.bad-side .compare-badge { background: color-mix(in oklab, var(--bad) 16%, transparent); color: var(--bad); }
.good-side .compare-badge { background: color-mix(in oklab, var(--ok) 16%, transparent); color: var(--ok); }
.compare-card ul { list-style: none; display: grid; gap: 14px; }
.compare-card li {
  display: flex;
  gap: 12px;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.5;
}
.compare-card li::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  margin-top: 8px;
  flex-shrink: 0;
}
.bad-side li::before { background: var(--bad); }
.good-side li::before { background: var(--ok); }

.impact-strip {
  margin-top: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-solid);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.impact-cell {
  padding: 34px 24px;
  text-align: center;
}
.impact-cell + .impact-cell { border-left: 1px solid var(--border); }
.impact-num {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 600;
}
.impact-cell:nth-child(1) .impact-num { color: var(--bad); }
.impact-cell:nth-child(2) .impact-num,
.impact-cell:nth-child(3) .impact-num {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.impact-label { color: var(--faint); font-size: 14px; margin-top: 6px; }

/* ============ Возможности ============ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 30px 28px;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  background: var(--surface-solid);
}
.feature-icon {
  width: 46px; height: 46px;
  border-radius: 13px;
  background: var(--accent-soft);
  border: 1px solid color-mix(in oklab, var(--accent) 35%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--accent);
}
.feature-card h3 { font-size: 20px; font-weight: 800; margin-bottom: 10px; }
.feature-card p { color: var(--muted); font-size: 15.5px; line-height: 1.55; }

/* ============ Как это работает ============ */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  counter-reset: step;
}
.step-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 28px 24px;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.step-card:hover { border-color: var(--border-strong); background: var(--surface-solid); }
.step-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 18px;
}
.step-num {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--faint);
  padding-top: 4px;
}
.step-icon {
  width: 52px; height: 52px;
  border-radius: 15px;
  background: var(--accent-soft);
  border: 1px solid color-mix(in oklab, var(--accent) 30%, transparent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}
/* разные акценты плиток — как в «Почему выбирают нас» */
.step-card:nth-child(3n+2) .step-icon {
  background: var(--accent-2-soft);
  border-color: color-mix(in oklab, var(--accent-2) 30%, transparent);
  color: var(--accent-2);
}
.step-card:nth-child(3n) .step-icon {
  background: color-mix(in oklab, var(--ok) 11%, transparent);
  border-color: color-mix(in oklab, var(--ok) 30%, transparent);
  color: var(--ok);
}
.step-card h3 { font-size: 19px; font-weight: 800; margin-bottom: 9px; }
.step-card p { color: var(--muted); font-size: 15px; line-height: 1.55; }

/* ============ Нейроредактор (демо) ============ */
.ai-demo {
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 6px);
  background: var(--surface-solid);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.ai-pane { padding: 34px; display: flex; flex-direction: column; gap: 18px; }
.ai-pane.out { border-left: 1px solid var(--border); background: var(--surface); }
.ai-pane-label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--faint);
}
.ai-input {
  width: 100%;
  min-height: 170px;
  resize: vertical;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 15.5px;
  line-height: 1.55;
  padding: 16px 18px;
  transition: border-color 0.2s ease;
}
.ai-input:focus { outline: none; border-color: var(--accent); }
.ai-styles { display: flex; flex-wrap: wrap; gap: 10px; }
.ai-styles-center { justify-content: center; margin-bottom: 26px; }
.ai-chip {
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 9px 20px;
  font-size: 14.5px;
  font-weight: 700;
  transition: all 0.2s ease;
}
.ai-chip:hover { border-color: var(--accent); color: var(--text); }
.ai-chip.active {
  background: var(--grad);
  color: var(--accent-ink);
  border-color: transparent;
}
.ai-run { align-self: flex-start; }
.ai-output {
  flex: 1;
  min-height: 170px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--text);
  white-space: pre-wrap;
  overflow-wrap: break-word;
}
.ai-output.placeholder { color: var(--faint); }
.ai-output.loading { color: var(--muted); }
.ai-output.loading::after {
  content: "▍";
  color: var(--accent);
  animation: blink 0.9s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.ai-actions { display: flex; align-items: center; gap: 14px; }
.ai-copy {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
  padding: 6px 0;
  display: none;
}
.ai-copy.visible { display: inline; }
.ai-note { font-size: 13px; color: var(--faint); }

/* ============ Тарифы ============ */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 24px;
  align-items: stretch;
  max-width: 880px;
  margin: 0 auto;
}
.price-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 38px 34px;
  display: flex;
  flex-direction: column;
}
.price-card.featured {
  border: 1px solid color-mix(in oklab, var(--accent) 50%, transparent);
  background:
    linear-gradient(var(--surface-solid), var(--surface-solid)) padding-box,
    var(--grad) border-box;
  border: 1.5px solid transparent;
  box-shadow: var(--glow);
}
.price-plan {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
.price-num {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 600;
  line-height: 1.1;
}
.price-num small { font-size: 17px; font-weight: 400; color: var(--muted); font-family: var(--font-body); }
.price-desc { color: var(--muted); font-size: 15.5px; margin: 14px 0 24px; }
.price-list { list-style: none; display: grid; gap: 12px; margin-bottom: 30px; }
.price-list li {
  display: flex;
  gap: 11px;
  font-size: 15px;
  color: var(--muted);
}
.price-list li::before {
  content: "✓";
  color: var(--ok);
  font-weight: 800;
  flex-shrink: 0;
}
.price-card .btn { margin-top: auto; }

/* Калькулятор каналов */
.price-calc {
  margin-top: 26px;
  padding-top: 24px;
  border-top: 1px dashed var(--border);
}
.price-calc-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 14px;
}
.price-calc-total {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  color: var(--text);
}
input[type="range"].calc-range {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  height: 5px;
  border-radius: 999px;
  background: var(--border-strong);
  outline: none;
}
input[type="range"].calc-range::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--grad);
  border: 3px solid var(--bg);
  box-shadow: 0 2px 10px -2px var(--accent);
  cursor: grab;
}
input[type="range"].calc-range::-moz-range-thumb {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg);
  cursor: grab;
}

/* ============ Почему мы ============ */
.why-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.why-item {
  display: flex;
  gap: 22px;
  align-items: flex-start;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  background: var(--surface);
  transition: border-color 0.25s ease, background 0.25s ease;
}
.why-item:hover { border-color: var(--border-strong); background: var(--surface-solid); }
.why-icon {
  width: 56px; height: 56px;
  border-radius: 16px;
  background: var(--accent-soft);
  border: 1px solid color-mix(in oklab, var(--accent) 30%, transparent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}
/* разные акценты плиток */
.why-item:nth-child(3n+2) .why-icon {
  background: var(--accent-2-soft);
  border-color: color-mix(in oklab, var(--accent-2) 30%, transparent);
  color: var(--accent-2);
}
.why-item:nth-child(3n) .why-icon {
  background: color-mix(in oklab, var(--ok) 11%, transparent);
  border-color: color-mix(in oklab, var(--ok) 30%, transparent);
  color: var(--ok);
}
.why-item h3 { font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.why-item p { font-size: 15.5px; color: var(--muted); line-height: 1.55; }

/* ============ FAQ ============ */
.faq-list { max-width: 760px; margin: 0 auto; display: grid; gap: 12px; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  overflow: hidden;
  transition: border-color 0.25s ease;
}
.faq-item.open { border-color: var(--border-strong); background: var(--surface-solid); }
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: none;
  border: none;
  color: var(--text);
  text-align: left;
  font-size: 17.5px;
  font-weight: 700;
  padding: 21px 24px;
}
.faq-q .faq-icon {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 15px;
  flex-shrink: 0;
  transition: transform 0.3s ease, background 0.3s ease;
}
.faq-item.open .faq-icon { transform: rotate(45deg); background: var(--accent-soft); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.faq-a > div {
  padding: 0 24px 22px;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.6;
}

/* ============ Форма заявки ============ */
.lead-wrap {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
  align-items: start;
}
.lead-info h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 600;
  line-height: 1.18;
  margin-bottom: 18px;
}
.lead-info p { color: var(--muted); font-size: 17px; margin-bottom: 30px; }
.lead-contacts { display: grid; gap: 12px; }
.lead-contact {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 15px 18px;
  background: var(--surface);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.lead-contact:hover { border-color: var(--accent); transform: translateX(4px); }
.lead-contact .lc-badge {
  width: 38px; height: 38px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  font-size: 12px;
  flex-shrink: 0;
}
.lead-contact .lc-name { font-weight: 700; font-size: 15px; }
.lead-contact .lc-desc { font-size: 13px; color: var(--faint); }

.lead-form {
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  background: var(--surface-solid);
  padding: 38px;
  display: grid;
  gap: 18px;
}
.field { display: grid; gap: 8px; }
.field label { font-size: 14px; font-weight: 700; color: var(--muted); }
.field input, .field textarea {
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 15.5px;
  padding: 14px 16px;
  transition: border-color 0.2s ease;
  width: 100%;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.field input.invalid, .field textarea.invalid { border-color: var(--bad); }
.field .field-err { font-size: 13px; color: var(--bad); display: none; }
.field.has-err .field-err { display: block; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.lead-form textarea { min-height: 96px; resize: vertical; }
.lead-form .form-note { font-size: 13px; color: var(--faint); text-align: center; margin-top: 18px; }
.lead-success {
  display: none;
  text-align: center;
  padding: 40px 20px;
}
.lead-form.sent form { display: none; }
.lead-form.sent .lead-success { display: block; }
.lead-success .ls-mark {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--ok);
  font-size: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.lead-success h3 { font-size: 22px; font-weight: 800; margin-bottom: 10px; }
.lead-success p { color: var(--muted); }

/* ============ Футер ============ */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 56px 0 40px;
  background: var(--bg-2);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 44px;
}
.footer-about p { color: var(--faint); font-size: 14.5px; max-width: 30em; margin-top: 16px; }
.footer-col h3 {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 16px;
  font-weight: 500;
}
.footer-col ul { list-style: none; display: grid; gap: 10px; }
.footer-col a {
  text-decoration: none;
  color: var(--muted);
  font-size: 15px;
  transition: color 0.2s ease;
}
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13.5px;
  color: var(--faint);
}

/* ============ CMS-режим (редактор контента) ============ */
html[data-cms="on"] [data-cms] {
  outline: 1.5px dashed color-mix(in oklab, var(--accent) 55%, transparent);
  outline-offset: 3px;
  border-radius: 4px;
  cursor: text;
  transition: outline-color 0.2s ease;
}
html[data-cms="on"] [data-cms]:hover { outline-color: var(--accent); }
html[data-cms="on"] [data-cms]:focus {
  outline: 2px solid var(--accent);
  background: var(--accent-soft);
}
.cms-banner {
  display: none;
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  background: var(--surface-solid);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 10px 12px 10px 22px;
  font-size: 14px;
  font-weight: 600;
  align-items: center;
  gap: 14px;
  box-shadow: 0 12px 40px -10px rgb(0 0 0 / 0.6);
}
html[data-cms="on"] .cms-banner { display: flex; }
.cms-banner .cms-count { color: var(--accent); font-family: var(--font-mono); font-size: 12.5px; }

/* ============ Адаптив ============ */
@media (max-width: 1020px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-grid { grid-template-columns: repeat(2, 1fr); }
  .ai-demo { grid-template-columns: 1fr; }
  .ai-pane.out { border-left: none; border-top: 1px solid var(--border); }
  .lead-wrap { grid-template-columns: 1fr; gap: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .main-nav { display: none; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .container { padding: 0 20px; }
  .section { padding: 72px 0; }
  .compare-grid, .features-grid, .why-grid, .steps-grid, .pricing-grid { grid-template-columns: 1fr; }
  .impact-strip { grid-template-columns: 1fr; }
  .impact-cell + .impact-cell { border-left: none; border-top: 1px solid var(--border); }
  .hero { padding-top: calc(var(--header-h) + 48px); padding-bottom: 64px; }
  .hero-stats { gap: 24px; flex-wrap: wrap; }
  .hero-cta { gap: 10px; }
  .hero-cta .btn { flex: 1 1 auto; }
  .btn { padding: 14px 22px; font-size: 15px; }
  .relay { padding: 22px 18px 18px; }
  .relay-node { padding: 13px 15px; gap: 12px; }
  .relay-node .node-badge { width: 40px; height: 40px; }
  .relay-wire { height: 44px; }
  .relay-core { width: 54px; height: 54px; }
  .sync-card { width: 106px; }
  .relay-tags2 { flex-direction: column; align-items: flex-start; gap: 8px; }
  .why-grid { grid-template-columns: 1fr; }
  .why-item { padding: 22px; gap: 16px; }
  .why-icon { width: 48px; height: 48px; }
  .field-row { grid-template-columns: 1fr; }
  .lead-form { padding: 26px 20px; }
  .ai-pane { padding: 24px 20px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .compare-card { padding: 26px 22px; }
  .price-card { padding: 30px 24px; }
  .section-head { margin-bottom: 40px; }
}
