/* ============================================================
   FEATURE KILLER — Landing (featurekiller.ru)
   Dark ASCII / terminal aesthetic. Tokens shared with the app.
   ============================================================ */

@font-face {
  font-family: 'Greybeard';
  src: local('Greybeard 18px'), local('Greybeard-18px-Bold'),
    url('/assets/fonts/Greybeard-18px-Bold.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --c1: #9db9b2;   /* teal  — links      */
  --c2: #79be9a;   /* green — accents    */
  --c3: #b9746f;   /* red   — highlights */
  --c4: #877887;   /* dim purple         */
  --c5: #dcd6d6;   /* light — body text  */

  --bg-base: #1c1a16;
  --bg-input: #151310;
  --text-muted: #c3b283;
  --accent-green: var(--c2);
  --accent-red: var(--c3);

  --border-subtle: rgba(121, 190, 154, 0.22);
  --border-base: rgba(121, 190, 154, 0.5);

  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px; --s-5: 20px;
  --s-6: 24px; --s-7: 32px; --s-8: 48px; --s-9: 64px; --s-10: 96px;

  --fs-xs: 11px; --fs-sm: 12px; --fs-base: 13px; --fs-md: 14px;
  --fs-lg: 16px; --fs-xl: 20px; --fs-2xl: 26px; --fs-3xl: 38px; --fs-4xl: 56px;

  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
  --container: 1120px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur-fast: 120ms;
  --dur-base: 200ms;

  --grid-bg: linear-gradient(to right, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

ul { list-style: none; }

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg-base);
  background-image: var(--grid-bg);
  background-size: 32px 32px;
  color: var(--c5);
  font-family: var(--font-mono);
  font-size: var(--fs-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: var(--c1); text-decoration: none; transition: color var(--dur-fast) var(--ease); }
a:hover { color: var(--c2); }

::selection { background: rgba(121, 190, 154, 0.25); color: var(--c1); }

img { max-width: 100%; display: block; }

h1, h2, h3, h4 { color: var(--c5); font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; }

/* ── Shared layout ─────────────────────────────────────────── */
.wrap {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--s-5);
}

.eyebrow {
  font-size: var(--fs-xs);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: inline-block;
}

.muted { color: var(--text-muted); }
.accent { color: var(--c2); }
.danger { color: var(--c3); }

.section {
  padding: var(--s-10) 0;
  border-top: 1px solid var(--border-subtle);
  position: relative;
}

.section__head { max-width: 720px; margin-bottom: var(--s-8); }
.section__head h2 {
  font-size: var(--fs-3xl);
  margin: var(--s-3) 0 var(--s-4);
}
.section__head p { color: var(--text-muted); font-size: var(--fs-md); }

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: var(--s-3) var(--s-5);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  font-weight: 500;
  line-height: 1;
  color: var(--c2);
  background: transparent;
  border: 1px solid var(--border-base);
  cursor: pointer;
  text-transform: lowercase;
  transition: border-color var(--dur-fast) var(--ease),
    background var(--dur-fast) var(--ease),
    color var(--dur-fast) var(--ease),
    transform var(--dur-fast) var(--ease);
}
.btn:hover { background: var(--c2); color: var(--bg-base); border-color: var(--c2); }
.btn:active { transform: translateY(1px); }
.btn--primary { box-shadow: 0 0 0 1px rgba(121, 190, 154, 0.35), 0 6px 24px -8px rgba(121, 190, 154, 0.35); }
.btn--ghost { color: var(--c5); }
.btn--lg { padding: var(--s-4) var(--s-7); font-size: var(--fs-md); }

