@font-face {
  font-family: "Inter Tight";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-tight-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 Tight";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-tight-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+2190-2199, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-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: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-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+2190-2199, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light dark;

  /* Светлая тема: холодный фарфор. Акцент — цвет ручья, тот же, что у «под контролем». */
  --bg: #f5f7fa;
  --bg-alt: #ebeff5;
  --card: #ffffff;
  --text: #0e1320;
  --text-2: #4b5468;
  --text-3: #848c9e;
  --hair: rgba(14, 19, 32, 0.1);
  --hair-strong: rgba(14, 19, 32, 0.24);
  /* Ядро свечения глаз героя, затемнённое под светлую бумагу. */
  --eye: #0c7480;
  --accent: var(--eye);
  --accent-text: var(--eye);
  --accent-ink: #ffffff;
  --wash: color-mix(in srgb, var(--eye) 12%, var(--card));
  /* Крупная плашка остаётся бумагой, край — цветом ручья. */
  --panel: var(--wash);
  --panel-ink: var(--text);
  --panel-muted: var(--text-2);
  --panel-line: color-mix(in srgb, var(--accent) 16%, transparent);
  --panel-mark: var(--accent);
  --panel-border: color-mix(in srgb, var(--accent) 32%, var(--hair));
  --ok: #1f8a5b;
  --stop: #c4321f;
  --nav-bg: rgba(245, 247, 250, 0.84);
  --grain-opacity: 0.03;

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

  --wrap: 1320px;
  --gutter: clamp(20px, 4vw, 48px);
  --nav-h: 60px;
  --r-ctl: 8px;
  --r-card: 20px;
  --r-sheet: 32px;

  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 0.45s;

  /* Совместимость с блоком сценария. */
  --blue: var(--accent);
  --link: var(--accent-text);
  --fill: color-mix(in srgb, var(--text) 6%, transparent);
  --card-shadow: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0a0c;
    --bg-alt: #111115;
    --card: #17171c;
    --text: #eeede8;
    --text-2: #9c9da5;
    --text-3: #6b6c74;
    --hair: rgba(238, 237, 232, 0.13);
    --hair-strong: rgba(238, 237, 232, 0.34);
    --eye: #77fbfc;
    --accent: var(--eye);
    --accent-text: var(--eye);
    --accent-ink: var(--bg);
    --wash: color-mix(in srgb, var(--eye) 10%, var(--card));
    --panel: var(--card);
    --panel-ink: var(--text);
    --panel-muted: var(--text-2);
    --panel-line: color-mix(in srgb, var(--eye) 28%, transparent);
    --panel-mark: var(--eye);
    --panel-border: color-mix(in srgb, var(--eye) 50%, transparent);
    --ok: #3ccf86;
    --stop: #ff6b6b;
    --nav-bg: rgba(10, 10, 12, 0.72);
    --grain-opacity: 0.07;
  }
}
:root[data-theme="dark"] {
  --bg: #0a0a0c;
  --bg-alt: #111115;
  --card: #17171c;
  --text: #eeede8;
  --text-2: #9c9da5;
  --text-3: #6b6c74;
  --hair: rgba(238, 237, 232, 0.13);
  --hair-strong: rgba(238, 237, 232, 0.34);
  --eye: #77fbfc;
  --accent: var(--eye);
  --accent-text: var(--eye);
  --accent-ink: var(--bg);
  --wash: color-mix(in srgb, var(--eye) 10%, var(--card));
  --panel: var(--card);
  --panel-ink: var(--text);
  --panel-muted: var(--text-2);
  --panel-line: color-mix(in srgb, var(--eye) 28%, transparent);
  --panel-mark: var(--eye);
  --panel-border: color-mix(in srgb, var(--eye) 50%, transparent);
  --ok: #3ccf86;
  --stop: #ff6b6b;
  --nav-bg: rgba(10, 10, 12, 0.72);
  --grain-opacity: 0.07;
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

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

html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
html:has(.admin-bar) { scroll-padding-top: calc(var(--nav-h) + 32px); }
@media (max-width: 782px) {
  html:has(.admin-bar) { scroll-padding-top: calc(var(--nav-h) + 46px); }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  letter-spacing: -0.01em;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

html::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay;
}

img, svg, canvas { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, figure, dl, dd { margin: 0; }
h1, h2, h3 { font-weight: 600; letter-spacing: -0.045em; line-height: 0.98; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 0.18em; }
p + p { margin-top: 0.75rem; }
::selection { background: var(--accent); color: var(--accent-ink); }

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

.mono {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.accent { color: var(--accent-text); }

.skip-link {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 120;
  padding: 10px 16px;
  border-radius: var(--r-ctl);
  background: var(--text);
  color: var(--bg);
  transform: translateY(-180%);
}
.skip-link:focus { transform: none; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.wrap { width: min(var(--wrap), calc(100% - 2 * var(--gutter))); margin: 0 auto; }
.narrow { width: min(880px, calc(100% - 2 * var(--gutter))); }

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

.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--nav-h);
  border-bottom: 1px solid transparent;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.nav.is-scrolled {
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  backdrop-filter: saturate(160%) blur(18px);
  border-bottom-color: var(--hair);
}
body.admin-bar .nav { top: 32px; }
.nav-inner {
  width: min(var(--wrap), calc(100% - 2 * var(--gutter)));
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}
.nav-brand { margin-right: auto; color: var(--text); }
.nav-brand:hover { text-decoration: none; }

.site-logo { display: block; height: 26px; width: auto; }
.site-logo .logo-ink { fill: var(--text); }
.site-logo .logo-blue { fill: var(--accent-text); }
.site-logo .logo-soft { fill: color-mix(in srgb, var(--accent-text) 55%, var(--bg)); }

.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a {
  position: relative;
  color: var(--text-2);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.2s var(--ease);
}
.nav-links a::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 50%;
  width: 6px;
  height: 6px;
  background: var(--accent);
  transform: translateY(-50%) scale(0);
  transition: transform 0.25s var(--ease-out);
}
.nav-links a:hover, .nav-links a.is-active { color: var(--text); text-decoration: none; }
.nav-links a.is-active::before { transform: translateY(-50%) scale(1); }

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--hair);
  border-radius: var(--r-ctl);
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}
.nav-toggle span { width: 16px; height: 1.5px; background: var(--text); }

