/* --- 1. Fonts & Reset --- */
@font-face {
	font-family: "Inter";
	font-style: normal;
	font-weight: 400;
	src: url("../fonts/inter-v13-latin-regular.woff2") format("woff2");
}
@font-face {
	font-family: "Inter";
	font-style: normal;
	font-weight: 500;
	src: url("../fonts/inter-v13-latin-500.woff2") format("woff2");
}
@font-face {
	font-family: "Inter";
	font-style: normal;
	font-weight: 700;
	src: url("../fonts/inter-v13-latin-700.woff2") format("woff2");
}
@font-face {
	font-family: "JetBrains Mono";
	font-style: normal;
	font-weight: 400;
	src: url("../fonts/jetbrains-mono-v13-latin-regular.woff2") format("woff2");
}
@font-face {
	font-family: "JetBrains Mono";
	font-style: normal;
	font-weight: 700;
	src: url("../fonts/jetbrains-mono-v13-latin-700.woff2") format("woff2");
}

* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

/* --- 2. Variables & Theme --- */
:root {
	/* Colors */
	--c-primary: #e68a00;
	--c-primary-hover: #cc7a00;
	--c-grey: #808080;
	--c-dark: #1a1a1a;

	/* Light Mode Defaults */
	--bg-body: #ffffff;
	--bg-glass: rgba(255, 255, 255, 0.9);
	--bg-card: #ffffff;
	--bg-panel: #f4f4f4;
	--text-main: #212121;
	--text-muted: #666666;
	--border: #e0e0e0;

	/* Layout & Type */
	--font-main: "Inter", sans-serif;
	--font-mono: "JetBrains Mono", monospace;
	--radius-md: 6px;
	--container-width: 1200px;
}

html.dark {
	--bg-body: #0f0f0f;
	--bg-glass: rgba(15, 15, 15, 0.9);
	--bg-card: #1a1a1a;
	--bg-panel: #111111;
	--text-main: #e0e0e0;
	--text-muted: #999999;
	--border: #333333;
}

body {
	font-family: var(--font-main);
	background: var(--bg-body);
	color: var(--text-main);
	line-height: 1.6;
	transition:
		background 0.3s,
		color 0.3s;
	-webkit-font-smoothing: antialiased;
}

/* --- 3. Layout Utilities --- */
.container {
	max-width: var(--container-width);
	margin: 0 auto;
	padding: 0 1.5rem;
}
.section {
	padding: 4rem 0;
	border-bottom: 1px solid var(--border);
}

.grid-2 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 4rem;
	align-items: center;
}
.grid-3 {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 2rem;
}

.mb-2 {
	margin-bottom: 1rem;
}
.mb-4 {
	margin-bottom: 2rem;
}

h1,
h2,
h3 {
	font-weight: 700;
	line-height: 1.2;
	margin-bottom: 1rem;
}
h1 {
	font-size: 3rem;
	letter-spacing: -0.03em;
}
p {
	color: var(--text-muted);
}

/* --- 4. Logo Component --- */
@keyframes blink-load {
	0%,
	100% {
		opacity: 1;
	}
	50% {
		opacity: 0;
	}
}
@keyframes blink-hover {
	0%,
	100% {
		opacity: 1;
	}
	50% {
		opacity: 0;
	}
}

.brand-logo {
	font-family: var(--font-mono);
	font-weight: 700;
	font-size: 1.5rem;
	line-height: 1;
	display: inline-flex;
	align-items: center;
	text-decoration: none;
	color: var(--text-main);
	user-select: none;
}
.brand-logo .syn {
	color: var(--c-grey);
}
.brand-logo .core {
	color: var(--c-primary);
}
.brand-logo .cursor {
	color: var(--c-grey);
	margin-left: 2px;
	opacity: 1;
	animation: blink-load 1s step-end 15 forwards;
}
.brand-logo:hover .cursor {
	animation: blink-hover 1s step-end 15 forwards;
}

html.dark .brand-logo .syn,
html.dark .brand-logo .cursor {
	color: #b3b3b3;
}

/* --- 5. Header --- */
.glass-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--bg-glass);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--border);
	padding: 1rem 0;
}
.header-inner {
	display: flex;
	justify-content: space-between;
	align-items: center;
}
.header-nav ul {
	display: flex;
	gap: 2rem;
	list-style: none;
}
.header-nav a {
	text-decoration: none;
	color: var(--text-muted);
	font-weight: 500;
	font-size: 0.9rem;
}
.header-nav a:hover {
	color: var(--c-primary);
}

/* --- 6. Buttons & Badges --- */
.btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.75rem 1.5rem;
	border-radius: 4px;
	text-decoration: none;
	font-weight: 600;
	font-size: 0.9rem;
	transition: all 0.2s;
	cursor: pointer;
	border: 1px solid transparent;
}
.btn-primary {
	background: var(--c-primary);
	color: white;
	border-color: var(--c-primary);
}
.btn-primary:hover {
	background: var(--c-primary-hover);
}

.btn-outline {
	background: transparent;
	border-color: var(--border);
	color: var(--text-main);
}
.btn-outline:hover {
	border-color: var(--c-primary);
	color: var(--c-primary);
}

