/* ============================================================
   VBIPro — styles.css  (clean rewrite)
   ============================================================ */

/* ── 1. Tokens & Reset ─────────────────────────────────────── */
:root {
  --text:         #2f3b49;
  --muted:        #5b6b7e;
  --glass:        rgba(255,255,255,.06);
  --glass-border: rgba(255,255,255,.18);
  --cta-bg:       rgba(47,59,73,.18);
  --cta-text:     #2f3b49;
  --blur-panel:   blur(24px);
  --radius-panel: 8px;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: #fff;
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  transition: background .45s ease, color .35s ease;
}

/* Плавная смена темы — переходы для всех ключевых элементов */
.glass, .chat-wrapper, .chat-header, .chat-input,
.chat-input textarea, .message.ai, .message.user,
.mode-pill, .mode-pill__thumb, .icon-btn, .send-btn,
.topbar, .mobile-nav, .theme-toggle, .nav-cabinet-btn,
.value-card, .team-card, .case-card, .contact-icon,
.form-field input, .form-field textarea, .form-field select,
.hero-stat, .cta, .auth-card {
  transition:
    background .45s ease,
    background-color .45s ease,
    border-color .40s ease,
    color .35s ease,
    box-shadow .40s ease !important;
}
/* chat-mockup НЕ входит в общий список — у него своя transition */
/* Фон страницы */
.bg { transition: filter .55s ease; }

/* ── 2. Layout ─────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  perspective: 1200px;
}
/* В тёмной теме снимаем все обрезания */
body.dark-mode .hero,
body.dark-mode .frame,
body.dark-mode .glass {
  overflow: visible !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Отражение от пола в тёмной теме */
body.dark-mode .hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 40%;
  right: -5%;
  height: 35%;
  pointer-events: none;
  z-index: 4;
  background: radial-gradient(ellipse 70% 100% at 65% 100%,
    rgba(140,70,255,.28) 0%,
    rgba(110,50,230,.12) 40%,
    transparent 70%);
  filter: blur(12px);
  transform: scaleY(-1) translateY(0);
  mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,.6) 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,.6) 100%);
}
.bg {
  position: absolute;
  inset: -7%;
  background: url("assets/bg.webp") center/cover no-repeat;
  transform: translate3d(0,0,0) scale(1.10);
  will-change: transform;
  filter: saturate(1.02) contrast(1.02);
  transition: opacity .6s ease, filter .55s ease;
}
.frame {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: 0 56px;
}

/* ── 3. Topbar & Nav ───────────────────────────────────────── */
.topbar {
  position: relative;
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 36px;
  padding: 20px 0;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 12px;
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  transition: background .25s ease, border-color .25s ease,
              backdrop-filter .25s ease, box-shadow .25s ease;
}
body.scrolled .topbar {
  background: rgba(255,255,255,.28);
  border-color: rgba(255,255,255,.22);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 18px 40px rgba(20,35,55,.10);
}
.brand {
  display: flex;
  align-items: center;
  margin-right: auto;
  padding: 4px 0;
  text-decoration: none;
  user-select: none;
  transition: opacity .2s;
}
.brand:hover { opacity: .72; }
.logo-img {
  height: 34px;
  width: auto;
  display: block;
  opacity: .90;
  filter: brightness(0) saturate(100%) invert(24%) sepia(10%)
          saturate(450%) hue-rotate(175deg) brightness(92%) contrast(88%);
}
.nav {
  display: flex;
  align-items: center;
  gap: 48px;
  font-family: Montserrat, Inter, sans-serif;
  font-weight: 400;
  font-size: 17px;
  color: var(--muted);
}
.nav a { color: inherit; text-decoration: none; transition: opacity .2s; }
.nav a:hover { opacity: .7; }
.burger {
  display: none;
  width: 48px; height: 48px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(110,130,155,.35);
  background: rgba(255,255,255,.18);
  border-radius: 10px;
  cursor: pointer;
  opacity: .85;
  position: relative;
  z-index: 200;
  /* Убираем backdrop-filter с самой кнопки — на iOS он ломает touch events.
     Размываем через ::before псевдоэлемент */
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
}
.burger::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 10px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: -1;
}
.burger span {
  display: block;
  width: 20px; height: 2px;
  background: #6a7a8d;
  border-radius: 2px;
}

/* ── 4. Glass panel ────────────────────────────────────────── */
.glass {
  position: absolute;
  inset: 78px;
  z-index: 10;
  background: var(--glass);
  backdrop-filter: var(--blur-panel);
  -webkit-backdrop-filter: var(--blur-panel);
  border-radius: var(--radius-panel);
  border: 1px solid var(--glass-border);
  box-shadow: 0 30px 70px rgba(30,55,85,.10),
              inset 0 1px 0 rgba(255,255,255,.28);
  overflow: hidden; /* overridden in dark mode */
}
.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(1200px 600px at 18% 20%,
    rgba(255,255,255,.25), transparent 58%);
  pointer-events: none;
}
.glass::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(255,255,255,.08), transparent 55%);
  pointer-events: none;
}

/* ── 5. Hero content ───────────────────────────────────────── */
.hero-screen {
  position: relative;
  z-index: 2;
}
.content {
  position: relative;
  z-index: 2;
  padding: 140px 0 0 78px;
  max-width: 820px;
}
h1 {
  margin: 0 0 20px;
  font-family: Montserrat, Inter, sans-serif;
  font-weight: 700;
  font-size: 52px;
  line-height: 1.18;
  letter-spacing: -.3px;
  color: var(--text);
  opacity: .95;
}
.sub {
  margin: 0 0 28px;
  font-size: 18px;
  line-height: 1.7;
  color: #5a6a7d;
}
.hero-stats {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 32px;
}
.hero-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-family: Montserrat, Inter, sans-serif;
  font-weight: 500;
  color: #2f3b49;
  background: rgba(255,255,255,.22);
  border: 1px solid rgba(255,255,255,.40);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  white-space: nowrap;
}
.hero-stat b { font-weight: 700; }

.cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 26px;
  border-radius: 6px;
  font-family: Montserrat, Inter, sans-serif;
  font-weight: 500;
  font-size: 16px;
  color: var(--cta-text);
  background: var(--cta-bg);
  box-shadow: 0 10px 22px rgba(45,70,95,.18);
  text-decoration: none;
  transition: filter .2s;
}
.cta:hover { filter: brightness(.97); }
.arrow { font-size: 18px; opacity: .95; }

/* ── 6. Robot ──────────────────────────────────────────────── */

.robot-wrap {
  position: absolute;
  right: clamp(20px, 6vw, 140px);
  bottom: -70px;
  height: clamp(380px, 88vh, 1080px);
  width: auto;
  max-width: 55vw;
  z-index: 12;
  display: grid;
  grid-template-rows: 1fr;
  grid-template-columns: 1fr;
  user-select: none;
  pointer-events: none;
  opacity: 1;
  visibility: visible;
  transform: translate3d(0,0,0);
  will-change: transform;
  transition: transform 1100ms cubic-bezier(.22,.61,.36,1);
}

/* Смещение вправо при открытии чата */
body.chat-active .robot-wrap {
  transform: translate3d(100px,0,0) rotate(1.5deg);
}

/* Оба изображения накладываются */
.robot-img {
  grid-row: 1;
  grid-column: 1;

  height: 100%;
  width: auto;

  align-self: end;
  justify-self: end;

  transform-origin: 50% 80%;

  filter: drop-shadow(0 22px 40px rgba(0,0,0,.10))
          drop-shadow(0 8px 18px rgba(60,100,140,.08));

  transition:
    opacity 900ms cubic-bezier(.22,.61,.36,1),
    transform 900ms cubic-bezier(.22,.61,.36,1),
    filter 600ms ease;
}

/* БОКОВОЙ ВИД (стартовый) */
.robot-side {
  opacity: 1;
  transform: translateX(0) scale(1);
  filter: blur(0);
}

/* ФРОНТАЛЬНЫЙ ВИД */
.robot-front {
  opacity: 0;
  transform: translateX(40px) scale(.98);
  filter: blur(4px);
}

/* Поворот на фронт */
body.robot-facing .robot-side {
  opacity: 0;
  transform: translateX(-20px) scale(.98);
  filter: blur(4px);
}

body.robot-facing .robot-front {
  opacity: 1;
  transform: translateX(0) scale(1);
  filter: blur(0);
}

/* ── 7. Reply-mode switch ──────────────────────────────────── */
.reply-mode {
  position: absolute;
  right: 20px;
  bottom: 80px;
  top: auto;
  z-index: 60;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(14px);
  will-change: opacity, transform;
  transition: opacity .25s ease, transform .35s cubic-bezier(.22,.8,.22,1), visibility 0s linear .25s;
}
body.chat-active .reply-mode {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0);
  transition-delay: 140ms, 140ms, 0ms;
}