/* ── Top nav ───────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(28, 26, 22, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-subtle);
}
.nav__inner {
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
}
.brand { display: flex; align-items: center; gap: var(--s-3); }
.brand__logo { width: 30px; height: 30px; object-fit: contain; }
.brand__name {
  font-size: var(--fs-md);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--c5);
}
.nav__links { display: flex; align-items: center; gap: var(--s-6); }
.nav__links a { color: var(--text-muted); font-size: var(--fs-sm); }
.nav__links a:hover { color: var(--c2); }
.nav__cta { display: flex; align-items: center; gap: var(--s-3); }

@media (max-width: 860px) {
  .nav__links { display: none; }
}

/* ── Hero ──────────────────────────────────────────────────── */
.hero { padding: var(--s-10) 0 var(--s-9); position: relative; overflow: hidden; }
.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: var(--s-9);
  align-items: center;
}
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  border: 1px solid var(--border-subtle);
  padding: var(--s-2) var(--s-3);
  font-size: var(--fs-xs);
  color: var(--text-muted);
  margin-bottom: var(--s-5);
}
.hero__badge .dot {
  width: 7px; height: 7px; background: var(--c2);
  box-shadow: 0 0 8px var(--c2);
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

.hero h1 {
  font-size: var(--fs-4xl);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: var(--s-5);
}
.hero h1 .kill { color: var(--c3); position: relative; white-space: nowrap; }
.hero h1 .kill::after {
  content: "";
  position: absolute; left: 0; right: 0; top: 52%; height: 2px;
  background: var(--c3);
  transform: scaleX(0);
  transform-origin: left;
  animation: strike 0.6s var(--ease) forwards;
  animation-delay: 0.7s;
}
@keyframes strike { to { transform: scaleX(1); } }

.hero__sub {
  font-size: var(--fs-lg);
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: var(--s-7);
  line-height: 1.65;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-bottom: var(--s-6); }
.hero__meta { display: flex; flex-wrap: wrap; gap: var(--s-5); font-size: var(--fs-xs); color: var(--text-muted); }
.hero__meta span { display: inline-flex; align-items: center; gap: var(--s-2); }
.hero__meta span::before { content: "▸"; color: var(--c2); }

/* Terminal window visual */
.terminal {
  border: 1px solid var(--border-base);
  background: var(--bg-input);
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.8);
  font-size: var(--fs-sm);
  line-height: 1.7;
}
.terminal__bar {
  display: flex; align-items: center; gap: var(--s-2);
  padding: var(--s-2) var(--s-3);
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: var(--fs-xs);
}
.terminal__dots { display: flex; gap: 6px; }
.terminal__dots i { width: 9px; height: 9px; border: 1px solid var(--border-base); display: block; }
.terminal__dots i:nth-child(1) { border-color: var(--c3); }
.terminal__dots i:nth-child(2) { border-color: var(--text-muted); }
.terminal__dots i:nth-child(3) { border-color: var(--c2); }
.terminal__title { margin-left: auto; letter-spacing: 0.08em; }
.terminal__body { padding: var(--s-5); line-height: 1.9; }
.terminal__body .ln { display: block; }
.terminal__body .ind { padding-left: 1.4em; }
.terminal__body .prompt { color: var(--c2); }
.terminal__body .cmd { color: var(--c5); }
.terminal__body .ok { color: var(--c2); }
.terminal__body .warn { color: var(--text-muted); }
.terminal__body .bad { color: var(--c3); }
.terminal__body .dim { color: var(--c4); }
.cursor { display: inline-block; width: 8px; height: 15px; background: var(--c2); vertical-align: text-bottom; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* App window (скриншоты интерфейса) */
.app-window {
  border: 1px solid var(--border-base);
  background: var(--bg-input);
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.8);
}
.app-window__bar {
  display: flex; align-items: center; gap: var(--s-2);
  padding: var(--s-2) var(--s-3);
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: var(--fs-xs);
}
.app-window__title { margin-left: auto; letter-spacing: 0.08em; }
.app-window__img { width: 100%; height: auto; display: block; }

/* Hero visual: окно приложения + мини-терминал вторым слоем */
.hero__visual { position: relative; padding-bottom: 84px; }
.terminal--mini {
  position: absolute;
  left: -28px; bottom: 0;
  width: 64%;
  font-size: var(--fs-xs);
  z-index: 2;
}
.terminal--mini .terminal__body { padding: var(--s-3) var(--s-4); line-height: 1.8; }

