:root,
[data-theme="dark"] {
  --bg: #0b0f19;
  --bg-soft: #111827;
  --bg-card: #151d2f;
  --bg-card-hover: #1a2438;
  --text: #e8edf7;
  --text-muted: #94a3b8;
  --text-strong: #e2e8f0;
  --accent: #3b82f6;
  --accent-2: #6366f1;
  --accent-text: #93c5fd;
  --accent-soft: rgba(59, 130, 246, 0.12);
  --accent-border: rgba(96, 165, 250, 0.35);
  --accent-glow: rgba(59, 130, 246, 0.35);
  --success: #22c55e;
  --success-soft: rgba(34, 197, 94, 0.12);
  --error: #f87171;
  --border: rgba(148, 163, 184, 0.14);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --max-width: 1140px;
  --header-bg: rgba(11, 15, 25, 0.82);
  --surface-overlay: rgba(255, 255, 255, 0.03);
  --surface-overlay-2: rgba(255, 255, 255, 0.02);
  --hero-glow: rgba(56, 189, 248, 0.14);
  --chat-bg: linear-gradient(180deg, #121a2b, #0f1524);
  --chat-border: rgba(96, 165, 250, 0.5);
  --chat-shadow: 0 20px 50px rgba(59, 130, 246, 0.12), 0 0 0 1px rgba(59, 130, 246, 0.12);
  --btn-primary-bg: linear-gradient(135deg, var(--accent), var(--accent-2));
  --btn-primary-color: #ffffff;
  --btn-primary-shadow: 0 10px 30px var(--accent-glow);
  --btn-secondary-border: rgba(147, 197, 253, 0.75);
  --footer-cta-color: #ffffff;
  --case-tabs-bg: rgba(15, 23, 42, 0.92);
  --contact-gradient: linear-gradient(180deg, rgba(59, 130, 246, 0.06), transparent);
  --logo-ai-bg: rgba(59, 130, 246, 0.15);
  --logo-ai-border: rgba(59, 130, 246, 0.25);
  --telegram: #38bdf8;
  --telegram-hover: #7dd3fc;
  --telegram-muted: #93c5fd;
  --telegram-muted-hover: #bfdbfe;
  --compare-bad: #f87171;
  --compare-good: #86efac;
  --cta-block-bg: linear-gradient(135deg, rgba(59, 130, 246, 0.14), rgba(99, 102, 241, 0.1));
  --cta-block-border: rgba(96, 165, 250, 0.3);
  --select-chevron: %2394a3b8;
  --color-scheme: dark;
}

[data-theme="light"] {
  --bg: #ffffff;
  --bg-soft: #eef2f9;
  --page-bg: linear-gradient(
    180deg,
    #ffffff 0%,
    #fafbfe 5%,
    #f5f8fc 10%,
    #eef3fa 15%,
    #f7f9fd 20%,
    #eaeff6 25%,
    #f3f7fb 30%,
    #e8edf6 35%,
    #f6f9fc 40%,
    #ecf1f8 45%,
    #f4f7fc 50%,
    #e9eff7 55%,
    #f8fafd 60%,
    #edf2f9 65%,
    #f5f8fc 70%,
    #eaeff6 75%,
    #f7f9fd 80%,
    #eef3fa 85%,
    #f5f8fc 90%,
    #f9fbfe 95%,
    #ffffff 100%
  );
  --hero-glow: rgba(96, 165, 250, 0.2);
  --hero-glow-2: rgba(129, 140, 248, 0.14);
  --bg-card: #ffffff;
  --bg-card-hover: #f9fafb;
  --text: #0f172a;
  --text-muted: #64748b;
  --text-strong: #0f172a;
  --accent: #2563eb;
  --accent-2: #1d4ed8;
  --accent-text: #2563eb;
  --accent-soft: rgba(37, 99, 235, 0.08);
  --accent-border: rgba(37, 99, 235, 0.22);
  --accent-glow: rgba(37, 99, 235, 0.18);
  --success: #16a34a;
  --success-soft: rgba(22, 163, 74, 0.1);
  --error: #dc2626;
  --border: rgba(15, 23, 42, 0.1);
  --shadow: 0 24px 64px rgba(15, 23, 42, 0.07);
  --header-bg: rgba(255, 255, 255, 0.94);
  --surface-overlay: #ffffff;
  --surface-overlay-2: #f8fafc;
  --chat-bg: linear-gradient(180deg, #ffffff, #f8fafc);
  --chat-border: rgba(15, 23, 42, 0.1);
  --chat-shadow: 0 24px 64px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(15, 23, 42, 0.06);
  --btn-primary-bg: linear-gradient(135deg, #2563eb, #1d4ed8);
  --btn-primary-color: #ffffff;
  --btn-primary-shadow: 0 10px 28px rgba(37, 99, 235, 0.28);
  --btn-secondary-border: rgba(15, 23, 42, 0.18);
  --footer-cta-color: #0f172a;
  --case-tabs-bg: rgba(255, 255, 255, 0.82);
  --contact-gradient: transparent;
  --logo-ai-bg: rgba(37, 99, 235, 0.08);
  --logo-ai-border: rgba(37, 99, 235, 0.18);
  --telegram: #2563eb;
  --telegram-hover: #1d4ed8;
  --telegram-muted: #2563eb;
  --telegram-muted-hover: #1d4ed8;
  --compare-bad: #dc2626;
  --compare-good: #16a34a;
  --cta-block-bg: linear-gradient(135deg, #eef3fa 0%, #f8faff 55%, #ffffff 100%);
  --cta-block-border: rgba(15, 23, 42, 0.08);
  --select-chevron: %2364748b;
  --color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  color-scheme: var(--color-scheme);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(100% - 32px, var(--max-width));
  margin: 0 auto;
}

.section {
  padding: 88px 0;
}

.section-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.15;
  margin: 0 0 16px;
  font-weight: 700;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 720px;
  margin: 0 0 40px;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 72px;
}

.header-brand {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}

.header-tagline {
  display: none;
  margin: 0;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.35;
}

.logo {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 700;
  font-size: 1.15rem;
}

.logo-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.logo-text {
  display: flex;
  align-items: baseline;
  gap: 0;
  letter-spacing: -0.02em;
}

.logo-dot {
  color: var(--accent-text);
  font-weight: 700;
}

.logo-ai {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent-text);
  padding: 2px 7px 2px 2px;
  margin-left: 1px;
  border-radius: 6px;
  background: var(--logo-ai-bg);
  border: 1px solid var(--logo-ai-border);
}

.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid;
  place-items: center;
  font-size: 0.9rem;
  font-weight: 800;
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav a {
  color: var(--text-muted);
  font-size: 0.95rem;
  transition: color 0.2s;
}

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

.nav a.btn-primary,
.nav a.btn-primary:hover {
  color: var(--btn-primary-color);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  border: none;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-color);
  box-shadow: var(--btn-primary-shadow);
}

.btn-contact-shimmer,
.btn-rag-shimmer {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.btn-contact-shimmer::after,
.btn-rag-shimmer::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 0%,
    transparent 38%,
    rgba(255, 255, 255, 0.5) 50%,
    transparent 62%,
    transparent 100%
  );
  transform: translateX(-130%);
  animation: btn-shimmer-loop 3s ease-in-out infinite;
  pointer-events: none;
}