.theme-switch { display: flex; padding: 2px; border: 1px solid var(--hair); border-radius: var(--r-ctl); }
.theme-switch button {
  display: grid;
  place-items: center;
  width: 28px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--text-3);
  cursor: pointer;
}
.theme-switch button[aria-checked="true"] { background: var(--text); color: var(--bg); }
.theme-switch svg { width: 14px; height: 14px; }

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

.btn, .nav-cta {
  --flood-x: 50%;
  --flood-y: 50%;
  --flood-dur: 0.75s;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: var(--r-ctl);
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.btn { min-height: 56px; padding: 0 24px; font-size: 17px; }
.nav-cta { height: 38px; padding: 0 16px; font-size: 14px; }
.btn > span:not(.btn-flood),
.nav-cta > span:not(.btn-flood) { position: relative; z-index: 1; }
.btn-flood {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.btn-tide {
  position: absolute;
  left: var(--flood-x);
  top: var(--flood-y);
  width: 460%;
  aspect-ratio: 1;
  background: var(--eye);
  transform: translate(-50%, -50%) scale(0);
  transition: none;
  -webkit-mask-image: url("../img/tide-edge.svg?v=3");
  mask-image: url("../img/tide-edge.svg?v=3");
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  mask-mode: alpha;
}
.nav-cta .btn-tide { background: var(--card); }
.btn:hover > .btn-flood > .btn-tide, .btn:focus-visible > .btn-flood > .btn-tide,
.nav-cta:hover > .btn-flood > .btn-tide, .nav-cta:focus-visible > .btn-flood > .btn-tide {
  transform: translate(-50%, -50%) scale(1);
  transition: transform var(--flood-dur) ease-in-out;
}
.btn:hover, .btn:focus-visible, .nav-cta:hover, .nav-cta:focus-visible { text-decoration: none; }
.btn-primary, .nav-cta { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover, .btn-primary:focus-visible { color: var(--bg); }
.nav-cta:hover, .nav-cta:focus-visible { color: var(--text); }
.btn-ghost { background: var(--card); color: var(--text); }
.btn-ghost:hover, .btn-ghost:focus-visible { color: var(--bg); }
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; }
.cta-placeholder { visibility: hidden; }

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

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: calc(100svh - var(--nav-h));
  padding-top: clamp(20px, 4vh, 48px);
  overflow: hidden;
}
.hero-character {
  position: absolute;
  z-index: 0;
  right: clamp(-80px, -2vw, -20px);
  bottom: 6%;
  height: min(74%, 680px);
  width: auto;
  max-width: none;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 28px 36px rgba(16, 24, 40, 0.16));
}
.hero-grid, .stream { position: relative; z-index: 1; }
:root[data-theme="dark"] .hero-character { opacity: 0.78; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hero-character { opacity: 0.78; }
}
.hero-grid { display: grid; gap: clamp(28px, 4vh, 48px); }
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--hair);
  color: var(--text-2);
}
.hero-meta span:first-child { color: var(--accent-text); }
.hero-meta span:last-child { margin-left: auto; }
.hero-title {
  font-size: clamp(48px, calc(10.6vw - 4px), 172px);
  font-weight: 600;
  line-height: 0.9;
  letter-spacing: -0.06em;
}
.hero-title .accent,
.closer-title .accent { color: var(--eye); }
.line { display: block; overflow: hidden; padding-bottom: 0.06em; margin-bottom: -0.06em; }
.line > span { display: inline-block; }
.hero-foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 28px 64px;
}
.hero-sub {
  max-width: 560px;
  color: var(--text-2);
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.4;
  letter-spacing: -0.02em;
}