@media (max-width: 900px) {
  .hero { padding: var(--s-7) 0 var(--s-8); }
  .hero__grid { grid-template-columns: 1fr; gap: var(--s-7); }
  .hero h1 { font-size: 36px; }
  .terminal { order: 2; }
  .hero__visual { padding-bottom: 0; }
  .terminal--mini { position: static; width: 100%; margin-top: var(--s-4); }
}
@media (max-width: 640px) {
  .hero { padding: var(--s-5) 0 var(--s-7); }
  .hero__badge { margin-bottom: var(--s-4); }
  .hero h1 { font-size: 29px; margin-bottom: var(--s-4); }
  .hero__sub { font-size: var(--fs-md); margin-bottom: var(--s-6); }
  .hero__actions { gap: var(--s-3); }
  .hero__actions .btn--lg { flex: 1 1 auto; }
  .section { padding: var(--s-9) 0; }
  .section__head h2 { font-size: var(--fs-2xl); }
}

/* ── ASCII divider ─────────────────────────────────────────── */
.ascii-rule {
  color: var(--border-base);
  font-size: var(--fs-sm);
  letter-spacing: 0.15em;
  display: flex;
  justify-content: center;
  overflow: hidden;
  white-space: nowrap;
  user-select: none;
  padding: var(--s-6) 0;
}

