:root {
	--red: #c10101;
	--red-dark: #9a0000;
	--ink: #14161c;
	--ink-2: #23262e;
	--text: #2b2f36;
	--muted: #5d6470;
	--paper: #ffffff;
	--paper-2: #f5f6f8;
	--line: #e5e8ee;
	--header-h: 76px;
	--radius: 14px;
	--shadow: 0 10px 40px rgba(20, 22, 28, 0.08);
	--font-body: 'Roboto', sans-serif;
	--font-display: 'Roboto Slab', serif;
}

* { box-sizing: border-box; }

html {
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
	margin: 0;
	font-family: var(--font-body);
	font-size: 17px;
	line-height: 1.65;
	color: var(--text);
	background: var(--paper);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

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

h1, h2, h3 {
	font-family: var(--font-display);
	line-height: 1.18;
	letter-spacing: -0.015em;
	margin: 0 0 0.5em;
	color: var(--ink);
}

p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }

.container {
	max-width: 1180px;
	margin: 0 auto;
	padding: 0 24px;
}

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 100;
	background: var(--ink);
	color: #fff;
	padding: 10px 18px;
	border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }

a:focus-visible,
button:focus-visible {
	outline: 2px solid var(--red);
	outline-offset: 3px;
	border-radius: 4px;
}

/* header */