.kcs-badge {
	display: inline-block;
	padding: 4px 8px;
	font-family: var(--font-mono);
	background: rgba(230, 138, 0, 0.1);
	color: var(--c-primary);
	font-size: 0.75rem;
	border-radius: 4px;
	margin-bottom: 1rem;
}

/* --- 7. Cards & Containers --- */
.kcs-card {
	background: var(--bg-card);
	border: 1px solid var(--border);
	border-radius: var(--radius-md);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	height: 100%;
	transition: transform 0.2s;
}
.kcs-card:hover {
	transform: translateY(-4px);
	border-color: var(--c-primary);
}
.kcs-card-body {
	padding: 1.5rem;
	flex: 1;
}

.kcs-form {
	background: var(--bg-panel);
	padding: 2rem;
	border-radius: var(--radius-md);
	border: 1px solid var(--border);
}
.form-input {
	width: 100%;
	padding: 0.75rem;
	margin-bottom: 1rem;
	background: var(--bg-card);
	border: 1px solid var(--border);
	color: var(--text-main);
	font-family: var(--font-mono);
	border-radius: 4px;
}

.terminal-window {
	background: #1e1e1e;
	border-radius: var(--radius-md);
	border: 1px solid var(--border);
	font-family: var(--font-mono);
	overflow: hidden;
}
.terminal-body {
	padding: 1.5rem;
	color: #d4d4d4;
	font-size: 0.85rem;
}

/* --- 8. Visuals & Images --- */
.tech-frame {
	position: relative;
	padding: 10px;
	border: 1px solid var(--border);
	background: var(--bg-card);
}
.tech-frame::before,
.tech-frame::after {
	content: "";
	position: absolute;
	width: 10px;
	height: 10px;
	border-color: var(--c-primary);
	border-style: solid;
}
.tech-frame::before {
	top: -1px;
	left: -1px;
	border-width: 2px 0 0 2px;
}
.tech-frame::after {
	bottom: -1px;
	right: -1px;
	border-width: 0 2px 2px 0;
}

.img-tint-wrap {
	position: relative;
	width: 100%;
	height: 100%;
	overflow: hidden;
}
.img-tint-wrap img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	filter: grayscale(100%) contrast(1.1);
}
.img-tint-wrap::after {
	content: "";
	position: absolute;
	inset: 0;
	background-color: var(--c-primary);
	opacity: 0.8;
	mix-blend-mode: multiply;
	pointer-events: none;
}
html.dark .img-tint-wrap::after {
	opacity: 0.5;
	mix-blend-mode: color;
}

/* --- 9. Swatches (Design System) --- */
.swatch-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 1.5rem;
	margin-bottom: 2rem;
}
.swatch {
	border: 1px solid var(--border);
	border-radius: var(--radius-md);
	overflow: hidden;
	background: var(--bg-card);
}
.swatch-color {
	height: 120px;
	width: 100%;
	border-bottom: 1px solid var(--border);
}
.swatch-info {
	padding: 1rem;
	font-family: var(--font-mono);
	font-size: 0.8rem;
}
.swatch-row {
	display: flex;
	justify-content: space-between;
	margin-bottom: 6px;
	border-bottom: 1px dashed var(--border);
	padding-bottom: 4px;
}
.swatch-row:last-child {
	border-bottom: none;
	margin-bottom: 0;
}
.swatch-row span:first-child {
	color: var(--text-muted);
}
.swatch-row span:last-child,
.swatch-row code {
	color: var(--text-main);
	font-weight: 700;
}

/* --- 10. Mobile & Responsiveness --- */

@media (max-width: 768px) {
	body,
	html {
		overflow-x: hidden;
		width: 100%;
	}
	.section {
		padding: 2.5rem 0;
	}
	.grid-2,
	.grid-3 {
		grid-template-columns: 1fr;
		gap: 2rem;
	}
	h1 {
		font-size: 2.2rem;
	}
	.tech-frame,
	.img-tint-wrap {
		width: 100% !important;
		max-width: 100%;
	}

	.glass-header .header-inner {
		flex-wrap: wrap;
		gap: 0.8rem;
		padding-top: 0.8rem;
		padding-bottom: 0;
	}

	.brand-logo {
		flex-grow: 1;
		font-size: 1.3rem;
	}
	.header-inner > div:last-child {
		margin-left: auto;
	}

	.header-nav {
		order: 3;

		width: calc(100% + 3rem);
		margin-left: -1.5rem;
		margin-right: -1.5rem;

		padding: 10px 1.5rem 10px 1.5rem;

		margin-top: 10px;
		border-top: 1px solid var(--border);

		/* Scroll-Verhalten */
		overflow-x: auto;
		white-space: nowrap;
		scrollbar-width: none;
		-ms-overflow-style: none;
	}
	.header-nav::-webkit-scrollbar {
		display: none;
	}

	.header-nav ul {
		gap: 1.5rem;
		padding-left: 0;
	}

	.list-text strong {
		display: block;
		margin-bottom: 2px;
	}

	.list-text span {
		display: block;
	}

	#loesungen ul li {
		align-items: flex-start !important;
		text-align: left;
	}
	#loesungen ul li i {
		flex-shrink: 0;
		margin-top: 4px;
		margin-right: 12px !important;
	}
	#loesungen ul li strong {
		display: block;
		margin-bottom: 2px;
	}
}
