/* ==========================================================================
   Domnio — персональный сайт ИТ-директора
   Палитра: неон на глубоком синем. Без внешних шрифтов и запросов.
   ========================================================================== */

:root {
	--bg:          #060a11;
	--bg-2:        #0a111c;
	--panel:       rgba(14, 23, 38, 0.78);
	--panel-solid: #0d1624;
	--line:        rgba(120, 180, 255, 0.16);
	--line-soft:   rgba(120, 180, 255, 0.08);

	--text:        #e9f2ff;
	--muted:       #93a6c0;
	--dim:         #6b7f9b;

	--cyan:        #22d3ee;
	--mint:        #34d399;
	--violet:      #a78bfa;
	--amber:       #fbbf24;
	--rose:        #fb7185;

	--grad:        linear-gradient(105deg, #22d3ee 0%, #60a5fa 42%, #a78bfa 100%);
	--grad-soft:   linear-gradient(105deg, rgba(34,211,238,.16), rgba(167,139,250,.16));

	--radius:      20px;
	--radius-sm:   14px;
	--maxw:        1180px;
	--pad:         26px;

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

	--shadow: 0 30px 80px -32px rgba(0, 0, 0, 0.9);
}

/* --- Сброс ---------------------------------------------------------------- */

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

html {
	scroll-behavior: smooth;
	scroll-padding-top: 86px;
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font);
	font-size: 17px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
	position: relative;
}

body::before {
	content: "";
	position: fixed;
	inset: 0;
	z-index: -2;
	background:
		radial-gradient(60% 45% at 12% -5%, rgba(34, 211, 238, 0.12), transparent 65%),
		radial-gradient(50% 40% at 92% 0%, rgba(167, 139, 250, 0.12), transparent 62%),
		radial-gradient(55% 45% at 50% 100%, rgba(52, 211, 153, 0.07), transparent 70%),
		var(--bg);
}

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

h1, h2, h3 {
	margin: 0 0 0.5em;
	line-height: 1.1;
	letter-spacing: -0.03em;
	font-weight: 750;
}

h2 { font-size: clamp(1.8rem, 1.1rem + 2.4vw, 3rem); }
h3 { font-size: 1.18rem; letter-spacing: -0.02em; }

p { margin: 0 0 1em; }

a { color: var(--cyan); text-decoration: none; transition: color .2s ease; }
a:hover { color: #7de9ff; }

ul, ol { margin: 0; padding: 0; list-style: none; }

::selection { background: rgba(34, 211, 238, 0.35); color: #fff; }

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

.skip-link {
	position: absolute;
	left: -9999px;
	top: 12px;
	z-index: 999;
	padding: 12px 18px;
	border-radius: 10px;
	background: var(--cyan);
	color: #04121a;
	font-weight: 700;
}

.skip-link:focus { left: 16px; }

/* --- Раскладка ------------------------------------------------------------ */

.container {
	width: 100%;
	max-width: var(--maxw);
	margin: 0 auto;
	padding: 0 var(--pad);
}

.section { padding: clamp(64px, 7.5vw, 112px) 0; position: relative; }

.section-head { max-width: 780px; margin-bottom: clamp(32px, 4.5vw, 54px); }

.section-sub { color: var(--muted); font-size: 1.02rem; max-width: 660px; margin: 0; }

.eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 16px;
	font-family: var(--mono);
	font-size: .72rem;
	font-weight: 600;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--cyan);
}

.eyebrow::before {
	content: "";
	width: 26px;
	height: 2px;
	border-radius: 2px;
	background: var(--grad);
}

.source {
	margin: 28px 0 0;
	font-size: .8rem;
	color: var(--dim);
}
.source a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.source a:hover { color: var(--cyan); }

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

.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: rgba(6, 10, 17, 0.72);
	backdrop-filter: blur(16px) saturate(150%);
	-webkit-backdrop-filter: blur(16px) saturate(150%);
	border-bottom: 1px solid var(--line-soft);
}

.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	min-height: 74px;
}

.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); }
.brand:hover { color: var(--text); }

.brand-mark {
	display: inline-grid;
	place-items: center;
	width: 40px;
	height: 40px;
	flex: none;
	border-radius: 12px;
	background: var(--grad);
	color: #04121a;
	font-size: .84rem;
	font-weight: 800;
	box-shadow: 0 10px 26px -12px rgba(34, 211, 238, .9);
}

