/* ── Header ── */

header {
	display: flex;
	gap: 0.5rem;
	align-items: center;
	position: fixed;
	top: 0; left: 0; right: 0;
	height: var(--nav-h);
	background: rgba(0,0,0,0.92);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	padding: 12px 20px;
	z-index: 100;
	border-bottom: 1px solid #1a1a1a;
}

.logo {
	height: 100%;
	width: auto;
	transition: opacity 0.2s ease-out;
}

.logo.hidden {
	opacity: 0;
}

.logo-text {
	font-size: 1.1rem;
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--white);
	text-decoration: none;
}

@media (max-width: 768px) {
	header { padding: 8px 12px; height: 61px; }
}


/* ── Nav ── */

nav {
	display: flex;
	align-items: center;
	position: fixed;
	top: 0;
	right: 32px;
	height: var(--nav-h);
	z-index: 102;
}

nav a, nav a:visited {
	color: var(--gray-light);
	text-decoration: none;
	margin-left: 28px;
	font-size: 0.78rem;
	font-weight: 500;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	transition: color var(--ease);
	padding-bottom: 2px;
	border-bottom: 1px solid transparent;
}

nav a:hover,
nav a.nav-active,
nav a.nav-active:visited {
	color: var(--white);
	border-bottom-color: var(--white);
}

.menu {
	display: none;
	height: 38px;
	width: 44px;
	flex-direction: column;
	justify-content: space-between;
	padding: 10px;
	background: var(--black);
	cursor: pointer;
	border: 0;
}

.menu .bar {
	display: block;
	width: 20px;
	height: 2px;
	background: var(--white);
	transition: all 0.3s ease;
}

.lang-switch {
	display: flex;
	align-items: center;
	margin-left: 36px;
	border: 1px solid var(--gray-dim);
	border-radius: 2px;
	overflow: hidden;
}

.lang-btn {
	background: none;
	border: none;
	color: var(--gray);
	font-family: inherit;
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	cursor: pointer;
	padding: 5px 10px;
	transition: background 0.12s, color 0.12s;
}

.lang-btn.active			  { background: var(--white); color: var(--black); }
.lang-btn:hover:not(.active)  { background: #111; color: var(--white); }

@media (max-width: 768px) {
	nav {
		position: fixed;
		top: -100dvh; left: 0; right: 0;
		height: 100dvh;
		padding: 0;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		background: #0009;
		gap: 36px;
		transition: top 0.3s ease;
	}

	nav[active] {
		top: 0;
		z-index: 200;
		backdrop-filter: blur(12px);
		-webkit-backdrop-filter: blur(12px);
	}

	nav a { margin-left: 0; font-size: 2rem; }

	.menu {
		display: flex;
		position: fixed;
		top: 11px; right: 20px;
		z-index: 201;
	}

	nav[active] ~ .menu .bar:nth-child(1) { transform: rotate(45deg)  translate(6px, 6px);  width: 24px; }
	nav[active] ~ .menu .bar:nth-child(2) { opacity: 0; }
	nav[active] ~ .menu .bar:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); width: 24px; }

	.lang-switch { margin-left: 0; }
}


/* ── Hero ── */