.stream {
  position: relative;
  flex: 1;
  min-height: clamp(200px, 30vh, 360px);
  margin-top: clamp(28px, 5vh, 56px);
  border-top: 1px solid var(--hair);
}
.stream canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.stream-legend {
  position: absolute;
  inset: 14px 0 auto;
  display: flex;
  justify-content: space-between;
  padding: 0 var(--gutter);
  color: var(--text-3);
  pointer-events: none;
}
.stream-legend > span:not(.stream-gate-label) {
  position: relative;
  z-index: 1;
  isolation: isolate;
  font-size: 14px;
  padding: 3px 10px;
  border-radius: 999px;
  color: var(--text-3);
  border: 1px solid color-mix(in srgb, var(--text) 42%, transparent);
}
.stream-legend > span:not(.stream-gate-label)::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
}
.stream-gate-label {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  padding: 3px 8px;
  border: 1px solid var(--hair-strong);
  border-radius: 4px;
  background: var(--bg);
  color: var(--text);
}

.marquee {
  overflow: hidden;
  border-block: 1px solid var(--hair);
  background: var(--bg);
}
.marquee-track { display: flex; width: max-content; animation: marquee 46s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee ul { display: flex; margin: 0; padding: 0; list-style: none; }
.marquee li {
  display: flex;
  align-items: center;
  gap: clamp(24px, 3vw, 48px);
  padding: clamp(16px, 2.2vw, 28px) 0;
  padding-right: clamp(24px, 3vw, 48px);
  font-size: clamp(30px, 4.4vw, 64px);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1;
  white-space: nowrap;
}
.marquee li::after {
  content: "";
  width: 0.22em;
  height: 0.22em;
  background: var(--eye);
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Разделы ---------- */

main { counter-reset: chapter; }

.section {
  position: relative;
  padding: clamp(72px, 10vw, 136px) 0;
  background: var(--bg);
}
.band { background: var(--bg-alt); }

.section ~ .section {
  margin-top: calc(-1 * var(--r-sheet));
  border-radius: var(--r-sheet) var(--r-sheet) 0 0;
  box-shadow: 0 -1px 0 var(--hair), 0 -24px 60px rgba(0, 0, 0, 0.06);
}
:root[data-theme="dark"] .section ~ .section { box-shadow: 0 -1px 0 var(--hair), 0 -30px 70px rgba(0, 0, 0, 0.55); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .section ~ .section { box-shadow: 0 -1px 0 var(--hair), 0 -30px 70px rgba(0, 0, 0, 0.55); }
}

.section-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: clamp(48px, 6vw, 88px);
  padding-top: 18px;
  border-top: 1px solid var(--hair-strong);
}
.kicker {
  display: flex;
  gap: 12px;
  color: var(--eye);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.section-head .kicker::before {
  counter-increment: chapter;
  content: counter(chapter, decimal-leading-zero);
  color: var(--eye);
}
.section-head h2 { font-size: clamp(37px, calc(6.4vw - 3px), 101px); }
.lede {
  max-width: 920px;
  color: var(--text-2);
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.42;
  letter-spacing: -0.02em;
}
.section-head .lede { margin-top: 12px; }
#example .section-head { margin-bottom: clamp(28px, 3.5vw, 48px); }

.facts { display: grid; gap: 0; }
.facts-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.facts-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.facts > div {
  min-width: 0;
  padding: 24px 28px 8px 0;
  border-top: 1px solid var(--hair);
}
.facts > div + div { padding-left: 28px; border-left: 1px solid var(--hair); }
.facts h3 { font-size: clamp(22px, 2vw, 28px); letter-spacing: -0.03em; }
.facts p { margin-top: 12px; color: var(--text-2); }

/* ---------- О решении ---------- */

.statement {
  max-width: 1180px;
  margin: 0 0 clamp(64px, 8vw, 112px) auto;
  font-size: clamp(28px, 4vw, 60px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.04em;
}
.statement.is-split .w { opacity: 0.16; transition: opacity 0.35s var(--ease); }
.statement.is-split .w.is-lit { opacity: 1; }

.compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: clamp(48px, 6vw, 80px);
}
.compare article {
  min-width: 0;
  padding: 32px;
  border: 1px solid var(--hair);
  border-radius: var(--r-card);
}
.compare h3 { font-size: clamp(24px, 2.2vw, 32px); letter-spacing: -0.035em; }
.compare ul { margin: 20px 0 0; padding: 0; list-style: none; }
.compare li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  padding: 14px 0;
  border-top: 1px solid var(--hair);
  color: var(--text-2);
}
.compare li::before { content: "—"; font-family: var(--mono); color: var(--text-3); }
.compare-with { background: var(--panel); border-color: var(--panel-border) !important; color: var(--panel-ink); }
.compare-with li { color: var(--panel-muted); border-top-color: var(--panel-line); }
.compare-with li::before { content: "+"; color: var(--panel-mark); }

/* ---------- Возможности: карточки ---------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.feature-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 28px;
  border: 1px solid var(--hair);
  border-radius: var(--r-card);
  background: var(--card);
  transition: border-color 0.35s var(--ease);
}
.feature-card:hover { border-color: var(--hair-strong); }
.feature-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 18px;
  border: 1px solid var(--hair);
  border-radius: 14px;
  background: var(--wash);
  color: var(--accent-text);
}
.feature-mark svg { width: 22px; height: 22px; }
.feature-card h3 { font-size: 22px; letter-spacing: -0.03em; }
.feature-card p { margin-top: 10px; color: var(--text-2); font-size: 15px; line-height: 1.5; }

/* ---------- Как работает ---------- */

.pipeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 24px;
  margin: 0;
  padding: 34px 0 0;
  list-style: none;
}
.pipeline::before, .pipeline::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
}
.pipeline::before { background: var(--hair); }
.pipeline::after { background: var(--eye); transform-origin: left; }
.pipeline li { position: relative; z-index: 1; min-width: 0; }
.pipeline-mark {
  position: absolute;
  z-index: 1;
  top: -51px;
  left: 0;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg);
  color: var(--eye);
  box-shadow: 0 0 0 1.5px var(--eye);
}
.pipeline-mark svg { width: 20px; height: 20px; stroke-width: 1.9; }
.pipeline .pipeline-num {
  display: block;
  margin-bottom: 22px;
  color: var(--accent-text);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
}
.pipeline .pipeline-num::before { content: "0"; }
.pipeline strong { display: block; font-size: clamp(20px, 1.8vw, 26px); font-weight: 600; letter-spacing: -0.035em; line-height: 1.1; }
.pipeline li > span:last-child { display: block; margin-top: 10px; color: var(--text-2); font-size: 15px; }