/* ── Mode pill slider ──────────────────────────────────────── */
.mode-pill {
  position: relative;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  width: 168px;
  height: 42px;
  border-radius: 999px;
  background: rgba(255,255,255,.22);
  border: 1px solid rgba(255,255,255,.42);
  -webkit-backdrop-filter: blur(16px);
          backdrop-filter: blur(16px);
  box-shadow: 0 8px 28px rgba(20,35,55,.12), 0 1px 0 rgba(255,255,255,.5) inset;
  cursor: pointer;
  -webkit-user-select: none;
     -moz-user-select: none;
      -ms-user-select: none;
          user-select: none;
  padding: 4px;
  box-sizing: border-box;
  -ms-overflow-style: none;
}
.mode-pill__thumb {
  position: absolute;
  top: 4px;
  left: 4px;
  /* pill=168px, padding=4px each side → track=160px, thumb=80px */
  width: 80px;
  height: 34px;
  border-radius: 999px;
  background: #2f3b49;
  box-shadow: 0 4px 14px rgba(20,35,55,.28);
  -webkit-transition: -webkit-transform .32s cubic-bezier(.34,1.3,.64,1);
          transition: transform .32s cubic-bezier(.34,1.3,.64,1);
  will-change: transform;
  z-index: 0;
  pointer-events: none;
}
.mode-pill.is-voice .mode-pill__thumb {
  /* translateX = thumb width = 80px */
  -webkit-transform: translateX(80px);
          transform: translateX(80px);
}
.mode-pill__opt {
  position: relative;
  z-index: 1;
  -webkit-box-flex: 1;
      -ms-flex: 1;
          flex: 1;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .01em;
  color: rgba(47,59,73,.55);
  -webkit-transition: color .22s ease;
          transition: color .22s ease;
  pointer-events: none;
  white-space: nowrap;
}
.mode-pill .mode-pill__text { color: #fff; }
.mode-pill.is-voice .mode-pill__text  { color: rgba(47,59,73,.55); }
.mode-pill.is-voice .mode-pill__voice { color: #fff; }

.mode-pill:focus-visible {
  outline: 3px solid rgba(142,160,182,.6);
  outline-offset: 3px;
}
.mode-pill:hover { background: rgba(255,255,255,.30); }

/* ── 8. Chat transitions ───────────────────────────────────── */
body.chat-active .bg { filter: saturate(1.02) contrast(1.02) blur(2px); }
body.chat-active .hero-screen { pointer-events: none; }
body.chat-active .hero-screen .content {
  opacity: 0;
  transform: translateY(-20px);
  transition: opacity .45s ease, transform .45s ease;
}
.chat-screen {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 40px;
  background: transparent;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(18px);
  will-change: opacity, transform;
  transition: opacity .55s ease, transform .55s cubic-bezier(.22,.8,.22,1), visibility 0s linear .55s;
}
body.chat-active .chat-screen {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition-delay: 120ms, 120ms, 0ms;
}
body.chat-active .topbar { pointer-events: auto; opacity: 1; }
body.chat-active .brand  { opacity: 1; }

/* ── 9. Chat UI ────────────────────────────────────────────── */
.chat-wrapper {
  width: min(860px, 100%);
  height: min(70vh, 640px);
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  background: rgba(255,255,255,.20);
  border: 1px solid rgba(255,255,255,.22);
  backdrop-filter: blur(26px);
  -webkit-backdrop-filter: blur(26px);
  box-shadow: 0 30px 80px rgba(30,55,85,.16),
              inset 0 1px 0 rgba(255,255,255,.28);
  overflow: hidden;
}
.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,.18);
  flex-shrink: 0;
}
.chat-head-left  { display: flex; align-items: center; gap: 12px; }
.chat-head-right { display: flex; align-items: center; gap: 10px; }
.chat-avatar {
  width: 34px; height: 34px;
  border-radius: 12px;
  background: radial-gradient(circle at 30% 30%,
    rgba(255,255,255,.9), rgba(180,200,230,.35));
  border: 1px solid rgba(255,255,255,.35);
  box-shadow: 0 10px 18px rgba(20,35,55,.10);
  flex-shrink: 0;
}
.chat-brand {
  font-family: Montserrat, Inter, sans-serif;
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
  letter-spacing: .2px;
  opacity: .92;
}
.chat-dots { display: flex; gap: 6px; padding-right: 6px; opacity: .8; }
.chat-dots span {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,.85);
  box-shadow: 0 2px 6px rgba(20,35,55,.10);
}
.chat-back {
  width: 40px; height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid rgba(110,130,155,.35);
  background: rgba(255,255,255,.18);
  color: #516174;
  font-size: 18px;
  cursor: pointer;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.chat-back:hover { filter: brightness(.97); }
.chat-messages {
  flex: 1 1 auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
}
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-thumb {
  background: rgba(142,160,182,.3);
  border-radius: 2px;
}
.message {
  max-width: 80%;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 15px;
  line-height: 1.5;
  white-space: pre-line;
  box-shadow: 0 10px 18px rgba(20,35,55,.06);
}
.message.ai {
  align-self: flex-start;
  background: rgba(255,255,255,.62);
  border: 1px solid rgba(255,255,255,.35);
  color: var(--text);
}
.message.user {
  align-self: flex-end;
  background: var(--cta-bg);
  color: #fff;
}
.typing { padding: 0 18px 10px; flex-shrink: 0; }
.typing span {
  display: inline-block;
  width: 7px; height: 7px;
  margin-right: 5px;
  border-radius: 50%;
  background: rgba(90,110,130,.55);
  animation: dot 1.1s infinite ease-in-out;
}
.typing span:nth-child(2) { animation-delay: .12s; }
.typing span:nth-child(3) { animation-delay: .24s; }
@keyframes dot {
  0%, 80%, 100% { transform: translateY(0);    opacity: .55; }
  40%            { transform: translateY(-5px); opacity: 1;   }
}
.speech-hint {
  padding: 0 16px 10px;
  font-size: 13px;
  color: rgba(47,59,73,.68);
  flex-shrink: 0;
}
.chat-input {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 12px 14px;
  border-top: 1px solid rgba(255,255,255,.20);
  background: rgba(255,255,255,.14);
  flex-shrink: 0;
}
.input-wrap {
  flex: 1;
  display: flex;
  align-items: flex-end;
}
.chat-input textarea {
  width: 100%;
  min-height: 44px;
  max-height: 132px;
  padding: 11px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(255,255,255,.50);
  font-size: 15px;
  line-height: 1.45;
  color: var(--text);
  outline: none;
  font-family: inherit;
  resize: none;
  overflow-y: auto;
}
.chat-input textarea::placeholder { color: rgba(91,107,126,.6); }
.icon-btn {
  width: 44px; height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(255,255,255,.20);
  color: #516174;
  font-size: 0;
  cursor: pointer;
  flex-shrink: 0;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  title: "Прикрепить файл";
}
/* SVG скрепка */
.icon-btn::before {
  content: '';
  display: block;
  width: 20px; height: 20px;
  background: currentColor;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21.44 11.05l-9.19 9.19a6 6 0 01-8.49-8.49l9.19-9.19a4 4 0 015.66 5.66l-9.2 9.19a2 2 0 01-2.83-2.83l8.49-8.48'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21.44 11.05l-9.19 9.19a6 6 0 01-8.49-8.49l9.19-9.19a4 4 0 015.66 5.66l-9.2 9.19a2 2 0 01-2.83-2.83l8.49-8.48'/%3E%3C/svg%3E");
  background-size: cover;
  color: #516174;
  opacity: .75;
}
.icon-btn:hover { filter: brightness(.97); }
.mic-btn {
  width: 44px; height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: none;
  background: rgba(66,132,255,.95);
  box-shadow: 0 10px 22px rgba(45,70,95,.20);
  cursor: pointer;
  flex-shrink: 0;
  transition: box-shadow .2s, background .2s;
}
.mic-btn::before {
  content: "";
  width: 18px; height: 18px;
  display: block;
  background: #fff;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 14a3 3 0 0 0 3-3V5a3 3 0 0 0-6 0v6a3 3 0 0 0 3 3Zm5-3a5 5 0 0 1-10 0H5a7 7 0 0 0 6 6.92V21h2v-3.08A7 7 0 0 0 19 11h-2Z'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 14a3 3 0 0 0 3-3V5a3 3 0 0 0-6 0v6a3 3 0 0 0 3 3Zm5-3a5 5 0 0 1-10 0H5a7 7 0 0 0 6 6.92V21h2v-3.08A7 7 0 0 0 19 11h-2Z'/%3E%3C/svg%3E") center/contain no-repeat;
}
.mic-btn.is-listening {
  background: rgba(30,105,255,.98);
  box-shadow: 0 0 0 6px rgba(66,132,255,.22), 0 14px 26px rgba(45,70,95,.22);
}
.send-btn {
  width: 44px; height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  border: none;
  background: var(--cta-bg);
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 10px 22px rgba(45,70,95,.18);
  transition: filter .2s;
}
.send-btn:hover { filter: brightness(.97); }
.send-btn::before {
  content: "";
  width: 18px; height: 18px;
  display: block;
  background: #fff;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M22 2L11 13' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M22 2L15 22L11 13L2 9L22 2Z' stroke='%23000' stroke-width='2' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M22 2L11 13' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M22 2L15 22L11 13L2 9L22 2Z' stroke='%23000' stroke-width='2' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E") center/contain no-repeat;
}
.chat-suggest, .quick-replies { display: none; }

/* ── 10. Typewriter ────────────────────────────────────────── */
.tw-caret {
  display: inline-block;
  margin-left: 2px;
  opacity: 1;
  animation: twBlink .9s steps(1,end) infinite;
}
@keyframes twBlink { 50% { opacity: 0; } }

/* ── 11. Tablet (≤1200px) ──────────────────────────────────── */
@media (max-width: 1200px) {
  .frame   { padding: 0 28px; }
  .nav     { gap: 28px; font-size: 16px; }
  .content { padding: 100px 0 0 44px; }
  h1       { font-size: 46px; }
  .glass   { inset: 66px 28px; }
  .robot-wrap { right: 60px; }
}

/* ── 12. Mobile (≤768px) ───────────────────────────────────── */
@media (max-width: 768px) {
  .nav    { display: none; }
  .burger { display: flex; }
  .frame  { padding: 0 20px; }
  .glass  { inset: 62px 14px 28px 14px; }
  .content { padding: 72px 24px 0; max-width: 100%; }
  h1      { font-size: 32px; }
  .sub    { font-size: 15px; }
  .hero-stats { gap: 8px; }
  .hero-stat  { font-size: 13px; padding: 6px 12px; }
  .cta        { font-size: 14px; padding: 12px 20px; }
  .robot-wrap {
    right: -30px;
    height: 78vh;
    opacity: .45;
    z-index: 0;
  }
  body.chat-active .robot-wrap {
    transform: translate3d(60px, 0, 0);
    opacity: .2;
  }
  .reply-mode {
    right: 14px;
    top: auto;
    bottom: 0;
    transform: none;
    position: fixed;
    z-index: 70;
  }
  body.chat-active .reply-mode {
    bottom: 74px;
    right: 12px;
  }
  .chat-screen  { padding: 14px; align-items: center; justify-content: center; }
  .chat-wrapper { width: 100%; height: min(80vh, 100%); border-radius: 14px; }
  .message      { max-width: 90%; font-size: 14px; }
  .chat-input   { padding: 10px 12px; gap: 8px; }
}

/* ── 13. Small mobile (≤420px) ─────────────────────────────── */
@media (max-width: 420px) {
  .logo-img   { height: 26px; }
  h1          { font-size: 26px; line-height: 1.25; }
  .sub        { font-size: 14px; }
  .cta        { font-size: 14px; padding: 11px 16px; }
  .robot-wrap { display: none; }
  .glass      { inset: 56px 10px 20px 10px; }
  .content    { padding: 56px 16px 0; }
  .chat-screen { padding: 8px; }
  .chat-input  { gap: 6px; }
  .icon-btn, .mic-btn, .send-btn { width: 40px; height: 40px; }
}


/* ── Микрофон скрыт в текстовом режиме ─────────────────────── */
/* body.voice-mode добавляется JS при переключении в голосовой режим */
.mic-btn { display: none; }
body.voice-mode .mic-btn { display: flex; }

/* ── Мобильное меню (бургер) ───────────────────────────────── */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  background: rgba(220, 228, 238, 0.88);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .28s ease;
}
body.menu-open .mobile-nav {
  opacity: 1;
  pointer-events: auto;
}
.mobile-nav a {
  font-family: Montserrat, Inter, sans-serif;
  font-size: 26px;
  font-weight: 400;
  color: #2f3b49;
  text-decoration: none;
  opacity: .88;
  transition: opacity .2s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  padding: 8px 24px;
}
.mobile-nav a:hover { opacity: .55; }
.mobile-nav__close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(110,130,155,.35);
  background: rgba(255,255,255,.22);
  border-radius: 10px;
  font-size: 22px;
  color: #516174;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
/* ── 14. Accessibility ─────────────────────────────────────── */
/*
  Раньше здесь было полное отключение transition/animation при
  prefers-reduced-motion: reduce. На части систем/браузеров (в т.ч. Windows/Edge)
  эта настройка может быть включена по умолчанию или пользователем,
  из-за чего "пропадали все плавные анимации".

  Чтобы анимации ВСЕГДА работали (как вы просите), блок отключения убран.
  Если захотите вернуть доступность — сделаем мягкий режим (короче, без blur).
*/


/* ── 15. Safe mobile fixes (без изменения дизайна) ──────────── */
html, body {
  max-width: 100%;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; }
input, textarea, select, button { font: inherit; }
@media (max-width: 768px) {
  .mobile-nav {
    padding: calc(24px + env(safe-area-inset-top, 0px)) 20px calc(24px + env(safe-area-inset-bottom, 0px));
  }
  .mobile-nav__close {
    top: calc(18px + env(safe-area-inset-top, 0px));
    right: calc(18px + env(safe-area-inset-right, 0px));
  }
}


/* ── Кнопка переключения темы ──────────────────────────────── */
.theme-toggle {
  height: 38px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid rgba(47,59,73,.25);
  background: rgba(255,255,255,.22);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  cursor: pointer;
  color: #2f3b49;
  font-size: 13px;
  font-weight: 600;
  font-family: Montserrat, Inter, sans-serif;
  letter-spacing: .03em;
  white-space: nowrap;
  transition: background .2s, border-color .2s, color .2s, box-shadow .2s;
  flex-shrink: 0;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 2px 8px rgba(47,59,73,.08);
}
.theme-toggle:hover {
  background: rgba(255,255,255,.35);
  border-color: rgba(47,59,73,.38);
}

/* ═══════════════════════════════════════════════════════════════
   ТЁМНАЯ ТЕМА — тёмно-синяя с фиолетовым свечением
   Вдохновлено: глубокий космос, неон, техно-эстетика
   ═══════════════════════════════════════════════════════════════ */

/* ── Токены ───────────────────────────────────────────────────── */
body.dark-mode {
  --text:         #e8edf8;
  --muted:        #8b9fc4;
  --glass:        rgba(255,255,255,.04);
  --glass-border: rgba(100,130,255,.15);
  --cta-bg:       linear-gradient(135deg, #4060ff 0%, #7040e0 100%);
  --cta-text:     #ffffff;
  --glow-blue:    rgba(60,100,255,.35);
  --glow-purple:  rgba(120,60,255,.25);
  background: #030610;
  color: var(--text);
}

/* ── Фон в тёмной теме — прячем фото, показываем canvas со звёздами ── */
body.dark-mode .bg {
  opacity: 0;  /* canvas заменяет фото */
  transition: opacity .6s ease;
}
body.dark-mode.chat-active #starsCanvas,
body.dark-mode.chat-active #glowLayer {
  filter: blur(2px);
  opacity: .7 !important;
}

/* ── Топбар ──────────────────────────────────────────────────── */
body.dark-mode.scrolled .topbar {
  background: rgba(6,11,24,.75);
  border-color: rgba(100,130,255,.12);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(100,130,255,.10), 0 18px 40px rgba(0,0,0,.50);
}

/* ── Логотип ─────────────────────────────────────────────────── */
body.dark-mode .logo-img {
  filter: brightness(0) invert(1);
  opacity: .95;
}