.brand-copy { display: flex; flex-direction: column; line-height: 1.15; }
.brand-copy strong { font-size: 1rem; letter-spacing: -.02em; }
.brand-copy em {
	font-style: normal;
	font-family: var(--mono);
	font-size: .68rem;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--dim);
}

.nav { display: flex; align-items: center; gap: 26px; }

.nav a {
	position: relative;
	color: var(--muted);
	font-size: .93rem;
	font-weight: 500;
}

.nav a::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -6px;
	width: 0;
	height: 2px;
	border-radius: 2px;
	background: var(--grad);
	transition: width .26s ease;
}

.nav a:hover { color: var(--text); }
.nav a:hover::after { width: 100%; }

.nav a.nav-cta {
	padding: 10px 20px;
	border-radius: 999px;
	background: var(--grad);
	color: #04121a;
	font-weight: 700;
	box-shadow: 0 12px 30px -14px rgba(34, 211, 238, .95);
}

.nav a.nav-cta::after { display: none; }
.nav a.nav-cta:hover { filter: brightness(1.08); color: #04121a; }

.nav-toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 44px;
	height: 44px;
	padding: 0 11px;
	border: 1px solid var(--line);
	border-radius: 12px;
	background: transparent;
	cursor: pointer;
}

.nav-toggle span {
	display: block;
	height: 2px;
	width: 100%;
	border-radius: 2px;
	background: var(--text);
	transition: transform .25s ease, opacity .2s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --- Hero ----------------------------------------------------------------- */

.hero {
	position: relative;
	padding: clamp(48px, 6vw, 84px) 0 clamp(40px, 5vw, 64px);
	overflow: hidden;
	isolation: isolate;
}

.matrix {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	z-index: -1;
	opacity: .55;
	-webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,.85) 55%, transparent 100%);
	mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,.85) 55%, transparent 100%);
}

.hero-glow {
	position: absolute;
	inset: -30% -10% auto -10%;
	height: 120%;
	z-index: -1;
	background:
		radial-gradient(38% 40% at 20% 6%, rgba(34, 211, 238, .18), transparent 62%),
		radial-gradient(34% 36% at 88% 10%, rgba(167, 139, 250, .18), transparent 64%);
	filter: blur(10px);
	pointer-events: none;
}

.hero-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
	gap: clamp(32px, 5vw, 64px);
	align-items: center;
}

.status {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	margin: 0 0 20px;
	padding: 7px 14px 7px 11px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: rgba(52, 211, 153, .07);
	font-family: var(--mono);
	font-size: .74rem;
	letter-spacing: .04em;
	color: #b6f3d9;
}

.status .dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--mint);
	box-shadow: 0 0 0 0 rgba(52, 211, 153, .7);
	animation: pulse 2.4s infinite;
}

@keyframes pulse {
	0%   { box-shadow: 0 0 0 0 rgba(52, 211, 153, .65); }
	70%  { box-shadow: 0 0 0 9px rgba(52, 211, 153, 0); }
	100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

.hero-title {
	font-size: clamp(2.5rem, 1.3rem + 5vw, 4.6rem);
	line-height: .98;
	letter-spacing: -.05em;
	margin-bottom: 14px;
}

.grad {
	background: var(--grad);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	-webkit-text-fill-color: transparent;
}

.hero-role {
	margin: 0 0 18px;
	font-family: var(--mono);
	font-size: clamp(.82rem, .7rem + .4vw, .95rem);
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--cyan);
}

.hero-lead {
	max-width: 560px;
	font-size: clamp(1rem, .96rem + .3vw, 1.14rem);
	color: var(--muted);
	margin-bottom: 28px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 26px; }

.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; }

.hero-tags li {
	padding: 6px 13px;
	border: 1px solid var(--line-soft);
	border-radius: 999px;
	background: rgba(255, 255, 255, .02);
	font-family: var(--mono);
	font-size: .72rem;
	letter-spacing: .06em;
	color: var(--dim);
	text-transform: uppercase;
}

/* --- Hero: фото + терминал ------------------------------------------------ */

.hero-media { position: relative; }

.portrait-card {
	position: relative;
	margin: 0;
	border-radius: 24px;
	overflow: hidden;
	border: 1px solid var(--line);
	background: var(--panel-solid);
	box-shadow: var(--shadow);
}

