/* Curtain and preview gate, ported from public/coming-soon.html and app/gate/gate.css. */
@font-face {
	font-family: "IBM Plex Sans";
	src: url("/assets/fonts/IBMPlexSans-300.c4557c8a3ca4.woff2") format("woff2");
	font-weight: 300;
	font-display: swap;
}
@font-face {
	font-family: "IBM Plex Sans";
	src: url("/assets/fonts/IBMPlexSans-400.3b646991d300.woff2") format("woff2");
	font-weight: 400;
	font-display: swap;
}
@font-face {
	font-family: "IBM Plex Sans";
	src: url("/assets/fonts/IBMPlexSans-500.0717336fb31f.woff2") format("woff2");
	font-weight: 500;
	font-display: swap;
}
@font-face {
	font-family: "JetBrains Mono";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("/assets/fonts/JetBrainsMono-400.7c53386f55c8.woff2") format("woff2");
}
*,
*::before,
*::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html,
body {
	height: 100%;
	overflow: hidden;
}

/* ─── Timing: 24s cycle, 4 × 6s phases ─────────────────────────────────── */
/*   Phase 1  0 – 25%   Deep + Weiß                                          */
/*   Phase 2 25 – 50%   Deep + Sand                                          */
/*   Phase 3 50 – 75%   Mist + Petrol                                        */
/*   Phase 4 75 – 100%  Sand + Petrol                                        */

/* ─── Background scenes ─────────────────────────────────────────────────── */
.scene {
	position: fixed;
	inset: 0;
	z-index: 0;
}

.scene-deep {
	background: radial-gradient(
		ellipse 80% 60% at 50% 55%,
		#0d3b4f 0%,
		#062838 55%,
		#020e18 100%
	);
	animation: scene-deep 24s ease-in-out infinite;
}
.scene-mist {
	background: radial-gradient(
		ellipse 80% 60% at 50% 55%,
		#e8f3f6 0%,
		#cfe1e7 55%,
		#b2cfd8 100%
	);
	animation: scene-mist 24s ease-in-out infinite;
}
.scene-sand {
	background: radial-gradient(
		ellipse 80% 60% at 50% 55%,
		#e8c9a0 0%,
		#d9b087 55%,
		#c49666 100%
	);
	animation: scene-sand 24s ease-in-out infinite;
}

/* Deep: phases 1+2 (0–50%), fades out at ~50%, returns at ~96% */
@keyframes scene-deep {
	0% {
		opacity: 1;
	}
	44% {
		opacity: 1;
	}
	52% {
		opacity: 0;
	}
	92% {
		opacity: 0;
	}
	100% {
		opacity: 1;
	}
}
/* Mist: phase 3 (50–75%) */
@keyframes scene-mist {
	0% {
		opacity: 0;
	}
	48% {
		opacity: 0;
	}
	54% {
		opacity: 1;
	}
	70% {
		opacity: 1;
	}
	78% {
		opacity: 0;
	}
	100% {
		opacity: 0;
	}
}
/* Sand: phase 4 (75–100%) */
@keyframes scene-sand {
	0% {
		opacity: 0;
	}
	73% {
		opacity: 0;
	}
	79% {
		opacity: 1;
	}
	96% {
		opacity: 1;
	}
	100% {
		opacity: 0;
	}
}

/* ─── Noise texture ──────────────────────────────────────────────────────── */
.noise {
	position: fixed;
	inset: 0;
	z-index: 1;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
	pointer-events: none;
	opacity: 0.35;
}

/* ─── Ripple rings ───────────────────────────────────────────────────────── */
.rings {
	position: fixed;
	inset: 0;
	z-index: 2;
	pointer-events: none;
}
.ring {
	position: absolute;
	left: 50%;
	top: 50%;
	border-radius: 50%;
	border: 1px solid currentColor;
	color: rgba(207, 225, 231, 0.35);
	transform: translate(-50%, -50%) scale(0);
	animation:
		ripple 8s ease-out infinite,
		ring-color 24s ease-in-out infinite;
}
.ring:nth-child(1) {
	width: 360px;
	height: 360px;
	animation-delay: 0s, 0s;
}
.ring:nth-child(2) {
	width: 620px;
	height: 620px;
	animation-delay: 2s, 0s;
}
.ring:nth-child(3) {
	width: 920px;
	height: 920px;
	animation-delay: 4s, 0s;
}
.ring:nth-child(4) {
	width: 1240px;
	height: 1240px;
	animation-delay: 6s, 0s;
}

@keyframes ripple {
	0% {
		transform: translate(-50%, -50%) scale(0.15);
		opacity: 0;
	}
	15% {
		opacity: 1;
	}
	100% {
		transform: translate(-50%, -50%) scale(1);
		opacity: 0;
	}
}
@keyframes ring-color {
	0%,
	44% {
		color: rgba(207, 225, 231, 0.35);
	} /* deep → hell-petrol */
	52%,
	70% {
		color: rgba(13, 59, 79, 0.3);
	} /* sand/mist → dunkel-petrol */
	78%,
	96% {
		color: rgba(255, 255, 255, 0.35);
	} /* petrol → weiß */
	100% {
		color: rgba(207, 225, 231, 0.35);
	}
}