/* ---------- Безопасность ---------- */

#security { overflow: hidden; }
.section-character {
  position: absolute;
  z-index: 0;
  right: clamp(-150px, -5vw, -70px);
  bottom: -11%;
  height: min(84%, 500px);
  width: auto;
  max-width: none;
  transform: scaleX(-1);
  opacity: 0.9;
  pointer-events: none;
  user-select: none;
}
#security .wrap { position: relative; z-index: 1; }
.security-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(240px, 0.7fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}
table { width: 100%; border-collapse: collapse; }
th, td { padding: 24px 24px 24px 0; text-align: left; vertical-align: top; border-top: 1px solid var(--hair); }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 1px solid var(--hair); }
thead th {
  padding-top: 0;
  border-top: 0;
  color: var(--text-3);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
tbody th { width: 34%; font-size: clamp(20px, 1.8vw, 26px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.15; }
tbody td { color: var(--text-2); font-size: 17px; }
.verdicts { padding: 28px; border: 1px solid var(--hair); border-radius: var(--r-card); background: var(--card); }
.verdicts-title { color: var(--text-3); }
.verdicts ul { margin: 16px 0 0; padding: 0; list-style: none; }
.verdicts li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--hair);
  font-size: 18px;
  letter-spacing: -0.02em;
}
.verdict-mark { display: grid; flex: none; place-items: center; width: 18px; height: 18px; color: var(--text-3); }
.verdict-mark svg { width: 18px; height: 18px; }
.verdict-mark.is-ok { color: var(--ok); }
.verdict-mark.is-stop { color: var(--stop); }

