/* ============================================================================
   Политика на диване — страница «Бот аналитики» (/pndbot/)
   ============================================================================
   Структура:
   1. Дизайн-токены
   2. Reset + базовая типографика
   3. Размещение контента в .page-grid
   4. Секции-«листы» и типографика
   5. Кнопки
   6. Блоки: проблема, функции, примеры отчётов, устройство, доступ, цена, FAQ

   Сетка .page-grid, шапка .site-header, логотип и подвал — общие, из
   /elements/layout.css и /elements/elements.css. Здесь их правил нет.

   Палитра — с главной (public/landing/styles.css): янтарный акцент на
   иконках и действиях, синий на границах наведения и фокусе. Раскладка
   секций и карточек повторяет страницу обучения insider.pm/edu.
   ============================================================================ */

/* ============================================================================
   1. ДИЗАЙН-ТОКЕНЫ
   ============================================================================ */
:root {
  --primary: #2563eb;
  --primary-border: #bfdbfe;

  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-600: #d97706;
  --amber-700: #b45309;

  --slate-900: #0f172a;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;

  --red-50: #fef2f2;
  --red-500: #ef4444;
  --yellow-50: #fefce8;
  --yellow-600: #ca8a04;
  --green-100: #dcfce7;
  --green-500: #22c55e;
  --green-600: #16a34a;
  --green-700: #15803d;
  --purple-100: #f3e8ff;
  --purple-600: #9333ea;
  --cyan-600: #0891b2;

  --radius: 12px;
  --font-main: 'Inter', sans-serif;
}

/* ============================================================================
   2. RESET + БАЗОВАЯ ТИПОГРАФИКА
   ============================================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background: #f5f0e6;
  color: var(--slate-600);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  color: var(--slate-900);
  line-height: 1.2;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

strong,
b {
  font-weight: 700;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Плавная прокрутка по якорям — только тем, кто не просил её отключить. */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* ============================================================================
   3. РАЗМЕЩЕНИЕ КОНТЕНТА В СЕТКЕ
   ============================================================================ */
.page-grid > .pnd-content {
  grid-column: 1 / -1;
}

@media (min-width: 1024px) {
  .page-grid > .pnd-content {
    grid-column: span 12;
  }
}

.pnd-content {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* ============================================================================
   4. СЕКЦИИ И ТИПОГРАФИКА
   ============================================================================ */
.pnd-section {
  background: #ffffff;
  border: 1px solid #dde1e8;
  border-radius: 10px;
  padding: 2rem 1.5rem;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.08),
    0 1px 2px rgba(0, 0, 0, 0.04);
  /* Якорные переходы не должны прятать заголовок под край окна. */
  scroll-margin-block-start: 1rem;
}

.pnd-section--muted {
  background: var(--slate-50);
}

.pnd-section--hero {
  text-align: center;
  background:
    radial-gradient(70% 50% at 50% 40%, rgba(217, 119, 6, 0.08) 0%, rgba(255, 255, 255, 0) 100%),
    #ffffff;
}

@media (max-width: 380px) {
  .pnd-section {
    padding: 1.5rem 1.125rem;
  }
}

@media (min-width: 768px) {
  .pnd-section {
    padding: 3rem 2.5rem;
  }
}

.pnd-section__head {
  text-align: center;
  margin-bottom: 2.5rem;
}

