/*
  Сайт продукта auri-ai.ru (D-132). Все стили сайта — только здесь: встроенные стили запрещены CSP (deploy/Caddyfile).
  Токены — по дизайн-системе портала (packages/ui/src/tokens), с приставкой --s- (site).
  Отличие от портала: главная кнопка в обеих темах — blue-600, чтобы белый текст держал контраст AA.
  Тема — только по prefers-color-scheme (своей кнопки темы нет: выбор негде хранить).
  Движение — один раз в первом экране; при prefers-reduced-motion его нет, разметка сразу в конечном виде.
*/

/* --- Шрифты: свои файлы, без CDN. Кириллица — Inter; Archivo (ширина 125 %) — только знак и цифры шагов. --- */

@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(fonts/inter-cyrillic-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(fonts/inter-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Archivo Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url(fonts/archivo-latin-wdth-normal.woff2) format('woff2-variations');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(fonts/geist-mono-cyrillic-500-normal.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(fonts/geist-mono-latin-500-normal.woff2) format('woff2');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- Токены: светлая тема --- */

:root {
  color-scheme: light;

  --s-bg: #ffffff;
  --s-band: #f9fafb;
  --s-card: #ffffff;
  --s-window-bar: #f3f4f6;
  --s-sunken: #f9fafb;
  --s-raised: #ffffff;
  --s-btn2-hover: #f3f4f6;

  --s-border: #e5e7eb;
  --s-border-strong: #d1d5db;

  --s-text-strong: #111827;
  --s-text: #374151;
  --s-text-muted: #4b5563;
  --s-text-subtle: #5f6672;

  --s-accent: #2563eb;
  --s-accent-hover: #1d4ed8;
  --s-accent-text: #ffffff;
  --s-accent-subtle: #eff6ff;
  --s-accent-subtle-text: #1d4ed8;
  --s-link: #2563eb;
  --s-link-hover: #1d4ed8;
  --s-glyph: #2563eb;
  --s-step: #2563eb;
  --s-focus: #2563eb;

  --s-chip-soon-bg: #fefce8;
  --s-chip-soon-text: #713f12;
  --s-chip-soon-border: #fde68a;
  --s-chip-later-bg: #f3f4f6;
  --s-chip-later-text: #374151;
  --s-chip-later-border: #e5e7eb;
  --s-chip-live-bg: #ecfdf5;
  --s-chip-live-text: #064e3b;
  --s-chip-live-border: #a7f3d0;
  --s-dot-live: #10b981;

  --s-chat-client-bg: #ffffff;
  --s-chat-client-border: #e5e7eb;
  --s-chat-client-text: #374151;
  --s-chat-ai-bg: #dbeafe;
  --s-chat-ai-border: #bfdbfe;
  --s-chat-ai-text: #111827;
  --s-chat-ai-label: #1d4ed8;
  --s-chat-meta: #4b5563;

  --s-quote-mark: rgb(59 130 246 / 0.18);
  --s-quote-rule: #3b82f6;
  --s-wave: #3b82f6;
  --s-flash: #dbeafe;

  --s-paper: repeating-linear-gradient(to bottom, transparent 0 7px, #eef0f3 7px 8px);
  --s-texture-fade: radial-gradient(ellipse 75% 70% at 60% 40%, #000 35%, transparent 100%);

  --s-shadow-window: 0 1px 2px rgb(0 0 0 / 0.05), 0 12px 32px -12px rgb(17 24 39 / 0.18);
  --s-shadow-card: 0 1px 2px rgb(0 0 0 / 0.05);
  --s-shadow-menu: 0 16px 32px -8px rgb(17 24 39 / 0.22);

  --s-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --s-fast: 100ms;
  --s-base: 150ms;
  --s-slow: 300ms;

  --font-sans:
    'Inter Variable', 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, sans-serif;
  --font-display: 'Archivo Variable', var(--font-sans);
  --font-mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --fs-h1: clamp(2.125rem, 1.63rem + 2.02vw, 3.25rem);
  --fs-h2: clamp(1.75rem, 1.42rem + 1.35vw, 2.5rem);
  --fs-h3: clamp(1.125rem, 1.07rem + 0.22vw, 1.25rem);
  --fs-lead: clamp(1.0625rem, 0.98rem + 0.34vw, 1.25rem);
  --fs-body: clamp(1rem, 0.97rem + 0.11vw, 1.0625rem);
  --fs-small: 0.875rem;
  --fs-step: clamp(2.75rem, 1.98rem + 3.15vw, 3.5rem);

  --container: 1120px;
  --gutter: 20px;
  --section-y: 64px;
  --head-gap: 32px;
}

/* Широкий экран: h1 уменьшен до 46 px (две строки), h2 — до 36 px, чтобы заголовки разделов не спорили с главным. */
@media (min-width: 1120px) {
  :root {
    --fs-h2: clamp(1.75rem, 1.5rem + 0.9vw, 2.25rem);
  }
}

/* --- Токены: тёмная тема «ночная синева» (ступени #0C1426 → #0F172A → #121B31 → #1A2540 → #232F4D) --- */

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;

    --s-bg: #121b31;
    --s-band: #0f172a;
    --s-card: #1a2540;
    --s-window-bar: #151f37;
    --s-sunken: #0f172a;
    --s-raised: #232f4d;
    --s-btn2-hover: #232f4d;

    --s-border: #2c3959;
    --s-border-strong: #5d719e;

    --s-text-strong: #f3f6fc;
    --s-text: #d5dcea;
    --s-text-muted: #afb9ce;
    --s-text-subtle: #9ba6c0;

    --s-accent: #2563eb;
    --s-accent-hover: #1d4ed8;
    --s-accent-text: #ffffff;
    --s-accent-subtle: rgb(59 130 246 / 0.14);
    --s-accent-subtle-text: #93c5fd;
    --s-link: #60a5fa;
    --s-link-hover: #93c5fd;
    --s-glyph: #60a5fa;
    --s-step: #60a5fa;
    --s-focus: #60a5fa;

    --s-chip-soon-bg: rgb(234 179 8 / 0.14);
    --s-chip-soon-text: #facc15;
    --s-chip-soon-border: rgb(234 179 8 / 0.3);
    --s-chip-later-bg: rgb(139 151 175 / 0.14);
    --s-chip-later-text: #c9d2e3;
    --s-chip-later-border: rgb(139 151 175 / 0.3);
    --s-chip-live-bg: rgb(16 185 129 / 0.14);
    --s-chip-live-text: #34d399;
    --s-chip-live-border: rgb(16 185 129 / 0.3);
    --s-dot-live: #34d399;

    --s-chat-client-bg: #1a2540;
    --s-chat-client-border: #2c3959;
    --s-chat-client-text: #d5dcea;
    --s-chat-ai-bg: #152c56;
    --s-chat-ai-border: #2f568f;
    --s-chat-ai-text: #f3f6fc;
    --s-chat-ai-label: #60a5fa;
    --s-chat-meta: #9ba6c0;

    --s-quote-mark: rgb(96 165 250 / 0.22);
    --s-quote-rule: #60a5fa;
    --s-wave: #60a5fa;
    --s-flash: #1e3a6e;

    --s-paper: repeating-linear-gradient(to bottom, transparent 0 7px, #1a2540 7px 8px);

    --s-shadow-window: 0 1px 2px rgb(2 6 16 / 0.5), 0 20px 40px -12px rgb(2 6 16 / 0.7);
    --s-shadow-card: none;
    --s-shadow-menu: 0 16px 32px -12px rgb(2 6 16 / 0.7);
  }
}

@media (min-width: 640px) {
  :root {
    --gutter: 32px;
  }
}

@media (min-width: 960px) {
  :root {
    --gutter: 40px;
    --section-y: 96px;
    --head-gap: 48px;
  }
}

@media (min-width: 1280px) {
  :root {
    --section-y: 112px;
  }
}

/* --- Основа --- */

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

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 16px;
}

@media (min-width: 640px) {
  html {
    scroll-padding-top: 80px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--s-bg);
  color: var(--s-text);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

::selection {
  background: rgb(59 130 246 / 0.22);
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--s-text-strong);
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

svg {
  flex: none;
}

a {
  color: var(--s-link);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--s-link-hover);
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 2px solid var(--s-focus);
  outline-offset: 2px;
  border-radius: 4px;
}

.nw {
  white-space: nowrap;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.container {
  width: min(var(--container), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  top: -200px;
  left: 16px;
  z-index: 100;
  padding: 10px 16px;
  border: 2px solid var(--s-focus);
  border-radius: 8px;
  background: var(--s-card);
  color: var(--s-text-strong);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

/* --- Кнопки --- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color var(--s-fast) linear,
    border-color var(--s-fast) linear,
    color var(--s-fast) linear;
}

.btn:hover {
  text-decoration: none;
}

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

.btn:focus-visible {
  border-radius: 8px;
}

.btn-lg {
  min-height: 48px;
  padding: 0 22px;
}

.btn-sm {
  min-height: 36px;
  padding: 0 14px;
  font-size: 0.875rem;
}

.btn-primary,
.btn-primary:hover {
  color: var(--s-accent-text);
}

.btn-primary {
  background: var(--s-accent);
}

.btn-primary:hover {
  background: var(--s-accent-hover);
}

.btn-secondary,
.btn-secondary:hover {
  color: var(--s-text-strong);
}

.btn-secondary {
  border-color: var(--s-border-strong);
  background: var(--s-card);
}

.btn-secondary:hover {
  background: var(--s-btn2-hover);
}

.btn-arrow {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform var(--s-base) var(--s-ease);
}

.btn:hover .btn-arrow {
  transform: translateX(2px);
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (min-width: 640px) {
  .actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

.note {
  color: var(--s-text-muted);
  font-size: var(--fs-small);
  line-height: 1.55;
}

/* --- Шапка --- */

.site-header {
  position: relative;
  z-index: 20;
  border-bottom: 1px solid var(--s-border);
  background: var(--s-bg);
}

@media (min-width: 640px) {
  .site-header {
    position: sticky;
    top: 0;
  }

  @supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
    .site-header {
      background: color-mix(in srgb, var(--s-bg) 88%, transparent);
      -webkit-backdrop-filter: blur(12px);
      backdrop-filter: blur(12px);
    }
  }
}

@media (prefers-reduced-transparency: reduce) {
  .site-header {
    background: var(--s-bg);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

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

@media (min-width: 640px) {
  .header-inner {
    height: 64px;
  }
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  color: var(--s-text-strong);
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  font-stretch: 125%;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.brand:hover {
  color: var(--s-text-strong);
}

.brand:focus-visible {
  border-radius: 6px;
}

.brand-mark {
  width: 28px;
  height: 28px;
}

.brand-mark-bg {
  fill: var(--s-accent);
}

.brand-mark-letter {
  fill: #ffffff;
}

.nav-desktop {
  display: none;
}

.nav-desktop ul,
.menu-panel ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-login {
  display: none;
}

@media (min-width: 640px) {
  .header-login {
    display: inline-flex;
  }
}

@media (min-width: 1040px) {
  .brand {
    margin-right: 0;
    font-size: 1.25rem;
  }

  .nav-desktop {
    display: block;
    margin: 0 auto 0 44px;
  }

  .nav-desktop ul {
    display: flex;
    gap: 28px;
  }

  .nav-desktop a {
    color: var(--s-text-muted);
    font-size: 0.9375rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
  }

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

  .menu {
    display: none;
  }
}

/* Меню на узком экране: <details> работает и без скрипта; site.js закрывает его после выбора раздела. */

.menu-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-right: -6px;
  border-radius: 8px;
  color: var(--s-text-strong);
  list-style: none;
  cursor: pointer;
}

.menu-button::-webkit-details-marker {
  display: none;
}

.menu-button:hover {
  background: var(--s-btn2-hover);
}

.menu-icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
}

.menu-icon-close,
.menu[open] .menu-icon-open {
  display: none;
}

.menu[open] .menu-icon-close {
  display: inline;
}

.menu-panel {
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  padding: 8px var(--gutter) 20px;
  border-bottom: 1px solid var(--s-border);
  background: var(--s-bg);
  box-shadow: var(--s-shadow-menu);
}

.menu-panel li + li {
  border-top: 1px solid var(--s-border);
}

.menu-panel ul a {
  display: flex;
  align-items: center;
  min-height: 52px;
  color: var(--s-text-strong);
  font-size: 1.0625rem;
  font-weight: 500;
  text-decoration: none;
}

.menu-login {
  width: 100%;
  margin-top: 12px;
}

@media (min-width: 640px) {
  .menu-login {
    display: none;
  }
}

/* --- Первый экран --- */

.hero {
  position: relative;
  padding: 32px 0 8px;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--s-paper);
  -webkit-mask-image: var(--s-texture-fade);
  mask-image: var(--s-texture-fade);
  pointer-events: none;
}

.hero > * {
  position: relative;
}

/* Одна колонка: линии «бумаги» только за окном продукта (38–88 % высоты первого экрана), под заголовком, кнопками
   и строкой о запуске фон чистый. */
@media (max-width: 1119px) {
  .hero::before {
    -webkit-mask-image: linear-gradient(
      to bottom,
      transparent 0 36%,
      #000 48% 82%,
      transparent 100%
    );
    mask-image: linear-gradient(to bottom, transparent 0 36%, #000 48% 82%, transparent 100%);
  }
}

.hero-grid {
  display: grid;
  gap: 40px;
}

.hero-copy {
  max-width: 40rem;
}

.eyebrow {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--s-accent-subtle-text);
  font-size: var(--fs-small);
  font-weight: 600;
}

.eyebrow::before {
  content: '';
  flex: none;
  width: 6px;
  height: 6px;
  margin-top: 0.55em;
  border-radius: 50%;
  background: currentColor;
}

h1 {
  font-size: var(--fs-h1);
  font-weight: 650;
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.lead {
  margin-top: 20px;
  color: var(--s-text);
  font-size: var(--fs-lead);
  line-height: 1.55;
}

.hero .actions {
  margin-top: 32px;
}

.hero .note {
  max-width: 34rem;
  margin-top: 16px;
}

.facts {
  display: grid;
  gap: 10px;
  margin: 40px 0 0;
  padding: 20px 0 0;
  border-top: 1px solid var(--s-border);
  color: var(--s-text-muted);
  font-size: 0.9375rem;
  line-height: 1.45;
  list-style: none;
}

.facts li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.fact-icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--s-glyph);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (min-width: 960px) {
  .facts {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 56px;
  }
}

@media (min-width: 1120px) {
  .hero {
    padding: 72px 0 16px;
  }

  .hero-grid {
    grid-template-columns: 5fr 7fr;
    gap: 48px;
    align-items: center;
  }

  /* 46 px: «AI-сотрудник / для вашей amoCRM» — две строки в колонке 5fr, amoCRM не висит одно. */
  .hero h1 {
    font-size: 2.875rem;
  }
}

/* --- «Окно продукта»: иллюстрации собраны разметкой, для скринридера — пересказ в .visually-hidden --- */

figure {
  margin: 0;
}

figcaption {
  margin-top: 12px;
  color: var(--s-text-subtle);
  font-size: var(--fs-small);
}

.hero-figure,
.trust-figure {
  min-width: 0;
  container-type: inline-size;
}

.window {
  overflow: hidden;
  border: 1px solid var(--s-border);
  border-radius: 14px;
  background: var(--s-card);
  box-shadow: var(--s-shadow-window);
  color: var(--s-text);
  font-size: 0.875rem;
  line-height: 1.5;
}

.window-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 40px;
  padding: 0 14px;
  border-bottom: 1px solid var(--s-border);
  background: var(--s-window-bar);
}

.window-dots {
  display: flex;
  gap: 6px;
}

.window-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--s-border-strong);
}

.window-title {
  color: var(--s-text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
}

@container (min-width: 600px) {
  .window-split {
    display: grid;
    grid-template-columns: 58fr 42fr;
  }

  .window-split .deal {
    border-top: 0;
    border-left: 1px solid var(--s-border);
  }
}

/* Чат: цветное — AI, нейтральное — люди (как в портале). */

.chat {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  background: var(--s-sunken);
}

.msg {
  position: relative;
  display: flex;
  flex-direction: column;
  max-width: 88%;
}

.msg-client {
  align-self: flex-start;
}

.msg-ai {
  align-self: flex-end;
  align-items: flex-end;
}

.msg-author {
  margin: 0 2px 4px;
  color: var(--s-text-muted);
  font-size: 0.75rem;
  line-height: 1.4;
}

.msg-ai .msg-author {
  color: var(--s-chat-ai-label);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.bubble {
  padding: 9px 13px 7px;
  border: 1px solid var(--s-chat-client-border);
  border-radius: 4px 14px 14px 14px;
  background: var(--s-chat-client-bg);
  color: var(--s-chat-client-text);
  text-wrap: auto;
}

.msg-ai .bubble {
  border-color: var(--s-chat-ai-border);
  border-radius: 14px 4px 14px 14px;
  background: var(--s-chat-ai-bg);
  color: var(--s-chat-ai-text);
}

.msg-time {
  display: block;
  margin-top: 2px;
  color: var(--s-chat-meta);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  text-align: right;
}

mark {
  padding: 0 2px;
  border-radius: 3px;
  background: var(--s-quote-mark);
  color: inherit;
}

.typing {
  position: absolute;
  top: 22px;
  right: 0;
  display: none;
  gap: 4px;
  padding: 13px 14px;
  border: 1px solid var(--s-chat-ai-border);
  border-radius: 14px 4px 14px 14px;
  background: var(--s-chat-ai-bg);
}

.typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--s-chat-ai-label);
}

/* Сделка: своя нейтральная карточка, не копия интерфейса amoCRM. */

.deal {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  border-top: 1px solid var(--s-border);
}

.deal-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.field-label,
.why-label {
  color: var(--s-text-subtle);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.4;
  text-transform: uppercase;
}

.deal-kicker {
  color: var(--s-text-subtle);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.4;
}

.deal-title {
  color: var(--s-text-strong);
  font-size: 0.9375rem;
  font-weight: 600;
}

.deal-stage {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.stage {
  padding: 1px 8px;
  border: 1px solid var(--s-border);
  border-radius: 6px;
  background: var(--s-band);
  color: var(--s-text-muted);
  font-size: 0.75rem;
  line-height: 1.6;
}

.stage-new {
  border-color: transparent;
  background: var(--s-accent-subtle);
  color: var(--s-accent-subtle-text);
  font-weight: 600;
}

.stage-arrow {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: var(--s-text-subtle);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fields-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 0 11px;
  color: var(--s-text-subtle);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.4;
  text-transform: uppercase;
}

.field {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 8px;
  padding: 8px 10px;
  border: 1px solid var(--s-border);
  border-radius: 8px;
  background: var(--s-card);
}

.field-label {
  grid-column: 1 / -1;
}

.field-value {
  color: var(--s-text-strong);
  font-weight: 500;
}

.field-conf {
  align-self: center;
  color: var(--s-text-muted);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
}

.field-quote {
  grid-column: 1 / -1;
  margin-top: 2px;
  padding-left: 8px;
  border-left: 2px solid var(--s-quote-rule);
  color: var(--s-text-muted);
  font-size: 0.75rem;
  line-height: 1.45;
}

.deal-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  color: var(--s-text-muted);
  font-size: 0.75rem;
}

.wave {
  width: 72px;
  height: 20px;
  color: var(--s-wave);
}

.wave path {
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}

@container (max-width: 480px) {
  .f2,
  .f3 {
    display: none;
  }
}

@container (max-width: 380px) {
  .chat,
  .deal {
    padding: 14px 12px;
  }

  .msg {
    max-width: 92%;
  }
}

/* Движение первого экрана: один раз, только opacity и transform. Конечное состояние — в разметке. */

@media (prefers-reduced-motion: no-preference) {
  .typing {
    display: flex;
    animation: typing-life 700ms linear 600ms both;
  }

  .typing span {
    animation: typing-dot 350ms ease-in-out 600ms 2 alternate both;
  }

  .typing span:nth-child(2) {
    animation-delay: 700ms;
  }

  .typing span:nth-child(3) {
    animation-delay: 800ms;
  }

  .m1 {
    animation: rise var(--s-slow) var(--s-ease) 150ms both;
  }

  .m2 .msg-author,
  .m2 .bubble {
    animation: rise var(--s-slow) var(--s-ease) 1300ms both;
  }

  .m2 .msg-author {
    animation-name: fade;
    animation-delay: 600ms;
  }

  .m3 {
    animation: rise var(--s-slow) var(--s-ease) 1800ms both;
  }

  .wave path {
    animation: draw 900ms var(--s-ease) 2000ms both;
  }

  .field {
    animation: flash 700ms ease-out both;
  }

  .field-value,
  .field-conf,
  .field-quote {
    animation: fade var(--s-slow) var(--s-ease) both;
  }

  .f1,
  .f1 > * {
    animation-delay: 2100ms;
  }

  .f2,
  .f2 > * {
    animation-delay: 2300ms;
  }

  .f3,
  .f3 > * {
    animation-delay: 2500ms;
  }

  .f4,
  .f4 > * {
    animation-delay: 2700ms;
  }

  .field-label {
    animation: none;
  }

  .stage-arrow,
  .stage-new {
    animation: rise var(--s-base) var(--s-ease) 3000ms both;
  }

  .stage-old {
    animation: dim var(--s-base) linear 3000ms both;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes dim {
  from {
    color: var(--s-text-strong);
  }
  to {
    color: var(--s-text-muted);
  }
}

@keyframes typing-life {
  0% {
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  85% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    visibility: hidden;
  }
}

@keyframes typing-dot {
  from {
    opacity: 0.35;
    transform: translateY(0);
  }
  to {
    opacity: 1;
    transform: translateY(-2px);
  }
}

@keyframes draw {
  from {
    stroke-dashoffset: 1;
  }
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes flash {
  0% {
    background-color: var(--s-flash);
  }
  100% {
    background-color: var(--s-card);
  }
}

/* --- Секции --- */

.section {
  padding-block: var(--section-y);
}

.section-band {
  background: var(--s-band);
}

.section-head {
  max-width: 44rem;
  margin-bottom: var(--head-gap);
}

h2 {
  font-size: var(--fs-h2);
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.section-sub {
  margin-top: 12px;
  color: var(--s-text-muted);
  font-size: var(--fs-lead);
  line-height: 1.55;
}

h3 {
  font-size: var(--fs-h3);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

/* --- Как это работает: шаги по «шкале прибора» --- */

.steps {
  position: relative;
  display: grid;
  gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step {
  position: relative;
  display: grid;
  grid-template-columns: 64px 1fr;
  align-content: start;
  align-items: baseline;
  column-gap: 0;
  row-gap: 8px;
}

.step-num {
  grid-row: 1;
  color: var(--s-step);
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 600;
  font-stretch: 125%;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.step h3 {
  grid-row: 1;
  grid-column: 2;
}

.step p {
  grid-column: 2;
  color: var(--s-text-muted);
}

.steps-foot {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 40px;
  padding: 20px;
  border: 1px solid var(--s-border);
  border-radius: 12px;
  background: var(--s-band);
}

.section-band .steps-foot {
  background: var(--s-card);
}

.steps-foot .note {
  max-width: 36rem;
  color: var(--s-text);
  font-size: 0.9375rem;
}

@media (min-width: 640px) {
  .steps {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px 32px;
  }

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

  .step-num,
  .step h3,
  .step p {
    grid-column: 1;
    grid-row: auto;
  }

  .step-num {
    margin-bottom: 12px;
    font-size: var(--fs-step);
  }

  .steps-foot {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 20px 24px;
  }

  .steps-foot .btn {
    flex: none;
  }

  /* Шаги одного ряда делят строки (subgrid): номер, заголовок и текст — на общих линиях. */
  @supports (grid-template-rows: subgrid) {
    .step {
      grid-row: span 3;
      grid-template-rows: subgrid;
      row-gap: 0;
    }

    .step h3 {
      margin-bottom: 8px;
    }
  }
}

@media (min-width: 1120px) {
  .steps {
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    padding-top: 28px;
  }

  /* Линия шкалы через все шаги и точка у начала каждого. */
  .steps::before {
    content: '';
    position: absolute;
    top: 3px;
    right: 0;
    left: 0;
    height: 1px;
    background: var(--s-border);
  }

  .step::before {
    content: '';
    position: absolute;
    top: -28px;
    left: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--s-step);
  }

  .step {
    padding-right: 8px;
  }
}

/* --- Карточки --- */

.card {
  display: flex;
  flex-direction: column;
  padding: 20px;
  border: 1px solid var(--s-border);
  border-radius: 12px;
  background: var(--s-card);
  box-shadow: var(--s-shadow-card);
}

@media (min-width: 640px) {
  .card {
    padding: 24px;
  }
}

.card-dashed {
  border-style: dashed;
  border-color: var(--s-border-strong);
  background: transparent;
  box-shadow: none;
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.glyph {
  width: 36px;
  height: 36px;
  fill: none;
  stroke: var(--s-glyph);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (min-width: 640px) {
  .glyph {
    width: 40px;
    height: 40px;
  }
}

.card-kicker {
  margin-bottom: 4px;
  color: var(--s-text-subtle);
  font-size: var(--fs-small);
  font-weight: 500;
}

.card h3 {
  margin-bottom: 8px;
}

.card-head {
  margin-bottom: 8px;
}

.card-head h3 {
  margin-bottom: 0;
}

.card-text {
  flex: 1;
  color: var(--s-text-muted);
}

.card-note {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px dashed var(--s-border-strong);
  color: var(--s-text-muted);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.ticks,
.dots {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ticks li,
.dots li {
  position: relative;
  padding-left: 22px;
}

.ticks li::before {
  content: '';
  position: absolute;
  top: 0.45em;
  left: 2px;
  width: 10px;
  height: 6px;
  border-bottom: 2px solid var(--s-glyph);
  border-left: 2px solid var(--s-glyph);
  transform: rotate(-45deg);
}

.dots li::before {
  content: '';
  position: absolute;
  top: 0.62em;
  left: 4px;
  width: 7px;
  height: 7px;
  border: 1.5px solid var(--s-text-subtle);
  border-radius: 50%;
}

/* Метки состояния: смысл несёт текст, цвет его только дублирует. */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.chip-live {
  border-color: var(--s-chip-live-border);
  background: var(--s-chip-live-bg);
  color: var(--s-chip-live-text);
}

.chip-live::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--s-dot-live);
}

.chip-soon {
  border-color: var(--s-chip-soon-border);
  background: var(--s-chip-soon-bg);
  color: var(--s-chip-soon-text);
}

.chip-later {
  border-color: var(--s-chip-later-border);
  background: var(--s-chip-later-bg);
  color: var(--s-chip-later-text);
}

/* Возможности: главные две, три поменьше, ниже — то, что строим и планируем. */

.features {
  display: grid;
  gap: 16px;
}

@media (min-width: 640px) {
  .features {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .card-wide {
    grid-column: 1 / -1;
  }

  /* Карточки одного ряда делят строки (subgrid): текст начинается на одной линии, пунктир «В разработке /
     В планах» — тоже, даже если у соседей разная длина подписи и заголовка. Без subgrid — обычные карточки. */
  @supports (grid-template-rows: subgrid) {
    .features .card {
      display: grid;
      grid-row: span 4;
      grid-template-rows: subgrid;
      gap: 0;
    }

    .features .card-top {
      grid-row: 1;
    }

    .features .card-head {
      grid-row: 2;
      align-self: end;
    }

    .features .card-text {
      grid-row: 3;
    }

    .features .card-text:last-child {
      grid-row: 3 / span 2;
    }

    .features .card-note {
      grid-row: 4;
      align-self: start;
    }
  }
}

/* Ряд из трёх — с 1120 px: уже заголовок «Человек может вмешаться» не влезает в строку и сдвигает соседей. */
@media (min-width: 1120px) {
  .features {
    grid-template-columns: repeat(6, 1fr);
    gap: 24px;
  }

  .card-main,
  .card-next {
    grid-column: span 3;
  }

  .card-sec,
  .card-wide {
    grid-column: span 2;
  }
}

/* Для кого */

.audience {
  display: grid;
  gap: 16px;
}

.audience .card {
  display: grid;
  grid-template-columns: auto 1fr;
  align-content: start;
  align-items: center;
  gap: 8px 16px;
}

.audience .card p {
  grid-column: 1 / -1;
  color: var(--s-text-muted);
}

@media (min-width: 640px) {
  .audience {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (min-width: 1040px) {
  .audience {
    gap: 24px;
  }

  .audience .card {
    grid-template-columns: 40px 1fr;
    align-items: start;
    gap: 8px 20px;
  }

  .audience .card .glyph {
    grid-row: 1 / span 2;
  }

  .audience .card h3 {
    padding-top: 6px;
  }

  .audience .card p {
    grid-column: 2;
  }
}

/* --- Доверие: список и окно «Почему так» --- */

.trust-grid {
  display: grid;
  gap: 40px;
}

.trust-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--s-border);
}

.trust-item {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 6px 12px;
  padding: 20px 0;
  border-top: 1px solid var(--s-border);
}

.trust-num {
  grid-row: 1;
  padding-top: 4px;
  color: var(--s-step);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
}

.trust-item h3 {
  grid-column: 2;
}

.trust-item p {
  grid-column: 2;
  color: var(--s-text-muted);
}

@media (min-width: 1120px) {
  .trust-grid {
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: start;
  }

  .trust-figure {
    position: sticky;
    top: 96px;
    grid-row: 1;
    grid-column: 1;
  }

  .trust-list {
    grid-column: 2;
  }

  .trust-item:first-child {
    padding-top: 0;
    border-top: 0;
  }
}

.why {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  background: var(--s-sunken);
}

.why-msg {
  max-width: 92%;
}

.why-card {
  border: 1px solid var(--s-border);
  border-radius: 10px;
  background: var(--s-raised);
}

.why-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 12px;
  padding: 10px 14px;
}

.why-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--s-text-strong);
  font-weight: 600;
}

.why-caret {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.why-run {
  color: var(--s-text-muted);
  font-size: 0.75rem;
}

.why-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  border-top: 1px solid var(--s-border);
}

.why-row p {
  color: var(--s-text);
}

.why-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.why-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.why-icon {
  width: 16px;
  height: 16px;
  margin-top: 3px;
  fill: none;
  stroke: var(--s-glyph);
  stroke-width: 1.4;
  stroke-linejoin: round;
}

.why-row-conf {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.why-row-conf .why-label {
  flex: none;
}

.meter {
  flex: 1;
  min-width: 80px;
  height: 6px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--s-border);
}

.meter-fill {
  display: block;
  width: 94%;
  height: 100%;
  border-radius: inherit;
  background: var(--s-wave);
}

.why-conf {
  color: var(--s-text-strong);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
}

/* --- Вопросы --- */

.faq {
  max-width: 48rem;
  border-top: 1px solid var(--s-border);
}

.faq details {
  border-bottom: 1px solid var(--s-border);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 14px 0;
  color: var(--s-text-strong);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.4;
  list-style: none;
  cursor: pointer;
}

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

.faq summary:hover {
  color: var(--s-link);
}

.faq summary:focus-visible {
  outline-offset: 4px;
}

.faq-icon {
  width: 20px;
  height: 20px;
  color: var(--s-text-muted);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  transition: transform var(--s-base) var(--s-ease);
}

.faq details[open] .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-width: 42rem;
  padding: 0 36px 20px 0;
  color: var(--s-text-muted);
}

.faq-answer p + p {
  margin-top: 12px;
}

/* --- Последний призыв и связь --- */

.section-cta {
  padding-top: 0;
}

.cta {
  display: grid;
  gap: 32px;
  padding: 24px;
  border-radius: 16px;
  background: var(--s-accent-subtle);
}

.cta h2 {
  font-size: clamp(1.625rem, 1.35rem + 1.1vw, 2.25rem);
}

.cta-main p {
  max-width: 34rem;
  margin-top: 12px;
  color: var(--s-text);
}

.cta .actions {
  margin-top: 24px;
}

.contact h3 {
  color: var(--s-text-muted);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.contact p {
  margin-top: 8px;
  color: var(--s-text);
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 18px 0 14px;
  border: 1px solid var(--s-border-strong);
  border-radius: 999px;
  background: var(--s-card);
  color: var(--s-text-strong);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}

.contact-link:not([aria-disabled="true"]):hover {
  border-color: var(--s-accent);
  color: var(--s-text-strong);
}

.contact-link:not([aria-disabled="true"]):focus-visible {
  border-radius: 999px;
}

.contact-link[aria-disabled="true"] {
  border-color: var(--s-border);
  background: var(--s-sunken);
  color: var(--s-text-muted);
  cursor: default;
}

.contact-link[aria-disabled="true"] .contact-icon {
  stroke: var(--s-text-muted);
}

.contact-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--s-glyph);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 639px) {
  .contact-link {
    justify-content: center;
    width: 100%;
  }
}

@media (min-width: 960px) {
  .cta {
    grid-template-columns: 7fr 5fr;
    gap: 48px;
    align-items: center;
    padding: 48px;
  }

  .contact {
    padding-left: 48px;
    border-left: 1px solid var(--s-border);
  }
}

/* --- Подвал --- */

.site-footer {
  padding: 32px 0 40px;
  border-top: 1px solid var(--s-border);
  color: var(--s-text-muted);
  font-size: var(--fs-small);
  line-height: 1.5;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer-about {
  display: grid;
  gap: 6px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--s-text);
}

.footer-brand strong {
  color: var(--s-text-strong);
  font-weight: 600;
}

.brand-mark-sm {
  width: 20px;
  height: 20px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a {
  color: var(--s-text);
  text-decoration-color: var(--s-border-strong);
}

.footer-links a:hover {
  color: var(--s-link-hover);
  text-decoration-color: currentColor;
}

@media (max-width: 639px) {
  .footer-links {
    gap: 0 24px;
  }

  .footer-links a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
}

@media (min-width: 960px) {
  .footer-inner {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }
}

/* --- Страница 404 --- */

.page-404 {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

.page-404 main {
  flex: 1;
}

.nf {
  position: relative;
  padding: 72px 0 96px;
  overflow: hidden;
}

.nf::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--s-paper);
  -webkit-mask-image: var(--s-texture-fade);
  mask-image: var(--s-texture-fade);
  pointer-events: none;
}

.nf > * {
  position: relative;
}

.nf .container > * {
  max-width: 36rem;
}

.page-404 .brand {
  margin-right: auto;
}

.nf-code {
  margin-bottom: 12px;
  color: var(--s-step);
  font-family: var(--font-display);
  font-size: var(--fs-step);
  font-weight: 600;
  font-stretch: 125%;
  line-height: 1;
}

.nf .lead {
  margin-top: 16px;
}

.nf .actions {
  margin-top: 32px;
}

/* --- Без движения --- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  .btn:active {
    transform: none;
  }
}