/* ---------- Сценарии: горизонтальная лента ---------- */

.hscroll-track {
  display: flex;
  gap: 16px;
  padding: 4px var(--gutter) 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.hscroll-track::-webkit-scrollbar { display: none; }
.hscroll.is-pinned .hscroll-sticky {
  position: sticky;
  top: var(--nav-h);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.hscroll.is-pinned .hscroll-track { overflow: visible; scroll-snap-type: none; will-change: transform; }
.hscroll-progress {
  width: min(var(--wrap), calc(100% - 2 * var(--gutter)));
  height: 2px;
  margin: 8px auto 0;
  background: var(--hair);
}
.hscroll-progress span { display: block; height: 100%; background: var(--eye); transform: scaleX(0); transform-origin: left; }
.hscroll:not(.is-pinned) .hscroll-progress { display: none; }

.case {
  flex: 0 0 min(520px, 84vw);
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 2.6vw, 36px);
  border: 1px solid var(--hair);
  border-radius: var(--r-card);
  background: var(--card);
  scroll-snap-align: start;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease), border-color 0.4s var(--ease);
}
.case:hover { background: var(--wash); border-color: transparent; color: var(--text); }
.case-num { color: var(--accent-text); }
.case-tag { margin-top: 10px; color: var(--text-3); }
.case h3 { margin-top: 28px; font-size: clamp(28px, 2.7vw, 42px); letter-spacing: -0.045em; line-height: 1.02; }
.case-text { margin-top: 18px; color: var(--text-2); }
.case:hover .case-num { color: var(--accent-text); }
.case:hover .case-tag, .case:hover .case-text { color: var(--text-2); }
.case-steps {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px 0;
  margin: auto 0 0;
  padding: 18px 0 0;
  border-top: 1px solid var(--hair);
  list-style: none;
  color: var(--text-2);
  font-size: 11px;
  letter-spacing: 0;
}
.case-steps li { white-space: nowrap; }
.case-steps li + li::before { content: "→"; margin: 0 6px; color: var(--text-3); }
.case:hover .case-steps { color: var(--text-2); border-top-color: var(--hair); }
.case:hover .case-steps li + li::before { color: var(--text-3); }

/* ---------- Приобретение и разработчик ---------- */

.split { display: grid; grid-template-columns: 1fr; gap: clamp(40px, 5vw, 72px); align-items: start; }
.purchase-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
}
.purchase-cols > section { min-width: 0; padding-right: clamp(28px, 4vw, 56px); }
.purchase-cols > section + section {
  padding-right: 0;
  padding-left: clamp(28px, 4vw, 56px);
  border-left: 1px solid var(--hair);
}
.stack { display: grid; gap: 0; }
.stack > section { padding: 28px 0; border-top: 1px solid var(--hair); }
.stack > section:first-child { padding-top: 0; border-top: 0; }
.stack h3, .purchase-cols h3, #sla h3 { margin-bottom: 12px; font-size: clamp(22px, 2vw, 30px); letter-spacing: -0.035em; }
.stack p, .purchase-cols p { color: var(--text-2); }
.purchase-cols .purchase-note { margin-top: 18px; color: var(--text-3); font-size: 15px; font-style: italic; }
.plain-list { margin: 14px 0 0; padding: 0; list-style: none; }
.plain-list li { position: relative; margin-top: 10px; padding-left: 20px; color: var(--text-2); }
.plain-list:not(.numbered) li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 6px;
  height: 6px;
  background: var(--accent);
}
.plain-list.numbered { counter-reset: item; }
.plain-list.numbered li { counter-increment: item; padding-left: 36px; }
.plain-list.numbered li::before {
  content: counter(item, decimal-leading-zero);
  position: absolute;
  left: 0;
  color: var(--accent-text);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.9;
}
#sla .plain-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(28px, 4vw, 72px);
}
#sla .plain-list li { margin: 0; padding: 0; border-top: 1px solid var(--hair); }
#sla .plain-list li::before { display: none; }
#sla .plain-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 0;
  color: var(--text);
  font-size: 18px;
  letter-spacing: -0.02em;
}
#sla .plain-list a::after { content: "↗"; color: var(--accent-text); transition: transform 0.35s var(--ease-out); }
#sla .plain-list a:hover { text-decoration: none; color: var(--accent-text); }
#sla .plain-list a:hover::after { transform: translate(3px, -3px); }
.developer-copy { color: var(--text-2); font-size: 19px; }
.developer-copy > p { color: var(--text); font-size: clamp(20px, 1.9vw, 26px); letter-spacing: -0.025em; line-height: 1.35; }
.developer-copy section { margin-top: 40px; }
.developer-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 64px);
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--hair);
}
.developer-split section { margin-top: 0; }
.developer-split p { color: var(--text-2); font-size: 19px; letter-spacing: -0.01em; line-height: 1.5; }
.developer-copy h3 { margin-bottom: 12px; color: var(--text); font-size: clamp(22px, 2vw, 28px); letter-spacing: -0.035em; }
/* ---------- Финал ---------- */

