/*
 * Kompas-MCP — оформление сайта
 *
 * Палитра и приёмы сняты с crisper.pro: тёмная/светлая тема на CSS-переменных,
 * моноширинные рубрики капслоком. Акцент — сочный малиново-алый: пара оттенков
 * градиента --tone-a/--tone-b и --accent для текста. Переменные объявлены
 * дважды: базовый набор — светлая тема, тёмная переопределяет их через [data-theme].
 */
:root {
	--wrap: 1180px;
	--tone-a: #ff7a9c;
	--tone-b: #ff2059;
	--accent: #d40b45;
	--accent-ink: #2b0512;

	--bg: #fff9fa;
	--surface: #ffffff;
	--surface-2: #fff2f5;
	--ink: #2b141c;
	--muted: #7a626c;
	--line: #f7dce4;
	--code-bg: #fff4f7;
	--code-ink: #5e1229;
	--shadow: 0 14px 40px rgba(255, 32, 89, .16);
	/* Цвета льва из фирменного спрайта ANYKS: тёмный на светлой теме */
	--lion-a: #3b3435;
	--lion-b: #000000;
	--radius: 14px;
}

html[data-theme="dark"] {
	--tone-a: #ff9db8;
	--tone-b: #ff4d7d;
	--accent: #ffb3c3;
	--bg: #16080d;
	--surface: #261017;
	--surface-2: #351620;
	--ink: #fff5f7;
	--muted: #c9a8b2;
	--line: #5e2838;
	--code-bg: #1d0b12;
	--code-ink: #ffd6df;
	--lion-a: #f1ebe4;
	--lion-b: #b9afa5;
	--shadow: 0 18px 48px rgba(0, 0, 0, .34);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 86px; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: "Golos Text", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
code, pre, .mono { font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace; }

.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }

/* Моноширинная рубрика над каждым разделом */
.rubric {
	margin: 0 0 14px;
	font: 600 12px/1.4 "JetBrains Mono", ui-monospace, monospace;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--accent);
	overflow-wrap: anywhere;
}

