/* ==========================================================================
   Антириус Ревизор — лендинг
   Один файл стилей, без зависимостей. Тема следует системной настройке.
   ========================================================================== */

/* ---------- Токены ---------- */
:root {
  --bg:          #f5f6f8;
  --surface:     #ffffff;
  --surface-2:   #eef1f5;
  --text:        #151a21;
  --text-soft:   #39424f;
  --muted:       #5d6875;
  --line:        #dde2e9;
  --line-strong: #c3cbd6;

  --accent:      #1f5ad0;
  --accent-ink:  #16428f;
  --accent-soft: #e4ecfb;
  --on-accent:   #ffffff;

  --done:        #2c8a5a;
  --done-soft:   #dcefe4;
  --wip:         #c1741a;
  --wip-soft:    #f7ebd9;
  --warn:        #b3441f;

  --radius:      14px;
  --radius-sm:   9px;
  --shadow:      0 1px 2px rgba(16, 24, 40, .06), 0 8px 24px rgba(16, 24, 40, .06);
  --maxw:        1140px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
          Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:          #0e1116;
    --surface:     #161b23;
    --surface-2:   #1d232c;
    --text:        #e8ecf2;
    --text-soft:   #c3cbd6;
    --muted:       #97a2b0;
    --line:        #262e39;
    --line-strong: #3a4553;

    --accent:      #7aa6ff;
    --accent-ink:  #a8c4ff;
    --accent-soft: #1a2740;
    --on-accent:   #0e1116;

    --done:        #56b487;
    --done-soft:   #172a22;
    --wip:         #d99a4e;
    --wip-soft:    #2a2317;
    --warn:        #e0784f;

    --shadow:      0 1px 2px rgba(0, 0, 0, .4), 0 10px 30px rgba(0, 0, 0, .35);
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

img, svg { max-width: 100%; }

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.015em; margin: 0 0 .6em; }
h1 { font-size: clamp(2rem, 1.3rem + 2.6vw, 3.2rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 1.1rem + 1.5vw, 2.15rem); font-weight: 650; }
h3 { font-size: 1.08rem; font-weight: 650; }
p  { margin: 0 0 1em; color: var(--text-soft); }

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

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

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--surface); color: var(--text);
  padding: 10px 16px; border-radius: 0 0 var(--radius-sm) 0; z-index: 50;
}
.skip:focus { left: 0; }

/* ---------- Шапка ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar__inner {
  display: flex; align-items: center; gap: 16px;
  min-height: 64px; flex-wrap: wrap;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand__text { font-size: 1.02rem; font-weight: 500; letter-spacing: -0.01em; white-space: nowrap; }
.brand__text b { font-weight: 700; }

.nav { display: flex; align-items: center; gap: 18px; margin-left: auto; flex-wrap: wrap; }
.nav a { color: var(--muted); font-size: .93rem; }
.nav a:hover { color: var(--text); text-decoration: none; }
.nav a.is-active { color: var(--text); }
.nav__cta {
  color: var(--accent) !important;
  border: 1px solid var(--line-strong);
  border-radius: 999px; padding: 6px 14px;
}
.nav__cta:hover { border-color: var(--accent); }

.navtoggle {
  display: none; margin-left: auto; align-items: center; gap: 9px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 8px 12px; font: inherit; font-size: .9rem; cursor: pointer;
}
.navtoggle__bars, .navtoggle__bars::before, .navtoggle__bars::after {
  display: block; width: 16px; height: 2px; background: currentColor; border-radius: 2px;
}
.navtoggle__bars { position: relative; }
.navtoggle__bars::before, .navtoggle__bars::after { content: ""; position: absolute; left: 0; }
.navtoggle__bars::before { top: -5px; }
.navtoggle__bars::after  { top: 5px; }

/* ---------- Секции ---------- */
.section { padding: clamp(56px, 6vw, 96px) 0; }
.section--tint { background: var(--surface); border-block: 1px solid var(--line); }
.section__lead { max-width: 68ch; font-size: 1.05rem; color: var(--muted); margin-bottom: 2rem; }