.closer { padding-bottom: clamp(64px, 8vw, 120px); }
.closer-stage { position: relative; overflow: hidden; }
.closer-character {
  position: absolute;
  z-index: 0;
  right: clamp(-36px, -1vw, 8px);
  bottom: -6%;
  height: min(86%, 520px);
  width: auto;
  max-width: none;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 24px 32px rgba(16, 24, 40, 0.14));
}
.closer-copy { position: relative; z-index: 1; }
:root[data-theme="dark"] .closer-character { opacity: 0.9; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .closer-character { opacity: 0.9; }
}
.closer-kicker { color: var(--eye); }
.closer-title { margin-top: 24px; font-size: clamp(48px, 8.6vw, 148px); line-height: 0.92; letter-spacing: -0.06em; }
.closer .facts { margin-top: clamp(64px, 8vw, 112px); }
.closer .facts p { margin-top: 8px; }

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

.site-footer {
  padding: 20px 0 16px;
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.35;
  background: var(--bg-alt);
  border-top: 1px solid var(--hair-strong);
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 24px 32px; }
.site-footer .footer-title { margin-bottom: 14px; color: var(--text-3); }
.site-footer p { margin: 0; }
.site-footer p + p,
.site-footer li { margin-top: 2px; }
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer a { color: var(--text); }
.site-footer a:hover { color: var(--accent-text); text-decoration: none; }

.entry-content > * + * { margin-top: 0.8rem; }

/* ---------- Пример сценария ---------- */

.walk-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.walk-switch { display: flex; padding: 3px; border: 1px solid var(--hair); border-radius: var(--r-ctl); }
.walk-switch button, .walk-play { border: 0; font: inherit; cursor: pointer; }
.walk-switch button {
  min-height: 38px;
  padding: 0 16px;
  border-radius: 6px;
  background: transparent;
  color: var(--text-2);
  font-size: 15px;
}
.walk-switch button[aria-checked="true"] { background: var(--text); color: var(--bg); }
.walk-play {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--r-ctl);
  background: transparent;
  color: var(--text);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: inset 0 0 0 1px var(--hair-strong);
}
.walk-play-icon { width: 20px; height: 20px; flex: none; color: var(--eye); }
.walk-play[data-mode="stop"] .walk-play-icon-play,
.walk-play[data-mode="play"] .walk-play-icon-stop,
.walk-play[data-mode="next"] .walk-play-icon-stop { display: none; }
.walk-play:hover { background: var(--text); color: var(--bg); }
.walk-play:hover .walk-play-icon { color: var(--bg); }