/* ── Pain section ──────────────────────────────────────────── */
.pain-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-4);
}
.pain {
  border: 1px solid var(--border-subtle);
  background: #1C1A16;
  padding: var(--s-5);
  display: flex;
  gap: var(--s-4);
  transition: border-color var(--dur-base) var(--ease), background var(--dur-base) var(--ease);
}
.pain:hover { border-color: var(--border-base); background: #211d18; }
.pain__mark { color: var(--c3); font-size: var(--fs-lg); line-height: 1.4; flex-shrink: 0; }
.pain h3 { font-size: var(--fs-md); margin-bottom: var(--s-2); }
.pain p { color: var(--text-muted); font-size: var(--fs-sm); }

@media (max-width: 720px) { .pain-grid { grid-template-columns: 1fr; } }

/* ── Anchor feature rows (текст + скриншот) ────────────────── */
.feature-row {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: var(--s-8);
  align-items: center;
  padding: var(--s-7) 0;
}
.feature-row + .feature-row { border-top: 1px solid var(--border-subtle); }
.feature-row--flip .feature-row__text { order: 2; }
.feature-row--flip .app-window { order: 1; }
.feature-row__text h3 { font-size: var(--fs-2xl); margin-bottom: var(--s-3); }
.feature-row__text p { color: var(--text-muted); font-size: var(--fs-md); max-width: 60ch; }
.feature-row + .feature-grid { margin-top: var(--s-7); }
@media (max-width: 900px) {
  .feature-row { grid-template-columns: 1fr; gap: var(--s-5); padding: var(--s-6) 0; }
  .feature-row--flip .feature-row__text { order: 0; }
  .feature-row--flip .app-window { order: 0; }
}

/* «На выходе: …» — артефакт фичи */
.feat-out {
  margin-top: var(--s-4);
  border-left: 2px solid var(--c2);
  padding-left: var(--s-3);
  font-size: var(--fs-sm);
}
.feat-out span {
  color: var(--c2);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: var(--fs-xs);
}

/* ── Feature cards ─────────────────────────────────────────── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-4);
}
.feat {
  border: 1px solid var(--border-subtle);
  background: #1C1A16;
  padding: var(--s-6);
  position: relative;
  transition: border-color var(--dur-base) var(--ease), transform var(--dur-base) var(--ease);
}
.feat:hover { border-color: var(--border-base); transform: translateY(-3px); }
.feat__tag {
  font-size: var(--fs-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c2);
  margin-bottom: var(--s-4);
  display: block;
}
.feat__icon {
  font-family: var(--font-mono);
  font-size: var(--fs-xl);
  color: var(--c2);
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: flex-start;
  margin-bottom: var(--s-4);
}
.feat__icon img {
  width: 34px; height: 34px;
  object-fit: contain;
  image-rendering: pixelated;
}
.feat__icon--sprite img { width: 40px; height: 40px; }
.feat h3 { font-size: var(--fs-lg); margin-bottom: var(--s-3); }
.feat p { color: var(--text-muted); font-size: var(--fs-sm); }
.feat--wide { grid-column: span 3; display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-7); align-items: center; }
.feat--wide .feat__body { padding: var(--s-2) 0; }
.feat--wide ul { display: grid; gap: var(--s-2); }
.feat--wide li { color: var(--text-muted); font-size: var(--fs-sm); padding-left: var(--s-4); position: relative; }
.feat--wide li::before { content: "▸"; position: absolute; left: 0; color: var(--c2); }

@media (max-width: 900px) { .feature-grid { grid-template-columns: 1fr 1fr; } .feat--wide { grid-column: span 2; } }
@media (max-width: 620px) {
  .feature-grid { grid-template-columns: 1fr; }
  .feat--wide, .feat--wide { grid-column: span 1; grid-template-columns: 1fr; }
}

/* ── Audience ──────────────────────────────────────────────── */
.audience { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-4); }
.aud { border: 1px solid var(--border-subtle); background: #1C1A16; padding: var(--s-6); }
.aud__art { color: var(--c2); font-size: var(--fs-sm); line-height: 1.15; margin-bottom: var(--s-4); white-space: pre; }
.aud h3 { font-size: var(--fs-md); margin-bottom: var(--s-2); }
.aud p { color: var(--text-muted); font-size: var(--fs-sm); }
@media (max-width: 820px) { .audience { grid-template-columns: 1fr; } }

/* ── Stats strip ───────────────────────────────────────────── */
.stats { display: flex; gap: var(--s-4); }
.stat { flex: 1 1 0; min-width: 0; border: 1px solid var(--border-subtle); background: #1C1A16; padding: var(--s-6); text-align: center; }
.stat__n { font-size: var(--fs-3xl); color: var(--c2); font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; }
.stat__l { color: var(--text-muted); font-size: var(--fs-sm); margin-top: var(--s-2); }
/* На десктопе все плашки в одну строку; цифры не переносятся — размер подстраивается */
@media (min-width: 901px) { .stat__n { font-size: clamp(20px, 2.6vw, 32px); } }
@media (max-width: 900px) { .stats { flex-wrap: wrap; } .stat { flex: 1 1 calc(50% - var(--s-4)); } }
@media (max-width: 620px) { .stat { flex-basis: 100%; } }

/* ── Repeated section CTA ──────────────────────────────────── */
.section-cta { margin-top: var(--s-7); display: flex; justify-content: center; }

/* ── Game showcase ─────────────────────────────────────────── */
.game-scene {
  border: 1px solid var(--border-base);
  background: var(--bg-input);
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.8);
  margin-bottom: var(--s-7);
}
.game-scene__stage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-6);
  padding: var(--s-8) var(--s-5);
  flex-wrap: wrap;
}
.game-sprite {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-3);
  min-width: 92px;
}
.game-sprite img {
  width: 72px; height: 72px;
  object-fit: contain;
  image-rendering: pixelated;
}
.game-sprite span {
  font-family: 'Greybeard', var(--font-mono);
  font-size: 15px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}
.game-scene__arrow { color: var(--c2); font-size: var(--fs-2xl); }
@media (max-width: 720px) {
  .game-scene__stage { flex-direction: column; gap: var(--s-4); padding: var(--s-6) var(--s-4); }
  .game-scene__arrow { transform: rotate(90deg); }
  .game-sprite img { width: 56px; height: 56px; }
}

