:root {
	--color-background: #0b0b1e;
	--color-surface: #15152e;
	--color-surface-raised: #1d1d3d;
	--color-border: #2f2f58;
	--color-text: #ededf5;
	--color-text-muted: #b8bad0;
	--color-blue: #4da3ff;
	--color-red: #ff7b7b;
	--color-gold: #f2c14e;
	--color-gold-strong: #ffd36b;
	--font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--radius-large: 28px;
	--radius-medium: 16px;
	--page-width: 1120px;
}

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

html {
	scroll-behavior: smooth;
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--color-background);
	color: var(--color-text);
	font-family: var(--font-family);
	font-size: 18px;
	line-height: 28px;
	-webkit-font-smoothing: antialiased;
}

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

a {
	color: var(--color-blue);
	text-underline-offset: 4px;
}

a:hover {
	color: var(--color-text);
}

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

h1,
h2,
h3 {
	margin: 0;
	letter-spacing: -0.5px;
}

p {
	margin: 0 0 16px;
}

.icon-sprite {
	position: absolute;
	width: 0;
	height: 0;
	overflow: hidden;
}

.icon {
	display: inline-block;
	flex: 0 0 auto;
	width: 22px;
	height: 22px;
}

.page-width {
	width: 100%;
	max-width: var(--page-width);
	margin: 0 auto;
	padding: 0 24px;
}

.skip-link {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 100;
	padding: 12px 20px;
	background: var(--color-gold);
	color: var(--color-background);
	font-weight: 700;
	text-decoration: none;
	border-radius: 999px;
	transform: translateY(-200%);
}

.skip-link:focus {
	transform: translateY(0);
}

.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(11, 11, 30, 0.86);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--color-border);
}

.header-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 72px;
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	min-height: 44px;
	color: var(--color-text);
	text-decoration: none;
}

.brand:hover {
	color: var(--color-text);
}

.brand-mark {
	width: 36px;
	height: 36px;
	color: var(--color-gold);
}

.brand-name {
	font-size: 22px;
	line-height: 28px;
	font-weight: 800;
	letter-spacing: -0.5px;
}

.brand-accent {
	color: var(--color-gold);
}

.navigation-links {
	display: flex;
	gap: 4px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.navigation-links a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 14px;
	color: var(--color-text);
	font-size: 17px;
	font-weight: 600;
	text-decoration: none;
	border-radius: 999px;
}

.navigation-links a:hover {
	background: var(--color-surface-raised);
}

.header-actions {
	display: flex;
	align-items: center;
	gap: 8px;
}

.visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/*
	Nyelvválasztás JavaScript nélkül.
	A szerver a html lang attribútumot tölti ki. Amíg a látogató nem választ, az dönt,
	utána a bepipált nyelvi rádiógomb. Az állapotból egyedi tulajdonságok lesznek,
	az alatta lévő szabályok ezeket olvassák.
*/
.translation {
	display: none;
}