.pnd-h1 {
  /* Нижняя граница clamp — под самое длинное слово заголовка: на 320–380px
     оно иначе не влезает в секцию и уводит страницу в горизонтальную
     прокрутку. С 768px размер задаётся медиазапросом ниже. */
  font-size: clamp(1.75rem, 8vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin-bottom: 1.25rem;
}

.pnd-h2 {
  font-size: 1.625rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.25;
}

.pnd-h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.pnd-lead {
  font-size: 1.0625rem;
  color: var(--slate-600);
  max-width: 50rem;
  margin: 0 auto;
  line-height: 1.6;
}

.pnd-lead--hero {
  font-size: 1.125rem;
  margin-bottom: 2rem;
}

/* Лид внутри двухколоночного блока: прижат влево, с отбивкой до списка. */
.pnd-lead--left {
  margin-inline: 0;
  margin-bottom: 1.5rem;
}

.pnd-note {
  margin: 2.5rem auto 0;
  max-width: 50rem;
  text-align: center;
  color: var(--slate-500);
  font-size: 0.9375rem;
}

.pnd-note a {
  color: var(--amber-600);
  font-weight: 500;
}

.pnd-note a:hover {
  color: var(--amber-700);
}

@media (min-width: 768px) {
  .pnd-h1 {
    font-size: 3.25rem;
  }

  .pnd-h2 {
    font-size: 2rem;
  }

  .pnd-lead--hero {
    font-size: 1.25rem;
  }
}

/* ============================================================================
   5. КНОПКИ
   ============================================================================ */
.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  font-size: 0.9375rem;
  /* Без nowrap: длинная подпись на узком экране должна переноситься, а не
     распирать секцию — грид-элемент растягивается по min-content ребёнка и
     утаскивает за собой всю страницу в горизонтальную прокрутку. */
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn svg {
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
}

.btn--primary {
  background-color: var(--amber-600);
  color: #ffffff;
}

.btn--primary:hover {
  background-color: var(--amber-700);
  color: #ffffff;
  transform: translateY(-1px);
}

.btn--ghost {
  background-color: #ffffff;
  border-color: var(--slate-200);
  color: var(--slate-700);
}

.btn--ghost:hover {
  border-color: var(--primary-border);
  color: var(--slate-900);
  transform: translateY(-1px);
}

/* Кнопка скачивания PDF. Зелёный — из галочек в этом же разделе; контур,
   а не заливка: три таких кнопки подряд перебивали бы янтарный призыв
   «Написать @artem_ins», единственное главное действие страницы.
   Оттенки взяты по контрасту к белому: рамка --green-600 (3.3:1, хватает
   для нетекстового элемента), подпись --green-700 (4.6:1, AA для текста). */
.btn--download {
  background-color: #ffffff;
  border-color: var(--green-600);
  color: var(--green-700);
}

.btn--download:hover {
  background-color: var(--green-700);
  border-color: var(--green-700);
  color: #ffffff;
  transform: translateY(-1px);
}

.btn--large {
  font-size: 1.0625rem;
  padding: 0.875rem 2rem;
}

.btn--block {
  width: 100%;
}

/* Ряд кнопок героя и финального призыва: на телефоне — колонка. */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  gap: 0.75rem;
}

@media (min-width: 480px) {
  .cta-row {
    flex-direction: row;
    align-items: center;
  }
}

/* ============================================================================
   6.1 ПРОБЛЕМА
   ============================================================================ */
/* Колонки заданы брейкпоинтами, а не auto-fit: у трека auto-fit нижняя
   граница не сжимается под узкий экран и уводит страницу в горизонтальную
   прокрутку. Ступени одинаковы у всех трёх сеток карточек: 1 → 2 → 3. */
.problem-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  max-width: 64rem;
  margin: 0 auto;
}

@media (min-width: 600px) {
  .problem-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .problem-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.problem-card {
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: border-color 0.3s;
}

.problem-card:hover {
  border-color: var(--primary-border);
}

.problem-card .icon-box {
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  background: var(--red-50);
  color: var(--red-500);
}

.problem-card .icon-box svg {
  width: 1.5rem;
  height: 1.5rem;
}

.problem-card p {
  color: var(--slate-600);
  line-height: 1.65;
}

/* ============================================================================
   6.2 ФУНКЦИИ БОТА
   ============================================================================ */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 700px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Три ряда: иконка+текст, растяжка, строка «вход → выход». Так подписи
   выравниваются по нижнему краю независимо от длины описания. */
.feature-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  padding: 2rem;
  transition: all 0.3s ease;
}

.feature-card:hover {
  border-color: var(--primary-border);
  transform: translateY(-5px);
  box-shadow:
    0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.feature-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  margin-bottom: 1.5rem;
  transition: transform 0.3s ease;
}

.feature-icon svg {
  width: 1.75rem;
  height: 1.75rem;
}

.feature-card:hover .feature-icon {
  transform: scale(1.1) rotate(3deg);
}

.feature-icon--amber {
  background: var(--amber-600);
  box-shadow: 0 10px 25px -5px rgba(217, 119, 6, 0.4);
}

.feature-icon--purple {
  background: var(--purple-600);
  box-shadow: 0 10px 25px -5px rgba(147, 51, 234, 0.4);
}

.feature-icon--cyan {
  background: var(--cyan-600);
  box-shadow: 0 10px 25px -5px rgba(8, 145, 178, 0.4);
}

.feature-card p {
  color: var(--slate-600);
  line-height: 1.65;
}

/* Строка характеристик под описанием функции. */
.feature-meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--slate-100);
  font-size: 0.875rem;
}

.feature-meta div {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 0.5rem;
}

.feature-meta dt {
  color: var(--slate-500);
  font-weight: 500;
}

.feature-meta dd {
  color: var(--slate-700);
  margin: 0;
}

/* ============================================================================
   6.3 ПРИМЕРЫ ОТЧЁТОВ
   ============================================================================ */
.sample-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 600px) {
  .sample-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .sample-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.sample-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: all 0.3s ease;
}

.sample-card:hover {
  border-color: var(--primary-border);
  box-shadow:
    0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.sample-card__file {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  color: var(--red-500);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sample-card__file svg {
  width: 1.5rem;
  height: 1.5rem;
}

.sample-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  font-size: 0.9375rem;
}

.sample-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  margin-bottom: 0.625rem;
  color: var(--slate-600);
}