.eyebrow {
  font-size: .78rem; text-transform: uppercase; letter-spacing: .09em;
  color: var(--accent); font-weight: 600; margin: 0 0 .7em;
}

.note {
  border-left: 3px solid var(--line-strong);
  padding-left: 14px; color: var(--muted); font-size: .95rem; margin-top: 1.4em;
}
.note--center {
  border-left: 0; border-top: 1px solid var(--line);
  padding: 18px 0 0; margin: 34px auto 0; max-width: 74ch; text-align: center;
}

/* ---------- Первый экран ---------- */
.hero { padding: clamp(44px, 5vw, 84px) 0 clamp(48px, 5vw, 88px); }
.hero__grid {
  display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 56px); align-items: center;
}
.lead { font-size: clamp(1.02rem, .97rem + .3vw, 1.2rem); color: var(--text-soft); max-width: 56ch; }

.cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 24px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 22px; border-radius: 999px; font-size: .98rem; font-weight: 550;
  border: 1px solid transparent; cursor: pointer; font-family: inherit;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn:hover { text-decoration: none; }
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: var(--accent-ink); }
.btn--ghost { border-color: var(--line-strong); color: var(--text); background: transparent; }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

.hero__facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.hero__facts li {
  position: relative; padding-left: 26px; color: var(--muted); font-size: .96rem;
}
.hero__facts li::before {
  content: ""; position: absolute; left: 4px; top: .62em;
  width: 8px; height: 8px; border-radius: 2px; background: var(--accent);
}

.hero__figure, .split__figure { margin: 0; }
figcaption {
  margin-top: 12px; font-size: .85rem; color: var(--muted); text-align: center;
}

/* ---------- Демонстрационный стенд ---------- */
/* Полоса выделена цветом акцента, а не общим чередованием светлого и
   тёмного: это единственное место страницы, откуда посетитель уходит в
   работающую систему, и теряться среди разделов она не должна. */
.section--demo { background: var(--accent-soft); border-block: 1px solid var(--line); }
.demo {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: clamp(28px, 4vw, 56px); align-items: start;
}
.demo__card { padding-bottom: 22px; }

/* Данные входа читают с экрана и набирают руками, поэтому моноширинный
   шрифт: в нём не путаются похожие знаки. */
.creds { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 16px; margin: 0 0 4px; }
.creds dt { color: var(--muted); font-size: .88rem; }
.creds dd { margin: 0; font-family: var(--mono); font-size: .95rem; overflow-wrap: anywhere; }

/* ---------- Карточки ---------- */
.cards { display: grid; gap: 18px; }
.cards--4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.cards--3 { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.cards--2 { grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); }

.card {
  background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px 22px 6px;
}
.section--tint .card { background: var(--bg); }
.section:not(.section--tint) .card { background: var(--surface); }
.card--lift { box-shadow: var(--shadow); }
.card--big { padding: 28px 26px 16px; }
.card--big h3 { font-size: 1.3rem; margin-bottom: .5em; }
.card p { font-size: .97rem; }

/* ---------- Двухколоночные блоки ---------- */
.split {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 60px); align-items: center;
}
.split--rev .split__text { order: 2; }
.split--rev .split__figure { order: 1; }
.split--tight { align-items: start; margin-top: 32px; }
.split__text > h2 { max-width: 20ch; }

.list { margin: 0 0 1em; padding: 0; list-style: none; display: grid; gap: 12px; }
.list li {
  position: relative; padding-left: 24px; color: var(--text-soft); font-size: .98rem;
}
.list li::before {
  content: ""; position: absolute; left: 2px; top: .58em;
  width: 9px; height: 9px; border-radius: 50%;
  border: 2px solid var(--accent);
}
.list li b { color: var(--text); font-weight: 600; }
.list--compact li { font-size: .95rem; }

