/* ==========================================================================
   Platforma — лендинг
   ========================================================================== */

/* ---------- Шрифты (лежат в проекте, без внешних CDN) ---------- */
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/onest-cyrillic-wght-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/onest-latin-wght-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;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-cyrillic-400-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-latin-400-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;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/jetbrains-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: "JetBrains Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/jetbrains-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 {
  --accent: #2F5BD8;
  --accent-hover: #2449B5;
  --accent-soft: #EEF3FF;
  --accent-on-dark: #8FB0FF;

  --ink: #15171C;
  --ink-2: #33363D;
  --muted: #4A4F5A;
  --muted-2: #5B616E;
  --faint: #8A909B;

  --ground: #F6F6F3;
  --ground-2: #F0F0EC;
  --surface: #FFFFFF;
  --line: #E4E4DF;
  --line-soft: #ECECE7;

  --ok: #1E7A4C;
  --ok-soft: #9BE3B9;
  --ok-ink: #0E3B24;
  --warn-ink: #8A4B00;
  --warn-soft: #FFF0DA;

  --dark: #15171C;
  --dark-2: #1F2229;
  --dark-3: #2A2E37;
  --dark-line: #2E323B;
  --on-dark: #FFFFFF;
  --on-dark-2: #C9CDD4;
  --on-dark-3: #9AA0AB;

  --font: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --wrap: 1200px;
  --gutter: 24px;
  --section-y: 112px;
  --radius-l: 28px;
  --radius-m: 24px;
  --radius-s: 14px;

  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--ground);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
s { text-decoration-thickness: 1.5px; }