.portrait-card::after {
	content: "";
	position: absolute;
	inset: 0;
	background:
		linear-gradient(180deg, transparent 55%, rgba(6, 10, 17, .92) 100%),
		linear-gradient(105deg, rgba(34, 211, 238, .10), transparent 55%);
	pointer-events: none;
}

.portrait-card img {
	width: 100%;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	object-position: 50% 18%;
	filter: saturate(1.02) contrast(1.03);
}

.portrait-card figcaption {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 1;
	display: flex;
	justify-content: flex-end;
	gap: 10px;
	padding: 16px 20px;
	font-family: var(--mono);
	font-size: .74rem;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: #cfe6ff;
}

.terminal {
	position: absolute;
	left: -26px;
	bottom: -34px;
	width: min(330px, 78%);
	border: 1px solid var(--line);
	border-radius: 14px;
	background: rgba(7, 13, 22, .94);
	box-shadow: 0 24px 60px -24px #000;
	overflow: hidden;
	backdrop-filter: blur(8px);
}

.term-bar {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 9px 12px;
	border-bottom: 1px solid var(--line-soft);
	background: rgba(255, 255, 255, .03);
}

.term-bar .t-dot {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: #2b3a52;
}
.term-bar .t-dot:nth-child(1) { background: #fb7185; }
.term-bar .t-dot:nth-child(2) { background: #fbbf24; }
.term-bar .t-dot:nth-child(3) { background: #34d399; }

.term-bar code {
	margin-left: 8px;
	font-family: var(--mono);
	font-size: .66rem;
	color: var(--dim);
	letter-spacing: .05em;
}

.term-body {
	margin: 0;
	padding: 12px 14px 14px;
	font-family: var(--mono);
	font-size: .68rem;
	line-height: 1.55;
	white-space: pre-wrap;
	color: #9ee7ff;
	min-height: 168px;
}

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

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 13px 24px;
	border: 1px solid transparent;
	border-radius: 999px;
	font-size: .95rem;
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
	transition: transform .2s ease, box-shadow .25s ease, background .25s ease,
	            border-color .25s ease, color .25s ease;
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
	background: var(--grad);
	color: #04121a;
	box-shadow: 0 18px 40px -20px rgba(34, 211, 238, 1);
}
.btn-primary:hover { color: #04121a; filter: brightness(1.07); }

.btn-ghost {
	border-color: var(--line);
	background: rgba(255, 255, 255, .03);
	color: var(--text);
}
.btn-ghost:hover {
	border-color: rgba(34, 211, 238, .5);
	background: rgba(34, 211, 238, .09);
	color: var(--text);
}

.btn-lg { padding: 16px 30px; font-size: 1rem; }
.btn-block { width: 100%; }

/* --- KPI ------------------------------------------------------------------ */

.kpi-wrap {
	border-top: 1px solid var(--line-soft);
	border-bottom: 1px solid var(--line-soft);
	background: linear-gradient(180deg, rgba(14, 23, 38, .5), rgba(6, 10, 17, 0));
}

.kpi {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1px;
	background: var(--line-soft);
	margin: 0;
}

.kpi-item {
	padding: clamp(22px, 2.4vw, 34px) clamp(18px, 2vw, 28px);
	background: var(--bg);
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.kpi-item b {
	font-size: clamp(2.2rem, 1.5rem + 2.7vw, 3.6rem);
	line-height: 1;
	margin-bottom: 2px;
	font-weight: 800;
	letter-spacing: -.04em;
	background: var(--grad);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	-webkit-text-fill-color: transparent;
	font-variant-numeric: tabular-nums;
}

.kpi-item > span { font-size: .78rem; line-height: 1.35; color: var(--dim); }
.kpi-item b span { font-size: inherit; }

/* --- Утечки --------------------------------------------------------------- */

.leak-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 18px;
}

.leak {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 6px;
	padding: 26px 24px 22px;
	border: 1px solid var(--line-soft);
	border-radius: var(--radius);
	background: var(--panel);
	text-align: left;
	color: var(--text);
	font-family: inherit;
	cursor: pointer;
	overflow: hidden;
	transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease, background .3s ease;
}

.leak::before {
	content: "";
	position: absolute;
	inset: 0 0 auto 0;
	height: 2px;
	background: var(--grad);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform .4s ease;
}

.leak:hover {
	transform: translateY(-4px);
	border-color: rgba(34, 211, 238, .38);
	box-shadow: 0 26px 60px -30px rgba(34, 211, 238, .5);
	background: rgba(16, 27, 44, .92);
}

.leak:hover::before { transform: scaleX(1); }

.leak-num {
	font-family: var(--mono);
	font-size: .7rem;
	letter-spacing: .18em;
	color: var(--dim);
}

.leak-metric {
	margin-top: 8px;
	font-size: clamp(2.5rem, 1.8rem + 2.6vw, 3.6rem);
	font-weight: 800;
	letter-spacing: -.05em;
	line-height: 1;
	color: var(--amber);
}

.leak[data-modal*="downtime"] .leak-metric { color: var(--rose); }
.leak[data-modal*="release"] .leak-metric { color: var(--violet); }
.leak[data-modal*="ai-pilots"] .leak-metric { color: var(--cyan); }

.leak-unit {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	font-family: var(--mono);
	font-size: .72rem;
	text-transform: uppercase;
	letter-spacing: .08em;
	color: var(--muted);
}

.leak-unit em { font-style: normal; color: var(--dim); text-transform: none; letter-spacing: 0; }

.leak-title {
	margin-top: 12px;
	font-size: 1.04rem;
	letter-spacing: -.02em;
}

.leak-short { font-size: .88rem; color: var(--muted); }

.leak-more {
	margin-top: auto;
	padding-top: 14px;
	font-family: var(--mono);
	font-size: .74rem;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--cyan);
}

/* --- Услуги --------------------------------------------------------------- */

.service-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 18px;
}

.service {
	position: relative;
	padding: 28px 24px;
	border: 1px solid var(--line-soft);
	border-radius: var(--radius);
	background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .01));
	transition: border-color .3s ease, transform .3s ease;
}