@keyframes btn-shimmer-loop {
  0% {
    transform: translateX(-130%);
  }

  38% {
    transform: translateX(130%);
  }

  100% {
    transform: translateX(130%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn-contact-shimmer::after,
  .btn-rag-shimmer::after {
    animation: none;
    display: none;
  }
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--btn-secondary-border);
}

.btn-secondary:hover {
  border-color: var(--accent-text);
  color: var(--accent-text);
  background: var(--accent-soft);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.4rem;
  cursor: pointer;
}

/* Theme switch */
.header-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-overlay-2);
  gap: 2px;
  flex-shrink: 0;
}

.lang-switch-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  min-width: 34px;
  padding: 7px 8px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.lang-switch-btn:hover {
  color: var(--text);
}

.lang-switch-btn.active {
  background: var(--accent-soft);
  color: var(--accent-text);
}

[data-theme="light"] .lang-switch-btn.active {
  background: rgba(37, 99, 235, 0.12);
  color: #2563eb;
}

.toolbar-icon {
  display: block;
  flex-shrink: 0;
}

.theme-switch-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.theme-switch-btn .theme-switch-label {
  display: none;
}

.theme-switch {
  display: inline-flex;
  align-items: center;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-overlay-2);
  gap: 2px;
  flex-shrink: 0;
}