/* ── Навигация ───────────────────────────────────────────────── */
body.dark-mode .nav { color: rgba(180,195,235,.80); }
body.dark-mode .nav a { color: rgba(180,195,235,.80); }
body.dark-mode .nav a:hover { color: #fff; opacity: 1; }

body.dark-mode .nav-cabinet-btn {
  color: rgba(255,255,255,.92) !important;
  border-color: rgba(100,130,255,.35) !important;
  background: rgba(60,80,200,.18) !important;
}
body.dark-mode .nav-cabinet-btn:hover {
  background: rgba(60,80,200,.32) !important;
  border-color: rgba(100,130,255,.55) !important;
  box-shadow: 0 0 18px rgba(60,100,255,.20) !important;
}
body.dark-mode .nav-cabinet-btn.logged {
  background: linear-gradient(135deg, rgba(60,80,200,.55), rgba(120,60,220,.45)) !important;
  border-color: rgba(100,130,255,.45) !important;
}

/* ── Бургер ──────────────────────────────────────────────────── */
body.dark-mode .burger {
  border-color: rgba(100,130,255,.22);
  background: rgba(60,80,200,.12);
}
body.dark-mode .burger span { background: rgba(180,200,255,.80); }

/* ── Стеклянная панель ───────────────────────────────────────── */

body.dark-mode .glass {
  /* Полностью убираем стекло в тёмной теме — звёзды видны */
  background: transparent !important;
  border-color: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: none !important;
  overflow: visible !important; /* чтобы граф выходил за края */
}
body.dark-mode .glass::before { background: none !important; }
body.dark-mode .glass::after  { background: none !important; }

/* ── Hero текст ──────────────────────────────────────────────── */
body.dark-mode h1 {
  color: #ffffff;
  opacity: 1;
  text-shadow: 0 0 60px rgba(80,120,255,.25);
}
body.dark-mode .sub { color: rgba(180,195,235,.75); }
body.dark-mode .cta {
  background: linear-gradient(135deg, #3555ff 0%, #6b35d9 100%);
  box-shadow: 0 8px 32px rgba(60,100,255,.40), 0 0 0 1px rgba(100,140,255,.25);
  color: #fff;
  transition: box-shadow .25s, filter .2s;
}
body.dark-mode .cta:hover {
  filter: brightness(1.1);
  box-shadow: 0 12px 40px rgba(60,100,255,.55), 0 0 0 1px rgba(130,160,255,.35);
}

/* ── Переключатель режима ────────────────────────────────────── */
body.dark-mode .mode-pill {
  background: rgba(10,18,45,.60);
  border-color: rgba(100,130,255,.20);
  box-shadow: 0 4px 20px rgba(0,0,0,.30);
}
body.dark-mode .mode-pill:hover {
  background: rgba(20,30,70,.70);
  border-color: rgba(100,130,255,.35);
}
body.dark-mode .mode-pill__thumb {
  background: linear-gradient(135deg, #3555ff 0%, #6b35d9 100%);
  box-shadow: 0 2px 12px rgba(60,100,255,.40);
}
body.dark-mode .mode-pill__opt { color: rgba(180,195,235,.45); }
body.dark-mode .mode-pill .mode-pill__text { color: #fff; }
body.dark-mode .mode-pill.is-voice .mode-pill__text  { color: rgba(180,195,235,.45); }
body.dark-mode .mode-pill.is-voice .mode-pill__voice { color: #fff; }

/* ── Чат ─────────────────────────────────────────────────────── */
body.dark-mode .chat-wrapper {
  background: rgba(8,14,38,.70);
  border-color: rgba(100,130,255,.14);
  box-shadow:
    0 30px 80px rgba(0,0,0,.60),
    0 0 60px rgba(60,80,200,.10),
    inset 0 1px 0 rgba(100,130,255,.12);
}
body.dark-mode .chat-header {
  border-color: rgba(100,130,255,.10);
  background: rgba(255,255,255,.02);
}
body.dark-mode .chat-brand { color: #fff; }
body.dark-mode .chat-back {
  border-color: rgba(100,130,255,.20);
  background: rgba(60,80,200,.12);
  color: rgba(180,200,255,.80);
}
body.dark-mode .chat-back:hover {
  background: rgba(60,80,200,.25);
  border-color: rgba(100,130,255,.40);
}
body.dark-mode .chat-dots span {
  background: rgba(100,130,255,.50);
}

/* ── Сообщения ───────────────────────────────────────────────── */
body.dark-mode .message.ai {
  background: rgba(15,25,65,.65);
  border-color: rgba(100,130,255,.14);
  color: var(--text);
}
body.dark-mode .message.user {
  background: linear-gradient(135deg, rgba(40,65,200,.80), rgba(90,40,180,.70));
  border: 1px solid rgba(100,140,255,.20);
  box-shadow: 0 4px 20px rgba(40,60,200,.25);
  color: #fff;
}

/* ── Тайпинг ─────────────────────────────────────────────────── */
body.dark-mode .typing span {
  background: rgba(100,130,255,.55);
}

/* ── Поле ввода ──────────────────────────────────────────────── */
body.dark-mode .chat-input {
  border-color: rgba(100,130,255,.10);
  background: rgba(8,14,38,.50);
}
body.dark-mode .chat-input textarea {
  background: rgba(15,25,65,.55);
  border-color: rgba(100,130,255,.18);
  color: var(--text);
}
body.dark-mode .chat-input textarea:focus {
  border-color: rgba(100,130,255,.45);
  box-shadow: 0 0 0 3px rgba(60,100,255,.10);
}
body.dark-mode .chat-input textarea::placeholder {
  color: rgba(140,160,210,.45);
}
body.dark-mode .icon-btn {
  border-color: rgba(100,130,255,.18);
  background: rgba(40,60,180,.15);
  color: rgba(150,175,255,.80);
}
body.dark-mode .icon-btn:hover {
  background: rgba(40,60,180,.28);
  border-color: rgba(100,130,255,.35);
}
body.dark-mode .send-btn {
  background: linear-gradient(135deg, #3555ff 0%, #6b35d9 100%);
  box-shadow: 0 4px 20px rgba(60,100,255,.35);
}
body.dark-mode .send-btn:hover {
  filter: brightness(1.12);
  box-shadow: 0 6px 28px rgba(60,100,255,.50);
}
body.dark-mode .speech-hint { color: rgba(140,160,210,.60); }

/* ── Mic button ──────────────────────────────────────────────── */
body.dark-mode .mic-btn {
  background: linear-gradient(135deg, #3555ff 0%, #6b35d9 100%);
  box-shadow: 0 6px 24px rgba(60,100,255,.40);
}
body.dark-mode .mic-btn.is-listening {
  background: linear-gradient(135deg, #2040ee 0%, #5525c8 100%);
  box-shadow: 0 0 0 6px rgba(60,100,255,.20), 0 8px 28px rgba(60,100,255,.45);
}

/* ── Мобильное меню ──────────────────────────────────────────── */
body.dark-mode .mobile-nav {
  background: rgba(6,11,24,.94);
}
body.dark-mode .mobile-nav a { color: rgba(200,215,255,.90); }
body.dark-mode .mobile-nav a:hover { color: #fff; opacity: 1; }
body.dark-mode .mobile-nav__close {
  border-color: rgba(100,130,255,.20);
  background: rgba(40,60,180,.15);
  color: rgba(150,175,255,.80);
}

/* ── Кнопка темы ─────────────────────────────────────────────── */
body.dark-mode .theme-toggle {
  border-color: rgba(100,130,255,.25);
  background: rgba(40,60,180,.15);
  color: rgba(180,200,255,.85);
}
body.dark-mode .theme-toggle:hover {
  background: rgba(40,60,180,.28);
  border-color: rgba(100,130,255,.45);
  box-shadow: 0 0 16px rgba(60,100,255,.20);
}

/* ── About / О компании ──────────────────────────────────────── */
body.dark-mode .about-glass,
body.dark-mode .about-section {
  background: transparent !important;
  border-color: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: none !important;
  color: var(--text);
}
body.dark-mode .about-hero,
body.dark-mode .about-main { color: #fff; }
body.dark-mode .about-section h2 { color: #ffffff !important; }
body.dark-mode .about-section p  { color: rgba(180,195,235,.75) !important; }
body.dark-mode .lead { color: rgba(180,195,235,.75); }
body.dark-mode .overline { color: rgba(100,130,255,.80); letter-spacing: .06em; }
body.dark-mode .stat-item .num {
  color: #fff;
  text-shadow: 0 0 30px rgba(80,120,255,.40);
}
body.dark-mode .stat-item .lbl { color: rgba(140,160,210,.70); }
body.dark-mode .about-cta {
  background: linear-gradient(135deg, #3555ff 0%, #6b35d9 100%);
  box-shadow: 0 8px 32px rgba(60,100,255,.35);
  color: #fff;
}
body.dark-mode .role { color: rgba(100,130,255,.80); }

/* ── Value cards (принципы) ──────────────────────────────────── */
body.dark-mode .value-card {
  background: transparent !important;
  border-color: rgba(100,130,255,.15) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: none !important;
  transition: border-color .2s, box-shadow .2s;
}
body.dark-mode .value-card:hover {
  border-color: rgba(100,130,255,.35) !important;
  box-shadow: 0 0 30px rgba(60,100,255,.10) !important;
}
body.dark-mode .value-card h3 { color: #ffffff !important; }
body.dark-mode .value-card p  { color: rgba(180,195,235,.70) !important; }

/* ── Team cards ──────────────────────────────────────────────── */
body.dark-mode .team-card {
  background: transparent !important;
  border-color: rgba(100,130,255,.15) !important;
  box-shadow: none !important;
}
body.dark-mode .team-card:hover {
  border-color: rgba(100,130,255,.30) !important;
}
body.dark-mode .team-card h3   { color: #ffffff !important; }
body.dark-mode .team-card .role { color: rgba(100,130,255,.80) !important; }
body.dark-mode .team-avatar {
  border-color: rgba(100,130,255,.25);
  box-shadow: 0 0 20px rgba(60,100,255,.15);
}

/* ── Кейсы ───────────────────────────────────────────────────── */
body.dark-mode .cases-glass { color: var(--text); }
body.dark-mode .cases-header h1,
body.dark-mode .cases-header h2 { color: #fff; }
body.dark-mode .case-card {
  background: rgba(10,18,50,.55) !important;
  border-color: rgba(100,130,255,.12) !important;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
body.dark-mode .case-card:hover {
  background: rgba(15,28,75,.65) !important;
  border-color: rgba(100,130,255,.30) !important;
  box-shadow: 0 8px 40px rgba(60,100,255,.15) !important;
}
body.dark-mode .case-title { color: #fff; }
body.dark-mode .case-desc  { color: rgba(180,195,235,.65); }
body.dark-mode .case-industry { color: rgba(100,130,255,.80); }
body.dark-mode .case-metric { color: #fff; text-shadow: 0 0 20px rgba(80,120,255,.30); }
body.dark-mode .cases-filters button {
  background: rgba(10,18,50,.55);
  border-color: rgba(100,130,255,.15);
  color: rgba(160,180,230,.75);
}
body.dark-mode .cases-filters button.active,
body.dark-mode .cases-filters button:hover {
  background: rgba(40,65,200,.35);
  border-color: rgba(100,130,255,.45);
  color: #fff;
  box-shadow: 0 0 20px rgba(60,100,255,.15);
}
body.dark-mode .case-detail,
body.dark-mode .case-detail-inner {
  background: rgba(8,14,38,.88);
  border-color: rgba(100,130,255,.12);
}
body.dark-mode .detail-body h2,
body.dark-mode .detail-body h3 { color: #fff; }
body.dark-mode .detail-body p,
body.dark-mode .detail-body li  { color: rgba(180,195,235,.75); }
body.dark-mode .detail-cta {
  background: linear-gradient(135deg, #3555ff 0%, #6b35d9 100%);
  box-shadow: 0 6px 28px rgba(60,100,255,.35);
  color: #fff;
}
body.dark-mode .detail-back { color: rgba(140,170,255,.75); }

/* ── Контакты ────────────────────────────────────────────────── */
body.dark-mode .contacts-glass {
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: none !important;
  border-color: rgba(100,130,255,.10) !important;
}
body.dark-mode .contacts-grid { color: var(--text); }
body.dark-mode .contacts-main h1,
body.dark-mode .contacts-main h2 { color: #fff; }
body.dark-mode .contacts-form-block h2 { color: #fff !important; }
body.dark-mode .contacts-form-block {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}
body.dark-mode .contact-item { color: rgba(180,195,235,.85); }
body.dark-mode .contact-detail { color: rgba(180,195,235,.65); }
body.dark-mode .contact-icon {
  background: rgba(40,60,180,.18);
  border-color: rgba(100,130,255,.20);
  color: rgba(150,175,255,.85);
}
body.dark-mode .form-field label { color: rgba(120,150,220,.65) !important; }
body.dark-mode .form-field input,
body.dark-mode .form-field textarea,
body.dark-mode .form-field select {
  background: rgba(15,25,65,.55) !important;
  border-color: rgba(100,130,255,.20) !important;
  color: #fff !important;
}
body.dark-mode .form-field input:focus,
body.dark-mode .form-field textarea:focus,
body.dark-mode .form-field select:focus {
  border-color: rgba(100,130,255,.50) !important;
  box-shadow: 0 0 0 3px rgba(60,100,255,.12) !important;
}
body.dark-mode .form-field input::placeholder,
body.dark-mode .form-field textarea::placeholder {
  color: rgba(100,130,200,.40) !important;
}
body.dark-mode .form-submit {
  background: linear-gradient(135deg, #3555ff 0%, #6b35d9 100%) !important;
  box-shadow: 0 6px 28px rgba(60,100,255,.35) !important;
  color: #fff !important;
}
body.dark-mode .hours-chip {
  background: rgba(40,60,180,.18);
  border-color: rgba(100,130,255,.18);
  color: rgba(160,185,255,.80);
}
body.dark-mode .contact-link,
body.dark-mode .social-link {
  background: rgba(40,60,180,.15);
  border-color: rgba(100,130,255,.20);
  color: rgba(160,185,255,.85);
}
body.dark-mode .contact-link:hover,
body.dark-mode .social-link:hover {
  background: rgba(40,60,180,.28);
  border-color: rgba(100,130,255,.40);
  box-shadow: 0 0 16px rgba(60,100,255,.20);
}

/* ── Auth ────────────────────────────────────────────────────── */
body.dark-mode .auth-card {
  background: rgba(8,14,38,.82) !important;
  border-color: rgba(100,130,255,.14) !important;
  box-shadow: 0 20px 60px rgba(0,0,0,.50), 0 0 40px rgba(60,100,255,.08) !important;
}
body.dark-mode .auth-card h1,
body.dark-mode .auth-card h2,
body.dark-mode .auth-card label { color: rgba(200,215,255,.90) !important; }
body.dark-mode .auth-card input {
  background: rgba(15,25,65,.55) !important;
  border-color: rgba(100,130,255,.20) !important;
  color: #fff !important;
}
body.dark-mode .auth-card input::placeholder {
  color: rgba(100,130,200,.40) !important;
}
body.dark-mode .auth-card button[type=submit] {
  background: linear-gradient(135deg, #3555ff 0%, #6b35d9 100%) !important;
  box-shadow: 0 6px 24px rgba(60,100,255,.35) !important;
  color: #fff !important;
}
body.dark-mode .auth-brand img { filter: brightness(0) invert(1); }

/* ── FAB (кнопка чата/демо) ──────────────────────────────────── */
body.dark-mode .fab-chat {
  background: rgba(8,14,38,.80);
  border-color: rgba(100,130,255,.20);
  box-shadow: 0 8px 32px rgba(0,0,0,.50), 0 0 20px rgba(60,100,255,.15);
}
body.dark-mode .fab-label { color: rgba(180,200,255,.85); }

/* ── Карточка робота в команде ───────────────────────────────── */
body.dark-mode .team-card--robot .team-avatar--robot {
  background: radial-gradient(circle at 50% 60%,
    rgba(60,100,255,.20) 0%, rgba(10,18,50,.25) 100%);
  border-color: rgba(100,130,255,.30);
  box-shadow: 0 0 30px rgba(60,100,255,.15);
}
body.dark-mode .team-card--robot h3 {
  background: linear-gradient(135deg, #6080ff, #a06aff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Hero stats & CTA — тёмная тема ─────────────────────────── */
body.dark-mode .hero-stat {
  color: rgba(200,215,255,.85);
  background: rgba(15,25,65,.55);
  border-color: rgba(100,130,255,.20);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
body.dark-mode .hero-stat b { color: #fff; }


/* ═══════════════════════════════════════════════════════════════
   ДЕКОРАТИВНОЕ ОКНО ЧАТА — точь-в-точь референс
   ═══════════════════════════════════════════════════════════════ */

.chat-mockup {
  position: absolute;
  right: 10px;
  top: 50%;
  /* Наклон как в референсе */
  transform: translateY(-50%) perspective(1100px) rotateY(-18deg) rotateX(6deg) scale(.96);
  width:  clamp(300px, 34vw, 490px);
  height: clamp(300px, 54vh, 610px);
  z-index: 11;
  border-radius: 18px;

  background: linear-gradient(170deg,
    rgba(10,14,52,.88)  0%,
    rgba(8,10,42,.93)  55%,
    rgba(6,8,32,.97) 100%);

  /* ВАЖНО: overflow visible — линия выходит за края */
  overflow: visible;

  opacity: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  transition: opacity .8s ease .25s, transform .8s cubic-bezier(.22,.61,.36,1) .25s;
  will-change: opacity, transform;

  box-shadow:
    0 60px 140px rgba(0,0,0,.88),
    0  0   80px rgba(110,55,255,.28),
    0  0  180px rgba(80,35,200,.15);
}

body.dark-mode .chat-mockup {
  opacity: 1;
  transform: translateY(-50%) perspective(1100px) rotateY(-18deg) rotateX(6deg) scale(1);
}
body.chat-active .chat-mockup {
  opacity: 0 !important;
  transform: translateY(-50%) perspective(1100px) rotateY(-18deg) rotateX(6deg) translateX(90px) scale(.93) !important;
  transition: opacity .3s ease, transform .45s ease !important;
}

/* Топбар */
.cm-topbar {
  display: flex;
  align-items: center;
  padding: 12px 16px 9px;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(140,110,255,.12);
  border-radius: 18px 18px 0 0;
  background: rgba(10,14,52,.88);
  position: relative;
  z-index: 2;
  overflow: hidden;
}
.cm-dots { display: flex; gap: 7px; flex-shrink: 0; }
.cm-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: rgba(180,160,255,.45);
  flex-shrink: 0;
}
.cm-topbar-bars {
  display: flex; flex-direction: column;
  gap: 5px; flex: 1; margin-left: 12px;
}
.cm-tbar {
  height: 6px; border-radius: 3px;
  background: rgba(130,105,255,.18);
}
.cm-tbar--long  { width: 100%; }
.cm-tbar--short { width: 35%; }

/* Тело — граф + сообщения */
.cm-body {
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: hidden; /* окно — просто рамка, SVG снаружи */
}

/* Сообщения поверх графика */
.cm-overlay-msgs {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 14px 10px;
  pointer-events: none;
  z-index: 3;
}
.cm-msg {
  max-width: 78%;
  padding: 9px 13px;
  border-radius: 14px;
  font-size: clamp(10px, .88vw, 12px);
  font-family: Inter, system-ui, sans-serif;
  line-height: 1.45;
  color: #e8eeff;
  word-break: break-word;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.cm-msg--user {
  align-self: flex-end;
  background: rgba(30,22,100,.78);
  border: 1px solid rgba(150,120,255,.32);
  border-bottom-right-radius: 3px;
  box-shadow: 0 4px 18px rgba(40,20,160,.35);
}
.cm-msg--bot {
  align-self: flex-start;
  background: rgba(22,22,72,.80);
  border: 1px solid rgba(210,200,255,.20);
  border-bottom-left-radius: 3px;
  box-shadow: 0 4px 16px rgba(0,0,40,.35);
}

/* Поле ввода */
.cm-input-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 14px 13px;
  flex-shrink: 0;
  border-top: 1px solid rgba(130,100,255,.10);
  border-radius: 0 0 18px 18px;
  background: rgba(10,14,52,.88);
  position: relative;
  z-index: 2;
  overflow: hidden;
}
.cm-input-thumb {
  width: 22px; height: 22px;
  border-radius: 6px;
  background: rgba(130,100,255,.22);
  border: 1px solid rgba(140,110,255,.20);
  flex-shrink: 0;
}
.cm-input-line {
  flex: 1; height: 8px;
  border-radius: 4px;
  background: rgba(130,100,255,.15);
}
.cm-mic-btn {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4455ff 0%, #8833ee 100%);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow:
    0 0  10px rgba(100,70,255,.70),
    0 0  24px rgba(90,50,220,.45),
    0 0  50px rgba(80,40,200,.25);
}

/* НЕОНОВАЯ РАМКА */
.cm-neon {
  position: absolute;
  inset: -1px;
  border-radius: 19px;
  pointer-events: none;
  z-index: 10;
  box-shadow:
    inset 0 0 0 1px rgba(195,155,255,.48),
    0 0 16px  3px rgba(155,90,255,.55),
    0 0 48px 10px rgba(120,60,255,.32),
    0 0 120px 28px rgba(90,40,200,.18);
}
/* Верхняя неоновая черта */
.cm-neon::before {
  content: '';
  position: absolute;
  top: 0; left: 5%; right: 5%; height: 2.5px;
  border-radius: 999px;
  background: linear-gradient(90deg,
    transparent 0%, rgba(195,155,255,.65) 8%,
    rgba(245,215,255,1) 40%, rgba(255,240,255,1) 50%,
    rgba(245,215,255,1) 60%, rgba(195,155,255,.65) 92%,
    transparent 100%);
  box-shadow:
    0 0  6px  3px rgba(255,235,255,1.0),
    0 0 18px  6px rgba(220,170,255,.90),
    0 0 45px 14px rgba(170,100,255,.65),
    0 0 90px 28px rgba(130,60,255,.38);
}
/* Правая неоновая черта */
.cm-neon::after {
  content: '';
  position: absolute;
  right: 0; top: 5%; bottom: 5%; width: 2.5px;
  border-radius: 999px;
  background: linear-gradient(180deg,
    transparent 0%, rgba(195,155,255,.65) 8%,
    rgba(245,215,255,1) 40%, rgba(255,240,255,1) 50%,
    rgba(245,215,255,1) 60%, rgba(195,155,255,.65) 92%,
    transparent 100%);
  box-shadow:
    0 0  6px  3px rgba(255,235,255,1.0),
    0 0 18px  6px rgba(220,170,255,.90),
    0 0 45px 14px rgba(170,100,255,.65),
    0 0 90px 28px rgba(130,60,255,.38);
}

/* ОТРАЖЕНИЕ снизу — розово-фиолетовое пятно */
.cm-reflection-glow {
  position: absolute;
  bottom: -80px;
  left: -10%; right: -10%;
  height: 130px;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 70% 100% at 55% 0%,
      rgba(190,100,255,.75) 0%,
      rgba(150,70,230,.45) 35%,
      rgba(120,50,200,.20) 60%,
      transparent 80%),
    radial-gradient(ellipse 35% 60% at 80% 0%,
      rgba(220,110,255,.50) 0%,
      transparent 65%);
  filter: blur(14px);
  border-radius: 50%;
}

/* Скрываем на узких экранах */
@media (max-width: 1024px) { .chat-mockup { display: none; } }
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: #fff;
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  transition: background .45s ease, color .35s ease;
}

/* Плавная смена темы — переходы для всех ключевых элементов */
.glass, .chat-wrapper, .chat-header, .chat-input,
.chat-input textarea, .message.ai, .message.user,
.mode-pill, .mode-pill__thumb, .icon-btn, .send-btn,
.topbar, .mobile-nav, .theme-toggle, .nav-cabinet-btn,
.value-card, .team-card, .case-card, .contact-icon,
.form-field input, .form-field textarea, .form-field select,
.hero-stat, .cta, .auth-card {
  transition:
    background .45s ease,
    background-color .45s ease,
    border-color .40s ease,
    color .35s ease,
    box-shadow .40s ease !important;
}
/* chat-mockup НЕ входит в общий список — у него своя transition */
/* Фон страницы */
.bg { transition: filter .55s ease; }

/* ── 2. Layout ─────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  perspective: 1200px;
}

/* Отражение от пола в тёмной теме */
body.dark-mode .hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 40%;
  right: -5%;
  height: 35%;
  pointer-events: none;
  z-index: 4;
  background: radial-gradient(ellipse 70% 100% at 65% 100%,
    rgba(140,70,255,.28) 0%,
    rgba(110,50,230,.12) 40%,
    transparent 70%);
  filter: blur(12px);
  transform: scaleY(-1) translateY(0);
  mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,.6) 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,.6) 100%);
}
.bg {
  position: absolute;
  inset: -7%;
  background: url("assets/bg.webp") center/cover no-repeat;
  transform: translate3d(0,0,0) scale(1.10);
  will-change: transform;
  filter: saturate(1.02) contrast(1.02);
  transition: opacity .6s ease, filter .55s ease;
}
.frame {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: 0 56px;
}

/* ── 3. Topbar & Nav ───────────────────────────────────────── */
.topbar {
  position: relative;
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 36px;
  padding: 20px 0;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 12px;
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  transition: background .25s ease, border-color .25s ease,
              backdrop-filter .25s ease, box-shadow .25s ease;
}
body.scrolled .topbar {
  background: rgba(255,255,255,.28);
  border-color: rgba(255,255,255,.22);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 18px 40px rgba(20,35,55,.10);
}
.brand {
  display: flex;
  align-items: center;
  margin-right: auto;
  padding: 4px 0;
  text-decoration: none;
  user-select: none;
  transition: opacity .2s;
}
.brand:hover { opacity: .72; }
.logo-img {
  height: 34px;
  width: auto;
  display: block;
  opacity: .90;
  filter: brightness(0) saturate(100%) invert(24%) sepia(10%)
          saturate(450%) hue-rotate(175deg) brightness(92%) contrast(88%);
}
.nav {
  display: flex;
  align-items: center;
  gap: 48px;
  font-family: Montserrat, Inter, sans-serif;
  font-weight: 400;
  font-size: 17px;
  color: var(--muted);
}
.nav a { color: inherit; text-decoration: none; transition: opacity .2s; }
.nav a:hover { opacity: .7; }
.burger {
  display: none;
  width: 48px; height: 48px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(110,130,155,.35);
  background: rgba(255,255,255,.18);
  border-radius: 10px;
  cursor: pointer;
  opacity: .85;
  position: relative;
  z-index: 200;
  /* Убираем backdrop-filter с самой кнопки — на iOS он ломает touch events.
     Размываем через ::before псевдоэлемент */
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
}
.burger::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 10px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: -1;
}
.burger span {
  display: block;
  width: 20px; height: 2px;
  background: #6a7a8d;
  border-radius: 2px;
}

/* ── 4. Glass panel ────────────────────────────────────────── */
.glass {
  position: absolute;
  inset: 78px;
  z-index: 10;
  background: var(--glass);
  backdrop-filter: var(--blur-panel);
  -webkit-backdrop-filter: var(--blur-panel);
  border-radius: var(--radius-panel);
  border: 1px solid var(--glass-border);
  box-shadow: 0 30px 70px rgba(30,55,85,.10),
              inset 0 1px 0 rgba(255,255,255,.28);
  overflow: hidden;
}
.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(1200px 600px at 18% 20%,
    rgba(255,255,255,.25), transparent 58%);
  pointer-events: none;
}
.glass::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(255,255,255,.08), transparent 55%);
  pointer-events: none;
}

/* ── 5. Hero content ───────────────────────────────────────── */
.hero-screen {
  position: relative;
  z-index: 2;
}
.content {
  position: relative;
  z-index: 2;
  padding: 140px 0 0 78px;
  max-width: 820px;
}
h1 {
  margin: 0 0 20px;
  font-family: Montserrat, Inter, sans-serif;
  font-weight: 700;
  font-size: 52px;
  line-height: 1.18;
  letter-spacing: -.3px;
  color: var(--text);
  opacity: .95;
}
.sub {
  margin: 0 0 28px;
  font-size: 18px;
  line-height: 1.7;
  color: #5a6a7d;
}
.hero-stats {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 32px;
}
.hero-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-family: Montserrat, Inter, sans-serif;
  font-weight: 500;
  color: #2f3b49;
  background: rgba(255,255,255,.22);
  border: 1px solid rgba(255,255,255,.40);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  white-space: nowrap;
}
.hero-stat b { font-weight: 700; }

.cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 26px;
  border-radius: 6px;
  font-family: Montserrat, Inter, sans-serif;
  font-weight: 500;
  font-size: 16px;
  color: var(--cta-text);
  background: var(--cta-bg);
  box-shadow: 0 10px 22px rgba(45,70,95,.18);
  text-decoration: none;
  transition: filter .2s;
}
.cta:hover { filter: brightness(.97); }
.arrow { font-size: 18px; opacity: .95; }

/* ── 6. Robot ──────────────────────────────────────────────── */

.robot-wrap {
  position: absolute;

  /* ← СДВИНУЛ ЛЕВЕЕ (было right:12px) */
  right: 120px;

  bottom: -70px;
  height: 92vh;
  max-height: 1080px;
  width: auto;

  z-index: 12;

  display: grid;
  grid-template-rows: 1fr;
  grid-template-columns: 1fr;

  user-select: none;
  pointer-events: none;

  opacity: 1;              /* ГАРАНТИРОВАННО ВИДИМ */
  visibility: visible;

  transform: translate3d(0,0,0);
  will-change: transform;

  transition: transform 1100ms cubic-bezier(.22,.61,.36,1);
}

/* Смещение вправо при открытии чата */
body.chat-active .robot-wrap {
  transform: translate3d(100px,0,0) rotate(1.5deg);
}

/* Оба изображения накладываются */
.robot-img {
  grid-row: 1;
  grid-column: 1;

  height: 100%;
  width: auto;

  align-self: end;
  justify-self: end;

  transform-origin: 50% 80%;

  filter: drop-shadow(0 22px 40px rgba(0,0,0,.10))
          drop-shadow(0 8px 18px rgba(60,100,140,.08));

  transition:
    opacity 900ms cubic-bezier(.22,.61,.36,1),
    transform 900ms cubic-bezier(.22,.61,.36,1),
    filter 600ms ease;
}

/* БОКОВОЙ ВИД (стартовый) */
.robot-side {
  opacity: 1;
  transform: translateX(0) scale(1);
  filter: blur(0);
}

/* ФРОНТАЛЬНЫЙ ВИД */
.robot-front {
  opacity: 0;
  transform: translateX(40px) scale(.98);
  filter: blur(4px);
}

/* Поворот на фронт */
body.robot-facing .robot-side {
  opacity: 0;
  transform: translateX(-20px) scale(.98);
  filter: blur(4px);
}

body.robot-facing .robot-front {
  opacity: 1;
  transform: translateX(0) scale(1);
  filter: blur(0);
}

/* ── 7. Reply-mode switch ──────────────────────────────────── */
.reply-mode {
  position: absolute;
  right: 60px;
  top: 55%;
  z-index: 60;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-50%) translateX(14px);
  will-change: opacity, transform;
  transition: opacity .25s ease, transform .35s cubic-bezier(.22,.8,.22,1), visibility 0s linear .25s;
}
body.chat-active .reply-mode {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(-50%) translateX(0);
  transition-delay: 140ms, 140ms, 0ms;
}

/* ── Mode pill slider ──────────────────────────────────────── */
.mode-pill {
  position: relative;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  width: 168px;
  height: 42px;
  border-radius: 999px;
  background: rgba(255,255,255,.22);
  border: 1px solid rgba(255,255,255,.42);
  -webkit-backdrop-filter: blur(16px);
          backdrop-filter: blur(16px);
  box-shadow: 0 8px 28px rgba(20,35,55,.12), 0 1px 0 rgba(255,255,255,.5) inset;
  cursor: pointer;
  -webkit-user-select: none;
     -moz-user-select: none;
      -ms-user-select: none;
          user-select: none;
  padding: 4px;
  box-sizing: border-box;
  -ms-overflow-style: none;
}
.mode-pill__thumb {
  position: absolute;
  top: 4px;
  left: 4px;
  /* pill=168px, padding=4px each side → track=160px, thumb=80px */
  width: 80px;
  height: 34px;
  border-radius: 999px;
  background: #2f3b49;
  box-shadow: 0 4px 14px rgba(20,35,55,.28);
  -webkit-transition: -webkit-transform .32s cubic-bezier(.34,1.3,.64,1);
          transition: transform .32s cubic-bezier(.34,1.3,.64,1);
  will-change: transform;
  z-index: 0;
  pointer-events: none;
}
.mode-pill.is-voice .mode-pill__thumb {
  /* translateX = thumb width = 80px */
  -webkit-transform: translateX(80px);
          transform: translateX(80px);
}
.mode-pill__opt {
  position: relative;
  z-index: 1;
  -webkit-box-flex: 1;
      -ms-flex: 1;
          flex: 1;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .01em;
  color: rgba(47,59,73,.55);
  -webkit-transition: color .22s ease;
          transition: color .22s ease;
  pointer-events: none;
  white-space: nowrap;
}
.mode-pill .mode-pill__text { color: #fff; }
.mode-pill.is-voice .mode-pill__text  { color: rgba(47,59,73,.55); }
.mode-pill.is-voice .mode-pill__voice { color: #fff; }

.mode-pill:focus-visible {
  outline: 3px solid rgba(142,160,182,.6);
  outline-offset: 3px;
}
.mode-pill:hover { background: rgba(255,255,255,.30); }

/* ── 8. Chat transitions ───────────────────────────────────── */
body.chat-active .bg { filter: saturate(1.02) contrast(1.02) blur(2px); }
body.chat-active .hero-screen { pointer-events: none; }
body.chat-active .hero-screen .content {
  opacity: 0;
  transform: translateY(-20px);
  transition: opacity .45s ease, transform .45s ease;
}
.chat-screen {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 40px;
  background: transparent;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(18px);
  will-change: opacity, transform;
  transition: opacity .55s ease, transform .55s cubic-bezier(.22,.8,.22,1), visibility 0s linear .55s;
}
body.chat-active .chat-screen {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition-delay: 120ms, 120ms, 0ms;
}
body.chat-active .topbar { pointer-events: auto; opacity: 1; }
body.chat-active .brand  { opacity: 1; }

/* ── 9. Chat UI ────────────────────────────────────────────── */
.chat-wrapper {
  width: min(860px, 100%);
  height: min(70vh, 640px);
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  background: rgba(255,255,255,.20);
  border: 1px solid rgba(255,255,255,.22);
  backdrop-filter: blur(26px);
  -webkit-backdrop-filter: blur(26px);
  box-shadow: 0 30px 80px rgba(30,55,85,.16),
              inset 0 1px 0 rgba(255,255,255,.28);
  overflow: hidden;
}
.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,.18);
  flex-shrink: 0;
}
.chat-head-left  { display: flex; align-items: center; gap: 12px; }
.chat-head-right { display: flex; align-items: center; gap: 10px; }
.chat-avatar {
  width: 34px; height: 34px;
  border-radius: 12px;
  background: radial-gradient(circle at 30% 30%,
    rgba(255,255,255,.9), rgba(180,200,230,.35));
  border: 1px solid rgba(255,255,255,.35);
  box-shadow: 0 10px 18px rgba(20,35,55,.10);
  flex-shrink: 0;
}
.chat-brand {
  font-family: Montserrat, Inter, sans-serif;
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
  letter-spacing: .2px;
  opacity: .92;
}
.chat-dots { display: flex; gap: 6px; padding-right: 6px; opacity: .8; }
.chat-dots span {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,.85);
  box-shadow: 0 2px 6px rgba(20,35,55,.10);
}
.chat-back {
  width: 40px; height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid rgba(110,130,155,.35);
  background: rgba(255,255,255,.18);
  color: #516174;
  font-size: 18px;
  cursor: pointer;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.chat-back:hover { filter: brightness(.97); }
.chat-messages {
  flex: 1 1 auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
}
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-thumb {
  background: rgba(142,160,182,.3);
  border-radius: 2px;
}
.message {
  max-width: 80%;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 15px;
  line-height: 1.5;
  white-space: pre-line;
  box-shadow: 0 10px 18px rgba(20,35,55,.06);
}
.message.ai {
  align-self: flex-start;
  background: rgba(255,255,255,.62);
  border: 1px solid rgba(255,255,255,.35);
  color: var(--text);
}
.message.user {
  align-self: flex-end;
  background: var(--cta-bg);
  color: #fff;
}
.typing { padding: 0 18px 10px; flex-shrink: 0; }
.typing span {
  display: inline-block;
  width: 7px; height: 7px;
  margin-right: 5px;
  border-radius: 50%;
  background: rgba(90,110,130,.55);
  animation: dot 1.1s infinite ease-in-out;
}
.typing span:nth-child(2) { animation-delay: .12s; }
.typing span:nth-child(3) { animation-delay: .24s; }
@keyframes dot {
  0%, 80%, 100% { transform: translateY(0);    opacity: .55; }
  40%            { transform: translateY(-5px); opacity: 1;   }
}
.speech-hint {
  padding: 0 16px 10px;
  font-size: 13px;
  color: rgba(47,59,73,.68);
  flex-shrink: 0;
}
.chat-input {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 12px 14px;
  border-top: 1px solid rgba(255,255,255,.20);
  background: rgba(255,255,255,.14);
  flex-shrink: 0;
}
.input-wrap {
  flex: 1;
  display: flex;
  align-items: flex-end;
}
.chat-input textarea {
  width: 100%;
  min-height: 44px;
  max-height: 132px;
  padding: 11px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(255,255,255,.50);
  font-size: 15px;
  line-height: 1.45;
  color: var(--text);
  outline: none;
  font-family: inherit;
  resize: none;
  overflow-y: auto;
}
.chat-input textarea::placeholder { color: rgba(91,107,126,.6); }
.icon-btn {
  width: 44px; height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(255,255,255,.20);
  color: #516174;
  font-size: 18px;
  cursor: pointer;
  flex-shrink: 0;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.icon-btn:hover { filter: brightness(.97); }
.mic-btn {
  width: 44px; height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: none;
  background: rgba(66,132,255,.95);
  box-shadow: 0 10px 22px rgba(45,70,95,.20);
  cursor: pointer;
  flex-shrink: 0;
  transition: box-shadow .2s, background .2s;
}
.mic-btn::before {
  content: "";
  width: 18px; height: 18px;
  display: block;
  background: #fff;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 14a3 3 0 0 0 3-3V5a3 3 0 0 0-6 0v6a3 3 0 0 0 3 3Zm5-3a5 5 0 0 1-10 0H5a7 7 0 0 0 6 6.92V21h2v-3.08A7 7 0 0 0 19 11h-2Z'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 14a3 3 0 0 0 3-3V5a3 3 0 0 0-6 0v6a3 3 0 0 0 3 3Zm5-3a5 5 0 0 1-10 0H5a7 7 0 0 0 6 6.92V21h2v-3.08A7 7 0 0 0 19 11h-2Z'/%3E%3C/svg%3E") center/contain no-repeat;
}
.mic-btn.is-listening {
  background: rgba(30,105,255,.98);
  box-shadow: 0 0 0 6px rgba(66,132,255,.22), 0 14px 26px rgba(45,70,95,.22);
}
.send-btn {
  width: 44px; height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  border: none;
  background: var(--cta-bg);
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 10px 22px rgba(45,70,95,.18);
  transition: filter .2s;
}
.send-btn:hover { filter: brightness(.97); }
.send-btn::before {
  content: "";
  width: 18px; height: 18px;
  display: block;
  background: #fff;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M22 2L11 13' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M22 2L15 22L11 13L2 9L22 2Z' stroke='%23000' stroke-width='2' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M22 2L11 13' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M22 2L15 22L11 13L2 9L22 2Z' stroke='%23000' stroke-width='2' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E") center/contain no-repeat;
}
.chat-suggest, .quick-replies { display: none; }

/* ── 10. Typewriter ────────────────────────────────────────── */
.tw-caret {
  display: inline-block;
  margin-left: 2px;
  opacity: 1;
  animation: twBlink .9s steps(1,end) infinite;
}
@keyframes twBlink { 50% { opacity: 0; } }

/* ── 11. Tablet (≤1200px) ──────────────────────────────────── */
@media (max-width: 1200px) {
  .frame   { padding: 0 28px; }
  .nav     { gap: 28px; font-size: 16px; }
  .content { padding: 100px 0 0 44px; }
  h1       { font-size: 46px; }
  .glass   { inset: 66px 28px; }
  .robot-wrap { right: 60px; }
}

/* ── 12. Mobile (≤768px) ───────────────────────────────────── */
@media (max-width: 768px) {
  .nav    { display: none; }
  .burger { display: flex; }
  .frame  { padding: 0 20px; }
  .glass  { inset: 62px 14px 28px 14px; }
  .content { padding: 72px 24px 0; max-width: 100%; }
  h1      { font-size: 32px; }
  .sub    { font-size: 15px; }
  .hero-stats { gap: 8px; }
  .hero-stat  { font-size: 13px; padding: 6px 12px; }
  .cta        { font-size: 14px; padding: 12px 20px; }
  .robot-wrap {
    right: -30px;
    height: 78vh;
    opacity: .45;
    z-index: 0;
  }
  body.chat-active .robot-wrap {
    transform: translate3d(60px, 0, 0);
    opacity: .2;
  }
  .reply-mode {
    right: 14px;
    top: auto;
    bottom: 0;
    transform: none;
    position: fixed;
    z-index: 70;
  }
  body.chat-active .reply-mode {
    bottom: 74px;
    right: 12px;
  }
  .chat-screen  { padding: 14px; align-items: center; justify-content: center; }
  .chat-wrapper { width: 100%; height: min(80vh, 100%); border-radius: 14px; }
  .message      { max-width: 90%; font-size: 14px; }
  .chat-input   { padding: 10px 12px; gap: 8px; }
}

/* ── 13. Small mobile (≤420px) ─────────────────────────────── */
@media (max-width: 420px) {
  .logo-img   { height: 26px; }
  h1          { font-size: 26px; line-height: 1.25; }
  .sub        { font-size: 14px; }
  .cta        { font-size: 14px; padding: 11px 16px; }
  .robot-wrap { display: none; }
  .glass      { inset: 56px 10px 20px 10px; }
  .content    { padding: 56px 16px 0; }
  .chat-screen { padding: 8px; }
  .chat-input  { gap: 6px; }
  .icon-btn, .mic-btn, .send-btn { width: 40px; height: 40px; }
}


/* ── Микрофон скрыт в текстовом режиме ─────────────────────── */
/* body.voice-mode добавляется JS при переключении в голосовой режим */
.mic-btn { display: none; }
body.voice-mode .mic-btn { display: flex; }

/* ── Мобильное меню (бургер) ───────────────────────────────── */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  background: rgba(220, 228, 238, 0.88);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .28s ease;
}
body.menu-open .mobile-nav {
  opacity: 1;
  pointer-events: auto;
}
.mobile-nav a {
  font-family: Montserrat, Inter, sans-serif;
  font-size: 26px;
  font-weight: 400;
  color: #2f3b49;
  text-decoration: none;
  opacity: .88;
  transition: opacity .2s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  padding: 8px 24px;
}
.mobile-nav a:hover { opacity: .55; }
.mobile-nav__close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(110,130,155,.35);
  background: rgba(255,255,255,.22);
  border-radius: 10px;
  font-size: 22px;
  color: #516174;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
/* ── 14. Accessibility ─────────────────────────────────────── */
/*
  Раньше здесь было полное отключение transition/animation при
  prefers-reduced-motion: reduce. На части систем/браузеров (в т.ч. Windows/Edge)
  эта настройка может быть включена по умолчанию или пользователем,
  из-за чего "пропадали все плавные анимации".

  Чтобы анимации ВСЕГДА работали (как вы просите), блок отключения убран.
  Если захотите вернуть доступность — сделаем мягкий режим (короче, без blur).
*/


/* ── 15. Safe mobile fixes (без изменения дизайна) ──────────── */
html, body {
  max-width: 100%;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; }
input, textarea, select, button { font: inherit; }
@media (max-width: 768px) {
  .mobile-nav {
    padding: calc(24px + env(safe-area-inset-top, 0px)) 20px calc(24px + env(safe-area-inset-bottom, 0px));
  }
  .mobile-nav__close {
    top: calc(18px + env(safe-area-inset-top, 0px));
    right: calc(18px + env(safe-area-inset-right, 0px));
  }
}


/* ── Кнопка переключения темы ──────────────────────────────── */
.theme-toggle {
  height: 38px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid rgba(47,59,73,.25);
  background: rgba(255,255,255,.22);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  cursor: pointer;
  color: #2f3b49;
  font-size: 13px;
  font-weight: 600;
  font-family: Montserrat, Inter, sans-serif;
  letter-spacing: .03em;
  white-space: nowrap;
  transition: background .2s, border-color .2s, color .2s, box-shadow .2s;
  flex-shrink: 0;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 2px 8px rgba(47,59,73,.08);
}
.theme-toggle:hover {
  background: rgba(255,255,255,.35);
  border-color: rgba(47,59,73,.38);
}

/* ═══════════════════════════════════════════════════════════════
   ТЁМНАЯ ТЕМА — тёмно-синяя с фиолетовым свечением
   Вдохновлено: глубокий космос, неон, техно-эстетика
   ═══════════════════════════════════════════════════════════════ */

/* ── Токены ───────────────────────────────────────────────────── */
body.dark-mode {
  --text:         #e8edf8;
  --muted:        #8b9fc4;
  --glass:        rgba(255,255,255,.04);
  --glass-border: rgba(100,130,255,.15);
  --cta-bg:       linear-gradient(135deg, #4060ff 0%, #7040e0 100%);
  --cta-text:     #ffffff;
  --glow-blue:    rgba(60,100,255,.35);
  --glow-purple:  rgba(120,60,255,.25);
  background: #030610;
  color: var(--text);
}

/* ── Фон в тёмной теме — прячем фото, показываем canvas со звёздами ── */
body.dark-mode .bg {
  opacity: 0;  /* canvas заменяет фото */
  transition: opacity .6s ease;
}
body.dark-mode.chat-active #starsCanvas,
body.dark-mode.chat-active #glowLayer {
  filter: blur(2px);
  opacity: .7 !important;
}

/* ── Топбар ──────────────────────────────────────────────────── */
body.dark-mode.scrolled .topbar {
  background: rgba(6,11,24,.75);
  border-color: rgba(100,130,255,.12);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(100,130,255,.10), 0 18px 40px rgba(0,0,0,.50);
}

/* ── Логотип ─────────────────────────────────────────────────── */
body.dark-mode .logo-img {
  filter: brightness(0) invert(1);
  opacity: .95;
}

/* ── Навигация ───────────────────────────────────────────────── */
body.dark-mode .nav { color: rgba(180,195,235,.80); }
body.dark-mode .nav a { color: rgba(180,195,235,.80); }
body.dark-mode .nav a:hover { color: #fff; opacity: 1; }

body.dark-mode .nav-cabinet-btn {
  color: rgba(255,255,255,.92) !important;
  border-color: rgba(100,130,255,.35) !important;
  background: rgba(60,80,200,.18) !important;
}
body.dark-mode .nav-cabinet-btn:hover {
  background: rgba(60,80,200,.32) !important;
  border-color: rgba(100,130,255,.55) !important;
  box-shadow: 0 0 18px rgba(60,100,255,.20) !important;
}
body.dark-mode .nav-cabinet-btn.logged {
  background: linear-gradient(135deg, rgba(60,80,200,.55), rgba(120,60,220,.45)) !important;
  border-color: rgba(100,130,255,.45) !important;
}

/* ── Бургер ──────────────────────────────────────────────────── */
body.dark-mode .burger {
  border-color: rgba(100,130,255,.22);
  background: rgba(60,80,200,.12);
}
body.dark-mode .burger span { background: rgba(180,200,255,.80); }

/* ── Стеклянная панель ───────────────────────────────────────── */
body.dark-mode .glass {
  background: rgba(3,6,18,.25);
  border-color: rgba(100,120,255,.08);
  box-shadow:
    0 30px 70px rgba(0,0,0,.50),
    inset 0 1px 0 rgba(100,120,255,.08);
}
body.dark-mode .glass::before {
  background: radial-gradient(1400px 700px at 20% 15%,
    rgba(80,100,255,.10), transparent 55%);
}
body.dark-mode .glass::after {
  background: linear-gradient(135deg, rgba(100,120,255,.06), transparent 50%);
}

/* ── Hero текст ──────────────────────────────────────────────── */
body.dark-mode h1 {
  color: #ffffff;
  opacity: 1;
  text-shadow: 0 0 60px rgba(80,120,255,.25);
}
body.dark-mode .sub { color: rgba(180,195,235,.75); }
body.dark-mode .cta {
  background: linear-gradient(135deg, #3555ff 0%, #6b35d9 100%);
  box-shadow: 0 8px 32px rgba(60,100,255,.40), 0 0 0 1px rgba(100,140,255,.25);
  color: #fff;
  transition: box-shadow .25s, filter .2s;
}
body.dark-mode .cta:hover {
  filter: brightness(1.1);
  box-shadow: 0 12px 40px rgba(60,100,255,.55), 0 0 0 1px rgba(130,160,255,.35);
}

/* ── Переключатель режима ────────────────────────────────────── */
body.dark-mode .mode-pill {
  background: rgba(10,18,45,.60);
  border-color: rgba(100,130,255,.20);
  box-shadow: 0 4px 20px rgba(0,0,0,.30);
}
body.dark-mode .mode-pill:hover {
  background: rgba(20,30,70,.70);
  border-color: rgba(100,130,255,.35);
}
body.dark-mode .mode-pill__thumb {
  background: linear-gradient(135deg, #3555ff 0%, #6b35d9 100%);
  box-shadow: 0 2px 12px rgba(60,100,255,.40);
}
body.dark-mode .mode-pill__opt { color: rgba(180,195,235,.45); }
body.dark-mode .mode-pill .mode-pill__text { color: #fff; }
body.dark-mode .mode-pill.is-voice .mode-pill__text  { color: rgba(180,195,235,.45); }
body.dark-mode .mode-pill.is-voice .mode-pill__voice { color: #fff; }

/* ── Чат ─────────────────────────────────────────────────────── */
body.dark-mode .chat-wrapper {
  background: rgba(8,14,38,.70);
  border-color: rgba(100,130,255,.14);
  box-shadow:
    0 30px 80px rgba(0,0,0,.60),
    0 0 60px rgba(60,80,200,.10),
    inset 0 1px 0 rgba(100,130,255,.12);
}
body.dark-mode .chat-header {
  border-color: rgba(100,130,255,.10);
  background: rgba(255,255,255,.02);
}
body.dark-mode .chat-brand { color: #fff; }
body.dark-mode .chat-back {
  border-color: rgba(100,130,255,.20);
  background: rgba(60,80,200,.12);
  color: rgba(180,200,255,.80);
}
body.dark-mode .chat-back:hover {
  background: rgba(60,80,200,.25);
  border-color: rgba(100,130,255,.40);
}
body.dark-mode .chat-dots span {
  background: rgba(100,130,255,.50);
}

/* ── Сообщения ───────────────────────────────────────────────── */
body.dark-mode .message.ai {
  background: rgba(15,25,65,.65);
  border-color: rgba(100,130,255,.14);
  color: var(--text);
}
body.dark-mode .message.user {
  background: linear-gradient(135deg, rgba(40,65,200,.80), rgba(90,40,180,.70));
  border: 1px solid rgba(100,140,255,.20);
  box-shadow: 0 4px 20px rgba(40,60,200,.25);
  color: #fff;
}

/* ── Тайпинг ─────────────────────────────────────────────────── */
body.dark-mode .typing span {
  background: rgba(100,130,255,.55);
}

/* ── Поле ввода ──────────────────────────────────────────────── */
body.dark-mode .chat-input {
  border-color: rgba(100,130,255,.10);
  background: rgba(8,14,38,.50);
}
body.dark-mode .chat-input textarea {
  background: rgba(15,25,65,.55);
  border-color: rgba(100,130,255,.18);
  color: var(--text);
}
body.dark-mode .chat-input textarea:focus {
  border-color: rgba(100,130,255,.45);
  box-shadow: 0 0 0 3px rgba(60,100,255,.10);
}
body.dark-mode .chat-input textarea::placeholder {
  color: rgba(140,160,210,.45);
}
body.dark-mode .icon-btn {
  border-color: rgba(100,130,255,.18);
  background: rgba(40,60,180,.15);
  color: rgba(150,175,255,.80);
}
body.dark-mode .icon-btn:hover {
  background: rgba(40,60,180,.28);
  border-color: rgba(100,130,255,.35);
}
body.dark-mode .send-btn {
  background: linear-gradient(135deg, #3555ff 0%, #6b35d9 100%);
  box-shadow: 0 4px 20px rgba(60,100,255,.35);
}
body.dark-mode .send-btn:hover {
  filter: brightness(1.12);
  box-shadow: 0 6px 28px rgba(60,100,255,.50);
}
body.dark-mode .speech-hint { color: rgba(140,160,210,.60); }

/* ── Mic button ──────────────────────────────────────────────── */
body.dark-mode .mic-btn {
  background: linear-gradient(135deg, #3555ff 0%, #6b35d9 100%);
  box-shadow: 0 6px 24px rgba(60,100,255,.40);
}
body.dark-mode .mic-btn.is-listening {
  background: linear-gradient(135deg, #2040ee 0%, #5525c8 100%);
  box-shadow: 0 0 0 6px rgba(60,100,255,.20), 0 8px 28px rgba(60,100,255,.45);
}

/* ── Мобильное меню ──────────────────────────────────────────── */
body.dark-mode .mobile-nav {
  background: rgba(6,11,24,.94);
}
body.dark-mode .mobile-nav a { color: rgba(200,215,255,.90); }
body.dark-mode .mobile-nav a:hover { color: #fff; opacity: 1; }
body.dark-mode .mobile-nav__close {
  border-color: rgba(100,130,255,.20);
  background: rgba(40,60,180,.15);
  color: rgba(150,175,255,.80);
}

/* ── Кнопка темы ─────────────────────────────────────────────── */
body.dark-mode .theme-toggle {
  border-color: rgba(100,130,255,.25);
  background: rgba(40,60,180,.15);
  color: rgba(180,200,255,.85);
}
body.dark-mode .theme-toggle:hover {
  background: rgba(40,60,180,.28);
  border-color: rgba(100,130,255,.45);
  box-shadow: 0 0 16px rgba(60,100,255,.20);
}

/* ── About / О компании ──────────────────────────────────────── */
body.dark-mode .about-glass,
body.dark-mode .about-section {
  background: transparent !important;
  border-color: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: none !important;
  color: var(--text);
}
body.dark-mode .about-hero,
body.dark-mode .about-main { color: #fff; }
body.dark-mode .about-section h2 { color: #ffffff !important; }
body.dark-mode .about-section p  { color: rgba(180,195,235,.75) !important; }
body.dark-mode .lead { color: rgba(180,195,235,.75); }
body.dark-mode .overline { color: rgba(100,130,255,.80); letter-spacing: .06em; }
body.dark-mode .stat-item .num {
  color: #fff;
  text-shadow: 0 0 30px rgba(80,120,255,.40);
}
body.dark-mode .stat-item .lbl { color: rgba(140,160,210,.70); }
body.dark-mode .about-cta {
  background: linear-gradient(135deg, #3555ff 0%, #6b35d9 100%);
  box-shadow: 0 8px 32px rgba(60,100,255,.35);
  color: #fff;
}
body.dark-mode .role { color: rgba(100,130,255,.80); }

/* ── Value cards (принципы) ──────────────────────────────────── */
body.dark-mode .value-card {
  background: transparent !important;
  border-color: rgba(100,130,255,.15) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: none !important;
  transition: border-color .2s, box-shadow .2s;
}
body.dark-mode .value-card:hover {
  border-color: rgba(100,130,255,.35) !important;
  box-shadow: 0 0 30px rgba(60,100,255,.10) !important;
}
body.dark-mode .value-card h3 { color: #ffffff !important; }
body.dark-mode .value-card p  { color: rgba(180,195,235,.70) !important; }

/* ── Team cards ──────────────────────────────────────────────── */
body.dark-mode .team-card {
  background: transparent !important;
  border-color: rgba(100,130,255,.15) !important;
  box-shadow: none !important;
}
body.dark-mode .team-card:hover {
  border-color: rgba(100,130,255,.30) !important;
}
body.dark-mode .team-card h3   { color: #ffffff !important; }
body.dark-mode .team-card .role { color: rgba(100,130,255,.80) !important; }
body.dark-mode .team-avatar {
  border-color: rgba(100,130,255,.25);
  box-shadow: 0 0 20px rgba(60,100,255,.15);
}

/* ── Кейсы ───────────────────────────────────────────────────── */
body.dark-mode .cases-glass { color: var(--text); }
body.dark-mode .cases-header h1,
body.dark-mode .cases-header h2 { color: #fff; }
body.dark-mode .case-card {
  background: rgba(10,18,50,.55) !important;
  border-color: rgba(100,130,255,.12) !important;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
body.dark-mode .case-card:hover {
  background: rgba(15,28,75,.65) !important;
  border-color: rgba(100,130,255,.30) !important;
  box-shadow: 0 8px 40px rgba(60,100,255,.15) !important;
}
body.dark-mode .case-title { color: #fff; }
body.dark-mode .case-desc  { color: rgba(180,195,235,.65); }
body.dark-mode .case-industry { color: rgba(100,130,255,.80); }
body.dark-mode .case-metric { color: #fff; text-shadow: 0 0 20px rgba(80,120,255,.30); }
body.dark-mode .cases-filters button {
  background: rgba(10,18,50,.55);
  border-color: rgba(100,130,255,.15);
  color: rgba(160,180,230,.75);
}
body.dark-mode .cases-filters button.active,
body.dark-mode .cases-filters button:hover {
  background: rgba(40,65,200,.35);
  border-color: rgba(100,130,255,.45);
  color: #fff;
  box-shadow: 0 0 20px rgba(60,100,255,.15);
}
body.dark-mode .case-detail,
body.dark-mode .case-detail-inner {
  background: rgba(8,14,38,.88);
  border-color: rgba(100,130,255,.12);
}
body.dark-mode .detail-body h2,
body.dark-mode .detail-body h3 { color: #fff; }
body.dark-mode .detail-body p,
body.dark-mode .detail-body li  { color: rgba(180,195,235,.75); }
body.dark-mode .detail-cta {
  background: linear-gradient(135deg, #3555ff 0%, #6b35d9 100%);
  box-shadow: 0 6px 28px rgba(60,100,255,.35);
  color: #fff;
}
body.dark-mode .detail-back { color: rgba(140,170,255,.75); }

/* ── Контакты ────────────────────────────────────────────────── */
body.dark-mode .contacts-glass {
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: none !important;
  border-color: rgba(100,130,255,.10) !important;
}
body.dark-mode .contacts-grid { color: var(--text); }
body.dark-mode .contacts-main h1,
body.dark-mode .contacts-main h2 { color: #fff; }
body.dark-mode .contacts-form-block h2 { color: #fff !important; }
body.dark-mode .contacts-form-block {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}
body.dark-mode .contact-item { color: rgba(180,195,235,.85); }
body.dark-mode .contact-detail { color: rgba(180,195,235,.65); }
body.dark-mode .contact-icon {
  background: rgba(40,60,180,.18);
  border-color: rgba(100,130,255,.20);
  color: rgba(150,175,255,.85);
}
body.dark-mode .form-field label { color: rgba(120,150,220,.65) !important; }
body.dark-mode .form-field input,
body.dark-mode .form-field textarea,
body.dark-mode .form-field select {
  background: rgba(15,25,65,.55) !important;
  border-color: rgba(100,130,255,.20) !important;
  color: #fff !important;
}
body.dark-mode .form-field input:focus,
body.dark-mode .form-field textarea:focus,
body.dark-mode .form-field select:focus {
  border-color: rgba(100,130,255,.50) !important;
  box-shadow: 0 0 0 3px rgba(60,100,255,.12) !important;
}
body.dark-mode .form-field input::placeholder,
body.dark-mode .form-field textarea::placeholder {
  color: rgba(100,130,200,.40) !important;
}
body.dark-mode .form-submit {
  background: linear-gradient(135deg, #3555ff 0%, #6b35d9 100%) !important;
  box-shadow: 0 6px 28px rgba(60,100,255,.35) !important;
  color: #fff !important;
}
body.dark-mode .hours-chip {
  background: rgba(40,60,180,.18);
  border-color: rgba(100,130,255,.18);
  color: rgba(160,185,255,.80);
}
body.dark-mode .contact-link,
body.dark-mode .social-link {
  background: rgba(40,60,180,.15);
  border-color: rgba(100,130,255,.20);
  color: rgba(160,185,255,.85);
}
body.dark-mode .contact-link:hover,
body.dark-mode .social-link:hover {
  background: rgba(40,60,180,.28);
  border-color: rgba(100,130,255,.40);
  box-shadow: 0 0 16px rgba(60,100,255,.20);
}

/* ── Auth ────────────────────────────────────────────────────── */
body.dark-mode .auth-card {
  background: rgba(8,14,38,.82) !important;
  border-color: rgba(100,130,255,.14) !important;
  box-shadow: 0 20px 60px rgba(0,0,0,.50), 0 0 40px rgba(60,100,255,.08) !important;
}
body.dark-mode .auth-card h1,
body.dark-mode .auth-card h2,
body.dark-mode .auth-card label { color: rgba(200,215,255,.90) !important; }
body.dark-mode .auth-card input {
  background: rgba(15,25,65,.55) !important;
  border-color: rgba(100,130,255,.20) !important;
  color: #fff !important;
}
body.dark-mode .auth-card input::placeholder {
  color: rgba(100,130,200,.40) !important;
}
body.dark-mode .auth-card button[type=submit] {
  background: linear-gradient(135deg, #3555ff 0%, #6b35d9 100%) !important;
  box-shadow: 0 6px 24px rgba(60,100,255,.35) !important;
  color: #fff !important;
}
body.dark-mode .auth-brand img { filter: brightness(0) invert(1); }

/* ── FAB (кнопка чата/демо) ──────────────────────────────────── */
body.dark-mode .fab-chat {
  background: rgba(8,14,38,.80);
  border-color: rgba(100,130,255,.20);
  box-shadow: 0 8px 32px rgba(0,0,0,.50), 0 0 20px rgba(60,100,255,.15);
}
body.dark-mode .fab-label { color: rgba(180,200,255,.85); }

/* ── Карточка робота в команде ───────────────────────────────── */
body.dark-mode .team-card--robot .team-avatar--robot {
  background: radial-gradient(circle at 50% 60%,
    rgba(60,100,255,.20) 0%, rgba(10,18,50,.25) 100%);
  border-color: rgba(100,130,255,.30);
  box-shadow: 0 0 30px rgba(60,100,255,.15);
}
body.dark-mode .team-card--robot h3 {
  background: linear-gradient(135deg, #6080ff, #a06aff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Hero stats & CTA — тёмная тема ─────────────────────────── */
body.dark-mode .hero-stat {
  color: rgba(200,215,255,.85);
  background: rgba(15,25,65,.55);
  border-color: rgba(100,130,255,.20);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
body.dark-mode .hero-stat b { color: #fff; }


/* ═══════════════════════════════════════════════════════════════
   ДЕКОРАТИВНОЕ ОКНО ЧАТА — референс точь-в-точь
   ═══════════════════════════════════════════════════════════════ */
.chat-mockup {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-52%) perspective(1000px) rotateY(-16deg) rotateX(5deg) scale(.97);
  width: clamp(340px, 38vw, 540px);
  height: clamp(360px, 58vh, 650px);
  z-index: 11;
  border-radius: 22px;
  background: linear-gradient(155deg,
    rgba(14,18,60,.85) 0%,
    rgba(9,12,45,.90) 50%,
    rgba(7,9,35,.95) 100%);
  border: 1px solid rgba(170,140,255,.24);
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  transition: opacity .8s ease .2s, transform .8s cubic-bezier(.22,.61,.36,1) .2s;
  box-shadow:
    0 0 0 1px rgba(200,160,255,.22),
    0 50px 130px rgba(0,0,0,.82),
    0 20px 60px  rgba(90,45,220,.28),
    0 0 80px     rgba(130,65,255,.30),
    0 0 160px    rgba(100,50,220,.18);
}
body.dark-mode .chat-mockup {
  opacity: 1;
  transform: translateY(-52%) perspective(1000px) rotateY(-16deg) rotateX(5deg) scale(1);
}
body.chat-active .chat-mockup {
  opacity: 0 !important;
  transform: translateY(-52%) perspective(1100px) rotateY(-16deg) rotateX(5deg) translateX(80px) scale(.93) !important;
  transition: opacity .3s ease, transform .4s ease !important;
}
.cm-topbar {
  display: flex; align-items: center; gap: 6px;
  padding: 12px 16px 10px; flex-shrink: 0;
  background: rgba(255,255,255,.025);
  border-bottom: 1px solid rgba(160,130,255,.10);
}
.cm-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.cm-dot--r { background: #ff5f57; box-shadow: 0 0 6px rgba(255,80,80,.50); }
.cm-dot--y { background: #febc2e; box-shadow: 0 0 6px rgba(255,190,40,.40); }
.cm-dot--g { background: #28c840; box-shadow: 0 0 6px rgba(40,200,60,.40); }
.cm-bar { height: 7px; border-radius: 4px; background: rgba(160,130,255,.15); flex: 1; margin-left: 8px; }
.cm-bar--short { flex: 0 0 26%; margin-left: 0; }
.cm-body { flex: 1; position: relative; min-height: 0; overflow: hidden; }
.cm-chart { position: absolute; inset: 0; padding: 0; }
.cm-messages {
  position: absolute; bottom: 12px; left: 14px; right: 14px;
  display: flex; flex-direction: column; gap: 9px; z-index: 2;
}
.cm-msg {
  max-width: 72%; padding: 10px 14px; border-radius: 14px;
  font-size: clamp(10px, .95vw, 12.5px);
  font-family: Inter, system-ui, sans-serif;
  line-height: 1.48; color: #eeeeff;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.cm-msg--right {
  align-self: flex-end;
  background: rgba(100,70,220,.55);
  border: 1px solid rgba(160,130,255,.35); border-bottom-right-radius: 4px;
  box-shadow: 0 4px 24px rgba(100,60,220,.35);
}
.cm-msg--left {
  align-self: flex-start;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18); border-bottom-left-radius: 4px;
}
.cm-input {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px 14px; flex-shrink: 0;
  border-top: 1px solid rgba(160,130,255,.10);
  background: rgba(255,255,255,.02);
}
.cm-input-icon {
  width: 24px; height: 24px; border-radius: 7px;
  background: rgba(160,130,255,.20); border: 1px solid rgba(160,130,255,.20); flex-shrink: 0;
}
.cm-input-bar { flex: 1; height: 8px; border-radius: 4px; background: rgba(160,130,255,.14); }
.cm-input-mic {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, #4466ff 0%, #9933ee 100%);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  box-shadow: 0 0 18px rgba(120,60,255,.70), 0 0 40px rgba(100,50,255,.35);
}
.cm-glow-border {
  position: absolute; inset: -1px; border-radius: 22px; pointer-events: none;
  /* Полная яркая обводка по всему периметру */
  box-shadow:
    inset 0 0 0 1px rgba(200,160,255,.50),
    0 0 20px 2px  rgba(160,100,255,.55),
    0 0 50px 8px  rgba(130,70,255,.35),
    0 0 100px 20px rgba(100,50,220,.20);
}

/* Верхняя сверхяркая полоса */
.cm-glow-border::before {
  content: '';
  position: absolute; top: -1px; left: 5%; right: 5%; height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(200,160,255,.70) 10%,
    rgba(255,220,255,1)   45%,
    rgba(220,180,255,1)   55%,
    rgba(200,160,255,.70) 90%,
    transparent 100%);
  box-shadow:
    0 0 8px  4px  rgba(240,200,255,1.0),
    0 0 20px 8px  rgba(200,140,255,.85),
    0 0 50px 16px rgba(160,90,255,.55),
    0 0 100px 30px rgba(120,60,255,.30);
}

/* Правая сверхяркая полоса */
.cm-glow-border::after {
  content: '';
  position: absolute; right: -1px; top: 5%; bottom: 5%; width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(200,160,255,.70) 10%,
    rgba(255,220,255,1)   45%,
    rgba(220,180,255,1)   55%,
    rgba(200,160,255,.70) 90%,
    transparent 100%);
  box-shadow:
    0 0 8px  4px  rgba(240,200,255,1.0),
    0 0 20px 8px  rgba(200,140,255,.85),
    0 0 50px 16px rgba(160,90,255,.55),
    0 0 100px 30px rgba(120,60,255,.30);
}

/* ── Отражение на полу ──────────────────────────────────────── */
.cm-reflection {
  position: absolute;
  right: 30px;
  top: 50%;
  width: clamp(340px, 38vw, 540px);
  height: clamp(80px, 10vh, 140px);
  z-index: 9;
  pointer-events: none;
  opacity: 0;
  transform: translateY(26%) perspective(1100px) rotateY(-16deg) rotateX(178deg) scaleY(.35);
  transform-origin: top center;
  transition: opacity .8s ease .3s;
  background: linear-gradient(180deg, rgba(120,70,230,.22) 0%, rgba(80,40,180,.08) 50%, transparent 100%);
  border-radius: 20px;
  border-top: 1px solid rgba(180,150,255,.18);
  mask-image: linear-gradient(180deg, rgba(0,0,0,.5) 0%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.5) 0%, transparent 100%);
  filter: blur(2px);
}
.cm-reflection::before {
  content: '';
  position: absolute; bottom: -20px; left: 5%; right: 5%; height: 50px;
  background: radial-gradient(ellipse 90% 60% at 50% 0%, rgba(150,80,255,.40) 0%, transparent 70%);
  filter: blur(10px);
}
body.dark-mode .cm-reflection { opacity: 1; }
body.chat-active .cm-reflection { opacity: 0 !important; }

@media (max-width: 1024px) { .chat-mockup, .cm-reflection { display: none; } }



/* ── Синяя тема окна (как в референсе) ─────────────────────── */
body.dark-mode .cm-neon {
  position: absolute; inset: -1px; border-radius: 19px;
  pointer-events: none; z-index: 10;
  box-shadow:
    inset 0 0 0 1px rgba(100,180,255,.45),
    0 0 16px  3px rgba(80,160,255,.55),
    0 0 48px 10px rgba(60,130,255,.30),
    0 0 120px 25px rgba(40,100,220,.18);
}
body.dark-mode .cm-neon::before {
  background: linear-gradient(90deg,
    transparent 0%, rgba(100,170,255,.60) 8%,
    rgba(200,230,255,1) 42%, rgba(240,248,255,1) 50%,
    rgba(200,230,255,1) 58%, rgba(100,170,255,.60) 92%,
    transparent 100%);
  box-shadow:
    0 0  6px  3px rgba(220,240,255,1.0),
    0 0 18px  6px rgba(160,210,255,.90),
    0 0 45px 14px rgba(100,170,255,.65),
    0 0 90px 28px rgba(60,130,255,.38);
}
body.dark-mode .cm-neon::after {
  background: linear-gradient(180deg,
    transparent 0%, rgba(100,170,255,.60) 8%,
    rgba(200,230,255,1) 42%, rgba(240,248,255,1) 50%,
    rgba(200,230,255,1) 58%, rgba(100,170,255,.60) 92%,
    transparent 100%);
  box-shadow:
    0 0  6px  3px rgba(220,240,255,1.0),
    0 0 18px  6px rgba(160,210,255,.90),
    0 0 45px 14px rgba(100,170,255,.65),
    0 0 90px 28px rgba(60,130,255,.38);
}
body.dark-mode .chat-mockup {
  background: linear-gradient(155deg,
    rgba(8,16,50,.82) 0%,
    rgba(5,12,40,.90) 55%,
    rgba(4,9,32,.96) 100%);
  border-color: rgba(80,150,255,.22);
  box-shadow:
    0 60px 140px rgba(0,0,0,.85),
    0  0   80px rgba(40,100,255,.25),
    0  0  180px rgba(20,70,200,.14);
}
body.dark-mode .cm-topbar,
body.dark-mode .cm-input-row {
  background: rgba(8,16,50,.88);
  border-color: rgba(80,150,255,.10);
}
body.dark-mode .cm-dot { background: rgba(100,170,255,.50); }
body.dark-mode .cm-tbar { background: rgba(80,150,255,.18); }
body.dark-mode .cm-input-thumb {
  background: rgba(80,150,255,.22);
  border-color: rgba(100,170,255,.20);
}
body.dark-mode .cm-input-line { background: rgba(80,150,255,.15); }
body.dark-mode .cm-mic-btn {
  background: linear-gradient(135deg, #2266ee 0%, #1144bb 100%);
  box-shadow: 0 0 10px rgba(60,130,255,.70), 0 0 28px rgba(40,110,220,.45);
}
body.dark-mode .cm-msg--user {
  background: rgba(20,50,160,.75);
  border-color: rgba(80,150,255,.30);
}
body.dark-mode .cm-msg--bot {
  background: rgba(15,30,90,.78);
  border-color: rgba(100,170,255,.18);
}


/* ═══════════════════════════════════════════════════════════════
   МОБИЛЬНАЯ АДАПТАЦИЯ — все страницы
   ═══════════════════════════════════════════════════════════════ */

/* ── Планшет 768–1024px ──────────────────────────────────────── */
@media (max-width: 1024px) {
  .frame   { padding: 0 28px; }
  .content { padding: 100px 0 0 44px; max-width: 580px; }
  h1       { font-size: 42px; }
  .robot-wrap { right: 60px; }
  .glass   { inset: 66px 28px; }

  /* About */
  .about-main { padding: 28px 28px 40px; }

  /* Cases */
  .cases-grid { grid-template-columns: repeat(2, 1fr); }

  /* Contacts */
  .contacts-grid { grid-template-columns: 1fr; }
  .contacts-robot-col { display: none; }
}

/* ── Мобильный 768px ─────────────────────────────────────────── */
@media (max-width: 768px) {
  /* Общее */
  .frame  { padding: 0 16px; }
  .glass  { inset: 58px 12px 24px 12px; border-radius: 14px; }
  .content { padding: 64px 20px 0; max-width: 100%; }
  h1      { font-size: 32px; line-height: 1.22; }
  .sub    { font-size: 15px; }
  .hero-stats { gap: 7px; }
  .hero-stat  { font-size: 12px; padding: 6px 11px; }
  .cta        { font-size: 14px; padding: 12px 20px; }

  /* Robot */
  .robot-wrap {
    right: -20px;
    height: 72vh;
    opacity: .40;
    z-index: 0;
  }
  body.chat-active .robot-wrap {
    transform: translate3d(60px, 0, 0);
    opacity: .15;
  }

  /* Mode pill */
  .reply-mode {
    right: 12px;
    top: auto;
    bottom: 72px;
    transform: none;
    position: fixed;
    z-index: 70;
  }
  body.chat-active .reply-mode {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
  }

  /* Chat */
  .chat-screen  { padding: 12px; align-items: center; justify-content: center; }
  .chat-wrapper { width: 100%; height: min(82vh, 100%); border-radius: 14px; }
  .message      { max-width: 90%; font-size: 14px; }
  .chat-input   { padding: 10px 11px; gap: 7px; }

  /* About */
  .about-glass { inset: 62px 12px 24px 12px !important; }
  .about-main  { padding: 20px 18px 32px; }
  .about-section h2 { font-size: 18px; }
  .values-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .team-grid   { grid-template-columns: 1fr 1fr; gap: 14px; }
  .stats-row   { grid-template-columns: 1fr 1fr; gap: 16px; }

  /* Cases */
  .cases-glass { inset: 62px 12px 24px 12px !important; }
  .cases-grid  { grid-template-columns: 1fr; gap: 12px; }
  .cases-filters { gap: 7px; flex-wrap: wrap; }
  .filter-tag  { font-size: 12px; padding: 5px 12px; }
  .case-detail-inner { padding: 28px 18px 36px; }

  /* Contacts */
  .contacts-glass { inset: 62px 12px 24px 12px !important; }
  .contacts-grid  { grid-template-columns: 1fr; }
  .contacts-form-block { padding: 20px 16px; }
  .contacts-robot-col { display: none; }

  /* Auth */
  .auth-card { margin: 0 12px; padding: 24px 18px 28px; }

  /* Navbar */
  .topbar { padding: 16px 0; }
  .logo-img { height: 28px; }
}

/* ── Маленький мобильный 420px ───────────────────────────────── */
@media (max-width: 420px) {
  h1       { font-size: 26px; line-height: 1.25; }
  .sub     { font-size: 13px; }
  .cta     { font-size: 13px; padding: 11px 16px; }
  .glass   { inset: 52px 8px 18px 8px; border-radius: 12px; }
  .content { padding: 52px 14px 0; }
  .robot-wrap { display: none; }

  .hero-stats { gap: 5px; }
  .hero-stat  { font-size: 11px; padding: 5px 9px; }

  .values-grid { grid-template-columns: 1fr; }
  .team-grid   { grid-template-columns: 1fr 1fr; }

  /* Chat */
  .chat-screen { padding: 6px; }
  .chat-input  { gap: 5px; }
  .icon-btn, .mic-btn, .send-btn { width: 38px; height: 38px; }

  /* FAB */
  .fab-chat { bottom: 16px; right: 16px; padding: 11px 14px; }
}

/* ── Фиксируем safe area на iOS ─────────────────────────────── */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .mobile-nav {
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
  }
  .chat-input {
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
  }
  .fab-chat {
    bottom: calc(24px + env(safe-area-inset-bottom));
  }
}


/* ── Светлая тема: кнопки видны на маленьких экранах ─────────── */
body:not(.dark-mode) .cta {
  background: rgba(47,59,73,.12) !important;
  color: #2f3b49 !important;
  border: 1px solid rgba(47,59,73,.22) !important;
  box-shadow: 0 4px 16px rgba(47,59,73,.10) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  opacity: 1 !important;
  visibility: visible !important;
  display: inline-flex !important;
}
body:not(.dark-mode) .hero-stats .hero-stat {
  background: rgba(47,59,73,.10) !important;
  border-color: rgba(47,59,73,.20) !important;
  color: #2f3b49 !important;
}

/* ── Кнопка видна на всех размерах ──────────────────────────── */
@media (max-width: 768px) {
  .cta {
    opacity: 1 !important;
    visibility: visible !important;
    display: inline-flex !important;
    font-size: 14px !important;
    padding: 12px 20px !important;
    min-width: 200px;
    justify-content: center;
  }
}
@media (max-width: 420px) {
  .cta {
    font-size: 13px !important;
    padding: 11px 16px !important;
    min-width: 180px;
    width: 100%;
    justify-content: center;
  }
}