/* ── Compare (без / с) ─────────────────────────────────────── */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
.compare__col { border: 1px solid var(--border-subtle); background: #1C1A16; padding: var(--s-6); }
.compare__col h3 { font-size: var(--fs-lg); margin-bottom: var(--s-5); }
.compare__col ul { display: grid; gap: var(--s-3); }
.compare__col li { font-size: var(--fs-sm); color: var(--text-muted); padding-left: var(--s-5); position: relative; }
.compare__col--without { border-color: rgba(185, 116, 111, 0.4); }
.compare__col--without h3 { color: var(--c3); }
.compare__col--without li::before { content: "✗"; position: absolute; left: 0; color: var(--c3); }
.compare__col--with { border-color: var(--border-base); }
.compare__col--with h3 { color: var(--c2); }
.compare__col--with li::before { content: "✓"; position: absolute; left: 0; color: var(--c2); }
@media (max-width: 720px) { .compare { grid-template-columns: 1fr; } }

/* ── Mini-case ─────────────────────────────────────────────── */
.case {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: var(--s-8);
  align-items: center;
}
.case__story p { color: var(--text-muted); font-size: var(--fs-md); margin-bottom: var(--s-4); max-width: 60ch; }
.case__story strong { color: var(--c5); }
.case__result { border-top: 1px solid var(--border-subtle); padding-top: var(--s-4); margin-bottom: 0; }
.case__result .accent { font-size: var(--fs-2xl); font-weight: 700; }
@media (max-width: 900px) { .case { grid-template-columns: 1fr; gap: var(--s-6); } }

/* ── Game section: другой оттенок фона (бонус-уровень) ─────── */
.section--game { background: #191712; }

/* Денежные и временные цифры в сравнении */
.compare .num { color: var(--c5); font-weight: 600; white-space: nowrap; }

/* ── Lead magnet ───────────────────────────────────────────── */
.magnet {
  border: 1px solid var(--border-base);
  background: #1C1A16;
  padding: var(--s-8) var(--s-7);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-7);
  flex-wrap: wrap;
}
.magnet h2 { font-size: var(--fs-2xl); margin: var(--s-3) 0; }
.magnet p { color: var(--text-muted); font-size: var(--fs-md); max-width: 62ch; }
.magnet .btn { flex-shrink: 0; }
/* На мобильном кнопка «забрать шаблон» — по центру */
@media (max-width: 620px) { .magnet .btn { margin: 0 auto; } }

/* ── Changelog ─────────────────────────────────────────────── */
.changelog {
  border: 1px solid var(--border-subtle);
  background: #1C1A16;
  padding: var(--s-6);
}
.changelog__rows { display: grid; gap: var(--s-3); margin-top: var(--s-4); }
.changelog__row {
  display: flex;
  gap: var(--s-4);
  font-size: var(--fs-sm);
  color: var(--text-muted);
  flex-wrap: wrap;
}
.changelog__label {
  flex: 0 0 220px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: var(--fs-xs);
  padding-top: 2px;
}
.changelog__label.ok { color: var(--c2); }
.changelog__label.warn { color: var(--text-muted); }
.changelog__label.dim { color: var(--c4); }
@media (max-width: 640px) { .changelog__label { flex-basis: 100%; } }

/* ── FAQ ───────────────────────────────────────────────────── */
.faq { display: grid; gap: var(--s-3); }
.faq__item { border: 1px solid var(--border-subtle); background: #1C1A16; }
.faq__item summary {
  cursor: pointer;
  list-style: none;
  padding: var(--s-5);
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--c5);
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: var(--s-4);
  transition: color var(--dur-fast) var(--ease);
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "+";
  color: var(--c2);
  font-size: var(--fs-xl);
  line-height: 1;
  flex-shrink: 0;
  margin-left: auto;
}
.faq__idx {
  color: var(--text-muted);
  font-size: var(--fs-xs);
  font-weight: 400;
  letter-spacing: 0.1em;
  flex-shrink: 0;
}
.faq__item[open] { border-left: 2px solid var(--c2); }
.faq__item[open] summary::after { content: "−"; }
.faq__item summary:hover { color: var(--c2); }
.faq__item p { padding: 0 var(--s-5) var(--s-5); color: var(--text-muted); font-size: var(--fs-sm); max-width: 75ch; }

/* ── CTA ───────────────────────────────────────────────────── */
.cta {
  border: 1px solid var(--border-base);
  padding: var(--s-10) var(--s-7);
  text-align: center;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(121, 190, 154, 0.08), transparent 70%) #1C1A16;
  position: relative;
  overflow: hidden;
}
/* inline-block + text-align:left — иначе text-align:center родителя центрирует
   каждую строку ASCII-рисунка отдельно и плита съезжает относительно основания */