.theme-switch-btn:hover {
  color: var(--text);
}

.theme-switch-btn.active {
  background: var(--bg-card);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

[data-theme="dark"] .theme-switch-btn.active {
  background: rgba(59, 130, 246, 0.18);
  color: var(--accent-text);
  box-shadow: none;
}

[data-theme="light"] .theme-switch-btn.active {
  background: #2563eb;
  color: #ffffff;
}

.section--soft {
  background: var(--bg-soft);
}

/* Hero */
.hero {
  padding: 72px 0 96px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -20% auto auto 50%;
  width: 700px;
  height: 700px;
  transform: translateX(-30%);
  background: radial-gradient(circle, var(--hero-glow), transparent 65%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px 48px;
  align-items: stretch;
}

.hero-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.hero-eyebrow {
  margin: 0 0 14px;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: normal;
}

.hero-grid .chat-demo {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-self: stretch;
  height: 100%;
}

.hero-stats {
  margin: 8px 0 24px;
}

.hero-actions {
  margin-bottom: 0;
  margin-top: auto;
}

.hero h1,
.hero-title {
  font-size: clamp(1.85rem, 4vw, 2.65rem);
  line-height: 1.08;
  margin: 0 0 20px;
  letter-spacing: -0.02em;
}

.hero-title-text {
  display: inline;
}

.hero-title-cursor {
  font-size: 0.92em;
  font-weight: 400;
  margin-left: 2px;
}

.hero-lead {
  color: var(--text-muted);
  font-size: 1.12rem;
  margin-bottom: 14px;
  max-width: 560px;
}

.hero-lead-second {
  font-size: 0.95rem;
  line-height: 1.55;
  margin-bottom: 8px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.stat-card {
  background: var(--surface-overlay);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent-text);
}

.stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Chat mockup */
.chat-mockup {
  background: var(--chat-bg);
  border: 1px solid var(--chat-border);
  border-radius: 20px;
  box-shadow: var(--chat-shadow);
  overflow: hidden;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-overlay-2);
}

.chat-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.chat-badge {
  font-size: 0.75rem;
  color: var(--success);
  background: var(--success-soft);
  padding: 4px 10px;
  border-radius: 999px;
}

.chat-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 340px;
}

.chat-mockup-hero {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 100%;
  height: 100%;
}

.chat-body-demo {
  flex: 1 1 auto;
  min-height: 200px;
  justify-content: flex-start;
}

.chat-input-demo {
  display: flex;
  align-items: center;
  min-height: 44px;
  color: var(--text-muted);
}

.type-cursor {
  color: var(--accent-text);
  font-weight: 400;
  animation: cursor-blink 1s step-end infinite;
  margin-left: 1px;
}

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

.typing-indicator {
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.typing-indicator span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-text);
  animation: typing-bounce 1.2s ease-in-out infinite;
}

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

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

@keyframes typing-bounce {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.45;
  }
  30% {
    transform: translateY(-5px);
    opacity: 1;
  }
}

.demo-dots {
  justify-content: center;
  margin-top: 14px;
}

.bubble-bot-demo .source-link {
  display: block;
  margin-top: 10px;
}

.chat-docs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.doc-chip {
  font-size: 0.78rem;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-text);
  border: 1px solid var(--accent-border);
}

.bubble {
  max-width: 92%;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 0.9rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.bubble-user {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--btn-primary-color);
}

.bubble-bot {
  align-self: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.bubble-bot strong {
  color: var(--accent-text);
}

.source-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--accent-text);
}