.hero {
	min-height: 90vh;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	align-items: flex-end;
	padding: 80px var(--pad-x) 60px;
	position: relative;
	overflow: hidden;
	background: #060608;

	background-image: 
		radial-gradient(circle at 10% 85%, rgba(99, 102, 241, 0.25) 0%, transparent 45%),
		radial-gradient(circle at 80% 20%, rgba(168, 85, 247, 0.15) 0%, transparent 50%),
		conic-gradient(from 180deg at 20% 70%, #060608 0deg, rgba(239, 68, 68, 0.07) 120deg, transparent 230deg);
	
	animation: auroraBorealis 12s infinite alternate ease-in-out;
}

.hero::before {
	content: '';
	position: absolute;
	inset: -50px;
	pointer-events: none;

	background:
		radial-gradient(circle at center, rgba(255, 255, 255, 0.15) 0.5px, transparent 1px),
		repeating-linear-gradient(0deg, transparent, transparent 39px, rgba(255, 255, 255, 0.035) 39px, rgba(255, 255, 255, 0.01) 40px),
		repeating-linear-gradient(90deg, transparent, transparent 39px, rgba(255, 255, 255, 0.035) 39px, rgba(255, 255, 255, 0.01) 40px);
	
	background-size: 12px 12px, 40px 40px, 40px 40px;

	mask-image: radial-gradient(circle at 20% 80%, rgba(0,0,0,1) 10%, rgba(0,0,0,0.3) 60%, rgba(0,0,0,0) 100%);
	-webkit-mask-image: radial-gradient(circle at 20% 80%, rgba(0,0,0,1) 10%, rgba(0,0,0,0.3) 60%, rgba(0,0,0,0) 100%);

	animation: gridFloat 20s infinite linear;
}

@keyframes auroraBorealis {
	0% {
		background-position: 0% 0%, 0% 0%, 0% 0%;
		filter: hue-rotate(0deg) brightness(1);
	}
	50% {
		filter: hue-rotate(15deg) brightness(1.2);
	}
	100% {
		background-position: 10% -5%, -5% 10%, 5% 5%;
		filter: hue-rotate(-10deg) brightness(0.9);
	}
}

@keyframes gridFloat {
	0% {
		transform: translateY(0) scale(1);
	}
	50% {
		transform: translateY(-10px) translateX(5px) scale(1.02); /* Легкое покачивание сетки */
	}
	100% {
		transform: translateY(0) scale(1);
	}
}

.hero-grid-matrix {
	position: absolute;
	top: 0; bottom: 0; left: 0;
	width: calc(100% + 800px);
	pointer-events: none;
	z-index: 1;
	will-change: transform;
	animation: matrixScrollX 16s linear infinite;
}

@keyframes matrixScrollX {
	from { transform: translate3d(0, 0, 0); }
	to   { transform: translate3d(-800px, 0, 0); }
}

.matrix-vertical, .matrix-horizontal {
	position: absolute;
	inset: 0;
	background-repeat: repeat;
}

.matrix-vertical {
	background-image: linear-gradient(90deg, rgba(255, 255, 255, 0.15) 4px, transparent 4px);
	background-size: 100px 100%;
}

.matrix-horizontal {
	background-size: 800px 4px;
	background-repeat: repeat-x;
	will-change: transform;
}

/* 1, 4, 7 */
.matrix-horizontal.layer-1 {
	background-image: 
		linear-gradient(90deg, transparent 4px, rgba(255, 255, 255, 0.15) 4px, rgba(255, 255, 255, 0.15) 100px, transparent 100px),
		linear-gradient(90deg, transparent 304px, rgba(255, 255, 255, 0.15) 304px, rgba(255, 255, 255, 0.15) 400px, transparent 400px),
		linear-gradient(90deg, transparent 604px, rgba(255, 255, 255, 0.15) 604px, rgba(255, 255, 255, 0.15) 700px, transparent 700px);
	background-position-y: 15%, 35%, 65%;
	animation: jitterY1 7s ease-in-out infinite alternate;
}

/* 2, 5, 8 */
.matrix-horizontal.layer-2 {
	background-image: 
		linear-gradient(90deg, transparent 104px, rgba(255, 255, 255, 0.15) 104px, rgba(255, 255, 255, 0.15) 200px, transparent 200px),
		linear-gradient(90deg, transparent 704px, rgba(255, 255, 255, 0.15) 704px, rgba(255, 255, 255, 0.15) 800px, transparent 800px),
		linear-gradient(90deg, transparent 404px, rgba(255, 255, 255, 0.15) 404px, rgba(255, 255, 255, 0.15) 500px, transparent 500px);
	background-position-y: 70%, 85%, 45%;
	animation: jitterY2 11s ease-in-out infinite alternate;
}

/* 3, 6 */
.matrix-horizontal.layer-3 {
	background-image: 
		linear-gradient(90deg, transparent 204px, rgba(255, 255, 255, 0.15) 204px, rgba(255, 255, 255, 0.15) 300px, transparent 300px),
		linear-gradient(90deg, transparent 504px, rgba(255, 255, 255, 0.15) 504px, rgba(255, 255, 255, 0.15) 600px, transparent 600px);
	background-position-y: 20%, 90%;
	animation: jitterY3 13s ease-in-out infinite alternate;
}

@keyframes jitterY1 {
	0%, 100% { transform: translate3d(0, 0, 0); }
	50%	  { transform: translate3d(0, 40px, 0); }
}

@keyframes jitterY2 {
	0%, 100% { transform: translate3d(0, 0, 0); }
	50%	  { transform: translate3d(0, -60px, 0); }
}

@keyframes jitterY3 {
	0%, 100% { transform: translate3d(0, 0, 0); }
	50%	  { transform: translate3d(0, 25px, 0); }
}

.hero-title {
	font-size: clamp(4rem, 8vw, 12rem);
	font-weight: 400;
	font-family: 'serif';
	line-height: 1.1;
	letter-spacing: -0.02em;
	text-align: right;
	color: var(--white);
	max-width: 820px;
	position: relative;
	animation: fadeUp 0.9s ease both;
}

.hero-title span {
	color: transparent;
	-webkit-text-stroke: 1px #fff8;
}

.hero-sub {
	margin-top: 28px;
	font-size: 1rem;
	color: var(--gray);
	font-weight: 400;
	text-align: right;
	max-width: 540px;
	line-height: 1.7;
	position: relative;
	animation: fadeUp 0.9s 0.15s ease both;
}

.hero-actions {
	margin-top: 32px;
	position: relative;
	animation: fadeUp 0.9s 0.3s ease both;
}

.hero-cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 10px 22px;
	border-radius: 999px;
	background: var(--white);
	color: var(--black);
	text-decoration: none;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	border: 1px solid #fff;
	transition: background var(--ease), color var(--ease), transform var(--ease), box-shadow var(--ease), border-color var(--ease);
}

