/* Inter (SIL OFL 1.1), свои файлы: страница не обращается к чужим серверам. Вариативный, 400–800. */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 800; font-display: swap; src: url(fonts/inter-cyrillic-ext.woff2) format('woff2'); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 800; font-display: swap; src: url(fonts/inter-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 800; font-display: swap; src: url(fonts/inter-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 800; font-display: swap; src: url(fonts/inter-latin.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; }

/* Layout: стиль samoilov.icu — тёмный navy, ментол как единственный акцент, терминал как герой-объект. Одна тема. */
:root {
  --navy-deep: #020617;
  --navy-dark: #0f172a;
  --navy-light: #1e293b;
  --menthol: #2dd4bf;
  --menthol-light: #5eead4;
  --ink: #e2e8f0;
  --ink-soft: #cbd5e1;
  --ink-muted: #94a3b8;
  --line: rgba(255, 255, 255, 0.08);
  --line-accent: rgba(45, 212, 191, 0.22);
  --term-green: #34d399;
  --term-bg: #000;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--navy-deep);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before {
  content: ""; position: fixed; inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px); z-index: 10;
  background: var(--navy-deep);
}
::selection { background: rgba(45, 212, 191, 0.35); color: var(--ink); }
h1, h2, h3 { letter-spacing: -0.02em; text-wrap: balance; margin: 0; color: #fff; }
p { margin: 0; }
a { color: inherit; }
*:focus-visible { outline: 2px solid var(--menthol); outline-offset: 4px; border-radius: 6px; }

.wrap {
  max-width: 1040px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* ── фон: зерно и полоса прокрутки, как на samoilov.icu ── */
.grain {
  position: fixed; inset: 0; z-index: 50; pointer-events: none; opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}
#progress {
  position: fixed; top: env(safe-area-inset-top, 0px); left: 0; height: 2px; width: 100%;
  transform: scaleX(0); transform-origin: left center; z-index: 60;
  background: linear-gradient(to right, var(--menthol), var(--menthol-light));
  pointer-events: none;
}

/* ── шапка ── */
header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 40;
  background: rgba(2, 6, 23, 0.82); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
header nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 14px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-mark {
  width: 32px; height: 32px; border-radius: 8px; background: var(--menthol); color: var(--navy-deep);
  display: grid; place-items: center; font-weight: 700; font-size: 18px;
  box-shadow: 0 0 15px rgba(45, 212, 191, 0.5);
}
.logo-text { font-family: var(--mono); font-weight: 700; font-size: 19px; color: #fff; letter-spacing: -0.01em; }
.nav-links { display: flex; gap: 36px; }
.nav-links a {
  font-size: 13px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-soft); text-decoration: none; transition: color .2s;
}
.nav-links a:hover { color: var(--menthol); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px;
  padding: 12px 24px; border-radius: 12px; font-weight: 700; font-size: 13px;
  letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none;
  transition: background .25s, color .25s, border-color .25s;
}
.btn-solid { background: var(--menthol); color: var(--navy-deep); }
.btn-solid:hover { background: var(--menthol-light); }
.btn-ghost { border: 1px solid var(--menthol); color: var(--menthol); }
.btn-ghost:hover { background: var(--menthol); color: var(--navy-deep); }
.btn-sm { min-height: 40px; padding: 8px 16px; font-size: 12px; }

/* ── герой ── */
.hero { position: relative; overflow: hidden; padding-block: 88px 96px; }
.orb { position: absolute; border-radius: 50%; pointer-events: none; }
.orb-a { top: 6%; right: -120px; width: 560px; height: 560px; background: rgba(45, 212, 191, 0.10); filter: blur(120px); }
.orb-b { bottom: 0; left: -120px; width: 400px; height: 400px; background: rgba(59, 130, 246, 0.10); filter: blur(100px); }
.hero .wrap { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.eyebrow {
  font-family: var(--mono); font-size: 13px; color: var(--menthol); letter-spacing: 0.04em;
  margin-bottom: 20px;
}
.hero h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); line-height: 1.06; font-weight: 800; }
.hero h1 em { font-style: normal; color: var(--menthol); }
.lead { margin-top: 24px; font-size: 1.15rem; color: var(--ink-soft); max-width: 34em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

/* ── терминал ── */
.terminal { background: var(--term-bg); border: 1px solid var(--line-accent); border-radius: 14px; overflow: hidden; min-width: 0; box-shadow: 0 30px 80px -30px rgba(45, 212, 191, 0.25); }
.term-head { position: relative; padding: 10px 16px; border-bottom: 1px solid rgba(45, 212, 191, 0.1); text-align: center; font-family: var(--mono); font-size: 12px; color: var(--ink-muted); }
.term-head::before { content: "● ● ●"; position: absolute; left: 14px; font-size: 8px; letter-spacing: 3px; color: rgba(255, 255, 255, 0.18); }
.term-body { padding: 20px 22px 22px; font-family: var(--mono); font-size: 13.5px; line-height: 1.7; color: var(--ink-soft); }
.term-body .dim { color: var(--ink-muted); }
.term-body .src { color: var(--menthol); }
.quote { margin: 14px 0 16px; padding: 12px 14px; border-left: 2px solid var(--menthol); background: rgba(45, 212, 191, 0.05); color: #fff; font-family: var(--sans); font-size: 15px; line-height: 1.6; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.checks li { color: var(--term-green); }
.term-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.term-btn { padding: 8px 12px; border-radius: 6px; border: 1px solid rgba(52, 211, 153, 0.3); background: rgba(52, 211, 153, 0.08); color: var(--term-green); font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 700; }
.term-btn.primary { background: var(--term-green); color: var(--navy-deep); border-color: var(--term-green); }
.cursor { display: inline-block; width: 8px; height: 1em; background: var(--menthol); vertical-align: text-bottom; margin-left: 2px; animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }
.term-note { margin-top: 12px; font-size: 13px; color: var(--ink-muted); }

/* ── демо в стиле Telegram (тёмная тема клиента) ── */
.demo { min-width: 0; }
.tg {
  --tg-bg: #0e1621; --tg-head: #17212b; --tg-in: #182533; --tg-out: #2b5278;
  --tg-btn: rgba(255, 255, 255, 0.08); --tg-btn-hover: rgba(255, 255, 255, 0.14);
  --tg-text: #f5f5f5; --tg-sub: #7f91a4; --tg-link: #6ab3f3; --tg-ok: #5fd38d; --tg-bad: #f26d6d;
  background: var(--tg-bg); border: 1px solid var(--line-accent); border-radius: 18px; overflow: hidden;
  display: flex; flex-direction: column; height: min(600px, 88vh); min-height: 460px;
  box-shadow: 0 30px 80px -30px rgba(45, 212, 191, 0.25);
  font-family: var(--sans); letter-spacing: 0; line-height: 1.45;
}
.tg-head { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--tg-head); border-bottom: 1px solid rgba(0, 0, 0, 0.3); }
.tg-ava { width: 38px; height: 38px; border-radius: 50%; background: var(--menthol); color: var(--navy-deep); display: grid; place-items: center; font-weight: 700; flex: none; }
.tg-title { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.tg-title b { color: var(--tg-text); font-size: 15px; font-weight: 600; }
.tg-title span { color: var(--tg-sub); font-size: 13px; }
.tg-title span.typing { color: var(--tg-link); }
.tg-reset { background: none; border: 0; color: var(--tg-link); font: inherit; font-size: 13px; cursor: pointer; padding: 6px 4px; }
.tg-log {
  position: relative; flex: 1; overflow-y: auto; padding: 14px 12px 8px; display: flex; flex-direction: column; gap: 8px;
  background-color: var(--tg-bg);
  background-image: radial-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 18px 18px; scrollbar-width: thin;
}
.tg-msg { max-width: 88%; display: flex; flex-direction: column; gap: 4px; align-self: flex-start; }
.tg-msg.out { align-self: flex-end; }
.tg-bubble { background: var(--tg-in); color: var(--tg-text); border-radius: 14px 14px 14px 4px; padding: 8px 12px 6px; font-size: 14.5px; white-space: pre-line; overflow-wrap: anywhere; }
.tg-msg.out .tg-bubble { background: var(--tg-out); border-radius: 14px 14px 4px 14px; }
.tg-time { display: block; text-align: right; font-size: 11.5px; color: var(--tg-sub); margin-top: 2px; }
.tg-msg.out .tg-time { color: #8fb4dc; }
.tg-src { border-left: 2px solid var(--tg-link); padding: 2px 0 2px 9px; margin-bottom: 8px; font-size: 13px; white-space: normal; }
.tg-src b { display: block; color: var(--tg-link); font-weight: 600; }
.tg-src i { font-style: normal; color: #c9d4df; }
.tg-checks { margin-top: 8px; padding-top: 6px; border-top: 1px solid rgba(255, 255, 255, 0.07); font-size: 13px; white-space: normal; display: grid; gap: 1px; }
.tg-checks .ok { color: var(--tg-ok); }
.tg-checks .bad { color: var(--tg-bad); }
.tg-stamp { margin-top: 6px; font-size: 13px; color: var(--tg-ok); white-space: normal; }
.tg-stamp.later { color: var(--tg-sub); }
.tg-kb { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
.tg-kb button {
  grid-column: span 1; background: var(--tg-btn); color: var(--tg-text); border: 0; border-radius: 8px;
  padding: 9px 8px; font: inherit; font-size: 13.5px; font-weight: 500; cursor: pointer; transition: background .15s;
}
.tg-kb button.wide { grid-column: span 2; }
.tg-kb button:hover { background: var(--tg-btn-hover); }
.tg-kb button.warn { color: #ffb4a8; }
/* ролик 9:16: заглушка кадра с прожжёнными субтитрами */
.tg-video {
  position: relative; width: 210px; max-width: 100%; aspect-ratio: 9 / 16; margin: 2px 0 8px;
  border-radius: 10px; overflow: hidden; cursor: pointer; border: 0; padding: 0; display: block;
  background: radial-gradient(120% 70% at 50% 18%, #2b4a5e 0%, #13283a 45%, #0a141d 100%);
  font: inherit; color: #fff;
}
.tg-video::before { /* голова */
  content: ""; position: absolute; left: 50%; top: 24%; width: 30%; aspect-ratio: 1; transform: translateX(-50%);
  border-radius: 50%; background: linear-gradient(180deg, #4d6a7c, #314b5c);
}
.tg-video::after { /* плечи */
  content: ""; position: absolute; left: 50%; top: 45%; width: 78%; height: 40%; transform: translateX(-50%);
  border-radius: 48% 48% 0 0; background: linear-gradient(180deg, #2e4757, #1a2c38);
}
.tg-video .dur { position: absolute; top: 8px; left: 8px; z-index: 2; font-size: 11.5px; padding: 1px 7px; border-radius: 9px; background: rgba(0, 0, 0, 0.5); }
.tg-video .play {
  position: absolute; top: 40%; left: 50%; z-index: 2; transform: translate(-50%, -50%);
  width: 52px; height: 52px; border-radius: 50%; background: rgba(0, 0, 0, 0.5); display: grid; place-items: center;
}
.tg-video .play::before { content: ""; margin-left: 4px; border-style: solid; border-width: 10px 0 10px 17px; border-color: transparent transparent transparent #fff; }
.tg-video.playing .play { opacity: 0; }
.tg-video .sub {
  position: absolute; left: 8%; right: 8%; bottom: 13%; z-index: 2; text-align: center;
  font-weight: 800; font-size: 14.5px; line-height: 1.25; text-shadow: 0 1px 3px #000, 0 0 2px #000; white-space: normal;
}
.tg-video .sub mark { background: none; color: var(--menthol-light); }
.tg-video .bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 0; z-index: 2; background: var(--tg-link); }
.tg-caption { white-space: pre-line; }

.tg-input { padding: 12px 16px; background: var(--tg-head); color: var(--tg-sub); font-size: 14.5px; border-top: 1px solid rgba(0, 0, 0, 0.3); }
@media (prefers-reduced-motion: no-preference) {
  .tg-msg { animation: pop .22s ease-out; }
  @keyframes pop { from { opacity: 0; transform: translateY(6px); } }
}

/* ── секции ── */
section.band { padding-block: 96px; border-top: 1px solid var(--line); }
section.band.tint { background: rgba(15, 23, 42, 0.45); }
.sec-head { max-width: 40em; margin-bottom: 48px; }
.sec-head h2 { font-size: clamp(1.75rem, 3.6vw, 2.4rem); font-weight: 700; line-height: 1.15; }
.sec-head p { margin-top: 14px; font-size: 1.08rem; color: var(--ink-muted); }

.pains { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.pain { padding: 26px; border-radius: 14px; background: rgba(30, 41, 59, 0.4); border: 1px solid var(--line); }
.pain h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 8px; }
.pain p { color: var(--ink-soft); font-size: 0.97rem; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; counter-reset: step; }
.step { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 24px; padding-block: 28px; border-top: 1px solid var(--line); }
.step:last-child { border-bottom: 1px solid var(--line); }
.step-n { font-family: var(--mono); font-size: 14px; color: var(--menthol); padding-top: 4px; }
.step h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: 6px; }
.step p { color: var(--ink-soft); max-width: 40em; }
.step.final h3 { color: var(--menthol); }

.rules { max-width: 720px; }
.rules .term-body { font-size: 14px; }
.rule { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; padding-block: 6px; }
.rule .x { color: #f87171; }
.rule span:last-child { color: var(--ink); }

.pilot { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.pilot-text p + p { margin-top: 16px; }
.pilot-text p { color: var(--ink-soft); font-size: 1.05rem; max-width: 36em; }
.pilot-card { padding: 28px; border-radius: 16px; background: rgba(30, 41, 59, 0.5); border: 1px solid var(--line-accent); }
.pilot-card h3 { font-size: 1.1rem; margin-bottom: 14px; }
.fit { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 10px; }
.fit li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; color: var(--ink-soft); font-size: 0.97rem; }
.fit li::before { content: "›"; color: var(--menthol); font-family: var(--mono); font-weight: 700; }
.handle { margin-top: 14px; font-family: var(--mono); font-size: 13px; color: var(--ink-muted); }
.handle b { color: var(--ink); font-weight: 500; user-select: all; }

footer { padding-block: 48px; border-top: 1px solid var(--line); }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; font-size: 14px; color: var(--ink-muted); }
footer a { color: var(--ink-soft); text-decoration: underline; text-underline-offset: 4px; }
footer a:hover { color: var(--menthol); }

@media (max-width: 860px) {
  .hero .wrap, .pilot { grid-template-columns: minmax(0, 1fr); }
  .hero { padding-block: 56px 72px; }
  .nav-links { display: none; }
}
@media (max-width: 600px) {
  .pains { grid-template-columns: minmax(0, 1fr); }
  .step { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  section.band { padding-block: 72px; }
  .term-body { font-size: 12.5px; padding: 16px; }
  .cta-row .btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cursor { animation: none; }
}

/* ── добавлено для сайта: переключатель языка, блоки без inline-стилей ── */
html, body { margin: 0; }
img { max-width: 100%; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; padding: 8px 14px; border-radius: 8px; background: var(--navy-deep); border: 1px solid var(--menthol); color: #fff; }
.skip:focus { left: 16px; }
.head-right { display: flex; align-items: center; gap: 12px; }
.langs { display: flex; gap: 2px; padding: 4px; border-radius: 999px; border: 1px solid var(--line); background: rgba(15, 23, 42, 0.6); }
.langs a { min-width: 34px; height: 30px; display: grid; place-items: center; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--ink-soft); text-decoration: none; letter-spacing: 0.04em; }
.langs a:hover { color: var(--menthol); }
.langs a[aria-current="page"] { background: var(--menthol); color: var(--navy-deep); }
.sec-head.tight { margin-bottom: 24px; }
.btn-block { width: 100%; }
.pilot-note { margin-top: 16px; font-size: 0.95rem; color: var(--ink-muted); }
.stats-note { flex-basis: 100%; margin: 0; font-size: 12.5px; color: var(--ink-muted); opacity: 0.8; }
@media (max-width: 600px) { .head-right .btn { display: none; } }