.chat-input {
  margin: 0 18px 18px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.88rem;
  background: var(--surface-overlay-2);
}

/* Hero chat carousel */
.chat-carousel {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.chat-carousel-viewport {
  overflow: hidden;
  overflow-x: clip;
  border-radius: 20px;
  width: 100%;
  max-width: 100%;
  position: relative;
  isolation: isolate;
}

.chat-carousel-track {
  display: flex;
  flex-wrap: nowrap;
  width: 100%;
  transition: transform 0.45s ease;
  will-change: transform;
}

.chat-carousel .chat-slide {
  flex: 0 0 100%;
  width: 100%;
  min-width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  flex-shrink: 0;
}

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 16px;
}

.carousel-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0 0 2px;
  transition: background 0.2s, border-color 0.2s;
}

.carousel-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
}

.carousel-dots {
  display: flex;
  gap: 8px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(148, 163, 184, 0.35);
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
}

.carousel-dot.active {
  background: var(--accent);
  transform: scale(1.2);
}

/* Cards grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: background 0.2s, transform 0.2s;
}

.card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 1.2rem;
  margin-bottom: 14px;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.step {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 18px;
}

.step-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.step-head h3 {
  margin: 0;
  font-size: 0.98rem;
}

.step p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.86rem;
}

/* Compare */
.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.compare-card {
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid var(--border);
}

.compare-card.bad {
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(248, 113, 113, 0.45);
}

.compare-card.good {
  background: rgba(34, 197, 94, 0.16);
  border-color: rgba(74, 222, 128, 0.45);
}

.compare-card h3 {
  margin-top: 0;
}

.compare-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--text-muted);
}

.compare-card li {
  margin-bottom: 8px;
}

/* FAQ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: var(--text);
  font: inherit;
  font-weight: 600;
  padding: 18px 20px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.faq-answer {
  display: none;
  padding: 0 20px 18px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.faq-item.open .faq-answer {
  display: block;
}

.faq-item.open .faq-question span:last-child {
  transform: rotate(45deg);
}

/* Form */
.contact-section {
  background: var(--contact-gradient);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.contact-perks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.contact-perk {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.contact-perk-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent-text);
}

.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
  font-weight: 500;
}

.form-group input:not([type="checkbox"]),
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-overlay);
  color: var(--text);
  font: inherit;
}