.cta__art { display: inline-block; text-align: left; color: var(--c3); font-size: var(--fs-xs); line-height: 1.1; white-space: pre; margin-bottom: var(--s-6); opacity: 0.85; }
.cta h2 { font-size: var(--fs-3xl); margin-bottom: var(--s-4); }
.cta p { color: var(--text-muted); font-size: var(--fs-md); max-width: 560px; margin: 0 auto var(--s-7); }

/* ── Footer ────────────────────────────────────────────────── */
.footer { border-top: 1px solid var(--border-subtle); padding: var(--s-8) 0 var(--s-7); }
.footer__inner { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-7); flex-wrap: wrap; }
.footer__brand { max-width: 320px; }
.footer__brand p { color: var(--text-muted); font-size: var(--fs-sm); margin-top: var(--s-3); }
.footer__cols { display: flex; gap: var(--s-9); flex-wrap: wrap; }
.footer__col h4 { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.14em; color: var(--text-muted); margin-bottom: var(--s-3); }
.footer__col a { display: block; color: var(--c5); font-size: var(--fs-sm); margin-bottom: var(--s-2); }
.footer__col a:hover { color: var(--c2); }
/* Линия над копирайтом — на всю ширину экрана, контент внутри — в .wrap */
.footer__bottom-rule {
  margin-top: var(--s-7);
  border-top: 1px solid var(--border-subtle);
}
.footer__bottom {
  padding-top: var(--s-5);
  display: flex; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap;
  color: var(--text-muted); font-size: var(--fs-xs);
}
@media (max-width: 620px) {
  .footer__bottom { flex-direction: column; align-items: center; text-align: center; gap: var(--s-2); }
}

/* ── Section numbering (дизайн-система: 01…08) ─────────────── */
.section__num {
  display: block;
  font-family: 'Greybeard', var(--font-mono);
  font-size: 42px;
  line-height: 1;
  color: var(--c4);
  opacity: 0.75;
  margin-bottom: var(--s-3);
  user-select: none;
}

/* ── Hero: scroll-хинт ─────────────────────────────────────── */
.hero__scroll {
  margin-top: var(--s-8);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--s-2);
  color: var(--text-muted);
  font-size: var(--fs-xs);
  letter-spacing: 0.12em;
  user-select: none;
}
.hero__scroll-arrow { display: inline-block; animation: bob 1.6s ease-in-out infinite; color: var(--c2); }
@keyframes bob { 50% { transform: translateY(4px); opacity: 0.55; } }

/* ── Typewriter (boot-sequence, autopsy-report) ────────────── */
.terminal__body--type .ln { white-space: pre-wrap; position: relative; }
.terminal__body--type .ln.pending { visibility: hidden; }
.terminal__body--type .ln .typer {
  visibility: visible;
  position: absolute;
  left: 0; top: 0; right: 0;
}

/* ── Data-sheet «на выходе» (якорные фичи) ─────────────────── */
.feat-out--sheet { border-left: 2px solid var(--c2); padding-left: var(--s-3); margin-top: var(--s-4); }
.feat-out__label {
  color: var(--c2);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: var(--fs-xs);
  display: block;
  margin-bottom: var(--s-2);
}
.datasheet {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: var(--s-1) var(--s-5);
  font-size: var(--fs-sm);
}
.datasheet dt { color: var(--text-muted); }
.datasheet dd { color: var(--c5); margin: 0; }

