/* ─── AiPepDen v3 — дополнительные стили (поверх inline CSS в index.html) ─── */

/* ─── MOBILE-FIRST АДАПТИВ ────────────────────────────────────────────── */

/* Базовые мобильные переопределения */
@media (max-width: 768px) {
  :root {
    --px: 20px;
  }

  /* Nav */
  .nav-links { display: none; }
  .nav-inner { padding: 0 20px; }

  /* Hero — колонка вместо сетки */
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .hero-photo {
    height: 60vw;
    max-height: 360px;
  }
  .hero-content {
    padding: 40px 20px 40px;
  }
  .hero-badge {
    bottom: 16px;
    right: 16px;
    padding: 12px 16px;
  }
  .hero-badge-value { font-size: 22px; }

  /* Live-stats */
  .live-agent-row {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 16px 20px;
  }
  .live-agent-metrics { justify-content: flex-start; }
  .live-total { flex-direction: column; gap: 12px; }
  .live-footer { flex-direction: column; gap: 16px; align-items: flex-start; }

  /* Pilot steps */
  .steps-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .steps-grid::before { display: none; }
  .step { padding: 0; }

  /* Founder */
  .founder-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .founder-photo-wrap { aspect-ratio: 4/3; }

  /* Team */
  .team-grid { grid-template-columns: 1fr; }

  /* Calculator */
  .calc-layout {
    grid-template-columns: 1fr;
  }
  .calc-agent-item {
    grid-template-columns: 20px 1fr;
    grid-template-rows: auto auto auto;
    gap: 10px;
  }
  .calc-tier-selector { grid-column: 1 / -1; }
  .calc-agent-price { grid-column: 1 / -1; text-align: left; }
  .calc-result { position: static; }

  /* Tech table */
  .tech-table-wrap { overflow-x: auto; }

  /* Cases grid */
  .cases-grid { grid-template-columns: 1fr 1fr; }

  /* Placeholders */
  .placeholder-inner { flex-direction: column; }
  .placeholder-block { max-width: 100%; }

  /* Final CTA */
  .final-cta { padding: 80px 0; }
  .final-cta-group { flex-direction: column; align-items: center; }

  /* Footer */
  .footer-inner { flex-direction: column; gap: 16px; }
}

@media (max-width: 480px) {
  .cases-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr; }
}