.form-group select {
  color-scheme: dark;
  background-color: var(--bg-card);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%2394a3b8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

.form-group select option {
  background: var(--bg-card);
  color: var(--text);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group textarea {
  min-height: 110px;
  resize: vertical;
}

.form-note {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 12px;
}

.form-status {
  margin-top: 14px;
  font-size: 0.92rem;
  min-height: 1.4em;
}

.form-status.success {
  color: var(--success);
}

.form-status.error {
  color: var(--error);
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-left: 0;
  padding-left: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.checkbox-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  padding: 0;
  flex-shrink: 0;
  accent-color: var(--accent);
}

.checkbox-row label {
  margin-bottom: 0;
  font-weight: 400;
  line-height: 1.45;
  cursor: pointer;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  gap: 16px 20px;
  flex-wrap: wrap;
  align-items: center;
}

.footer-links a:hover {
  color: var(--text);
}

.footer-links a[href="#contact"],
.footer-links a[href="#contact"]:hover {
  color: var(--footer-cta-color);
  font-weight: 600;
}

.footer-brand {
  flex: 0 1 360px;
  min-width: 320px;
  max-width: 400px;
}

.footer-tagline {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.5;
  max-width: 100%;
}

.footer-copy {
  flex: 1 1 100%;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.45;
  text-align: left;
  margin-top: 8px;
}

.footer-telegram {
  color: var(--telegram-muted);
}

.footer-telegram:hover {
  color: var(--telegram-muted-hover);
}

.telegram-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  color: var(--telegram);
  transition: color 0.2s, transform 0.2s;
}

.telegram-link:hover {
  color: var(--telegram-hover);
  transform: translateY(-1px);
}

.telegram-icon {
  display: block;
}

.contact-telegram {
  margin: 20px 0 0;
  font-size: 0.92rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

/* Rag diagram */
.rag-diagram {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.rag-node {
  text-align: left;
  padding: 20px 14px;
  border-radius: var(--radius);
  border: 1px dashed var(--border);
  background: var(--surface-overlay-2);
}

.rag-node strong {
  display: block;
  margin-bottom: 6px;
}

.rag-arrow {
  display: none;
}

/* Case study */
.case-section {
  border-top: 1px solid var(--border);
}

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

.case-content h3 {
  font-size: 1.4rem;
  margin: 0 0 12px;
}

.case-content p {
  color: var(--text-muted);
  margin: 0 0 16px;
}

.case-list {
  margin: 0 0 24px;
  padding-left: 18px;
  color: var(--text-muted);
}

.case-list li {
  margin-bottom: 8px;
}

.case-mockup {
  box-shadow: var(--chat-shadow);
}

.case-carousel {
  position: relative;
  margin-top: 8px;
}

.case-carousel-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.case-carousel-text {
  min-width: 0;
}

.case-carousel-viewport {
  overflow: hidden;
  width: 100%;
}

.case-carousel-track {
  display: flex;
  flex-wrap: nowrap;
  transition: transform 0.5s ease;
  will-change: transform;
}

.case-slide {
  flex: 0 0 100%;
  width: 100%;
  min-width: 100%;
  box-sizing: border-box;
  padding: 4px 0 0;
}

.case-chat-panel {
  min-width: 0;
}

.case-carousel-controls {
  margin-top: 32px;
  justify-content: center;
  width: 100%;
}

#case-demo-source {
  display: block;
  margin-top: 10px;
}

@media (max-width: 960px) {
  .hero {
    padding: 20px 0 40px;
  }

  .hero::before {
    width: 320px;
    height: 320px;
    inset: -10% -10% auto auto;
    transform: none;
  }

  .header-brand {
    gap: 6px;
    flex: 1;
    min-width: 0;
    padding-right: 8px;
  }

  .header-tagline {
    display: block;
    font-size: 0.72rem;
    line-height: 1.35;
    max-width: calc(100vw - 96px);
  }

  .header-inner {
    align-items: center;
    min-height: 64px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .hero-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  .hero-main {
    display: contents;
  }

  .hero-grid .hero-eyebrow {
    display: none;
  }

  .hero-grid h1 {
    order: 1;
    font-size: clamp(1.45rem, 6.2vw, 1.85rem);
    line-height: 1.15;
    margin-bottom: 12px;
  }

  .hero-grid .hero-lead:not(.hero-lead-second) {
    order: 2;
    font-size: 0.98rem;
    margin-bottom: 12px;
    max-width: none;
  }

  .hero-grid .hero-stats {
    order: 3;
    margin: 0 0 16px;
  }

  .hero-grid .hero-lead-second {
    order: 4;
    font-size: 0.86rem;
    line-height: 1.55;
    margin-bottom: 12px;
  }

  .hero-grid .chat-demo {
    order: 5;
    width: 100%;
    max-width: 100%;
    height: auto;
  }

  .hero-grid .hero-actions {
    order: 6;
    margin-bottom: 0;
    margin-top: 0;
  }

  .chat-mockup-hero {
    min-height: 400px;
    height: auto;
  }

  .chat-body-demo {
    min-height: 280px;
  }

  .hero-actions .btn {
    flex: 1 1 calc(50% - 6px);
    min-width: 0;
    padding: 11px 16px;
    font-size: 0.9rem;
  }

  .chat-body {
    min-height: 0;
    padding: 12px;
    gap: 10px;
  }

  .chat-header {
    padding: 10px 12px;
    gap: 8px;
  }

  .chat-title {
    font-size: 0.84rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .chat-input {
    margin: 0 12px 12px;
    font-size: 0.8rem;
    padding: 10px 12px;
  }

  .bubble {
    font-size: 0.82rem;
    padding: 10px 11px;
    max-width: 95%;
  }

  .source-link {
    font-size: 0.75rem;
  }

  .doc-chip {
    font-size: 0.68rem;
    padding: 4px 7px;
  }

  .chat-mockup {
    border-radius: 16px;
    box-shadow: var(--chat-shadow);
  }

  .contact-grid,
  .compare-grid,
  .case-grid,
  .case-carousel-layout {
    grid-template-columns: 1fr;
  }

  .steps {
    grid-template-columns: 1fr 1fr;
  }

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

  .stat-card {
    padding: 10px 12px;
  }

  .stat-value {
    font-size: 1.15rem;
  }

  .stat-label {
    font-size: 0.72rem;
    line-height: 1.35;
  }

  .rag-diagram {
    grid-template-columns: 1fr;
  }

  .rag-node {
    text-align: left;
  }

  .footer-brand {
    flex: 1 1 100%;
    min-width: 0;
    max-width: none;
  }

  .header-inner {
    position: relative;
    min-height: 64px;
  }

  .nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    padding: 16px;
    background: var(--bg-soft);
    border-bottom: 1px solid var(--border);
    z-index: 101;
  }

  .nav.open {
    display: flex;
  }

  .nav .btn {
    width: 100%;
  }

  .menu-toggle {
    display: block;
  }
}

@media (max-width: 600px) {
  .container {
    width: min(100% - 24px, var(--max-width));
  }

  .section {
    padding: 56px 0;
  }

  .hero {
    padding: 24px 0 40px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
    flex: none;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .stats-row {
    grid-template-columns: 1fr 1fr;
  }

  .carousel-controls {
    gap: 12px;
    margin-top: 12px;
  }

  .logo-text {
    font-size: 1.05rem;
  }

  .logo-icon {
    width: 42px;
    height: 42px;
  }
}

@media (max-width: 380px) {
  .chat-badge {
    display: none;
  }
}

/* Case detail pages */
.case-page-hero {
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--border);
}

.case-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 24px;
  font-size: 0.92rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

.case-back:hover {
  color: var(--accent-text);
}

.case-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.case-tag {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-text);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-radius: 999px;
  padding: 5px 12px;
}

.case-page-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.12;
  margin: 0 0 16px;
  max-width: 820px;
}

.case-page-lead {
  color: var(--text-muted);
  font-size: 1.08rem;
  line-height: 1.6;
  margin: 0 0 28px;
  max-width: 760px;
}

.case-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.case-metric {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 14px;
  text-align: center;
}

.case-metric-value {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--accent-text);
  line-height: 1.1;
  margin-bottom: 6px;
}