/* ── Pipeline «Как работает» ───────────────────────────────── */
.pipeline__track {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  flex-wrap: wrap;
  margin-bottom: var(--s-5);
}
.pipeline__stage {
  background: none;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  letter-spacing: 0.06em;
  padding: var(--s-2) var(--s-3);
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease),
    background var(--dur-fast) var(--ease);
}
.pipeline__stage:hover { color: var(--c2); border-color: var(--border-base); }
.pipeline__stage.is-active {
  color: var(--c2);
  border-color: var(--c2);
  background: rgba(121, 190, 154, 0.08);
}
.pipeline__arrow { color: var(--c4); }
.pipeline__counter {
  margin-left: auto;
  color: var(--text-muted);
  font-size: var(--fs-xs);
  letter-spacing: 0.12em;
}
.pipeline__win {
  border: 1px solid var(--border-base);
  background: var(--bg-input);
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.8);
}
.pipe-panel {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: var(--s-7);
  align-items: center;
  padding: var(--s-6);
  min-height: 190px;
}
/* Без JS все панели читаются стопкой; с JS видна только активная */
.pipe-panel + .pipe-panel { border-top: 1px dashed var(--border-subtle); }
.js-pipeline .pipe-panel { display: none; }
.js-pipeline .pipe-panel.is-active { display: grid; }
.js-pipeline .pipe-panel + .pipe-panel { border-top: none; }
.pipe-panel__text h3 { font-size: var(--fs-lg); margin-bottom: var(--s-3); }
.pipe-panel__text p { color: var(--text-muted); font-size: var(--fs-sm); max-width: 48ch; }
.pipe-panel__term {
  font-size: var(--fs-sm);
  line-height: 1.9;
  border-left: 1px solid var(--border-subtle);
  padding-left: var(--s-5);
}
.pipe-panel__term .ln { display: block; }
.pipe-panel__term .ok { color: var(--c2); }
.pipe-panel__term .warn { color: var(--text-muted); }
.pipe-panel__term .bad { color: var(--c3); }
.pipe-panel__term .dim { color: var(--c4); }
@media (max-width: 719px) {
  .pipeline__track { flex-direction: column; align-items: stretch; }
  .pipeline__arrow { display: none; }
  .pipeline__counter { display: none; }
  .pipe-panel { grid-template-columns: 1fr; gap: var(--s-4); min-height: 0; }
  .pipe-panel__term { border-left: none; padding-left: 0; }
}

/* ── Compare: акцентный кант + крупные цифры ───────────────── */
.compare__col--with { border-left: 3px solid var(--c2); }
.compare .num { font-size: var(--fs-md); }

/* ── LIVE-панель счётчиков ─────────────────────────────────── */
.stat--live { position: relative; }
/* Бейдж — оверлей в углу плашки: не сдвигает цифру и подпись вниз,
   чтобы тексты под цифрами у всех плашек были на одном уровне */
.live-badge {
  position: absolute;
  top: var(--s-2);
  right: var(--s-2);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-xs);
  letter-spacing: 0.16em;
  color: var(--c2);
  border: 1px solid var(--border-base);
  padding: 2px 8px;
  white-space: nowrap;
}
.live-dot {
  width: 6px; height: 6px;
  background: var(--c2);
  box-shadow: 0 0 6px var(--c2);
  animation: pulse 1.6s infinite;
}

/* ── Точечная отбивка (второй тип разделителя) ─────────────── */
.ascii-rule--dots { color: var(--c4); letter-spacing: 0.3em; padding: var(--s-4) 0; }