.flow-board {
  position: relative;
  display: grid;
  grid-template-columns: 1.35fr 0.85fr;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--hair);
  border-radius: var(--r-card);
  background: var(--bg-alt);
}
.zone {
  position: relative;
  display: grid;
  gap: 12px;
  align-content: start;
  min-height: 100%;
  padding: 36px 12px 12px;
  border-radius: 14px;
  transition: opacity 0.35s var(--ease);
}
.zone-name {
  position: absolute;
  top: 10px;
  left: 12px;
  margin: 0;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
}
.zone-dmz {
  border: 1px dashed var(--hair-strong);
  background:
    repeating-linear-gradient(135deg, transparent 0 9px, color-mix(in srgb, var(--text) 5%, transparent) 9px 10px),
    var(--bg);
  grid-template-columns: 1fr 1fr;
  grid-template-areas:
    "sftp szi"
    "agent agent"
    "relay email";
}
.zone-dmz .zone-name { color: var(--text-2); }
.zone-lan {
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  background: color-mix(in srgb, var(--accent) 7%, var(--bg));
}
.zone-lan .zone-name { color: var(--accent-text); }
.zone.is-dim { opacity: 0.4; }

.flow-node {
  appearance: none;
  width: 100%;
  min-width: 0;
  justify-self: stretch;
  margin: 0;
  padding: 10px 12px 8px;
  border: 1px solid var(--hair);
  border-radius: 12px;
  background: var(--card);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), opacity 0.25s var(--ease);
}
.flow-node strong { display: block; font-size: 15px; font-weight: 600; letter-spacing: -0.02em; }
.flow-node small { display: block; margin-top: 2px; color: var(--text-2); font-size: 12px; }
.flow-node:hover { border-color: var(--hair-strong); }
.flow-node.is-current { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent); }
.flow-node.is-along { border-color: color-mix(in srgb, var(--accent) 55%, var(--hair)); }
.flow-board.is-ok [data-node="email"],
.flow-board.is-fail [data-node="relay"] { opacity: 0.4; }
.flow-board.is-crossing .zone { opacity: 1; }

.agent-gate {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  visibility: hidden;
}
.flow-node.is-deciding .agent-gate { visibility: visible; }
.agent-gate-kicker { color: var(--text-2); font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.agent-gate-picks { display: flex; flex-wrap: wrap; gap: 6px; }
.agent-gate-picks span {
  padding: 4px 10px;
  border-radius: 4px;
  color: var(--text-3);
  font-size: 12px;
  font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--hair);
}
.flow-board.is-ok .agent-gate-picks [data-pick="ok"],
.flow-board.is-fail .agent-gate-picks [data-pick="fail"] { background: var(--accent); color: var(--accent-ink); box-shadow: none; }

.file-token {
  position: absolute;
  z-index: 3;
  left: 0;
  top: 0;
  pointer-events: none;
  opacity: 0;
  transition: transform 0.72s var(--ease-out), opacity 0.25s linear;
}
.flow-board.is-ready .file-token { opacity: 1; }
.flow-board.is-instant .file-token { transition: none; }
.file-sheet {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px 0 8px;
  border-radius: 6px;
  background: var(--text);
  color: var(--bg);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}
@keyframes file-bob { 0% { transform: translateY(-8px) scale(0.96); } 100% { transform: none; } }
.file-token.is-hop .file-sheet { animation: file-bob 0.6s var(--ease-out); }

.walk-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; }
.walk-list button {
  display: flex;
  gap: 10px;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--hair);
  border-radius: 12px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.25s var(--ease), background-color 0.25s var(--ease), opacity 0.25s var(--ease);
}
.walk-list button:hover { border-color: var(--hair-strong); }
.walk-list button[aria-current="step"] { border-color: var(--accent); background: var(--card); }
.walk-list button.is-aside { opacity: 0.45; }
.walk-num { flex: none; color: var(--accent-text); font-family: var(--mono); font-size: 12px; font-weight: 600; line-height: 1.7; }
.walk-num::before { content: "0"; }
.walk-list strong { display: block; font-size: 15px; font-weight: 600; letter-spacing: -0.02em; }
.walk-copy { display: block; margin-top: 2px; color: var(--text-2); font-size: 13px; line-height: 1.35; }

.walk-notes { margin-top: 56px; }
.walk-notes h3 { font-size: 22px; }
.walk-pdf { margin: 28px 0 0; }
.walk-pdf a { color: var(--accent-text); font-family: var(--mono); font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; }

/* ---------- Движение ---------- */