.service:hover { border-color: rgba(167, 139, 250, .45); transform: translateY(-3px); }

.service-ico {
	display: inline-grid;
	place-items: center;
	width: 42px;
	height: 42px;
	margin-bottom: 18px;
	border-radius: 12px;
	border: 1px solid rgba(34, 211, 238, .3);
	background: rgba(34, 211, 238, .1);
	color: var(--cyan);
	font-size: 1.1rem;
}

.service h3 { margin-bottom: 10px; }
.service p { font-size: .92rem; color: var(--muted); margin-bottom: 18px; }

.service-nums {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 16px;
	padding-top: 14px;
	border-top: 1px solid var(--line-soft);
	font-family: var(--mono);
	font-size: .74rem;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: var(--dim);
}

.service-nums b {
	display: block;
	font-size: 1.32rem;
	letter-spacing: -.02em;
	color: var(--mint);
	text-transform: none;
}

/* --- Кейсы ---------------------------------------------------------------- */

.case-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 18px;
}

.case {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 6px;
	padding: 26px 24px 22px;
	border: 1px solid var(--line-soft);
	border-radius: var(--radius);
	background:
		radial-gradient(120% 100% at 0% 0%, rgba(34, 211, 238, .10), transparent 55%),
		var(--panel);
	text-align: left;
	color: var(--text);
	font-family: inherit;
	cursor: pointer;
	overflow: hidden;
	transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}

.case:hover {
	transform: translateY(-4px);
	border-color: rgba(52, 211, 153, .4);
	box-shadow: 0 26px 60px -30px rgba(52, 211, 153, .45);
}

.case-label {
	font-family: var(--mono);
	font-size: .7rem;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--dim);
}

.case-metric {
	margin-top: 10px;
	font-size: clamp(2.3rem, 1.7rem + 2.3vw, 3.4rem);
	font-weight: 800;
	letter-spacing: -.05em;
	line-height: 1;
	color: var(--mint);
}

.case-note { font-size: .8rem; color: var(--muted); }

.case-title {
	margin-top: 12px;
	font-size: 1rem;
	line-height: 1.3;
}

.case-more {
	margin-top: auto;
	padding-top: 14px;
	font-family: var(--mono);
	font-size: .74rem;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--cyan);
}

/* --- Рынок ---------------------------------------------------------------- */

.market { border-top: 1px solid var(--line-soft); }

.market-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 22px;
	align-items: start;
}

.market-stats {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}

.market-stats li {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 20px;
	border: 1px solid var(--line-soft);
	border-radius: var(--radius-sm);
	background: rgba(255, 255, 255, .02);
}

.market-stats b {
	font-size: clamp(1.9rem, 1.4rem + 1.8vw, 2.7rem);
	font-weight: 800;
	letter-spacing: -.04em;
	color: var(--amber);
	font-variant-numeric: tabular-nums;
}