.hero-cta:hover {
	background: #f5f5f5;
	border-color: #f5f5f5;
	transform: translateY(-1px);
	box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

@media (max-width: 768px) {
	.hero {
		background-position: 30% !important;
		padding: 60px 24px 48px;
	}
}


/* ── Page hero ── */

.page-hero {
	padding: 120px var(--pad-x) 72px;
	border-bottom: var(--border-faint);
}

.page-title {
	font-size: clamp(2rem, 5vw, 4rem);
	font-weight: 800;
	letter-spacing: -0.03em;
	line-height: 1.1;
	color: var(--white);
	margin-top: 20px;
	animation: fadeUp 0.8s ease both;
}

.page-sub {
	margin-top: 20px;
	font-size: 1rem;
	color: var(--gray);
	line-height: 1.7;
	max-width: 480px;
	animation: fadeUp 0.8s 0.1s ease both;
}

@media (max-width: 768px) {
	.page-hero { padding: 90px 24px 56px; }
}


/* ── Card ── */

.card {
	display: flex;
	flex-direction: column;
	background: var(--black);
	padding: 36px 32px;
	text-decoration: none;
	color: inherit;
	transition: background 0.2s;
}

.card:hover { background: #0a0a0a; }

.card--dim		  { background: #050505; padding: 40px 32px; }
.card--dim:hover	{ background: #0d0d0d; }

.card-top {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 20px;
}

.card-lang {
	font-size: 0.62rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--gray);
}

.card-name {
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--white);
	letter-spacing: -0.02em;
	margin-bottom: 12px;
}

.card--dim h3 {
	font-size: 1.1rem;
	font-weight: 700;
	color: var(--white);
	margin-bottom: 12px;
	letter-spacing: -0.01em;
}

.card-desc {
	font-size: 0.88rem;
	color: #666;
	line-height: 1.75;
	flex: 1;
}

.card-footer { margin-top: 28px; }

.card-link {
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--gray);
	transition: color var(--ease);
	margin-right: 1rem;
}

.card:hover .card-link { color: var(--white); }
.card:has(.card-link:hover) .card-link { color: var(--gray); }
.card-link:hover { color: var(--white) !important; }


/* ── Tag ── */

.tag {
	font-size: 0.62rem;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	padding: 3px 8px;
	border-radius: 2px;
	border: 1px solid;
}

.tag-active		{ color: #4caf50; border-color: #4caf5044; }
.tag-featured	{ color: #9c27b0; border-color: #9c27b044; }
.tag-wip		{ color: #e0a020; border-color: #e0a02044; }
.tag-partner	{ color: #2196f3; border-color: #2196f344; }
.tag-archived	{ color: var(--gray-light); border-color: var(--gray-dim); }


/* ── About ── */

.about-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 60px 80px;
	align-items: start;
}

.about-lead {
	grid-column: 1 / -1;
	font-size: clamp(1.2rem, 2.2vw, 1.65rem);
	font-weight: 300;
	line-height: 1.6;
	color: #e0e0e0;
	letter-spacing: -0.01em;
}

.about-lead strong  { color: var(--white); font-weight: 600; }
.about-lead a,
.about-lead a:visited { color: var(--white); }

.about-block h3 {
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--gray);
	margin-bottom: 16px;
}

.about-block p {
	font-size: 0.95rem;
	color: #999;
	line-height: 1.75;
}

@media (max-width: 768px) {
	.about-grid { grid-template-columns: 1fr; gap: 40px; }
}

/* ── Contacts ── */

.partners-lead {
	grid-column: 1 / -1;
	font-size: clamp(1.2rem, 2.2vw, 1.65rem);
	font-weight: 300;
	line-height: 1.6;
	color: #e0e0e0;
	letter-spacing: -0.01em;
}

.partners-lead strong  { color: var(--white); font-weight: 600; }

.partners .grid {
	align-items: center;
}

.partners .card {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 120px;
	padding: 24px;
	background: #050505;
}

.partners .card img {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	
	filter: grayscale(1) brightness(0.8);
	opacity: 0.4;
	transition: filter var(--ease), opacity var(--ease);
}

.partners .card:hover img {
	filter: grayscale(0) brightness(1);
	opacity: 1;
}

/* ── Contacts ── */

.contact-row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	padding: 16px 0;
	border-bottom: var(--border-faint);
	text-decoration: none;
	transition: border-color var(--ease);
}

.contact-row:first-child { border-top: var(--border-faint); }
.contact-row:hover .contact-handle { color: var(--white); }

.contact-name {
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--gray-light);
}

.contact-handle {
	font-size: 0.88rem;
	color: var(--gray);
	transition: color var(--ease);
}


/* ── Principles section ── */

.principles { background: #050505; border-top: var(--border-faint); }


/* ── Footer ── */

footer {
	background: var(--black) url("/static/footer.svg") no-repeat center bottom / cover;
	border-top: var(--border-faint);
	padding: 48px var(--pad-x) 40px;
	margin-top: auto;
	height: 100dvh;
	z-index: 101;
}

footer .logo {
	width: 100%;
	height: auto;
	opacity: 0.5;
}

.footer-meta {
	color: var(--gray);
	margin-top: 1rem;
	line-height: 4;
	letter-spacing: 0.08em;
}

.footer-meta a { color: #666; text-decoration: none; transition: color var(--ease); }
.footer-meta a:hover { color: var(--white); }

@media (max-width: 1280px) {
	footer {
		font-size: 0.78rem;
		height: 371px;
		border-top: 2px solid var(--gray-dim);
		z-index: unset;
		box-shadow: inset 0 100vh 0 #000c;
	}
	footer .logo {
		opacity: 1;
		width: 75vw;
		height: auto;
	}
}
@media (max-width: 768px) {
	footer {
		padding: 40px 24px 32px;
	}
}