.case-metric-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.case-detail-section {
  padding: 56px 0;
}

.case-detail-section.alt {
  background: var(--bg-soft);
}

.case-detail-section h2 {
  font-size: clamp(1.45rem, 3vw, 1.9rem);
  margin: 0 0 20px;
}

.case-detail-section h3 {
  font-size: 1.15rem;
  margin: 0 0 14px;
  color: var(--accent-text);
}

.case-detail-list {
  margin: 0 0 24px;
  padding-left: 0;
  list-style: none;
}

.case-detail-list li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 12px;
  color: var(--text-muted);
  line-height: 1.55;
}

.case-detail-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent-text);
  font-weight: 700;
}

.case-goals {
  margin-top: 8px;
  padding: 20px 22px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-sm);
}

.case-goals h3 {
  margin-top: 0;
  color: var(--text);
}

.case-solution-grid {
  display: grid;
  gap: 12px;
}

.case-solution-item {
  padding: 16px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.case-solution-item strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
}

.case-solution-item span {
  color: var(--text-muted);
  font-size: 0.94rem;
  line-height: 1.5;
}

.case-results-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  font-size: 0.95rem;
}

.case-results-table th,
.case-results-table td {
  border: 1px solid var(--border);
  padding: 12px 14px;
  text-align: left;
}

.case-results-table th {
  background: var(--bg-card);
  color: var(--text);
  font-weight: 600;
}

.case-results-table td {
  color: var(--text-muted);
}

.case-results-table td:last-child {
  color: var(--compare-good);
}