.accent-text {
	background: linear-gradient(100deg, var(--tone-a), var(--tone-b));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

h1, h2, h3 {
	font-family: "Unbounded", "Golos Text", sans-serif;
	font-weight: 700;
	line-height: 1.12;
	letter-spacing: -.02em;
	margin: 0;
}
h1 { font-size: clamp(32px, 5.2vw, 62px); }
h2 { font-size: clamp(26px, 3.8vw, 44px); }
h3 { font-size: 19px; line-height: 1.3; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
.lead { font-size: clamp(17px, 1.7vw, 20px); color: var(--muted); line-height: 1.55; max-width: 62ch; }
.small { font-size: 13px; color: var(--muted); line-height: 1.5; }

section { padding: 88px 0; }
section + section { border-top: 1px solid var(--line); }

/* Кнопки */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	min-height: 48px; padding: 0 22px; border-radius: 10px;
	font-weight: 600; border: 1px solid transparent; cursor: pointer;
	transition: transform .15s ease, filter .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: linear-gradient(100deg, var(--tone-a), var(--tone-b)); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { background: transparent; border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* Шапка */
.top {
	position: sticky; top: 0; z-index: 50;
	background: color-mix(in srgb, var(--bg) 88%, transparent);
	backdrop-filter: blur(14px);
	border-bottom: 1px solid var(--line);
}
.top .wrap { min-height: 70px; display: flex; align-items: center; gap: 24px; }
.logo { display: flex; align-items: center; gap: 10px; font-family: "Unbounded", sans-serif; font-weight: 700; font-size: 16px; white-space: nowrap; }
.logo svg { width: 30px; height: 30px; }
.logo span { color: var(--muted); font-family: "JetBrains Mono", monospace; font-size: 11px; letter-spacing: .06em; }
.nav { display: flex; gap: 26px; margin-left: auto; font-size: 14px; }
.nav a { color: var(--muted); }
.nav a:hover { color: var(--accent); }
.top-actions { display: flex; align-items: center; gap: 10px; }
.lang {
	border: 1px solid var(--line); background: var(--surface); border-radius: 9px;
	height: 38px; display: inline-flex; align-items: center; justify-content: center;
	cursor: pointer; font-size: 13px; padding: 0 12px; font-weight: 600;
}
/* Переключатель тем — тот же набор правил, что на acu.anyks.com */
.theme { display: flex; border: 1px solid var(--line); border-radius: 9px; padding: 2px; gap: 2px; flex: none; }
.theme button { all: unset; cursor: pointer; width: 26px; height: 28px; display: grid; place-items: center; border-radius: 7px; color: var(--muted); }
.theme button:hover { color: var(--ink); }
.theme button[aria-pressed="true"] { background: var(--surface-2); color: var(--accent); }
.theme button:focus-visible { outline: 2px solid var(--accent); }
.theme svg { width: 16px; height: 16px; }
.top .btn { min-height: 38px; padding: 0 16px; font-size: 14px; }
.burger { display: none; width: 38px; height: 38px; }

/* Первый экран */
.hero { padding-top: 62px; padding-bottom: 72px; overflow: hidden; }
.hero h1 { max-width: 16ch; margin-bottom: 22px; }
.hero .platforms {
	margin-top: 24px; font: 12px/1.5 "JetBrains Mono", ui-monospace, monospace;
	color: var(--muted); letter-spacing: .02em;
}
.hero-shot {
	margin-top: 46px; border: 1px solid var(--line); border-radius: 18px;
	background: radial-gradient(circle at 50% 30%, var(--surface-2), var(--surface) 70%);
	padding: 26px; box-shadow: var(--shadow);
}
.hero-shot img { width: 100%; max-height: 560px; object-fit: contain; margin-inline: auto; }

/* Плитки с цифрами */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 40px 0 64px; }
.stat {
	background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
	padding: 22px; box-shadow: var(--shadow);
}
.stat .num { font-family: "Unbounded", sans-serif; font-size: clamp(30px, 3.4vw, 44px); line-height: 1; color: var(--accent); }
.stat .label { margin-top: 12px; font-weight: 600; font-size: 15px; }
.stat .note { margin-top: 8px; font-size: 12px; color: var(--muted); line-height: 1.45; }

/* Блоки «утверждение → объяснение → список» */
.claims { display: grid; gap: 46px; }
.claim { display: grid; grid-template-columns: 260px 1fr; gap: 40px; align-items: start; }
.claim .claim-head { display: flex; gap: 14px; align-items: flex-start; }
.claim .claim-head svg { width: 26px; height: 26px; color: var(--accent); flex: none; margin-top: 3px; }
.claim p { color: var(--muted); margin-bottom: 14px; }
.claim ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.claim li { padding-left: 20px; position: relative; }
.claim li::before { content: "—"; position: absolute; left: 0; color: var(--accent); }
.claim li b { color: var(--ink); }

/* Таблица сравнения */
.table-wrap { overflow-x: auto; margin-top: 56px; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; background: var(--surface); font-size: 14px; }
th, td { padding: 13px 18px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: "JetBrains Mono", monospace; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); }
tr:last-child td { border-bottom: 0; }
td.yes { color: var(--accent); font-weight: 700; }
td.part { color: #c98a12; font-weight: 600; }
td.no { color: var(--muted); }
.table-note { margin-top: 14px; font-size: 13px; color: var(--muted); }

/* Карточки возможностей */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 40px; }
.card {
	background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
	padding: 26px; box-shadow: var(--shadow);
}
.card svg { width: 30px; height: 30px; color: var(--accent); margin-bottom: 18px; }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 14px; margin: 0; }

/* Галерея */
.shot-group { margin-top: 60px; }
.shot-group:first-of-type { margin-top: 40px; }
.shot-grid { display: grid; gap: 16px; margin-top: 24px; }
.shot-grid.two { grid-template-columns: repeat(2, 1fr); }
.shot-grid.three { grid-template-columns: repeat(3, 1fr); }
.shot-grid.hero-pair { grid-template-columns: 1.6fr 1fr; }
.shot {
	background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
	padding: 14px; box-shadow: var(--shadow); margin: 0;
}
.shot button.zoom {
	display: block; width: 100%; border: 0; background: var(--surface-2); border-radius: 10px;
	padding: 20px; cursor: zoom-in; min-height: 180px;
}
.shot img { max-height: 380px; width: auto; margin-inline: auto; object-fit: contain; }
.shot.tall img { max-height: 520px; }
.shot figcaption { padding: 14px 8px 4px; font-size: 14px; }
.shot figcaption .call { display: block; margin-top: 6px; font-size: 11px; color: var(--accent); overflow-wrap: anywhere; }
.shot figcaption .small { display: block; margin-top: 6px; }

/* Блок кода */
.code {
	position: relative; background: var(--code-bg); border: 1px solid var(--line);
	border-radius: var(--radius); padding: 24px; margin-top: 26px; overflow-x: auto;
}
.code pre { margin: 0; font-size: 13px; line-height: 1.7; color: var(--code-ink); }
.code .copy {
	position: absolute; top: 12px; right: 12px; border: 1px solid var(--line);
	background: var(--surface); border-radius: 7px; height: 32px; padding: 0 10px;
	cursor: pointer; font-size: 12px;
}