.feature { padding: 16px 0; border-top: 1px solid var(--line); }
.feature:first-child { border-top: 0; padding-top: 0; }
.feature p { margin-bottom: 0; font-size: .97rem; }

/* ---------- Готовность ---------- */
.status {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px;
}
.status__col {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px 24px 8px;
}
.section--tint .status__col { background: var(--bg); }
.status__title { display: flex; align-items: center; gap: 10px; font-size: 1rem; }
.status__title::before {
  content: ""; width: 10px; height: 10px; border-radius: 50%;
}
.status__title--done::before { background: var(--done); }
.status__title--plan::before { background: var(--wip); }

.ticks { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 10px; }
.ticks li {
  position: relative; padding-left: 28px; font-size: .95rem; color: var(--text-soft);
}
.ticks li::before {
  content: ""; position: absolute; left: 4px; top: .34em;
  width: 13px; height: 8px; border-left: 2px solid var(--done);
  border-bottom: 2px solid var(--done); transform: rotate(-45deg);
}
.ticks--plan li::before {
  border: 0; width: 12px; height: 12px; top: .38em; transform: none;
  border-radius: 3px; box-shadow: inset 0 0 0 2px var(--wip);
}

/* ---------- Контакты и форма ---------- */
.contact {
  display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: clamp(28px, 4vw, 56px); align-items: start;
}
.form {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px;
}
.section--tint .form { background: var(--bg); }
.field { display: grid; gap: 6px; min-width: 0; }
.field--wide { grid-column: 1 / -1; }
.field label { font-size: .88rem; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: .97rem; color: var(--text);
  background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm); padding: 11px 13px;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--accent); outline: none;
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field--check {
  grid-template-columns: auto 1fr; align-items: start; gap: 10px;
}
.field--check input { width: 18px; height: 18px; margin-top: 3px; }
.field--check label { font-size: .9rem; color: var(--muted); }
.field.is-invalid input, .field.is-invalid textarea { border-color: var(--warn); }

.form .btn { justify-self: start; }
.form__status { margin: 12px 0 0; font-size: .92rem; color: var(--muted); }
.form__status.is-error { color: var(--warn); }
.form__status.is-ok { color: var(--done); }

/* ---------- Подвал ---------- */
.footer { border-top: 1px solid var(--line); padding: 34px 0; background: var(--surface); }
.footer__inner {
  display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: start;
}
.footer__brand { font-weight: 600; color: var(--text); margin: 0 0 6px; }
.footer__note { color: var(--muted); font-size: .9rem; max-width: 46ch; margin: 0; }
.footer__nav { display: flex; flex-wrap: wrap; gap: 16px; }
.footer__nav a { color: var(--muted); font-size: .9rem; }
.footer__nav a:hover { color: var(--text); text-decoration: none; }

/* ==========================================================================
   Инлайновая графика
   ========================================================================== */
.fig {
  display: block; width: 100%; height: auto;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px;
}
.section--tint .fig { background: var(--bg); }
.fig--plan { padding: 8px; }

.fig text {
  font-family: var(--font); font-size: 12px; fill: var(--text);
}
.s-node text { text-anchor: middle; }
.s-label { text-anchor: middle; font-size: 12.5px; fill: var(--text); }
.s-label--left { text-anchor: start; }
.s-label--muted { fill: var(--muted); font-size: 11px; }

.s-caption { font-size: 11px; fill: var(--muted); }
.s-caption--tiny { font-size: 10.5px; }
.s-code { font-family: var(--mono); font-size: 10.5px; fill: var(--muted); }
.s-code--tiny { font-size: 9px; }
.s-code--warn { fill: var(--warn); }
.s-step { font-size: 13px; font-weight: 700; fill: var(--accent); text-anchor: middle; }

