/*
 * tpl_imhof_cyber – base.css
 * Design-Tokens, Reset, Typografie, Buttons, Formulare.
 * (C) 2026 Webdesign Imhof, Mannheim
 *
 * Kontrast: Fließtext #E6EDF3 auf #0D0F12 ≈ 16:1, gedämpfter Text #9AA7B4 ≈ 7,8:1.
 * Cyan #00F2FE ist als Text zulässig (≈ 13,8:1). Violett #7F00FF hat auf Schwarz (≈ 3:1) zu wenig
 * Kontrast für Text und wird nur dekorativ genutzt; für violetten Text gilt --c-violet-text.
 */

:root {
	/* Farben */
	--c-bg: #0D0F12;
	--c-bg-raise: #12161C;
	--c-surface: rgba(18, 22, 28, 0.72);
	--c-surface-strong: rgba(18, 22, 28, 0.9);
	--c-line: rgba(0, 242, 254, 0.22);
	--c-line-soft: rgba(230, 237, 243, 0.08);
	--c-text: #E6EDF3;
	--c-text-muted: #9AA7B4;
	--c-cyan: #00F2FE;
	--c-violet: #7F00FF;
	--c-violet-text: #B88CFF;
	--c-warn: #FFC857;
	--c-danger: #FF6B81;
	--c-ok: #4ADE80;

	--g-neon: linear-gradient(120deg, var(--c-cyan) 0%, var(--c-violet) 100%);
	--g-neon-text: linear-gradient(120deg, #6AF6FF 0%, var(--c-violet-text) 100%);

	/* Schrift: Systemschriften, keine externen Webfonts (DSGVO).
	   Eigene Schriften als WOFF2 unter media/.../fonts ablegen und hier ergänzen. */
	--f-sans: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
	--f-display: "Space Grotesk", "Inter", "Segoe UI", system-ui, sans-serif;
	--f-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

	--fs-xs: 0.8125rem;
	--fs-sm: 0.9375rem;
	--fs-base: 1.0625rem;
	--fs-lg: clamp(1.125rem, 1rem + 0.5vw, 1.3125rem);
	--fs-h3: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
	--fs-h2: clamp(1.625rem, 1.3rem + 1.4vw, 2.375rem);
	--fs-h1: clamp(2.125rem, 1.4rem + 3.2vw, 4rem);

	/* Raster und Abstände */
	--space-1: 0.25rem;
	--space-2: 0.5rem;
	--space-3: 0.75rem;
	--space-4: 1rem;
	--space-5: 1.5rem;
	--space-6: 2rem;
	--space-7: 3rem;
	--space-8: 4.5rem;
	--space-9: 7rem;
	--container: 76rem;
	--gutter: clamp(1rem, 3vw, 2rem);
	--header-h: 4.25rem;

	/* Form */
	--radius-sm: 6px;
	--radius: 12px;
	--radius-lg: 18px;
	--blur: 14px;
	--glow-cyan: 0 0 0 1px rgba(0, 242, 254, 0.35), 0 0 24px rgba(0, 242, 254, 0.18);
	--glow-violet: 0 0 0 1px rgba(127, 0, 255, 0.45), 0 0 28px rgba(127, 0, 255, 0.22);
	--shadow: 0 18px 50px rgba(0, 0, 0, 0.45);

	--ease: cubic-bezier(0.22, 1, 0.36, 1);
	--dur: 280ms;

	color-scheme: dark;
}

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-padding-top: calc(var(--header-h) + var(--space-4));
}

body {
	margin: 0;
	min-height: 100vh;
	background: var(--c-bg);
	color: var(--c-text);
	font-family: var(--f-sans);
	font-size: var(--fs-base);
	line-height: 1.65;
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

img,
svg,
video,
canvas {
	display: block;
	max-width: 100%;
	height: auto;
}

input,
button,
textarea,
select {
	font: inherit;
	color: inherit;
}

h1,
h2,
h3,
h4 {
	margin: 0 0 var(--space-4);
	font-family: var(--f-display);
	font-weight: 600;
	line-height: 1.15;
	letter-spacing: -0.01em;
	text-wrap: balance;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-lg); }

p {
	margin: 0 0 var(--space-4);
	text-wrap: pretty;
}

ul,
ol {
	margin: 0 0 var(--space-4);
	padding-left: 1.25em;
}

a {
	color: var(--c-cyan);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
	transition: color var(--dur) var(--ease);
}

a:hover {
	color: #8AF9FF;
}

code,
pre {
	font-family: var(--f-mono);
	font-size: 0.875em;
}

:not(pre) > code {
	padding: 0.1em 0.35em;
	border-radius: var(--radius-sm);
	background: rgba(0, 242, 254, 0.08);
	color: #8AF9FF;
}

::selection {
	background: rgba(0, 242, 254, 0.3);
	color: #fff;
}

/* ---------- Fokus (Tastaturbedienung) ---------- */
:focus-visible {
	outline: 2px solid var(--c-cyan);
	outline-offset: 3px;
	border-radius: 4px;
}

#main:focus {
	outline: none;
}

/* ---------- Hilfsklassen ---------- */
[hidden] {
	display: none !important;
}

.visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.skip-link {
	position: absolute;
	top: var(--space-2);
	left: var(--space-2);
	z-index: 1000;
	padding: var(--space-2) var(--space-4);
	border-radius: var(--radius-sm);
	background: var(--c-cyan);
	color: var(--c-bg);
	font-weight: 600;
	transform: translateY(-200%);
}

.skip-link:focus {
	transform: none;
}

.container {
	width: 100%;
	max-width: var(--container);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.text-gradient {
	background: var(--g-neon-text);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

/* Fallback, falls background-clip nicht greift */
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
	.text-gradient {
		color: var(--c-cyan);
	}
}

.icon {
	display: inline-block;
	width: 1.15em;
	height: 1.15em;
	flex: none;
	vertical-align: -0.2em;
}

.no-js [data-consent-open],
.no-js [data-assistant-toggle] {
	display: none;
}

/* Lenis (Smooth Scroll) */
html.lenis,
html.lenis body {
	height: auto;
}

.lenis.lenis-smooth {
	scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
	overscroll-behavior: contain;
}

.lenis.lenis-stopped {
	overflow: hidden;
}

/* ---------- Buttons ---------- */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--space-2);
	min-height: 2.875rem;
	padding: 0.625rem 1.375rem;
	border: 1px solid transparent;
	border-radius: 999px;
	font-weight: 600;
	font-size: var(--fs-sm);
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition:
		transform var(--dur) var(--ease),
		box-shadow var(--dur) var(--ease),
		background-color var(--dur) var(--ease),
		color var(--dur) var(--ease);
}

.btn:hover {
	transform: translateY(-1px);
}

.btn--primary {
	background: var(--c-cyan);
	color: var(--c-bg);
	box-shadow: 0 0 24px rgba(0, 242, 254, 0.28);
}

.btn--primary:hover {
	color: var(--c-bg);
	background: #6AF6FF;
	box-shadow: 0 0 34px rgba(0, 242, 254, 0.45);
}

.btn--ghost {
	border-color: var(--c-line);
	background: rgba(0, 242, 254, 0.04);
	color: var(--c-text);
}

.btn--ghost:hover {
	color: var(--c-text);
	border-color: var(--c-cyan);
	box-shadow: var(--glow-cyan);
}

.btn--hud {
	position: relative;
	border-color: rgba(0, 242, 254, 0.55);
	border-radius: var(--radius-sm);
	background: rgba(13, 15, 18, 0.7);
	color: #8AF9FF;
	font-family: var(--f-display);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	box-shadow: var(--glow-cyan), inset 0 0 18px rgba(127, 0, 255, 0.18);
	-webkit-backdrop-filter: blur(var(--blur));
	backdrop-filter: blur(var(--blur));
}

.btn--hud:hover {
	color: #fff;
	box-shadow: var(--glow-cyan), var(--glow-violet);
}

.btn--sm {
	min-height: 2.375rem;
	padding: 0.4375rem 1rem;
	font-size: var(--fs-xs);
}

.btn--icon {
	width: 2.75rem;
	min-height: 2.75rem;
	padding: 0;
	border-color: var(--c-line);
	border-radius: 50%;
	background: transparent;
	color: var(--c-cyan);
}

.btn--icon[aria-pressed="true"] {
	background: var(--c-cyan);
	color: var(--c-bg);
}

.btn__pulse {
	width: 0.5rem;
	height: 0.5rem;
	border-radius: 50%;
	background: var(--c-cyan);
	box-shadow: 0 0 0 0 rgba(0, 242, 254, 0.6);
	animation: pulse 2.2s var(--ease) infinite;
}

@keyframes pulse {
	70% { box-shadow: 0 0 0 12px rgba(0, 242, 254, 0); }
	100% { box-shadow: 0 0 0 0 rgba(0, 242, 254, 0); }
}

.link-button {
	padding: 0;
	border: 0;
	background: none;
	color: var(--c-cyan);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
	cursor: pointer;
}

/* ---------- Formulare ---------- */
.field {
	margin-bottom: var(--space-4);
}

.field__label {
	display: block;
	margin-bottom: var(--space-1);
	font-size: var(--fs-sm);
	font-weight: 600;
}

.field__help {
	margin: var(--space-1) 0 0;
	color: var(--c-text-muted);
	font-size: var(--fs-xs);
}

.field__input {
	width: 100%;
	min-height: 2.75rem;
	padding: 0.5rem 0.875rem;
	border: 1px solid rgba(230, 237, 243, 0.18);
	border-radius: var(--radius-sm);
	background: rgba(13, 15, 18, 0.8);
	transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.field__input:focus-visible {
	outline: none;
	border-color: var(--c-cyan);
	box-shadow: var(--glow-cyan);
}

textarea.field__input {
	min-height: 7rem;
	resize: vertical;
}

.field__range {
	width: 100%;
	accent-color: var(--c-cyan);
}

.choice {
	display: flex;
	gap: var(--space-3);
	align-items: flex-start;
	padding: var(--space-2) 0;
	cursor: pointer;
}

.choice input {
	width: 1.125rem;
	height: 1.125rem;
	margin-top: 0.25em;
	flex: none;
	accent-color: var(--c-cyan);
}

.choice-row {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-5);
}

.hp-field {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Joomla-Systemmeldungen */
#system-message-container joomla-alert {
	display: block;
	margin: var(--space-4) auto;
	max-width: var(--container);
}