.market-stats li:nth-child(2) b { color: var(--rose); }
.market-stats li:nth-child(3) b { color: var(--cyan); }
.market-stats li:nth-child(4) b { color: var(--violet); }

.market-stats span { font-size: .86rem; color: var(--muted); line-height: 1.4; }
.market-stats em {
	font-style: normal;
	margin-top: auto;
	padding-top: 8px;
	font-family: var(--mono);
	font-size: .66rem;
	letter-spacing: .04em;
	color: var(--dim);
}

.market-charts { display: grid; gap: 18px; }

.chart-card {
	margin: 0;
	padding: 22px;
	border: 1px solid var(--line-soft);
	border-radius: var(--radius);
	background: var(--panel);
}

.chart-card figcaption {
	margin-bottom: 16px;
	font-family: var(--mono);
	font-size: .72rem;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--dim);
}

.flow { display: grid; gap: 10px; margin: 4px 0 18px; }

.flow li {
	display: grid;
	grid-template-columns: 34px minmax(0, 1fr) auto;
	grid-template-areas:
		"step title tag"
		"step text tag";
	gap: 2px 12px;
	padding: 12px 14px;
	border: 1px solid var(--line-soft);
	border-radius: 12px;
	background: rgba(255, 255, 255, .02);
}

.flow-step {
	grid-area: step;
	font-family: var(--mono);
	font-size: .7rem;
	color: var(--cyan);
	padding-top: 3px;
}

.flow b { grid-area: title; font-size: .96rem; letter-spacing: -.01em; }
.flow em { grid-area: text; font-style: normal; font-size: .8rem; color: var(--muted); line-height: 1.4; }

.flow-tag {
	grid-area: tag;
	align-self: start;
	padding: 3px 9px;
	border: 1px solid var(--line);
	border-radius: 999px;
	font-family: var(--mono);
	font-size: .62rem;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--dim);
	white-space: nowrap;
}

.flow-cost { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }

.flow-cost-label {
	font-family: var(--mono);
	font-size: .6rem;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--dim);
}

.flow-cost-bar { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; }

.flow-cost-bar i {
	height: 8px;
	border-radius: 3px;
	background: linear-gradient(90deg, #22d3ee, #a78bfa);
	opacity: .3;
}

.flow-cost-bar i:nth-child(2) { opacity: .5; }
.flow-cost-bar i:nth-child(3) { opacity: .72; }
.flow-cost-bar i:nth-child(4) { opacity: 1; background: linear-gradient(90deg, #fb7185, #fbbf24); }

.chart-note { margin: 0; font-size: .74rem; color: var(--dim); }

/* --- Обо мне -------------------------------------------------------------- */

.about-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
	gap: clamp(28px, 4vw, 56px);
	align-items: start;
}

.about-card p { color: var(--muted); max-width: 560px; }

.about-facts { display: grid; gap: 12px; margin-top: 22px; }

.about-facts li {
	padding-left: 14px;
	border-left: 2px solid var(--line);
	font-size: .9rem;
	color: var(--muted);
}

.about-facts b {
	display: block;
	font-family: var(--mono);
	font-size: .68rem;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--cyan);
	margin-bottom: 2px;
}

.about-stack {
	padding: 24px;
	border: 1px solid var(--line-soft);
	border-radius: var(--radius);
	background: rgba(255, 255, 255, .02);
}

.about-stack .eyebrow { margin-bottom: 6px; }

.stack-hint { margin: 0 0 16px; font-size: .8rem; color: var(--dim); }

.stack-group {
	margin: 18px 0 8px;
	font-family: var(--mono);
	font-size: .64rem;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--cyan);
	opacity: .85;
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
	padding: 8px 14px;
	border: 1px solid var(--line-soft);
	border-radius: 999px;
	background: rgba(34, 211, 238, .05);
	font-family: var(--mono);
	font-size: .76rem;
	color: var(--muted);
	cursor: pointer;
	transition: border-color .25s ease, color .25s ease, background .25s ease, transform .2s ease;
}

.chip:hover {
	border-color: rgba(34, 211, 238, .5);
	background: rgba(34, 211, 238, .12);
	color: var(--text);
	transform: translateY(-1px);
}

/* --- Контакты ------------------------------------------------------------- */

.contact { padding-bottom: clamp(64px, 7vw, 100px); }