/* ─── Page layout ────────────────────────────────────────────────────────── */
.page {
	position: relative;
	z-index: 3;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 100vh;
	padding: 40px 24px;
}

/* ─── Wordmark crossfade ─────────────────────────────────────────────────── */
.wordmark-wrap {
	position: relative;
	width: min(320px, 78vw);
}
.wordmark-wrap img {
	display: block;
	width: 100%;
	height: auto;
	position: absolute;
	top: 0;
	left: 0;
}
.wordmark-wrap img:first-child {
	position: relative;
}

/* Weiß: phase 1 (0–25%), returns briefly at cycle end */
.wm-weiss {
	animation: wm-weiss 24s ease-in-out infinite;
}
@keyframes wm-weiss {
	0% {
		opacity: 1;
	}
	20% {
		opacity: 1;
	}
	27% {
		opacity: 0;
	}
	92% {
		opacity: 0;
	}
	100% {
		opacity: 1;
	}
}

/* Sand: phase 2 (25–50%) */
.wm-sand {
	animation: wm-sand 24s ease-in-out infinite;
}
@keyframes wm-sand {
	0% {
		opacity: 0;
	}
	23% {
		opacity: 0;
	}
	29% {
		opacity: 1;
	}
	44% {
		opacity: 1;
	}
	52% {
		opacity: 0;
	}
	100% {
		opacity: 0;
	}
}

/* Petrol: phases 3+4 (50–100%) */
.wm-petrol {
	animation: wm-petrol 24s ease-in-out infinite;
}
@keyframes wm-petrol {
	0% {
		opacity: 0;
	}
	48% {
		opacity: 0;
	}
	54% {
		opacity: 1;
	}
	93% {
		opacity: 1;
	}
	100% {
		opacity: 0;
	}
}

/* ─── Footer ─── */
.vorhang-fuss {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 4;
	padding: 18px 32px;
	display: flex;
	justify-content: space-between;
	font-family: "JetBrains Mono", monospace;
	font-size: 11px;
	letter-spacing: 0.06em;
	animation: footer-color 24s ease-in-out infinite;
}
@keyframes footer-color {
	0%,
	44% {
		color: rgba(207, 225, 231, 0.25);
		border-top-color: rgba(207, 225, 231, 0.08);
	}
	52%,
	70% {
		color: rgba(13, 59, 79, 0.35);
		border-top-color: rgba(13, 59, 79, 0.1);
	}
	78%,
	96% {
		color: rgba(255, 255, 255, 0.3);
		border-top-color: rgba(255, 255, 255, 0.1);
	}
	100% {
		color: rgba(207, 225, 231, 0.25);
		border-top-color: rgba(207, 225, 231, 0.08);
	}
}

@media (max-width: 480px) {
	.vorhang-fuss {
		flex-direction: column;
		gap: 4px;
		text-align: center;
		padding: 12px;
	}
}

/* Brand-Font-Stack — kein Mono-Fremdkörper, tabular-nums + letterspacing geben Mono-Look */
.lw-gate-trigger,
.lw-audio-toggle {
	font-family:
		"IBM Plex Sans",
		-apple-system,
		BlinkMacSystemFont,
		system-ui,
		sans-serif;
	font-variant-numeric: tabular-nums;
	font-size: 11px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.78);
	background: rgba(13, 40, 56, 0.28);
	border: 1px solid rgba(255, 255, 255, 0.32);
	border-radius: 999px;
	padding: 6px 14px;
	cursor: pointer;
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	animation: lw-einblenden 0.8s ease 2s both;
	transition:
		background 0.15s,
		color 0.15s;
	z-index: 50;
}
.lw-gate-trigger {
	position: fixed;
	right: 18px;
	bottom: 16px;
}
.lw-audio-toggle {
	position: fixed;
	right: 18px;
	top: 16px;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	line-height: 1;
}
.lw-audio-toggle .icon {
	width: 14px;
	height: 14px;
	display: inline-block;
	flex: none;
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
	/* Speaker-On (default = aria-pressed="true") */
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><polygon points='11 5 6 9 2 9 2 15 6 15 11 19 11 5'/><path d='M19.07 4.93a10 10 0 0 1 0 14.14'/><path d='M15.54 8.46a5 5 0 0 1 0 7.07'/></svg>");
}
.lw-audio-toggle[aria-pressed="false"] .icon {
	/* Speaker-Muted (X) */
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><polygon points='11 5 6 9 2 9 2 15 6 15 11 19 11 5'/><line x1='23' y1='9' x2='17' y2='15'/><line x1='17' y1='9' x2='23' y2='15'/></svg>");
}
@keyframes lw-einblenden {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}
.lw-gate-trigger:hover,
.lw-audio-toggle:hover {
	color: #fff;
	background: rgba(13, 40, 56, 0.55);
	opacity: 1;
	transition: background 0.15s;
}
.lw-gate-trigger:focus-visible,
.lw-audio-toggle:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
	opacity: 1;
}

