/* Лендинг ChatBot AI — стиль в духе pastbin.pro:
   светлый фон, тёмный текст, спокойный синий акцент, Geist-шрифты,
   строгие бизнес-кнопки. */

:root {
  --bg: #f5f5f7;
  --bg-card: #ffffff;
  --text: #1d1d1f;
  --text-secondary: #6e6e73;
  --text-muted: #86868b;
  --primary: #1e5f8f;
  --primary-hover: #174e76;
  --primary-soft: rgba(30, 95, 143, 0.1);
  --border: #e3e3e6;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.14);
  --font-sans: "Geist", -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Шапка ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245, 245, 247, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
}

.brand-logo {
  font-size: 22px;
}

.brand-accent {
  color: var(--primary);
}

.header-nav {
  display: flex;
  gap: 22px;
  margin-left: 8px;
  flex: 1;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--text);
}

.header-login {
  margin-left: auto;
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

/* Компактная кнопка (для служебных ссылок в шапке) */
.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
  border-radius: 10px;
  gap: 6px;
}

.btn-dark {
  background: var(--text);
  color: #ffffff;
}

.btn-dark:hover {
  background: #000000;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}

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

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(30, 95, 143, 0.28);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-ghost:hover {
  border-color: var(--text);
  transform: translateY(-2px);
}

.btn-light {
  background: #ffffff;
  color: var(--text);
}

.btn-light:hover {
  background: #f0f0f2;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.14);
}

.btn-outline-light {
  background: transparent;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.6);
}

.btn-outline-light:hover {
  border-color: #ffffff;
  transform: translateY(-2px);
}

/* ---------- Hero ---------- */
.hero {
  padding: 84px 0 72px;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 22px;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

.hero-title {
  font-size: 52px;
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.title-accent {
  background: linear-gradient(100deg, var(--primary) 0%, #4a86c0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 30px;
  max-width: 520px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.hero-points {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hero-points li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: var(--text-secondary);
}

.hero-points svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: #22c55e;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* ---------- Демо чата ---------- */
.demo-wrap {
  position: relative;
}

.demo-glow {
  position: absolute;
  inset: -8% -6%;
  background: radial-gradient(60% 60% at 50% 40%, rgba(30, 95, 143, 0.18), transparent 70%);
  filter: blur(20px);
  pointer-events: none;
}

.chat-demo {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 560px;
  height: 560px;
}

.chat-demo-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: #fafafc;
}

.chat-demo-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.chat-demo-meta {
  flex: 1;
  min-width: 0;
}

.chat-demo-name {
  font-weight: 600;
  font-size: 15px;
}

.chat-demo-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
}

.chat-demo-badge {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
}

.chat-demo-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.chat-demo-body::-webkit-scrollbar {
  width: 5px;
}

.chat-demo-body::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.msg {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.45;
  word-wrap: break-word;
  white-space: pre-wrap;
  opacity: 0;
  transform: translateY(8px);
  animation: msg-in 0.3s ease forwards;
}

@keyframes msg-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.msg-bot {
  align-self: flex-start;
  background: #eef1f6;
  color: var(--text);
  border-bottom-left-radius: 4px;
}

.msg-user {
  align-self: flex-end;
  background: var(--primary);
  color: #ffffff;
  border-bottom-right-radius: 4px;
}

/* Печатающий курсор у сообщения бота */
.typing-caret::after {
  content: "▍";
  margin-left: 2px;
  animation: blink 0.9s step-end infinite;
  color: var(--primary);
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* Индикатор «печатает…» */
.typing-ind {
  align-self: flex-start;
  display: inline-flex;
  gap: 5px;
  padding: 12px 16px;
  background: #eef1f6;
  border-radius: 16px;
  border-bottom-left-radius: 4px;
}

.typing-ind i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: typing-dot 1.2s infinite;
}

.typing-ind i:nth-child(2) {
  animation-delay: 0.15s;
}

.typing-ind i:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes typing-dot {
  0%, 60%, 100% {
    opacity: 0.3;
    transform: translateY(0);
  }
  30% {
    opacity: 1;
    transform: translateY(-4px);
  }
}

/* Быстрые вопросы */
.chat-demo-chips {
  display: flex;
  gap: 8px;
  padding: 0 18px 12px;
  flex-wrap: wrap;
}

.chip {
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text-secondary);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all 0.2s;
}

.chip:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}

/* Поле ввода демо */
.chat-demo-input {
  display: flex;
  gap: 10px;
  padding: 0 18px 18px;
  align-items: center;
}

.chat-demo-input input {
  flex: 1;
  border: 2px solid #d4d4d8;
  border-radius: 12px;
  padding: 11px 14px;
  font-size: 14px;
  font-family: var(--font-sans);
  outline: none;
  transition: border-color 0.2s;
  min-width: 0;
}

.chat-demo-input input:focus {
  border-color: var(--primary);
}

.chat-demo-send {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border: none;
  border-radius: 12px;
  background: var(--primary);
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
}

.chat-demo-send:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
}

.chat-demo-send svg {
  width: 18px;
  height: 18px;
}

/* ---------- Статистика ---------- */
.stats {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: #fbfbfd;
  padding: 40px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}

.stat-value {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}

.stat-label {
  margin-top: 6px;
  font-size: 14px;
  color: var(--text-secondary);
}

/* ---------- Секции ---------- */
.features,
.integrations {
  padding: 84px 0;
}

.how {
  padding: 84px 0;
  background: #fbfbfd;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 52px;
}

.section-eyebrow {
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.section-title {
  font-size: 36px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
}

/* ---------- Карточки возможностей ---------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: rgba(30, 95, 143, 0.35);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--primary-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-secondary);
}

/* ---------- Как это работает ---------- */
.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.how-step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  position: relative;
  text-align: center;
}

.how-num {
  width: 44px;
  height: 44px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--text);
  color: #ffffff;
  font-weight: 700;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
}

.how-step h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.how-step p {
  font-size: 14px;
  color: var(--text-secondary);
}

/* ---------- Интеграции ---------- */
.integrations-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.integration {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.25s;
}

.integration:hover {
  border-color: rgba(30, 95, 143, 0.4);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

/* ---------- CTA ---------- */
.cta {
  padding: 84px 0;
}

.cta-box {
  background: linear-gradient(120deg, var(--primary) 0%, #14476b 100%);
  border-radius: 24px;
  padding: 64px 40px;
  text-align: center;
  color: #ffffff;
}

.cta-title {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.cta-text {
  font-size: 17px;
  opacity: 0.9;
  margin-bottom: 28px;
}

.cta-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Футер ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: #fbfbfd;
  padding: 28px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-brand {
  font-weight: 700;
  font-size: 15px;
}

.footer-text {
  font-size: 13px;
  color: var(--text-muted);
}

/* ---------- Адаптив ---------- */
@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-title {
    font-size: 40px;
  }

  .features-grid,
  .how-grid {
    grid-template-columns: 1fr 1fr;
  }

  .chat-demo {
    height: 480px;
    max-height: 480px;
  }
}

@media (max-width: 680px) {
  .header-nav {
    display: none;
  }

  .hero {
    padding: 56px 0 48px;
  }

  .hero-title {
    font-size: 32px;
  }

  .hero-subtitle {
    font-size: 16px;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }

  .features-grid,
  .how-grid,
  .integrations-grid {
    grid-template-columns: 1fr;
  }

  .section-title {
    font-size: 28px;
  }

  .cta-box {
    padding: 44px 24px;
  }

  .cta-title {
    font-size: 28px;
  }

  .header-login span {
    display: none;
  }
}