.site-header {
	position: fixed;
	inset: 0 0 auto 0;
	z-index: 50;
	height: var(--header-h);
	display: flex;
	align-items: center;
	background: transparent;
	transition: box-shadow 0.35s ease;
}
.site-header::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: rgba(255, 255, 255, 0.9);
	backdrop-filter: blur(12px) saturate(1.5);
	-webkit-backdrop-filter: blur(12px) saturate(1.5);
	opacity: 0;
	transition: opacity 0.35s ease;
	pointer-events: none;
}
.site-header.scrolled,
.site-header.nav-open {
	box-shadow: 0 1px 0 rgba(20, 22, 28, 0.08), 0 8px 30px rgba(20, 22, 28, 0.08);
}
.site-header.scrolled::before,
.site-header.nav-open::before { opacity: 1; }
.header-inner {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}
.brand {
	font-family: var(--font-body);
	font-size: 21px;
	line-height: 1;
	letter-spacing: 0.01em;
	color: #fff;
	white-space: nowrap;
	transition: color 0.35s ease;
}
.brand .w-b { color: #ff3b3b; font-weight: 700; }
.brand .w-a { color: #e01414; font-weight: 700; }
.site-header.scrolled .brand,
.site-header.nav-open .brand { color: #26282e; }
.site-header.scrolled .brand .w-b,
.site-header.nav-open .brand .w-b { color: #e81111; }
.site-header.scrolled .brand .w-a,
.site-header.nav-open .brand .w-a { color: #9c0e0e; }

.nav {
	display: flex;
	align-items: center;
	gap: 30px;
}
.nav > a {
	position: relative;
	font-size: 15px;
	font-weight: 500;
	letter-spacing: 0.02em;
	color: #fff;
	padding: 6px 0;
	transition: color 0.3s ease;
}
.site-header.scrolled .nav > a,
.site-header.nav-open .nav > a { color: var(--ink); }
.nav > a:not(.lang)::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 100%;
	height: 2px;
	background: var(--red);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.3s ease;
}
.nav > a:hover::after,
.nav > a.active::after { transform: scaleX(1); }
.nav > a.active { color: var(--red); }
.nav .lang {
	border: 1px solid currentColor;
	border-radius: 999px;
	padding: 4px 14px;
	font-size: 13px;
	opacity: 0.85;
}
.nav .lang:hover { opacity: 1; }
.nav .lang::after { display: none; }

.nav-toggle {
	display: none;
	width: 44px;
	height: 44px;
	border: 0;
	background: transparent;
	cursor: pointer;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 5px;
}
.nav-toggle span {
	width: 22px;
	height: 2px;
	background: #fff;
	transition: transform 0.3s ease, opacity 0.3s ease, background-color 0.3s ease;
}
.site-header.scrolled .nav-toggle span,
.site-header.nav-open .nav-toggle span { background: var(--ink); }
.site-header.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-header.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.site-header.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* hero */

.hero {
	position: relative;
	min-height: 100vh;
	min-height: 100svh;
	display: flex;
	align-items: center;
	overflow: hidden;
	background: var(--ink);
}
.hero-bg {
	position: absolute;
	inset: 0;
	background: url("../img/hero.jpg") center / cover no-repeat;
}
.hero-bg::after {
	content: "";
	position: absolute;
	inset: 0;
	background:
		linear-gradient(100deg, rgba(13, 15, 20, 0.88) 0%, rgba(13, 15, 20, 0.62) 45%, rgba(13, 15, 20, 0.38) 100%),
		linear-gradient(to top, rgba(13, 15, 20, 0.75), transparent 30%);
}
.hero-inner {
	position: relative;
	z-index: 1;
	padding-top: calc(var(--header-h) + 40px);
	padding-bottom: 90px;
	max-width: 780px;
}
.eyebrow {
	margin: 0 0 18px;
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.34em;
	text-transform: uppercase;
	color: #ff6b6b;
}
.hero h1 {
	font-size: clamp(46px, 7.5vw, 88px);
	color: #fff;
	margin-bottom: 0.18em;
}
.hero h1 .h1-b { color: #ff0000; }
.hero h1 .h1-a { color: #dd3333; }
.hero-tagline {
	font-family: var(--font-display);
	font-size: clamp(20px, 3vw, 30px);
	color: #fff;
	opacity: 0.95;
	margin-bottom: 0.4em;
}
.hero-lead {
	font-size: clamp(16px, 2vw, 19px);
	color: rgba(255, 255, 255, 0.78);
	max-width: 560px;
	margin-bottom: 2em;
}
.hero-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
}
.btn {
	display: inline-block;
	padding: 14px 32px;
	border-radius: 10px;
	font-weight: 500;
	font-size: 16px;
	letter-spacing: 0.01em;
	transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.btn-primary {
	background: var(--red);
	color: #fff;
}
.btn-primary:hover {
	background: var(--red-dark);
	transform: translateY(-2px);
	box-shadow: 0 12px 30px rgba(193, 1, 1, 0.35);
}
.btn-ghost {
	border: 1px solid rgba(255, 255, 255, 0.55);
	color: #fff;
}
.btn-ghost:hover {
	border-color: #fff;
	background: rgba(255, 255, 255, 0.1);
	transform: translateY(-2px);
}
.hero-scroll {
	position: absolute;
	left: 50%;
	bottom: 28px;
	width: 22px;
	height: 34px;
	border: 2px solid rgba(255, 255, 255, 0.5);
	border-radius: 12px;
	transform: translateX(-50%);
	z-index: 1;
}
.hero-scroll::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 6px;
	width: 3px;
	height: 7px;
	border-radius: 2px;
	background: #fff;
	transform: translateX(-50%);
	animation: scroll-hint 1.8s ease-in-out infinite;
}
@keyframes scroll-hint {
	0% { opacity: 0; transform: translate(-50%, 0); }
	35% { opacity: 1; }
	100% { opacity: 0; transform: translate(-50%, 12px); }
}

/* particles */

.particles {
	position: absolute;
	inset: 0;
	z-index: 0;
	overflow: hidden;
	pointer-events: auto;
}
.particles canvas { display: block; }

/* sections */

.section {
	position: relative;
	padding: 108px 0;
}
.section > .container {
	position: relative;
	z-index: 1;
}
.section-dark {
	background: var(--ink);
	color: #c9cdd6;
}
.section-dark h2,
.section-dark h3 { color: #fff; }

.section-head {
	max-width: 820px;
	margin-bottom: 56px;
}
.kicker {
	display: inline-flex;
	align-items: center;
	gap: 14px;
	margin: 0 0 16px;
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.28em;
	text-transform: uppercase;
	color: var(--red);
}
.kicker::before {
	content: "";
	width: 34px;
	height: 2px;
	background: var(--red);
}
.section-dark .kicker { color: #ff6b6b; }
.section-dark .kicker::before { background: #ff6b6b; }

.section h2 {
	font-size: clamp(30px, 4.4vw, 46px);
}
.lead {
	font-size: 19px;
	color: var(--muted);
	max-width: 720px;
}
.section-dark .lead { color: #aab0bd; }
.lead-red {
	font-family: var(--font-display);
	font-size: clamp(18px, 2.4vw, 24px);
	color: #ff6b6b;
	letter-spacing: 0.02em;
}

/* cards */

.card {
	max-width: 860px;
	background: var(--paper-2);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 40px 44px;
}
.card h3 {
	font-size: 24px;
	margin-bottom: 16px;
}
.card h3::before {
	content: "";
	display: inline-block;
	width: 10px;
	height: 10px;
	margin-right: 12px;
	background: var(--red);
	border-radius: 3px;
}

.cols-3 {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 40px;
}
.cols-3 h3 {
	font-size: 19px;
	margin-bottom: 18px;
	padding-bottom: 12px;
	border-bottom: 2px solid rgba(193, 1, 1, 0.35);
}
.cols-3 li {
	position: relative;
	padding-left: 26px;
	margin-bottom: 12px;
	font-size: 15.5px;
}
.cols-3 li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.55em;
	width: 8px;
	height: 8px;
	background: var(--red);
	border-radius: 2px;
	transform: rotate(45deg);
}

.card-tech {
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 30px 30px 34px;
	height: 100%;
	transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.card-tech:hover {
	transform: translateY(-5px);
	box-shadow: var(--shadow);
	border-color: rgba(193, 1, 1, 0.25);
}
.card-tech h3 { font-size: 20px; }
.card-tech p {
	font-size: 15px;
	color: var(--muted);
	margin: 0;
}

/* tiles & tools */

.tiles {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 20px;
	margin-top: 72px;
}
.tile {
	margin: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 150px;
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	transition: transform 0.3s ease, border-color 0.3s ease;
}
.tile:hover {
	transform: translateY(-5px);
	border-color: rgba(193, 1, 1, 0.5);
}
.tile img {
	width: 104px;
	height: 104px;
	object-fit: contain;
	filter: contrast(1.4) brightness(0.78);
}

.tools-label {
	margin: 72px 0 28px;
	font-family: var(--font-display);
	font-size: 22px;
	color: var(--ink);
}
.tools {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 18px;
	align-items: center;
}
.tool {
	margin: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 130px;
	padding: 22px;
	background: var(--paper-2);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.tool:hover {
	transform: translateY(-5px);
	box-shadow: var(--shadow);
	border-color: rgba(193, 1, 1, 0.25);
}
.tool img {
	max-height: 110px;
	width: auto;
	filter: grayscale(0.9) opacity(0.75);
	transition: filter 0.35s ease;
}
.tool:hover img { filter: none; }

/* contacts */

.contacts {
	position: relative;
	overflow: hidden;
}
.contacts::before {
	content: "";
	position: absolute;
	top: -220px;
	right: -160px;
	width: 560px;
	height: 560px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(193, 1, 1, 0.22), transparent 65%);
	pointer-events: none;
}
.contacts-inner {
	position: relative;
	text-align: center;
}
.contacts .kicker { justify-content: center; }
.contacts .kicker::before { display: none; }
.contact-line {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 14px 40px;
	margin: 28px 0 48px;
}
.contact-line a {
	font-family: var(--font-display);
	font-size: clamp(20px, 3vw, 28px);
	color: #fff;
	transition: color 0.25s ease;
}
.contact-line a:hover { color: #ff6b6b; }
.contact-mail {
	font-size: clamp(18px, 2.6vw, 24px) !important;
	border-bottom: 2px solid rgba(255, 107, 107, 0.55);
	padding-bottom: 3px;
}
.cat {
	display: inline-block;
	transition: transform 0.3s ease;
}
.cat img {
	width: 210px;
	height: auto;
	opacity: 0.92;
	transition: opacity 0.3s ease;
}
.cat:hover { transform: translateY(-4px) scale(1.02); }
.cat:hover img { opacity: 1; }

/* flappy cat modal */

.modal {
	position: fixed;
	inset: 0;
	z-index: 100;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 20px;
}
.modal.open { display: flex; }
.modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(10, 11, 15, 0.82);
}
.modal-box {
	position: relative;
	width: min(720px, 94vw);
	height: min(780px, 90vh);
	background: #fff;
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
	animation: modal-in 0.25s ease;
}
@keyframes modal-in {
	from { opacity: 0; transform: translateY(18px) scale(0.98); }
	to { opacity: 1; transform: none; }
}
.modal-box:focus { outline: none; }
.modal-frame {
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
}
.modal-close {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 2;
	width: 42px;
	height: 42px;
	border: 0;
	border-radius: 50%;
	background: rgba(20, 22, 28, 0.75);
	color: #fff;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.25s ease, transform 0.25s ease;
}
.modal-close:hover {
	background: var(--red);
	transform: rotate(90deg);
}

/* footer */

.site-footer {
	background: #0e1014;
	color: #7d828e;
	padding: 26px 0;
	font-size: 14px;
}
.site-footer p { margin: 0; text-align: center; }

/* reveal on scroll */

.js .reveal {
	opacity: 0;
	transform: translateY(26px);
	transition: opacity 0.7s ease, transform 0.7s ease;
}
.js .reveal.in {
	opacity: 1;
	transform: none;
}
.js .cols-3 .reveal:nth-child(2) { transition-delay: 0.12s; }
.js .cols-3 .reveal:nth-child(3) { transition-delay: 0.24s; }
.js .tile.reveal:nth-child(2) { transition-delay: 0.08s; }
.js .tile.reveal:nth-child(3) { transition-delay: 0.16s; }
.js .tile.reveal:nth-child(4) { transition-delay: 0.24s; }
.js .tool.reveal:nth-child(2) { transition-delay: 0.07s; }
.js .tool.reveal:nth-child(3) { transition-delay: 0.14s; }
.js .tool.reveal:nth-child(4) { transition-delay: 0.21s; }
.js .tool.reveal:nth-child(5) { transition-delay: 0.28s; }

/* responsive */

@media (max-width: 980px) {
	.section { padding: 84px 0; }
	.cols-3 { grid-template-columns: 1fr; gap: 32px; }
	.tiles { grid-template-columns: repeat(2, 1fr); margin-top: 56px; }
	.tools { grid-template-columns: repeat(2, 1fr); }
	.tool { min-height: 150px; }
	.card { padding: 30px 26px; }
}

@media (max-width: 860px) {
	:root { --header-h: 64px; }
	.nav-toggle { display: flex; }
	.nav {
		position: fixed;
		top: 0;
		right: 0;
		bottom: 0;
		width: min(320px, 82vw);
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
		padding: 92px 30px 40px;
		background: #fff;
		box-shadow: -18px 0 50px rgba(20, 22, 28, 0.18);
		transform: translateX(105%);
		transition: transform 0.35s ease;
	}
	.site-header.nav-open .nav { transform: none; }
	.nav > a {
		color: var(--ink) !important;
		font-size: 18px;
		padding: 8px 0;
		width: 100%;
	}
	.nav .lang { margin-top: 14px; }
}

@media (max-width: 560px) {
	.hero-inner { padding-bottom: 70px; }
	.hero-actions .btn { width: 100%; text-align: center; }
	.tiles { grid-template-columns: 1fr 1fr; gap: 12px; }
	.tiles { min-height: 0; }
	.tools { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
	}
	.js .reveal { opacity: 1; transform: none; }
}