.gate-kopf {
	text-align: center;
	max-width: 36rem;
	margin-bottom: 2rem;
	animation: gate-text 24s ease-in-out infinite;
}
.gate-kopf h1 {
	font-size: clamp(1.5rem, 3vw, 2rem);
	font-weight: 400;
	line-height: 1.25;
	letter-spacing: -0.01em;
	margin: 0 0 0.75rem;
	animation: gate-text 24s ease-in-out infinite;
}
.gate-kopf p {
	font-size: 1rem;
	line-height: 1.6;
	margin: 0;
	animation: gate-text-leise 24s ease-in-out infinite;
}

@keyframes gate-text {
	0%,
	44% {
		color: rgba(255, 255, 255, 0.92);
	}
	52%,
	70% {
		color: rgba(13, 59, 79, 0.92);
	}
	78%,
	96% {
		color: rgba(13, 59, 79, 0.92);
	}
	100% {
		color: rgba(255, 255, 255, 0.92);
	}
}
@keyframes gate-text-leise {
	0%,
	44% {
		color: rgba(207, 225, 231, 0.7);
	}
	52%,
	70% {
		color: rgba(13, 59, 79, 0.65);
	}
	78%,
	96% {
		color: rgba(13, 59, 79, 0.65);
	}
	100% {
		color: rgba(207, 225, 231, 0.7);
	}
}

.gate-formular {
	width: 100%;
	max-width: 28rem;
	margin-bottom: 2.5rem;
}
.gate-zeile {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}
@media (min-width: 480px) {
	.gate-zeile {
		flex-direction: row;
	}
}

.gate-eingabe {
	flex: 1;
	padding: 0.75rem 1rem;
	border-radius: 8px;
	border: 1px solid rgba(255, 255, 255, 0.3);
	background: rgba(13, 40, 56, 0.35);
	color: #ffffff;
	font-family: inherit;
	font-size: 0.9rem;
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	transition: border-color 0.15s;
	animation: gate-feld 24s ease-in-out infinite;
}
.gate-eingabe::placeholder {
	color: rgba(255, 255, 255, 0.45);
}
.gate-eingabe:focus {
	outline: 2px solid rgba(207, 225, 231, 0.6);
	outline-offset: 1px;
	border-color: rgba(207, 225, 231, 0.5);
}

/* On mist/sand phase, invert form for readability */
@keyframes gate-feld {
	0%,
	44% {
		background: rgba(13, 40, 56, 0.35);
		border-color: rgba(255, 255, 255, 0.3);
		color: #ffffff;
	}
	52%,
	70% {
		background: rgba(255, 255, 255, 0.55);
		border-color: rgba(13, 59, 79, 0.4);
		color: #062838;
	}
	78%,
	96% {
		background: rgba(255, 255, 255, 0.55);
		border-color: rgba(13, 59, 79, 0.4);
		color: #062838;
	}
	100% {
		background: rgba(13, 40, 56, 0.35);
		border-color: rgba(255, 255, 255, 0.3);
		color: #ffffff;
	}
}

.gate-knopf {
	padding: 0.75rem 1.25rem;
	border-radius: 8px;
	border: 1px solid rgba(255, 255, 255, 0.32);
	background: rgba(13, 40, 56, 0.28);
	color: rgba(255, 255, 255, 0.92);
	font-family: inherit;
	font-size: 0.85rem;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	cursor: pointer;
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	white-space: nowrap;
	transition:
		background 0.15s,
		color 0.15s;
	animation: gate-knopf-phase 24s ease-in-out infinite;
}
.gate-knopf:hover {
	background: rgba(13, 40, 56, 0.55);
	color: #ffffff;
}
.gate-knopf:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

@keyframes gate-knopf-phase {
	0%,
	44% {
		border-color: rgba(255, 255, 255, 0.32);
		background: rgba(13, 40, 56, 0.28);
		color: rgba(255, 255, 255, 0.92);
	}
	52%,
	70% {
		border-color: rgba(13, 59, 79, 0.4);
		background: rgba(13, 59, 79, 0.12);
		color: rgba(13, 59, 79, 0.9);
	}
	78%,
	96% {
		border-color: rgba(13, 59, 79, 0.4);
		background: rgba(13, 59, 79, 0.12);
		color: rgba(13, 59, 79, 0.9);
	}
	100% {
		border-color: rgba(255, 255, 255, 0.32);
		background: rgba(13, 40, 56, 0.28);
		color: rgba(255, 255, 255, 0.92);
	}
}

.gate-fehler {
	font-size: 0.8rem;
	margin-top: 0.5rem;
	color: #f87171;
}

.vorhang-fuss nav {
	display: flex;
	flex-wrap: wrap;
	gap: 0 1rem;
	justify-content: center;
}
.vorhang-fuss a {
	color: inherit;
	text-decoration: none;
}
.vorhang-fuss a:hover {
	text-decoration: underline;
}
.lw-gate-trigger {
	text-decoration: none;
}
.gate-kopf h1 {
	font-family: "IBM Plex Sans", system-ui, sans-serif;
}
.page.gate {
	font-family: "IBM Plex Sans", system-ui, sans-serif;
}
.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
