/* Публичный сайт платформы — токены Nocturne, как в кабинете (cabinet/src/styles/nocturne.css) */
@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;
}

:root {
  color-scheme: dark;
  --bg: #161826;
  --surface: #232532;
  --canvas: #131522;
  --text: #e9e9ed;
  --muted: #9397ab;
  --faint: #75798c;
  --divider: color-mix(in srgb, #e9e9ed 14%, transparent);
  --accent: #9184d9;
  --accent-strong: #b5abfc;
  --accent-soft: color-mix(in srgb, #9184d9 16%, transparent);
  --accent-contrast: #161826;
  --ok: oklch(0.8 0.12 160);
  --shadow: 0 0 0 1px #3f424d, 0 16px 40px rgba(0, 0, 0, 0.45);
  --radius: 14px;
  --font: 'Inter Variable', 'Inter', system-ui, sans-serif;
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #f3f5fe;
    --surface: #ffffff;
    --canvas: #eceef8;
    --text: #292b31;
    --muted: #595d6c;
    --faint: #75798c;
    --divider: color-mix(in srgb, #292b31 12%, transparent);
    --accent: #796cbf;
    --accent-strong: #5d5294;
    --accent-soft: color-mix(in srgb, #796cbf 12%, transparent);
    --accent-contrast: #ffffff;
    --ok: oklch(0.5 0.1 160);
    --shadow: 0 0 0 1px #cfd3e5, 0 12px 32px rgba(41, 43, 49, 0.08);
  }
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.muted {
  color: var(--muted);
}
.small {
  font-size: 14px;
}

/* Шапка */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--divider);
}
.top-row {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 650;
  letter-spacing: -0.01em;
}
.brand:hover {
  text-decoration: none;
}
.brand svg {
  width: 28px;
  height: 28px;
  fill: var(--accent);
  stroke: var(--accent);
  stroke-width: 2.2;
  stroke-linecap: round;
}
.brand svg circle:last-of-type {
  fill: var(--accent-strong);
  stroke: var(--accent-strong);
}
.brand.small {
  font-size: 15px;
}
.nav {
  display: flex;
  gap: 22px;
  margin-left: auto;
  font-size: 15px;
}
.nav a {
  color: var(--muted);
}
.nav a:hover {
  color: var(--text);
  text-decoration: none;
}

/* Кнопки */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 20px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.btn:hover {
  text-decoration: none;
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-contrast);
}
.btn-primary:hover {
  background: var(--accent-strong);
}
.btn-ghost {
  border: 1px solid var(--divider);
  color: var(--text);
}
.btn-ghost:hover {
  border-color: var(--accent);
}
.top .btn {
  height: 38px;
  padding: 0 16px;
}

/* Первый экран */
.hero {
  padding: 88px 0 72px;
  background: radial-gradient(900px 420px at 80% 10%, var(--accent-soft), transparent 70%);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: center;
}
.pill {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 14px;
  font-weight: 600;
}
h1 {
  margin: 18px 0 16px;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 750;
}
.lead {
  margin: 0 0 28px;
  font-size: 19px;
  color: var(--muted);
  max-width: 34em;
}
.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Макет диалога */
.chat {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  border-radius: 20px;
  background: var(--canvas);
  box-shadow: var(--shadow);
}
.chat-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--divider);
  font-weight: 600;
  font-size: 15px;
}
.chat-head .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ok);
}
.msg {
  max-width: 82%;
  padding: 9px 13px;
  border-radius: 14px;
  font-size: 15px;
  line-height: 1.4;
}
.msg.bot {
  align-self: flex-start;
  background: var(--surface);
  border-bottom-left-radius: 4px;
}
.msg.user {
  align-self: flex-end;
  background: var(--accent);
  color: var(--accent-contrast);
  border-bottom-right-radius: 4px;
}
.lead-card {
  display: flex;
  flex-direction: column;
  margin-top: 6px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px dashed var(--accent);
  font-size: 14px;
}

/* Разделы */
.section {
  padding: 64px 0;
}
.section + .section {
  border-top: 1px solid var(--divider);
}
h2 {
  margin: 0 0 28px;
  font-size: clamp(26px, 3.2vw, 34px);
  letter-spacing: -0.02em;
  font-weight: 720;
}
h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 650;
}
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.cards.two {
  grid-template-columns: repeat(2, 1fr);
}
.card {
  padding: 22px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps li {
  counter-increment: step;
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid var(--divider);
  color: var(--muted);
  font-size: 15px;
}
.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 700;
}
.steps b {
  color: var(--text);
}