.contact-solo {
	max-width: 760px;
	padding: clamp(28px, 4vw, 46px);
	border: 1px solid var(--line);
	border-radius: 26px;
	background:
		radial-gradient(90% 80% at 0% 0%, rgba(34, 211, 238, .10), transparent 60%),
		var(--panel-solid);
	box-shadow: var(--shadow);
}

.contact-solo h2 { margin-bottom: 12px; }
.contact-solo p { max-width: 52ch; color: var(--muted); margin-bottom: 24px; }

/* --- Модалки -------------------------------------------------------------- *//* --- Модалки -------------------------------------------------------------- */

.modal {
	width: min(680px, calc(100vw - 32px));
	max-height: min(86vh, 820px);
	padding: 0;
	border: 1px solid var(--line);
	border-radius: 22px;
	background: #0a1320;
	color: var(--text);
	box-shadow: 0 40px 120px -40px #000;
	overflow: auto;
}

.modal::backdrop {
	background: rgba(3, 6, 11, .72);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
}

.modal-inner { position: relative; padding: 30px 30px 28px; }

.modal-close {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 38px;
	height: 38px;
	border: 1px solid var(--line);
	border-radius: 50%;
	background: rgba(255, 255, 255, .04);
	color: var(--muted);
	font-size: 1.3rem;
	line-height: 1;
	cursor: pointer;
	transition: color .2s ease, border-color .2s ease, transform .2s ease;
}

.modal-close:hover { color: var(--text); border-color: var(--cyan); transform: rotate(90deg); }

.modal-eyebrow {
	margin: 0 0 10px;
	padding-right: 44px;
	font-family: var(--mono);
	font-size: .7rem;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--dim);
}

.modal h3 { margin-bottom: 12px; padding-right: 40px; font-size: 1.4rem; }

.modal-metric {
	display: flex;
	align-items: baseline;
	gap: 10px;
	margin: 0 0 20px;
	font-size: 3.1rem;
	font-weight: 800;
	letter-spacing: -.05em;
	line-height: 1;
	color: var(--amber);
}

.modal-metric span {
	font-size: .78rem;
	font-weight: 600;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--dim);
}

.modal-list { margin: 0; display: grid; gap: 4px; }

.modal-list dt {
	margin-top: 14px;
	font-family: var(--mono);
	font-size: .7rem;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--cyan);
}

.modal-list dd { margin: 0; font-size: .94rem; color: var(--muted); }

.stat-tiles {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
	margin: 0 0 22px;
}

.stat-tiles li {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 14px;
	border: 1px solid var(--line-soft);
	border-radius: 12px;
	background: rgba(255, 255, 255, .03);
}

.stat-tiles b {
	font-size: clamp(1.3rem, 1rem + 1.2vw, 1.85rem);
	font-weight: 800;
	letter-spacing: -.04em;
	line-height: 1;
	color: var(--mint);
}

.stat-tiles span { font-size: .72rem; line-height: 1.3; color: var(--dim); }

.modal-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.modal-label {
	margin: 0 0 8px;
	font-family: var(--mono);
	font-size: .66rem;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--cyan);
}

.modal-facts li { font-size: .88rem; }

.tech-desc { font-size: .98rem; color: var(--muted); }

.tech-case {
	margin: 0;
	padding: 12px 14px;
	border-left: 2px solid var(--mint);
	border-radius: 0 10px 10px 0;
	background: rgba(52, 211, 153, .06);
	font-size: .9rem;
	color: var(--text);
}

.modal-role {
	margin: -4px 0 16px;
	font-size: .9rem;
	color: var(--mint);
}

.modal-facts { display: grid; gap: 9px; margin-bottom: 18px; }

.modal-facts li {
	position: relative;
	padding-left: 22px;
	font-size: .9rem;
	color: var(--muted);
}

.modal-facts li::before {
	content: "▸";
	position: absolute;
	left: 0;
	color: var(--cyan);
}

.modal-text { font-size: .92rem; color: var(--muted); }

.modal-stack {
	margin: 0;
	padding-top: 16px;
	border-top: 1px solid var(--line-soft);
	font-family: var(--mono);
	font-size: .74rem;
	line-height: 1.6;
	color: var(--dim);
}

.modal-stack span {
	display: block;
	margin-bottom: 4px;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--dim);
}

/* --- Контент обычных страниц ---------------------------------------------- */

.page-title { font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3rem); margin-bottom: 0; }