:is(html[lang="de"]:not(:has(.language-radio:checked)), html:has(#language-de:checked)) {
	--language-de-display: contents;
	--language-de-weight: 700;
}

:is(html[lang="en"]:not(:has(.language-radio:checked)), html:has(#language-en:checked)) {
	--language-en-display: contents;
	--language-en-weight: 700;
}

:is(html[lang="es"]:not(:has(.language-radio:checked)), html:has(#language-es:checked)) {
	--language-es-display: contents;
	--language-es-weight: 700;
}

:is(html[lang="fr"]:not(:has(.language-radio:checked)), html:has(#language-fr:checked)) {
	--language-fr-display: contents;
	--language-fr-weight: 700;
}

:is(html[lang="hu"]:not(:has(.language-radio:checked)), html:has(#language-hu:checked)) {
	--language-hu-display: contents;
	--language-hu-weight: 700;
}

:is(html[lang="ja"]:not(:has(.language-radio:checked)), html:has(#language-ja:checked)) {
	--language-ja-display: contents;
	--language-ja-weight: 700;
}

:is(html[lang="pl"]:not(:has(.language-radio:checked)), html:has(#language-pl:checked)) {
	--language-pl-display: contents;
	--language-pl-weight: 700;
}

:is(html[lang="zh"]:not(:has(.language-radio:checked)), html:has(#language-zh:checked)) {
	--language-zh-display: contents;
	--language-zh-weight: 700;
}

:is(html[lang="nl"]:not(:has(.language-radio:checked)), html:has(#language-nl:checked)) {
	--language-nl-display: contents;
	--language-nl-weight: 700;
}

.translation[lang="de"] { display: var(--language-de-display, none); }
.translation[lang="en"] { display: var(--language-en-display, none); }
.translation[lang="es"] { display: var(--language-es-display, none); }
.translation[lang="fr"] { display: var(--language-fr-display, none); }
.translation[lang="hu"] { display: var(--language-hu-display, none); }
.translation[lang="ja"] { display: var(--language-ja-display, none); }
.translation[lang="pl"] { display: var(--language-pl-display, none); }
.translation[lang="zh"] { display: var(--language-zh-display, none); }
.translation[lang="nl"] { display: var(--language-nl-display, none); }

.language-options label[for="language-de"] { font-weight: var(--language-de-weight, 400); }
.language-options label[for="language-en"] { font-weight: var(--language-en-weight, 400); }
.language-options label[for="language-es"] { font-weight: var(--language-es-weight, 400); }
.language-options label[for="language-fr"] { font-weight: var(--language-fr-weight, 400); }
.language-options label[for="language-hu"] { font-weight: var(--language-hu-weight, 400); }
.language-options label[for="language-ja"] { font-weight: var(--language-ja-weight, 400); }
.language-options label[for="language-pl"] { font-weight: var(--language-pl-weight, 400); }
.language-options label[for="language-zh"] { font-weight: var(--language-zh-weight, 400); }
.language-options label[for="language-nl"] { font-weight: var(--language-nl-weight, 400); }

.language-picker {
	position: relative;
}

.language-opener {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	padding: 0 14px;
	background: var(--color-surface-raised);
	color: var(--color-text);
	font-family: inherit;
	font-size: 16px;
	line-height: 24px;
	font-weight: 600;
	border: 1px solid var(--color-border);
	border-radius: 999px;
	cursor: pointer;
}

.language-opener:hover {
	background: var(--color-border);
}

.language-chevron {
	flex: 0 0 auto;
	transition: transform 0.15s ease;
}

html:has(#language-menu-state:popover-open) .language-chevron {
	transform: rotate(180deg);
}

.flag {
	display: block;
	flex: 0 0 auto;
	width: 24px;
	height: 16px;
	border-radius: 3px;
	box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.28);
}

/* Láthatatlan, nulla méretű popover: a nyitott állapotot tárolja, és bármilyen kattintásra bezárul. */
.language-menu-state {
	width: 0;
	height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	overflow: hidden;
}

.language-options {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	z-index: 60;
	min-width: 200px;
	padding: 8px;
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-medium);
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
	visibility: hidden;
	opacity: 0;
	transition: opacity 0.15s ease, visibility 0s linear 0.2s;
}

html:has(#language-menu-state:popover-open) .language-options {
	visibility: visible;
	opacity: 1;
	transition-delay: 0s;
}

.language-picker:has(.language-radio:focus-visible) .language-options {
	visibility: visible;
	opacity: 1;
	transition-delay: 0s;
}

@supports not selector(:popover-open) {
	.language-picker:focus-within .language-options {
		visibility: visible;
		opacity: 1;
		transition-delay: 0s;
	}
}

.language-options fieldset {
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.language-radio {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: 0;
	opacity: 0;
}

.language-options label {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 44px;
	padding: 0 12px;
	color: var(--color-text);
	font-size: 17px;
	border-radius: 10px;
	cursor: pointer;
}

.language-options label:hover {
	background: var(--color-surface-raised);
}

.language-radio:focus-visible + label {
	outline: 3px solid var(--color-gold);
	outline-offset: -3px;
}

.hero {
	position: relative;
	overflow: hidden;
	padding: 112px 0 120px;
}

.hero-paths {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
}

.hero-path {
	fill: none;
	stroke-width: 14;
	stroke-linecap: round;
	opacity: 0.28;
	stroke-dasharray: 2400;
	stroke-dashoffset: 2400;
	animation: draw-path 3.2s ease-out forwards;
}

.hero-path-blue {
	stroke: var(--color-blue);
}

.hero-path-red {
	stroke: var(--color-red);
	animation-delay: 0.4s;
}

.hero-path-gold {
	stroke: var(--color-gold);
	opacity: 0.18;
	animation-delay: 0.8s;
}

@keyframes draw-path {
	to {
		stroke-dashoffset: 0;
	}
}

.hero-content {
	position: relative;
	max-width: 860px;
	margin-left: max(0px, calc((100% - var(--page-width)) / 2));
}

.hero-kicker,
.section-kicker {
	display: inline-block;
	margin-bottom: 20px;
	padding: 6px 14px;
	background: var(--color-surface-raised);
	color: var(--color-gold);
	font-size: 16px;
	line-height: 24px;
	font-weight: 700;
	border: 1px solid var(--color-border);
	border-radius: 999px;
}

.hero h1 {
	font-size: clamp(40px, 7vw, 76px);
	line-height: 1.05;
	font-weight: 850;
}

.hero-highlight {
	color: var(--color-gold);
}

.hero-lead {
	max-width: 620px;
	margin-top: 28px;
	color: var(--color-text-muted);
	font-size: 20px;
	line-height: 32px;
}

.action-row {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 32px;
}

.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 52px;
	padding: 12px 24px;
	font-size: 17px;
	line-height: 24px;
	font-weight: 700;
	text-decoration: none;
	border-radius: 999px;
	border: 2px solid transparent;
	transition: transform 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.button:hover {
	transform: translateY(-2px);
}

.button-primary {
	background: var(--color-gold);
	color: var(--color-background);
}

.button-primary:hover {
	background: var(--color-gold-strong);
	color: var(--color-background);
}

.button-secondary {
	background: transparent;
	color: var(--color-text);
	border-color: var(--color-text-muted);
}

.button-secondary:hover {
	background: var(--color-surface-raised);
	color: var(--color-text);
}

.projects {
	padding: 96px 0;
	background: linear-gradient(180deg, var(--color-background) 0%, #10102a 50%, var(--color-background) 100%);
}

.section-heading {
	margin-bottom: 40px;
}

.section-heading h2 {
	font-size: clamp(32px, 4.5vw, 48px);
	line-height: 1.15;
	font-weight: 800;
}

.project-card {
	display: grid;
	grid-template-columns: 1fr;
	gap: 40px;
	padding: 32px;
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-large);
}

.project-visual {
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 24px;
	background: radial-gradient(circle at 50% 40%, rgba(77, 163, 255, 0.22), transparent 70%);
	border-radius: var(--radius-medium);
}

.project-screenshot {
	width: 100%;
	max-width: 280px;
	border: 8px solid var(--color-surface-raised);
	border-radius: var(--radius-large);
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
	transform: rotate(-3deg);
}

.project-title-row {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-bottom: 20px;
}

.project-icon {
	width: 64px;
	height: 64px;
	border-radius: var(--radius-medium);
}

.project-body h3 {
	font-size: 32px;
	line-height: 38px;
	font-weight: 800;
}

.project-tagline {
	margin: 4px 0 0;
	color: var(--color-gold);
	font-weight: 600;
}

.project-body > p {
	color: var(--color-text-muted);
}

.feature-list {
	display: grid;
	gap: 12px;
	margin: 24px 0 0;
	padding: 0;
	list-style: none;
}

.feature-list li {
	display: flex;
	align-items: center;
	gap: 14px;
}

.feature-icon {
	width: 40px;
	height: 40px;
	padding: 9px;
	background: var(--color-surface-raised);
	border-radius: 12px;
}

.feature-icon-blue {
	color: var(--color-blue);
}

.feature-icon-red {
	color: var(--color-red);
}

.feature-icon-gold {
	color: var(--color-gold);
}

.coming-soon {
	margin-top: 24px;
	padding: 28px 32px;
	border: 2px dashed var(--color-border);
	border-radius: var(--radius-large);
	color: var(--color-text-muted);
}

.coming-soon p:last-child {
	margin-bottom: 0;
}

.coming-soon-title {
	color: var(--color-text);
	font-size: 20px;
	font-weight: 700;
}

.about {
	padding: 96px 0;
}

.about-grid {
	display: grid;
	gap: 24px;
}

.about-text {
	max-width: 680px;
	color: var(--color-text-muted);
	font-size: 20px;
	line-height: 32px;
}

.site-footer {
	padding: 32px 0;
	border-top: 1px solid var(--color-border);
	color: var(--color-text-muted);
	font-size: 16px;
	line-height: 24px;
}

.footer-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.footer-row p {
	margin: 0;
}

.footer-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	color: var(--color-text);
	font-weight: 600;
}

.error-page {
	display: flex;
	min-height: calc(100vh - 73px);
	align-items: center;
	padding: 48px 0;
	background: radial-gradient(circle at 75% 40%, rgba(242, 193, 78, 0.12), transparent 55%);
}

.error-layout {
	display: grid;
	gap: 40px;
	align-items: center;
}

.error-page h1 {
	font-size: clamp(36px, 6vw, 60px);
	line-height: 1.1;
	font-weight: 850;
	margin-bottom: 20px;
}

.error-text > p:not(.section-kicker) {
	color: var(--color-text-muted);
	font-size: 20px;
	line-height: 32px;
}

.error-board {
	width: 100%;
	max-width: 360px;
	justify-self: center;
	transform: rotate(4deg);
}

.error-board-frame {
	fill: var(--color-surface);
	stroke: var(--color-border);
	stroke-width: 3;
}

.error-board-grid {
	fill: none;
	stroke: var(--color-border);
	stroke-width: 2;
}

.error-board-path {
	fill: none;
	stroke-width: 10;
	stroke-linecap: round;
	stroke-dasharray: 520;
	stroke-dashoffset: 520;
	animation: draw-path 2.4s ease-out forwards;
}

.error-board-path-light {
	stroke: var(--color-text);
	opacity: 0.5;
}

.error-board-path-gold {
	stroke: var(--color-gold);
	animation-delay: 0.3s;
}

.error-board-token {
	fill: var(--color-gold);
	animation: token-wobble 1.6s ease-in-out 2.4s infinite;
	transform-origin: 296px 34px;
}

.error-board-number {
	fill: var(--color-text);
	opacity: 0.12;
	font-family: var(--font-family);
	font-size: 96px;
	font-weight: 900;
}

@keyframes token-wobble {
	0%,
	100% {
		transform: translate(0, 0);
	}

	50% {
		transform: translate(6px, -8px);
	}
}

@media (min-width: 860px) {
	.project-card {
		grid-template-columns: 5fr 7fr;
		align-items: center;
		gap: 56px;
		padding: 48px;
	}

	.about-grid {
		grid-template-columns: 5fr 7fr;
		align-items: start;
		gap: 56px;
	}

	.error-layout {
		grid-template-columns: 7fr 5fr;
		gap: 56px;
	}
}

@media (max-width: 700px) {
	.language-opener {
		padding: 0 12px;
	}

	.language-opener .language-name {
		position: absolute;
		width: 1px;
		height: 1px;
		margin: -1px;
		overflow: hidden;
		clip-path: inset(50%);
		white-space: nowrap;
	}

	.language-options {
		right: 0;
		left: auto;
	}
}

@media (max-width: 520px) {
	body {
		font-size: 17px;
		line-height: 27px;
	}

	.page-width {
		padding: 0 18px;
	}

	.brand-name {
		font-size: 19px;
	}

	.header-actions nav {
		display: none;
	}

	.hero {
		padding: 72px 0 88px;
	}

	.hero-lead,
	.about-text {
		font-size: 18px;
		line-height: 29px;
	}

	.project-card {
		padding: 20px;
	}

	.button {
		width: 100%;
	}
}

@media (max-width: 374px) {
	.header-row {
		gap: 8px;
	}

	.brand {
		gap: 8px;
	}

	.brand-mark {
		width: 30px;
		height: 30px;
	}

	.brand-name {
		font-size: 17px;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	.hero-path,
	.error-board-path {
		animation: none;
		stroke-dashoffset: 0;
	}

	.error-board-token {
		animation: none;
	}

	.language-chevron {
		transition: none;
	}

	.language-options {
		transition: visibility 0s linear 0.2s;
	}

	.button {
		transition: none;
	}

	.button:hover {
		transform: none;
	}
}