/* Полоса-призыв */
.band {
	padding: 64px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
	background: linear-gradient(110deg, var(--tone-a), var(--tone-b)); color: var(--accent-ink);
}
.band .wrap { display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.band h2 { max-width: 18ch; }
.band .btn { background: #2b0512; color: #ffe3ea; }

/* Подвал */
footer { padding: 56px 0 40px; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; }
.foot-cols { display: contents; }
.foot-col h4 { margin: 0 0 12px; font: 600 12px/1.4 "JetBrains Mono", monospace; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.foot-col a { display: block; padding: 3px 0; font-size: 14px; color: var(--muted); }
.foot-col a:hover { color: var(--accent); }
.foot-bottom { margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.foot-bottom a { font-weight: 600; }
.foot-bottom a:hover { color: var(--accent); }
/* Лев ANYKS рядом с копирайтом — как в подвале acu.anyks.com */
.foot-bottom .brand { display: inline-flex; align-items: center; gap: 8px; }
.foot-bottom .lion { width: 26px; height: 22px; flex: none; }
.foot-bottom .brand b { font-family: "Unbounded", sans-serif; }

/* Страница загрузки */
.download-hero { padding-top: 58px; }
.os-card {
	margin-top: 34px; display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: center;
	background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
	padding: 30px; box-shadow: var(--shadow);
}
.os-card .tag {
	display: inline-block; padding: 5px 10px; border-radius: 6px; background: var(--surface-2);
	font: 11px "JetBrains Mono", monospace; color: var(--accent); margin-bottom: 14px;
}
/* display на классе перебивает встроенное [hidden] — возвращаем скрытие явно */
.os-card .tag[hidden] { display: none; }
.os-card h3 { font-size: 24px; font-family: "Unbounded", sans-serif; }
.os-card .btn { white-space: nowrap; }
.warn {
	margin-top: 22px; padding: 20px 22px; border-left: 3px solid #c98a12;
	background: var(--surface); border-radius: 0 10px 10px 0; color: var(--muted); font-size: 14px;
}
.warn b { color: var(--ink); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px; counter-reset: step; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.step::before { counter-increment: step; content: "0" counter(step); display: block; font: 700 13px "JetBrains Mono", monospace; color: var(--accent); margin-bottom: 12px; }
.step p { font-size: 14px; color: var(--muted); }
.inline-code { background: var(--code-bg); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; font-size: .9em; color: var(--code-ink); }

/* Увеличение снимка */
.lightbox {
	position: fixed; inset: 0; z-index: 100; display: none; place-items: center;
	background: rgba(4, 7, 3, .88); padding: 30px; cursor: zoom-out;
}
.lightbox.open { display: grid; }
.lightbox img { max-width: 96vw; max-height: 92vh; object-fit: contain; }
.lightbox .hint { position: absolute; bottom: 18px; color: #cbd6bd; font: 12px "JetBrains Mono", monospace; }

/* Появление при прокрутке */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
	.reveal { opacity: 1; transform: none; transition: none; }
	html { scroll-behavior: auto; }
}

/* Адаптив */
@media (max-width: 980px) {
	.nav { display: none; }
	.burger { display: inline-grid; place-items: center; }
	.nav.open {
		display: flex; position: absolute; top: 70px; left: 0; right: 0; margin: 0;
		flex-direction: column; gap: 0; padding: 10px 20px 20px;
		background: var(--bg); border-bottom: 1px solid var(--line);
	}
	.nav.open a { padding: 10px 0; }
	.stats { grid-template-columns: repeat(2, 1fr); }
	.cards, .steps { grid-template-columns: repeat(2, 1fr); }
	.claim { grid-template-columns: 1fr; gap: 16px; }
	.shot-grid.hero-pair, .shot-grid.three { grid-template-columns: repeat(2, 1fr); }
	.foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
	section { padding: 64px 0; }
	.hero { padding-top: 40px; }
	.top .wrap { gap: 10px; }
	.logo { font-size: 14px; gap: 6px; }
	.logo svg { width: 24px; height: 24px; }
	.logo span { display: none; }
	.top-actions { gap: 6px; margin-left: auto; }
	.lang { padding: 0 8px; }
	.theme button { width: 26px; }
	.top .btn-primary { display: none; }
	.stats, .cards, .steps, .shot-grid, .shot-grid.two, .shot-grid.hero-pair, .shot-grid.three { grid-template-columns: 1fr; }
	.os-card { grid-template-columns: 1fr; }
	.hero-shot { padding: 12px; }
	.foot-grid { grid-template-columns: 1fr; }
}