/* ── Игра: пиксельный шум и глитч ──────────────────────────── */
.game-glyph {
  position: absolute;
  width: 44px; height: 44px;
  object-fit: contain;
  image-rendering: pixelated;
  opacity: 0.22;
  pointer-events: none;
}
.game-glyph--tl { top: var(--s-7); left: var(--s-6); }
.game-glyph--tr { top: var(--s-7); right: var(--s-6); transform: scaleX(-1); }
.game-glyph--bl { bottom: var(--s-7); left: var(--s-6); }
.game-glyph--br { bottom: var(--s-7); right: var(--s-6); transform: scaleX(-1); }
@media (max-width: 900px) { .game-glyph { display: none; } }
.section--game .section__head h2:hover { animation: glitch 320ms steps(2) infinite; }
@keyframes glitch {
  0% { text-shadow: 2px 0 var(--c3), -2px 0 var(--c1); }
  50% { text-shadow: -2px 0 var(--c3), 2px 0 var(--c1); }
  100% { text-shadow: 2px 0 var(--c3), -2px 0 var(--c1); }
}
.game-sprite:hover img { animation: sprite-hop 0.35s steps(2) infinite; }
@keyframes sprite-hop { 50% { transform: translateY(-5px); } }

/* ── Footer: ASCII-логотип, пасхалка, back to top ──────────── */
.footer__ascii {
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.15;
  color: var(--c2);
  opacity: 0.5;
  white-space: pre;
  overflow: hidden;
  margin-bottom: var(--s-7);
  user-select: none;
}
@media (max-width: 400px) { .footer__ascii { font-size: 8px; } }
/* Терминал живёт в средней колонке футера и заполняет пустое пространство */
.terminal--egg { flex: 1 1 360px; max-width: 560px; min-width: 0; font-size: var(--fs-sm); }
.egg__body { max-height: 240px; overflow-y: auto; }
.egg__out { display: block; }
.egg__out .ln { display: block; overflow-wrap: anywhere; }
.egg__line { display: flex; align-items: center; gap: var(--s-2); }
.egg__input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--c5);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  padding: var(--s-1) 0;
  caret-color: var(--c2);
}
.back-top { letter-spacing: 0.12em; }

/* ── Reveal on scroll (только при работающем JS — html.js) ──── */
html.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
html.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html.js .reveal { opacity: 1; transform: none; transition: none; }
  .hero h1 .kill::after { animation: none; transform: scaleX(1); }
  .cursor, .hero__badge .dot, .live-dot, .hero__scroll-arrow { animation: none; }
  .section--game .section__head h2:hover { animation: none; }
  .game-sprite:hover img { animation: none; }
  html { scroll-behavior: auto; }
}

/* ── Legal pages (/legal/…) ──────────────────────────────────── */
.legal { max-width: 820px; margin: 0 auto; padding: var(--s-9) var(--s-5) var(--s-10); }
.legal h1 { font-size: var(--fs-2xl); margin: var(--s-3) 0 var(--s-2); }
.legal .legal__meta { color: var(--text-muted); font-size: var(--fs-sm); margin-bottom: var(--s-7); }
.legal h2 { font-size: var(--fs-lg); margin: var(--s-7) 0 var(--s-3); color: var(--c2); }
.legal p, .legal li { font-size: var(--fs-md); color: var(--c5); margin-bottom: var(--s-3); }
.legal ul, .legal ol { padding-left: var(--s-6); margin-bottom: var(--s-4); }
.legal ul { list-style: none; }
.legal ul > li { position: relative; }
.legal ul > li::before { content: '—'; position: absolute; left: calc(-1 * var(--s-6)); color: var(--text-muted); }
.legal ol { list-style: decimal; }
.legal a { text-decoration: underline; text-underline-offset: 3px; }
.legal .legal__requisites { border: 1px solid var(--border-subtle); background: var(--bg-input); padding: var(--s-5); margin: var(--s-6) 0; }
.legal .legal__requisites p { margin-bottom: var(--s-2); }
.legal .legal__requisites p:last-child { margin-bottom: 0; }