.case-cta-block {
  text-align: center;
  padding: 48px 24px;
  background: var(--cta-block-bg);
  border: 1px solid var(--cta-block-border);
  border-radius: var(--radius);
}

.case-cta-block h2 {
  margin-bottom: 12px;
}

.case-cta-block p {
  color: var(--text-muted);
  margin: 0 0 22px;
}

.case-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.case-tech span {
  font-size: 0.82rem;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
}

@media (max-width: 960px) {
  .case-metrics {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .case-metric {
    padding: 12px 10px;
  }

  .case-metric-value {
    font-size: 1.2rem;
  }

  .case-metric-label {
    font-size: 0.72rem;
  }

  .case-page-hero {
    padding: 40px 0 32px;
  }

  .case-detail-section {
    padding: 44px 0;
  }
}

@media (max-width: 480px) {
  .case-results-table {
    font-size: 0.85rem;
  }

  .case-results-table th,
  .case-results-table td {
    padding: 10px;
  }
}

/* Article page */
.article-page-hero {
  padding: 56px 0 32px;
  border-bottom: 1px solid var(--border);
}

.article-page-title {
  font-size: clamp(1.85rem, 4.5vw, 2.75rem);
  line-height: 1.12;
  margin: 0 0 12px;
  max-width: 820px;
}

.article-page-meta {
  margin: 0 0 16px;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.article-page-lead {
  color: var(--text-muted);
  font-size: 1.12rem;
  line-height: 1.65;
  margin: 0;
  max-width: 720px;
}

.article-body {
  padding: 48px 0 56px;
}

.article-content {
  max-width: 720px;
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text-muted);
}

.article-content > *:first-child {
  margin-top: 0;
}

.article-content > *:last-child {
  margin-bottom: 0;
}

.article-content h2 {
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  line-height: 1.25;
  color: var(--text);
  margin: 2.25rem 0 1rem;
}

.article-content h3 {
  font-size: 1.15rem;
  line-height: 1.35;
  color: var(--accent-text);
  margin: 1.75rem 0 0.75rem;
}

.article-content p {
  margin: 0 0 1.25rem;
}

.article-content ul,
.article-content ol {
  margin: 0 0 1.25rem;
  padding-left: 1.35rem;
}

.article-content li {
  margin-bottom: 0.5rem;
}

.article-content li::marker {
  color: var(--accent-text);
}

.article-content a {
  color: var(--accent-text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-content a:hover {
  color: var(--telegram-muted-hover);
}

.article-content blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--accent-border);
  background: var(--bg-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text);
}

.article-content img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.5rem 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.article-content hr {
  margin: 2rem 0;
  border: 0;
  border-top: 1px solid var(--border);
}

.article-content strong {
  color: var(--text);
  font-weight: 600;
}

.article-page-footer {
  padding: 0 0 56px;
}

.article-page-footer .case-cta-block {
  margin-top: 0;
}

@media (max-width: 768px) {
  .article-page-hero {
    padding: 40px 0 28px;
  }

  .article-body {
    padding: 36px 0 44px;
  }

  .article-content {
    font-size: 1rem;
  }
}

/* Case page tabs */
.case-tabs-wrap {
  position: sticky;
  top: 64px;
  z-index: 50;
  background: var(--case-tabs-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.case-tabs {
  display: flex;
  gap: 8px;
  padding: 12px 0;
}

.case-tab {
  flex: 1;
  max-width: 280px;
  padding: 12px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.case-tab:hover {
  color: var(--text-strong);
  border-color: var(--accent-border);
}

.case-tab.active {
  color: var(--text);
  background: var(--accent-soft);
  border-color: var(--accent-border);
}

.case-tab-panel[hidden] {
  display: none;
}

.case-steps-list {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.case-steps-list li {
  margin-bottom: 14px;
}

.case-steps-list li strong {
  color: var(--text-strong);
}

.case-example-answer {
  margin: 20px 0 0;
  padding: 16px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  line-height: 1.6;
}

.case-example-answer strong {
  color: var(--accent-text);
}

.case-arch-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.case-arch-step {
  flex: 1 1 140px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}

.case-arch-step span {
  display: block;
  margin-top: 4px;
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--text-muted);
}

.case-arch-arrow {
  color: #60a5fa;
  font-size: 1.25rem;
  flex: 0 0 auto;
}

.case-solution-item code {
  font-size: 0.82rem;
  word-break: break-word;
}

.case-carousel--single .case-carousel-controls {
  display: none;
}

@media (max-width: 768px) {
  .case-tabs-wrap {
    top: 56px;
  }

  .case-tab {
    max-width: none;
    padding: 10px 14px;
    font-size: 0.88rem;
  }

  .case-arch-arrow {
    display: none;
  }

  .case-arch-step {
    flex: 1 1 100%;
  }
}

/* Light theme — Apex-inspired polish */
[data-theme="light"] body {
  background: var(--page-bg);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  min-height: 100vh;
}

[data-theme="light"] .hero,
[data-theme="light"] .section,
[data-theme="light"] .section--soft,
[data-theme="light"] .contact-section,
[data-theme="light"] .footer,
[data-theme="light"] .case-page-hero,
[data-theme="light"] .case-detail-section,
[data-theme="light"] .article-page-hero,
[data-theme="light"] .article-body,
[data-theme="light"] main {
  background: transparent;
}

[data-theme="light"] .section-label {
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

[data-theme="light"] .section-title,
[data-theme="light"] .case-page-title,
[data-theme="light"] .article-page-title {
  color: #0a0a0a;
  letter-spacing: -0.03em;
}

[data-theme="light"] .hero-title,
[data-theme="light"] .hero-title .hero-title-text {
  color: var(--accent-text);
}

[data-theme="light"] .hero::before {
  inset: -15% auto auto 42%;
  width: min(92vw, 860px);
  height: min(92vw, 860px);
  transform: translateX(-25%);
  background: radial-gradient(
    circle at 35% 35%,
    var(--hero-glow) 0%,
    rgba(147, 197, 253, 0.1) 38%,
    transparent 68%
  );
  opacity: 1;
}

[data-theme="light"] .hero::after {
  content: "";
  position: absolute;
  right: -8%;
  bottom: 0;
  width: min(55vw, 480px);
  height: min(55vw, 480px);
  background: radial-gradient(circle, var(--hero-glow-2) 0%, transparent 68%);
  pointer-events: none;
}

[data-theme="light"] .stat-card,
[data-theme="light"] .card,
[data-theme="light"] .form-card,
[data-theme="light"] .faq-item,
[data-theme="light"] .case-metric,
[data-theme="light"] .case-solution-item,
[data-theme="light"] .compare-card {
  box-shadow: var(--shadow);
}

[data-theme="light"] .bubble-user {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

[data-theme="light"] .bubble-bot {
  background: #f1f5f9;
  border: 1px solid var(--border);
  color: var(--text);
}

[data-theme="light"] .header {
  border-bottom-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

[data-theme="light"] .nav a:hover {
  color: #0a0a0a;
}

[data-theme="light"] .case-tabs-wrap {
  background: var(--case-tabs-bg);
  backdrop-filter: blur(14px);
}

[data-theme="light"] .case-tab.active {
  color: var(--accent-text);
}

[data-theme="light"] .form-group select {
  color-scheme: light;
  background-color: var(--bg-card);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%2364748b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

[data-theme="light"] .form-group input:not([type="checkbox"]),
[data-theme="light"] .form-group textarea,
[data-theme="light"] .form-group select {
  background: #ffffff;
}

[data-theme="light"] .compare-card.bad {
  background: rgba(220, 38, 38, 0.05);
  border-color: rgba(220, 38, 38, 0.18);
}

[data-theme="light"] .compare-card.good {
  background: rgba(22, 163, 74, 0.05);
  border-color: rgba(22, 163, 74, 0.18);
}

@media (max-width: 900px) {
  .header-tools {
    margin-left: auto;
  }

  .lang-switch-btn {
    min-width: 30px;
    padding: 6px 7px;
    font-size: 0.68rem;
  }

  .theme-switch-btn {
    width: 32px;
    height: 32px;
  }
}