/* Много ботов */
.many-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.many .lead {
  margin-bottom: 12px;
}
.bots {
  display: grid;
  gap: 12px;
}
.bot-row {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.bot-row div {
  display: flex;
  flex-direction: column;
}
.bot-row span:not(.bot-icon) {
  color: var(--muted);
  font-size: 14px;
}
.bot-icon {
  flex: none;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  font-size: 20px;
}

/* Схема сценария — карточки как в редакторе кабинета (cabinet/src/styles/scenario.css) */
.flow {
  margin-top: 28px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow-x: auto;
  background-color: var(--canvas);
  background-image: radial-gradient(color-mix(in srgb, var(--text) 9%, transparent) 1px, transparent 1px);
  background-size: 22px 22px;
}
.flow-canvas {
  position: relative;
  width: 1060px;
  height: 410px;
  margin: 0 auto;
}
.flow-edges {
  position: absolute;
  inset: 0;
}
.edge {
  fill: none;
  stroke: var(--faint);
  stroke-width: 1.5;
}
.edge.list {
  stroke: var(--accent);
}
.edge.dashed {
  stroke-dasharray: 4 4;
}
.arrow {
  fill: var(--faint);
}
.arrow.list {
  fill: var(--accent);
}
.flow-node,
.flow-out {
  position: absolute;
  width: 210px;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  font-size: 13px;
  line-height: 1.45;
}
.flow-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px;
  border-bottom: 1px solid var(--divider);
}
.flow-name {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 12px;
  color: var(--accent-strong);
}
.flow-wait {
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
}
.flow-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
}
.flow-meta {
  font-size: 11px;
  color: var(--muted);
}
.flow-action {
  font-size: 11px;
  color: var(--ok);
}
.flow-button {
  padding: 6px 10px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  text-align: center;
}
.flow-out {
  display: flex;
  flex-direction: column;
  padding: 8px 12px;
  border: 1px dashed var(--accent);
  box-shadow: none;
  background: var(--accent-soft);
}
.flow-out span {
  color: var(--muted);
  font-size: 12px;
}
.flow-caption {
  margin: 12px 0 0;
  text-align: center;
}

/* Цены */
.plans {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.plan {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.plan-main {
  box-shadow:
    0 0 0 2px var(--accent),
    0 16px 40px rgba(0, 0, 0, 0.35);
}
.plan p {
  margin: 0;
}
.price {
  font-size: 36px;
  font-weight: 750;
  letter-spacing: -0.02em;
}
.price span {
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0;
}
.checks {
  margin: 4px 0 8px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
  font-size: 15px;
}
.checks li {
  position: relative;
  padding-left: 26px;
}
.checks li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 7px;
  width: 12px;
  height: 7px;
  border-left: 2px solid var(--ok);
  border-bottom: 2px solid var(--ok);
  transform: rotate(-45deg);
}
.plan .btn {
  margin-top: auto;
  align-self: flex-start;
}

/* Документы */
.doc {
  max-width: 820px;
}
.doc h1 {
  font-size: clamp(28px, 4vw, 38px);
  margin-top: 0;
}
.doc h2 {
  margin: 36px 0 12px;
  font-size: 22px;
}
.doc p,
.doc li {
  color: var(--text);
  font-size: 16px;
}
.doc ul {
  padding-left: 22px;
}
.req {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 24px;
}
.req th,
.req td {
  padding: 12px 0;
  border-bottom: 1px solid var(--divider);
  text-align: left;
  vertical-align: top;
}
.req th {
  width: 180px;
  color: var(--muted);
  font-weight: 500;
}

/* Подвал */
.foot {
  padding: 40px 0 56px;
  border-top: 1px solid var(--divider);
  background: var(--canvas);
  font-size: 15px;
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 24px;
}
.foot-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.foot p {
  margin: 10px 0 0;
}

@media (max-width: 900px) {
  .hero-grid,
  .many-grid,
  .plans,
  .cards,
  .cards.two,
  .steps,
  .foot-grid {
    grid-template-columns: 1fr;
  }
  .hero {
    padding: 48px 0;
  }
  .nav {
    display: none;
  }
  .top .btn {
    margin-left: auto;
  }
  .section {
    padding: 48px 0;
  }
}