.entry { max-width: 780px; color: var(--muted); }
.entry h2, .entry h3 { color: var(--text); }
.entry a { text-decoration: underline; text-underline-offset: 3px; }
.entry ul { list-style: disc; padding-left: 22px; margin-bottom: 1em; }
.entry li { margin-bottom: .45em; }
.entry h2 { margin-top: 1.6em; font-size: 1.35rem; }

.page-back { margin-top: 36px; font-family: var(--mono); font-size: .8rem; }

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

.site-footer {
	padding: 48px 0 24px;
	border-top: 1px solid var(--line-soft);
	background: rgba(8, 13, 22, .7);
}

.footer-top {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 22px;
	padding-bottom: 24px;
	border-bottom: 1px solid var(--line-soft);
}

.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-brand strong { display: block; font-size: .98rem; }
.footer-brand p { margin: 2px 0 0; font-size: .8rem; color: var(--dim); }

.footer-nav { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-nav a { color: var(--muted); font-size: .88rem; }
.footer-nav a:hover { color: var(--cyan); }

.footer-bottom {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 10px;
	padding-top: 20px;
	font-size: .78rem;
	color: var(--dim);
}

.footer-legal { display: flex; gap: 18px; }
.footer-legal a { color: var(--dim); }
.footer-legal a:hover { color: var(--muted); }

/* --- Анимация появления --------------------------------------------------- */

.reveal { transition: opacity .7s ease, transform .7s cubic-bezier(.22, 1, .36, 1); }
.js .reveal { opacity: 0; transform: translateY(20px); will-change: opacity, transform; }
.js .reveal.is-visible { opacity: 1; transform: none; }

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

@media (max-width: 1060px) {
	.hero-grid { grid-template-columns: 1fr; }
	.hero-media { max-width: 460px; }
	.market-grid { grid-template-columns: 1fr; }
	.about-grid { grid-template-columns: 1fr; }
}

@media (max-width: 1040px) {
	.kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.kpi-item b { font-size: clamp(2.4rem, 1.2rem + 3.4vw, 2.9rem); }
}

@media (max-width: 760px) {
	body { font-size: 16px; }

	.nav-toggle { display: flex; }

	.nav {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		padding: 8px var(--pad) 20px;
		background: rgba(6, 10, 17, .98);
		backdrop-filter: blur(16px);
		-webkit-backdrop-filter: blur(16px);
		border-bottom: 1px solid var(--line);
		opacity: 0;
		visibility: hidden;
		transform: translateY(-8px);
		transition: opacity .25s ease, transform .25s ease, visibility .25s;
	}

	.nav.is-open { opacity: 1; visibility: visible; transform: none; }

	.nav a { padding: 14px 4px; border-bottom: 1px solid var(--line-soft); font-size: 1rem; }
	.nav a::after { display: none; }
	.nav a.nav-cta { margin-top: 14px; border-bottom: 0; text-align: center; }

	.kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.kpi-item { padding: 18px 14px; }

	.hero-actions .btn, .contact-solo .btn { width: 100%; }
	.terminal { position: relative; left: 0; bottom: 0; width: 100%; margin-top: -18px; }
	.hero-media { display: grid; gap: 0; }

	.market-stats { grid-template-columns: 1fr; }
	
	.modal-inner { padding: 26px 20px 24px; }
	.modal-cols { grid-template-columns: 1fr; }
	.stat-tiles { grid-template-columns: 1fr; }
	.stat-tiles li { flex-direction: row; align-items: baseline; gap: 10px; }
	.kpi-item b { font-size: 2.4rem; }
	.footer-top { align-items: flex-start; }
}

@media (max-width: 560px) {
	.kpi { grid-template-columns: 1fr; }
	.kpi-item b { font-size: 2.6rem; }
}

@media (max-width: 420px) {
	:root { --pad: 18px; }
	.hero-title { letter-spacing: -.035em; }
	.leak-metric { font-size: 2.4rem; }
}

/* --- Уменьшенное движение / печать ---------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.reveal, .btn, .leak, .case, .service, .status .dot {
		transition: none !important;
		animation: none !important;
	}
	.js .reveal { opacity: 1; transform: none; }
	.matrix { display: none; }
}

@media print {
	.site-header, .nav-toggle, .matrix, .hero-glow, .contact, .site-footer, .terminal { display: none !important; }
	body { background: #fff; color: #000; }
	.js .reveal { opacity: 1; transform: none; }
}