@keyframes rise { from { transform: translateY(105%); } to { transform: none; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

.hero-title .line > span { animation: rise 1.1s var(--ease-out) both; }
.hero-title .line:nth-child(2) > span { animation-delay: 0.1s; }
.hero-meta, .hero-foot, .stream { animation: fade-up 1s var(--ease-out) both; }
.hero-meta { animation-delay: 0.05s; }
.hero-foot { animation-delay: 0.3s; }
.stream { animation-delay: 0.45s; }

@supports (animation-timeline: view()) {
  @keyframes chapter-in { from { opacity: 0; transform: translateY(56px); } to { opacity: 1; transform: none; } }
  @keyframes title-in { from { clip-path: inset(0 0 100% 0); transform: translateY(40px); } to { clip-path: inset(0 0 -10% 0); transform: none; } }
  @keyframes draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
  @keyframes sheet-out { to { transform: scale(0.96); } }

  .section-head h2, .closer-title {
    animation: title-in linear both;
    animation-timeline: view();
    animation-range: entry 10% cover 30%;
  }
  .section-head .lede,
  .facts > div,
  .compare > article,
  .feature-card,
  .pipeline li,
  .security-layout,
  .walk,
  .walk-notes > div,
  .stack > section,
  .purchase-cols > section,
  .developer-copy > * {
    animation: chapter-in linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 24%;
  }
  .facts > div:nth-child(2), .compare > article:nth-child(2), .pipeline li:nth-child(2), .feature-card:nth-child(2) { animation-range: entry 0% cover 28%; }
  .facts > div:nth-child(3), .pipeline li:nth-child(3), .feature-card:nth-child(3) { animation-range: entry 0% cover 32%; }
  .pipeline li:nth-child(4) { animation-range: entry 0% cover 36%; }
  .pipeline li:nth-child(5) { animation-range: entry 0% cover 40%; }
  .pipeline::after {
    animation: draw linear both;
    animation-timeline: view();
    animation-range: entry 20% cover 45%;
  }
  .section ~ .section:not(#cases) {
    transform-origin: 50% 0;
    animation: sheet-out linear both;
    animation-timeline: view();
    animation-range: exit 0% exit 100%;
  }
}

/* ---------- Адаптив ---------- */

@media (max-width: 1080px) {
  .nav-links { gap: 18px; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .pipeline { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 56px; }
  .flow-board { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 20px;
    background: var(--bg);
    border-bottom: 1px solid var(--hair);
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { min-height: 48px; display: flex; align-items: center; border-top: 1px solid var(--hair); font-size: 13px; }
  .nav-links a::before { display: none; }
  .nav-inner { position: relative; gap: 12px; }
  .security-layout, .split { grid-template-columns: 1fr; }
  .facts-3 { grid-template-columns: 1fr; }
  .facts > div + div { padding-left: 0; border-left: 0; }
  .hero-foot { grid-template-columns: 1fr; }
  .cta-placeholder { display: none; }
  .hero-meta span:last-child { margin-left: 0; }
}

@media (max-width: 760px) {
  .nav-cta { display: none; }
  .compare, .facts-2, .walk-list, .footer-grid, #sla .plain-list, .developer-split, .feature-grid, .purchase-cols { grid-template-columns: 1fr; }
  .purchase-cols > section { padding-right: 0; }
  .purchase-cols > section + section { padding-left: 0; padding-top: 28px; border-left: 0; border-top: 1px solid var(--hair); }
  .case-steps { flex-wrap: wrap; }
  .pipeline { grid-template-columns: 1fr 1fr; padding-top: 0; }
  .pipeline::before, .pipeline::after { display: none; }
  .pipeline-mark { position: static; margin-bottom: 14px; }
  .walk-toolbar { flex-direction: column; align-items: stretch; }
  .walk-switch button { flex: 1; }
  .zone-dmz { grid-template-columns: 1fr; grid-template-areas: "sftp" "szi" "agent" "relay" "email"; }
  .stream-legend { font-size: 10px; }
  .stream-legend > span:not(.stream-gate-label) { font-size: 12px; }
  .hero-character,
  :root[data-theme="dark"] .hero-character,
  :root:not([data-theme="light"]) .hero-character { height: 240px; right: -48px; bottom: 34%; opacity: 0.4; }
  .section-character, .closer-character { display: none; }
  :root { --r-sheet: 22px; }
}

@media (max-width: 782px) {
  body.admin-bar .nav { top: 46px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
  }
  .section-head h2, .closer-title, .section-head .lede, .facts > div, .compare > article, .feature-card,
  .pipeline li, .security-layout, .walk, .walk-notes > div, .stack > section, .purchase-cols > section,
  .developer-copy > *, .section ~ .section { animation: none !important; }
  .pipeline::after { animation: none !important; transform: none; }
  .marquee-track { animation: none !important; }
}
