/**
 * 5 CSS-инфографик для контента глав (Phase 7+ контентный коммит).
 * Все компоненты — расширения существующих паттернов из chapter.css
 * (big-number, anatomy-diagram). Используют те же CSS-переменные роли.
 *
 * INFO-1: cycle-3blocks       — Цикл 3 блоков (упаковка → ведение → AI-боты)
 * INFO-2: funnel-steps        — Воронка передачи контакта (4 шага)
 * INFO-3: timeline-3m         — Календарь 3 месяцев работы
 * INFO-4: lead-cost-compare   — Сравнение стоимости лида (Директ vs карты)
 * INFO-5: factors-chain       — Четыре фактора попадания в топ
 *
 * HTML-блоки для копипаста — см. final_content_patch.md раздел «Пункт 5».
 *
 * Подключение в HTML:
 *   <link rel="stylesheet" href="/styles/infographics.css">
 *
 * Зависимости: design-system.css (CSS-переменные), Phosphor Duotone иконки.
 */

/* ============================================================
 * INFO-1: Цикл 3 блоков (упаковка → ведение → AI-боты)
 * ============================================================ */

.cycle-3blocks {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: stretch;
  gap: 8px;
  margin: 32px 0;
  padding: 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
}
.cycle-block {
  text-align: center;
  padding: 16px 12px;
  background: var(--neutral-100);
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
}
.cycle-block-icon {
  width: 40px; height: 40px;
  margin: 0 auto 10px;
  border-radius: 10px;
  background: var(--accent-soft);
  display: flex; align-items: center; justify-content: center;
}
.cycle-block-icon i { font-size: 20px; color: var(--accent-light); }
.cycle-block h4 {
  font-size: 14px; font-weight: 500;
  margin: 0 0 4px;
  color: var(--text-primary);
}
.cycle-block p {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 0; line-height: 1.4;
}
.cycle-arrow {
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
}
.cycle-arrow i { font-size: 18px; }
@media (max-width: 640px) {
  .cycle-3blocks {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .cycle-arrow { transform: rotate(90deg); }
}

/* ============================================================
 * INFO-2: Воронка передачи контакта
 * ============================================================ */

.funnel-steps {
  margin: 32px 0;
  padding: 24px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  display: flex; flex-direction: column; gap: 4px;
}
.funnel-step {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 14px; align-items: center;
  padding: 14px 16px;
  background: var(--neutral-100);
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  position: relative;
}
.funnel-step::after {
  content: ''; display: block;
  width: 1px; height: 16px;
  background: var(--border-strong);
  position: absolute;
  left: 31px; bottom: -10px;
  z-index: 1;
}
.funnel-step:last-child::after { display: none; }
.funnel-num {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-text);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px; font-weight: 500;
}
.funnel-content { flex: 1; min-width: 0; }
.funnel-title { font-size: 14px; font-weight: 500; color: var(--text-primary); margin-bottom: 2px; }
.funnel-desc { font-size: 12px; color: var(--text-secondary); }

/* ============================================================
 * INFO-3: Календарь 3 месяцев работы
 * ============================================================ */

.timeline-3m {
  margin: 32px 0;
  padding: 24px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
}
.timeline-row {
  display: grid;
  grid-template-columns: 130px 1fr 110px;
  gap: 14px; align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.timeline-row:last-child { border-bottom: none; }
.timeline-period {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.timeline-track {
  height: 6px;
  background: var(--neutral-100);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}
.timeline-fill {
  position: absolute; top: 0; height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  border-radius: 3px;
}
.timeline-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-light);
  text-align: right;
}
@media (max-width: 640px) {
  .timeline-row { grid-template-columns: 1fr; gap: 6px; }
}

/* ============================================================
 * INFO-4: Сравнение стоимости лида (Директ vs карты)
 * ============================================================ */

.lead-cost-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 32px 0;
}
.lead-cost-card {
  padding: 24px 20px;
  border-radius: 12px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.lead-cost-card[data-type="expensive"] {
  background: linear-gradient(135deg, var(--danger-soft), transparent);
  border: 1px solid rgba(239, 68, 68, 0.20);
}
[data-theme="light"] .lead-cost-card[data-type="expensive"] {
  border-color: rgba(220, 38, 38, 0.20);
}
.lead-cost-card[data-type="cheap"] {
  background: linear-gradient(135deg, var(--teal-soft), transparent);
  border: 1px solid rgba(94, 234, 212, 0.20);
}
[data-theme="light"] .lead-cost-card[data-type="cheap"] {
  border-color: rgba(13, 148, 136, 0.22);
}
.lead-cost-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-muted); font-weight: 500;
  font-family: var(--font-mono);
  margin-bottom: 12px;
}
.lead-cost-value {
  font-family: var(--font-mono);
  font-size: 32px; font-weight: 500;
  line-height: 1.1; letter-spacing: -0.02em;
  margin-bottom: 6px;
  white-space: nowrap;
}
.lead-cost-card[data-type="expensive"] .lead-cost-value { color: var(--danger-light); }
.lead-cost-card[data-type="cheap"]     .lead-cost-value { color: var(--teal-light); }
.lead-cost-source { font-size: 12px; color: var(--text-secondary); }
.lead-cost-summary {
  grid-column: 1 / -1;
  text-align: center;
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 500;
  padding-top: 4px;
}
@media (max-width: 480px) {
  .lead-cost-compare { grid-template-columns: 1fr; }
  .lead-cost-value { font-size: 26px; }
}

/* ============================================================
 * INFO-5: Четыре фактора попадания в топ
 * ============================================================ */

.factors-chain {
  margin: 32px 0;
  padding: 24px 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
}
.factors-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  align-items: stretch;
  gap: 6px;
}
.factor-card {
  padding: 14px 10px;
  text-align: center;
  background: var(--neutral-100);
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
}
.factor-num {
  display: inline-block;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-text);
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500;
  line-height: 22px;
  margin-bottom: 8px;
}
.factor-name { font-size: 13px; font-weight: 500; color: var(--text-primary); margin-bottom: 4px; }
.factor-role { font-size: 11px; color: var(--text-secondary); }
.factors-arrow { display: flex; align-items: center; justify-content: center; color: var(--text-muted); }
.factors-arrow i { font-size: 16px; }
.factors-note {
  margin-top: 14px;
  padding: 12px 14px;
  background: var(--accent-soft);
  border-radius: 6px;
  font-size: 12px;
  color: var(--text-primary);
  text-align: center;
}
@media (max-width: 640px) {
  .factors-row { grid-template-columns: 1fr; }
  .factors-arrow { transform: rotate(90deg); height: 20px; }
}