/* ─── AI ATTRIBUTIONS ──────────────────────────────────────────────────── */
.ai-attr {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 24px;
  padding: 12px 16px;
  border-left: 2px solid var(--accent);
  background: rgba(229,255,69,.04);
  border-radius: 0 6px 6px 0;
}
.ai-attr p {
  font-size: 12px;
  color: #4B5563;
  line-height: 1.5;
}
.ai-attr p strong { color: #9CA3AF; }

/* Mobile: скрыты по умолчанию, toggle */
@media (max-width: 768px) {
  .ai-attr--collapsed { overflow: hidden; }
  .ai-attr--collapsed p { display: none; }
  .ai-attr-toggle {
    background: transparent;
    border: 1px solid var(--border, #222228);
    border-radius: 100px;
    color: var(--text-muted, #4B5563);
    font-size: 11px;
    padding: 4px 10px;
    cursor: pointer;
    font-family: 'JetBrains Mono', monospace;
    white-space: nowrap;
  }
}

/* ─── ФОРМА ЗАЯВКИ ────────────────────────────────────────────────────── */
.lead-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary, #9CA3AF);
}

.form-input {
  background: var(--bg, #0A0A0C);
  border: 1px solid var(--border, #222228);
  border-radius: 10px;
  color: var(--text-primary, #fff);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  padding: 13px 16px;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
  width: 100%;
}
.form-input::placeholder { color: var(--text-muted, #4B5563); }
.form-input:focus {
  border-color: var(--accent, #E5FF45);
  box-shadow: 0 0 0 3px rgba(229,255,69,.1);
}

.form-input.field-error { border-color: #ef4444; }
.field-error-msg {
  font-size: 12px;
  color: #ef4444;
  font-family: 'JetBrains Mono', monospace;
}

/* Сообщения */
.form-message {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.5;
}
.form-message--error {
  background: rgba(239,68,68,.1);
  border: 1px solid rgba(239,68,68,.3);
  color: #fca5a5;
}
.form-message--success {
  background: rgba(229,255,69,.08);
  border: 1px solid rgba(229,255,69,.25);
  color: var(--accent, #E5FF45);
}

/* Успешная отправка */
.form-success {
  text-align: center;
  padding: 40px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.form-success-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(229,255,69,.15);
  border: 2px solid var(--accent, #E5FF45);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--accent, #E5FF45);
}
.form-success h3 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 24px;
  font-weight: 700;
}
.form-success p {
  color: var(--text-secondary, #9CA3AF);
  max-width: 340px;
  line-height: 1.6;
}

/* ─── LIVE STATS — дополнение ────────────────────────────────────────── */
.live-agent-row--last { border-bottom: none; }

/* ─── TECH TABLE ─────────────────────────────────────────────────────── */
.tech-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.tech-table th, .tech-table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border, #222228);
  text-align: left;
}
.tech-table thead th {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted, #4B5563);
  font-weight: 500;
}
.tech-table td:first-child { color: var(--text-secondary, #9CA3AF); }
.tech-table td.highlight { color: var(--accent, #E5FF45); font-weight: 600; }
.tech-table tr:last-child td { border-bottom: none; }

/* ─── CASES GRID ─────────────────────────────────────────────────────── */
.cases-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.case-card {
  background: var(--surface, #111115);
  border: 1px solid var(--border, #222228);
  border-radius: 20px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.case-tag {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--accent, #E5FF45);
  background: rgba(229,255,69,.1);
  border-radius: 100px;
  padding: 4px 10px;
}
.case-title { font-size: 16px; font-weight: 700; }
.case-row { display: flex; gap: 8px; font-size: 13px; color: var(--text-secondary, #9CA3AF); line-height: 1.5; }
.case-row b { color: var(--text-primary, #fff); flex-shrink: 0; }
.case-result {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border, #222228);
  font-size: 14px;
  color: var(--accent, #E5FF45);
  font-weight: 600;
}

/* ─── CONTROLS / ПРИНЦИПЫ ────────────────────────────────────────────── */
.principles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
@media (max-width: 768px) {
  .principles-grid { grid-template-columns: 1fr; }
}
.principle-card {
  background: var(--surface, #111115);
  border: 1px solid var(--border, #222228);
  border-radius: 16px;
  padding: 24px;
}
.principle-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 28px;
  font-weight: 700;
  color: var(--accent, #E5FF45);
  line-height: 1;
  margin-bottom: 12px;
}
.principle-title { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.principle-text { font-size: 14px; color: var(--text-secondary, #9CA3AF); line-height: 1.7; }

/* ─── FAQ ─────────────────────────────────────────────────────────────── */
.faq-list { display: flex; flex-direction: column; gap: 0; }
.faq-item {
  border-bottom: 1px solid var(--border, #222228);
}
.faq-question {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text-primary, #fff);
  text-align: left;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 600;
  padding: 20px 0;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq-question:hover { color: var(--accent, #E5FF45); }
.faq-icon {
  font-size: 20px;
  line-height: 1;
  color: var(--accent, #E5FF45);
  flex-shrink: 0;
  transition: transform .2s;
}
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-answer {
  font-size: 15px;
  color: var(--text-secondary, #9CA3AF);
  line-height: 1.7;
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease, padding .3s;
}
.faq-item.open .faq-answer { max-height: 600px; padding-bottom: 20px; }

/* ─── CONTROL BLOCKS (А если AI ошибётся) ────────────────────────────── */
.controls-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
@media (max-width: 768px) {
  .controls-grid { grid-template-columns: 1fr; }
}
.control-card {
  background: var(--surface, #111115);
  border: 1px solid var(--border, #222228);
  border-radius: 16px;
  padding: 24px;
}
.control-icon { font-size: 28px; margin-bottom: 12px; }
.control-title { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.control-text { font-size: 14px; color: var(--text-secondary, #9CA3AF); line-height: 1.65; }