.s-surface   { fill: var(--surface); }
.s-surface-2 { fill: var(--surface-2); }
.section--tint .s-surface   { fill: var(--bg); }
.section--tint .s-surface-2 { fill: var(--surface-2); }
.s-line        { stroke: var(--line); }
.s-line-strong { stroke: var(--line-strong); }
.s-fill-accent { fill: var(--accent); }
.s-fill-soft   { fill: var(--line-strong); }

.s-grid path { stroke: var(--line); stroke-width: 1; fill: none; }
.s-link path { stroke: var(--line-strong); stroke-width: 1.5; fill: none; }

.s-node rect, .s-node circle {
  fill: var(--surface-2); stroke: var(--line-strong); stroke-width: 1.5;
}
.section:not(.section--tint) .s-node rect { fill: var(--bg); }
.s-node rect.screen { fill: var(--surface); stroke: var(--line); }
.s-node rect.leaf { stroke: var(--accent); }
.s-node rect.accented { fill: var(--accent-soft); stroke: var(--accent); }

.s-bars rect { fill: var(--text); }
.s-rows rect { fill: var(--line-strong); opacity: .55; }
.s-rows--queue rect { fill: var(--accent); opacity: .45; }

.s-arrow {
  stroke: var(--accent); stroke-width: 2; fill: none;
  marker-end: url(#arrowhead);
}
.s-arrow--dashed { stroke-dasharray: 6 5; }
.s-break { stroke: var(--warn); stroke-width: 2.5; fill: none; stroke-linecap: round; }
.s-arrowhead { fill: var(--accent); }

.zone rect { stroke-width: 1.5; }
.zone--done rect { fill: var(--done-soft); stroke: var(--done); }
.zone--wip  rect { fill: var(--wip-soft);  stroke: var(--wip); }
.zone--idle rect { fill: var(--surface-2); stroke: var(--line-strong); }
.zone--new  rect { fill: var(--accent-soft); stroke: var(--accent); stroke-dasharray: 5 4; }
.section:not(.section--tint) .zone--idle rect { fill: var(--bg); }

.lg--done { fill: var(--done-soft); stroke: var(--done); stroke-width: 1.5; }
.lg--wip  { fill: var(--wip-soft);  stroke: var(--wip);  stroke-width: 1.5; }
.lg--idle { fill: var(--surface-2); stroke: var(--line-strong); stroke-width: 1.5; }
.s-legend text { font-size: 11px; fill: var(--muted); }

.step circle { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1.5; }
.handle circle { fill: var(--surface); stroke: var(--accent); stroke-width: 1.5; }

/* ==========================================================================
   Адаптив
   ========================================================================== */
@media (max-width: 960px) {
  .hero__grid, .split, .contact, .demo { grid-template-columns: minmax(0, 1fr); }
  .split--rev .split__text, .split--rev .split__figure { order: 0; }
  .split__text > h2 { max-width: none; }
  .hero__figure, .split__figure { order: 2; }
  .contact__text { order: 0; }
}

@media (max-width: 780px) {
  body { font-size: 16px; }
  .navtoggle { display: inline-flex; }
  .nav {
    display: none; width: 100%; margin: 0 0 12px;
    flex-direction: column; align-items: flex-start; gap: 2px;
  }
  .nav.is-open { display: flex; }
  .nav a { width: 100%; padding: 10px 2px; border-bottom: 1px solid var(--line); }
  .nav__cta { border: 0 !important; padding: 10px 2px; }
  .status__col, .card, .form { padding-inline: 18px; }
  .form { grid-template-columns: 1fr; }
  .form .btn { justify-self: stretch; }
  .note--center { text-align: left; }
  figcaption { text-align: left; }
}

@media (max-width: 420px) {
  .cta .btn { width: 100%; }
  .fig { padding: 8px; }
}

/* Ловушка для роботов. Убрана из потока и из обхода клавиатурой, но не
   через display: none — часть роботов такие поля пропускает. */
.field--trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