.mono { font-family: var(--mono); font-weight: 500; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.section { padding-top: var(--section-y); padding-bottom: var(--section-y); }
.section--white { background: var(--surface); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.section--dark { background: var(--dark); color: var(--on-dark); }

.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px;
}
.skip-link:focus { top: 12px; color: #fff; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 14px 24px;
  border-radius: var(--radius-s);
  font-weight: 600; font-size: 1rem; text-decoration: none;
  border: 1px solid transparent;
  transition: transform 100ms ease-out, background-color 150ms ease, border-color 150ms ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-hover); color: #fff; }
.btn--ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { color: var(--ink); border-color: #CFCFC8; }
.btn--dark { background: var(--ink); color: #fff; min-height: 44px; padding: 10px 18px; font-size: 0.9375rem; border-radius: 12px; }
.btn--dark:hover { background: #2A2D35; color: #fff; }
.btn--light { background: #fff; color: var(--ink); width: 100%; }
.btn--light:hover { background: #F1F3F8; color: var(--ink); }

/* ---------- Шапка ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246, 246, 243, 0.78);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(21, 23, 28, 0.06);
}
.nav { display: flex; align-items: center; gap: 32px; padding-top: 14px; padding-bottom: 14px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.logo:hover { color: var(--ink); }
.logo__mark { width: 32px; height: 32px; border-radius: 9px; background: var(--accent); display: grid; place-items: center; }
.logo__text { font-weight: 700; font-size: 1.1875rem; letter-spacing: -0.01em; }
.nav__links { display: flex; gap: 28px; flex-grow: 1; font-size: 0.9375rem; }
.nav__links a { color: var(--muted); text-decoration: none; padding: 6px 0; }
.nav__links a:hover { color: var(--ink); }
.nav__login { margin-left: auto; color: var(--ink); text-decoration: none; font-size: 0.9375rem; font-weight: 500; padding: 6px 0; }
.nav__login:hover { color: var(--accent); }

/* ---------- Общие заголовки секций ---------- */
.eyebrow {
  font-size: 0.875rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--accent);
}
.section--dark .eyebrow { color: var(--accent-on-dark); }
.section-head { display: flex; flex-direction: column; gap: 16px; max-width: 760px; margin-bottom: 56px; }
.h2 {
  font-size: clamp(2rem, 3.8vw, 3rem);
  line-height: 1.1; letter-spacing: -0.025em; font-weight: 700;
  text-wrap: balance;
}
.lead { font-size: 1.1875rem; color: var(--muted); }
.section--dark .lead { color: var(--on-dark-2); }

/* ---------- 1. Первый экран ---------- */
.hero { display: flex; flex-wrap: wrap; gap: 64px; align-items: center; padding-top: 96px; padding-bottom: 112px; }
.hero__text { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.pill {
  align-self: flex-start;
  font-size: 0.875rem; font-weight: 500; color: var(--muted);
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px;
}
.h1 {
  font-size: clamp(2.5rem, 5.4vw, 4.25rem);
  line-height: 1.04; letter-spacing: -0.035em; font-weight: 700;
}
.h1 span { color: var(--accent); }
.hero__lead { font-size: 1.25rem; line-height: 1.5; color: var(--muted); max-width: 560px; }
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero__facts { display: flex; gap: 12px 24px; flex-wrap: wrap; font-size: 0.875rem; color: var(--muted-2); }
.hero__facts li { display: flex; align-items: center; gap: 8px; }
.hero__visual { flex: 1 1 320px; display: flex; justify-content: center; }

/* Телефон */
.phone {
  width: min(330px, 100%);
  aspect-ratio: 1 / 2;
  border-radius: 48px; background: var(--dark); padding: 11px;
  box-shadow: 0 40px 80px -24px rgba(21, 23, 28, 0.35), 0 8px 24px rgba(21, 23, 28, 0.12);
}
.phone__screen {
  height: 100%; border-radius: 38px; background: #ECEEF2; overflow: hidden;
  display: flex; flex-direction: column; font-size: 0.875rem; line-height: 1.45;
}
.chat-head {
  background: rgba(255, 255, 255, 0.86); padding: 22px 16px 12px;
  display: flex; align-items: center; gap: 10px; border-bottom: 1px solid #E1E3E8;
}
.avatar {
  width: 36px; height: 36px; flex-shrink: 0; border-radius: 50%; background: #DCE5FB; color: var(--accent);
  font-weight: 700; font-size: 0.875rem; display: grid; place-items: center;
}
.chat-head__name { display: block; font-weight: 600; font-size: 0.9375rem; line-height: 1.25; }
.chat-head__sub { display: block; font-size: 0.75rem; color: #6B7180; line-height: 1.25; }
.chat { flex-grow: 1; padding: 14px 12px; display: flex; flex-direction: column; gap: 10px; }
.bubble { max-width: 80%; background: #fff; padding: 9px 12px; border-radius: 16px 16px 16px 4px; align-self: flex-start; }
.order-card {
  align-self: flex-end; width: 86%;
  background: #fff; border: 1.5px solid var(--accent); border-radius: 16px 16px 4px 16px;
  padding: 12px; display: flex; flex-direction: column; gap: 8px;
}
.order-card__top { display: flex; align-items: center; justify-content: space-between; font-weight: 700; }
.badge { font-size: 0.6875rem; font-weight: 600; border-radius: 999px; padding: 3px 8px; }
.badge--warn { color: var(--warn-ink); background: var(--warn-soft); }
.badge--ok { color: var(--ok-ink); background: var(--ok-soft); font-size: 0.8125rem; padding: 5px 12px; }
.order-card__rows { display: flex; flex-direction: column; gap: 4px; font-size: 0.8125rem; color: var(--ink-2); }
.order-card__rows li { display: flex; justify-content: space-between; gap: 8px; }
.order-card__rows .mono { font-weight: 400; }
.order-card__rows s { color: #9AA0AB; }
.order-card__more { color: #6B7180; }
.order-card__addr { font-size: 0.75rem; color: #6B7180; border-top: 1px solid #ECEEF2; padding-top: 7px; }
.order-card__open {
  text-align: center; font-weight: 600; font-size: 0.8125rem; color: var(--accent);
  background: var(--accent-soft); border-radius: 10px; padding: 8px;
}
.sys-msg {
  align-self: center; text-align: center; font-size: 0.75rem; color: #6B7180;
  background: rgba(255, 255, 255, 0.7); border-radius: 999px; padding: 4px 10px;
}
.composer {
  padding: 10px 12px 16px; display: flex; gap: 8px; align-items: center;
  background: rgba(255, 255, 255, 0.86); border-top: 1px solid #E1E3E8;
}
.composer__input { flex-grow: 1; background: #F1F2F5; border-radius: 999px; padding: 9px 14px; font-size: 0.8125rem; color: #8A909B; }
.composer__btn { background: var(--accent); color: #fff; font-size: 0.8125rem; font-weight: 600; border-radius: 999px; padding: 9px 12px; white-space: nowrap; }

/* ---------- 2. Роли ---------- */
.roles { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.role {
  background: var(--ground); border-radius: var(--radius-m); padding: 28px;
  display: flex; flex-direction: column; gap: 18px;
}
.role__icon { width: 48px; height: 48px; border-radius: 14px; background: var(--surface); display: grid; place-items: center; }
.role__title { font-size: 1.3125rem; letter-spacing: -0.01em; line-height: 1.25; }
.role__pain { color: var(--muted-2); font-style: italic; }
.tag {
  margin-top: auto; align-self: flex-start;
  font-size: 0.875rem; font-weight: 600; color: var(--accent);
  background: var(--accent-soft); border-radius: 999px; padding: 6px 12px;
}

/* ---------- 3. Статусы ---------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.step {
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 20px;
  display: flex; flex-direction: column; gap: 10px;
}
.step__num { font-family: var(--mono); font-size: 0.8125rem; color: var(--faint); }
.step__title { font-weight: 600; font-size: 1.0625rem; line-height: 1.3; }
.step__text { font-size: 0.875rem; color: var(--muted-2); }
.step--final { background: var(--dark); border-color: var(--dark); color: #fff; }
.step--final .step__num { color: var(--on-dark-3); }
.step--final .step__text { color: var(--on-dark-2); }
.note { margin-top: 24px; font-size: 0.9375rem; color: var(--muted-2); }

/* ---------- 4. История ---------- */
.history { display: flex; flex-wrap: wrap; gap: 64px; align-items: center; }
.history__text { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.history__text .section-head { margin-bottom: 0; gap: 20px; }
.checks { display: flex; flex-direction: column; gap: 12px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; }
.checks svg { flex-shrink: 0; margin-top: 3px; }
.checks--dark { color: #E4E6EA; }

.log {
  flex: 1 1 460px; min-width: 0;
  background: var(--dark-2); border: 1px solid var(--dark-line); border-radius: var(--radius-l); padding: 28px;
  display: flex; flex-direction: column; gap: 20px;
}
.log__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.log__title { display: block; font-weight: 700; font-size: 1.1875rem; }
.log__sub { display: block; font-size: 0.875rem; color: var(--on-dark-3); }
.log__list { font-size: 0.9375rem; }
.log__item { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 16px; padding: 12px 0; border-top: 1px solid var(--dark-line); }
.log__time { font-family: var(--mono); font-weight: 400; color: var(--on-dark-3); }
.log__item b { font-weight: 600; }
.log__body { display: flex; flex-direction: column; gap: 6px; }
.diff { background: var(--dark-3); border-radius: 10px; padding: 8px 12px; font-size: 0.875rem; color: #E4E6EA; }
.diff s { color: var(--faint); }
.diff b { color: #fff; }

/* ---------- 5. Что внутри ---------- */
.features { display: flex; flex-wrap: wrap; gap: 20px; }
.features__card { min-width: 0; border-radius: var(--radius-m); padding: 32px; display: flex; flex-direction: column; gap: 20px; }
.features__card--now { flex: 1 1 460px; background: var(--surface); border: 1px solid var(--line); }
.features__card--soon { flex: 1 1 360px; background: var(--ground-2); }
.features__label { font-size: 0.875rem; font-weight: 600; }
.features__card--now .features__label { color: var(--ok); }
.features__card--soon .features__label { color: var(--muted-2); }
.features__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px 24px; }
.features__card--soon .checks { color: var(--ink-2); }

/* ---------- 6. Подключение ---------- */
.connect { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.connect__step { display: flex; flex-direction: column; gap: 12px; padding-top: 20px; border-top: 2px solid var(--ink); }
.connect__num { font-family: var(--mono); font-size: 0.875rem; color: var(--accent); }
.connect__title { font-size: 1.25rem; }
.connect__text { color: var(--muted-2); }

/* ---------- 7. Призыв ---------- */
.cta {
  background: var(--accent); color: #fff; border-radius: 32px;
  padding: clamp(40px, 6vw, 80px);
  display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-end; justify-content: space-between;
}
.cta__text { flex: 999 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.cta__title { font-size: clamp(2rem, 4.2vw, 3.375rem); line-height: 1.06; letter-spacing: -0.03em; font-weight: 700; text-wrap: balance; }
.cta__lead { font-size: 1.1875rem; color: rgba(255, 255, 255, 0.88); max-width: 560px; }
.cta__actions { flex: 1 1 260px; display: flex; flex-direction: column; gap: 12px; }
.cta__contact { font-size: 0.875rem; color: rgba(255, 255, 255, 0.85); text-align: center; }
.cta__contact a { color: #fff; }

/* ---------- Подвал ---------- */
.footer {
  display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between;
  padding-top: 32px; padding-bottom: 48px; font-size: 0.875rem; color: var(--muted-2);
  border-top: 1px solid var(--line);
}
.footer strong { color: var(--ink); }
.footer a { color: inherit; }
.footer a:hover { color: var(--ink); }

/* ---------- Появление при прокрутке ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 600ms var(--ease-out), transform 700ms var(--ease-out);
  transition-delay: var(--delay, 0ms);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Адаптив ---------- */
@media (max-width: 760px) {
  :root { --section-y: 72px; --gutter: 16px; }
  .nav { gap: 16px; }
  .nav__links { display: none; }
  .hero { padding-top: 48px; padding-bottom: 72px; gap: 48px; }
  .hero__actions .btn { flex: 1 1 auto; }
  .section-head { margin-bottom: 40px; }
  .log { padding: 20px; }
  .log__item { grid-template-columns: 48px minmax(0, 1fr); gap: 12px; }
  .features__card { padding: 24px; }
}
@media (max-width: 460px) {
  .nav .btn { display: none; }
}

/* ---------- Доступность ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
  .btn:active { transform: none; }
  .js .reveal { transform: none; transition: opacity 200ms ease; transition-delay: 0ms; }
}
@media (prefers-reduced-transparency: reduce) {
  .header { background: var(--ground); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  :root { --muted: #33363D; --muted-2: #3A3F48; --line: #9A9A92; }
}

/* ---------- Документы (/privacy, /terms) ---------- */
.doc { max-width: 800px; padding-top: 56px; padding-bottom: 96px; }
.doc__draft { background: var(--warn-soft); color: var(--warn-ink); border-radius: var(--radius-s); padding: 12px 16px; font-size: 0.9375rem; margin-bottom: 32px; }
.doc h1 { font-size: clamp(2rem, 5vw, 2.75rem); line-height: 1.15; letter-spacing: -0.02em; }
.doc__meta { margin-top: 16px; font-size: 0.9375rem; color: var(--muted-2); }
.doc__body { margin-top: 8px; color: var(--ink-2); }
.doc__body > * + * { margin-top: 12px; }
.doc__body h2 { margin-top: 48px; margin-bottom: 4px; font-size: 1.375rem; line-height: 1.3; letter-spacing: -0.01em; color: var(--ink); }
.doc__body ul { list-style: disc; padding-left: 1.25em; }
.doc__body li + li { margin-top: 6px; }
.doc mark { background: var(--warn-soft); color: var(--warn-ink); border-radius: 4px; padding: 0 2px; }
.doc__table { overflow-x: auto; }
.doc__table table { width: 100%; min-width: 560px; border-collapse: collapse; background: var(--surface); font-size: 0.9375rem; line-height: 1.45; }
.doc__table th, .doc__table td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.doc__table th { background: var(--ground-2); font-weight: 600; color: var(--ink); }
@media (max-width: 760px) {
  .doc { padding-top: 32px; padding-bottom: 64px; }
  .doc__body h2 { margin-top: 36px; }
}

/* Инструкции (/supplier) */
.doc__body ol { list-style: decimal; padding-left: 1.25em; }
.doc__body h3 { font-size: 1.0625rem; color: var(--ink); }
.doc__body code { font-family: "JetBrains Mono", monospace; font-size: 0.875em; }
.steps__pair { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.steps__card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 20px; }
.steps__card > * + * { margin-top: 12px; }
.steps__hint { font-size: 0.9375rem; color: var(--muted-2); }