.sample-list svg {
  width: 1.125rem;
  height: 1.125rem;
  color: var(--green-500);
  flex-shrink: 0;
  margin-top: 0.25rem;
}

/* ============================================================================
   6.4 КАК УСТРОЕНО
   ============================================================================ */
.how-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 900px) {
  .how-grid {
    grid-template-columns: 1fr 1fr;
    gap: 3.5rem;
  }
}

.how-list {
  list-style: none;
  padding: 0;
}

.how-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1.125rem;
  color: var(--slate-700);
}

.how-list li:last-child {
  margin-bottom: 0;
}

.how-list svg {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--green-500);
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.how-panel {
  position: relative;
}

/* Свечение за панелью. Смещаем его только по вертикали и в пределах
   отбивки секции: сдвиг вправо расширял бы область прокрутки страницы —
   абсолютный блок отдаёт переполнение вверх до вьюпорта. */
.how-panel .glow {
  position: absolute;
  inset: 2rem 0 -2rem;
  background: var(--amber-600);
  filter: blur(64px);
  opacity: 0.14;
  border-radius: 9999px;
  z-index: 0;
}

.how-panel .panel {
  position: relative;
  z-index: 1;
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow:
    0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.how-panel .panel-icon {
  width: 3.5rem;
  height: 3.5rem;
  color: var(--amber-600);
  margin-bottom: 1.25rem;
}

.how-panel .panel h3 {
  font-size: 1.375rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.how-panel .panel p {
  color: var(--slate-600);
  margin-bottom: 0.5rem;
}

.how-panel .panel p:last-child {
  margin-bottom: 0;
}

/* ============================================================================
   6.5 ДОСТУП
   ============================================================================ */
.requirements {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.875rem;
  color: var(--slate-500);
  font-size: 0.875rem;
  font-weight: 500;
}

.requirements > div {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.requirements svg {
  width: 1.25rem;
  height: 1.25rem;
}

@media (min-width: 768px) {
  .requirements {
    flex-direction: row;
    gap: 2rem;
  }
}

/* ============================================================================
   6.6 ЦЕНА
   ============================================================================ */
.pricing-wrap {
  display: flex;
  justify-content: center;
}

.pricing-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 28rem;
  background: #ffffff;
  border: 1px solid var(--amber-100);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow:
    0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.pricing-card__badge {
  background: var(--amber-600);
  color: #ffffff;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pricing-card__body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  padding: 2rem;
}

.pricing-card__price {
  display: block;
  font-size: clamp(2rem, 10vw, 3rem);
  font-weight: 700;
  color: var(--slate-900);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.pricing-card__hint {
  display: block;
  margin-bottom: 1.5rem;
  color: var(--amber-600);
  font-size: 0.9375rem;
  font-weight: 600;
}

.pricing-list {
  list-style: none;
  padding: 0;
  margin-bottom: 2rem;
  flex-grow: 1;
}

.pricing-list li {
  display: flex;
  align-items: flex-start;
  font-size: 0.9375rem;
  color: var(--slate-600);
  margin-bottom: 0.875rem;
}

.pricing-list li::before {
  content: '';
  display: inline-block;
  width: 1.25rem;
  height: 1.25rem;
  margin-right: 0.75rem;
  margin-top: 3px;
  flex-shrink: 0;
  background-repeat: no-repeat;
  background-size: contain;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23d97706' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M5 13l4 4L19 7'/%3E%3C/svg%3E");
}

.pricing-list li.is-divider {
  font-weight: 600;
  color: var(--amber-600);
  margin-top: 1.25rem;
}

.pricing-list li.is-divider::before {
  background-image: none;
}

/* ============================================================================
   6.7 FAQ
   ============================================================================ */
.faq {
  max-width: 48rem;
  margin: 0 auto;
}

.faq details {
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.faq details:last-child {
  margin-bottom: 0;
}

.faq details[open] {
  border-color: var(--primary-border);
}

.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.125rem 1.5rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--slate-900);
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

/* Маркер-«плюс» рисуем сами: у нативного нет управления цветом и отступом. */
.faq summary::after {
  content: '';
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  background-repeat: no-repeat;
  background-size: contain;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  transition: transform 0.2s ease;
}

.faq details[open] summary::after {
  transform: rotate(180deg);
}

.faq p {
  padding: 0 1.5rem 1.25rem;
  color: var(--slate-600);
  font-size: 0.9375rem;
}

/* ============================================================================
   ДВИЖЕНИЕ: уважаем системную настройку
   ============================================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }

  .feature-card:hover,
  .btn--primary:hover,
  .btn--ghost:hover,
  .btn--download:hover {
    transform: none;
  }

  .feature-card:hover .feature-icon {
    transform: none;
  }
}
