/**
 * widgets.css — Modul-Styles der Gebra-Tech-Widgets, 1:1 aus design/ portiert.
 *
 * Regeln:
 * - Nur semantische Tokens aus tokens.css referenzieren, kein Hex.
 *   (Ausnahme wie im Design: --gebra-ink-300 / --gebra-violet-300 auf
 *   invertierten Flächen.)
 * - Stolperfalle #3: Hello Elementors reset.css funkt rein → gezielt
 *   neutralisieren (Links, Buttons, Listen, Headings).
 * - prefers-reduced-motion deaktiviert Reveals/Transitions (siehe unten).
 */

/* ── Basis pro Modul (statt body-Styles des Design-Exports) ──────────── */

.gebra-mod {
	font-family: var(--font-body);
	font-weight: var(--body-weight);
	font-size: var(--text-base);
	line-height: var(--body-leading);
	color: var(--text-body);
	-webkit-font-smoothing: antialiased;
}

.gebra-mod h1,
.gebra-mod h2,
.gebra-mod h3 {
	font-family: var(--font-display);
	font-weight: var(--display-weight);
	letter-spacing: var(--display-tracking);
	line-height: var(--display-leading);
	color: var(--text-heading);
	margin: 0;
}

.gebra-mod a {
	text-decoration: none;
	transition: color var(--dur-fast) var(--ease-out);
}

.gebra-mod ::selection {
	background: var(--gebra-violet-100);
}

/* Design-Export rechnet content-box (1160px Inhalt + Padding); WP setzt
   global border-box → Padding auf die max-width aufschlagen. */
.gebra-wrap {
	max-width: calc(var(--max-content) + 2 * var(--space-xl));
	margin: 0 auto;
	padding: 0 var(--space-xl);
}

/* Anker springen unter dem Sticky-Header hindurch → Ausgleich. */
.gebra-mod[id] {
	scroll-margin-top: var(--header-h);
}

@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
}

/* ── Kicker (Caps-Label über Headlines) ──────────────────────────────── */

.gebra-kicker {
	font-size: var(--text-micro);
	font-weight: 600;
	letter-spacing: var(--tracking-caps);
	text-transform: uppercase;
	color: var(--accent-primary);
}

/* ── Buttons (Rezept aus dem Design-System) ──────────────────────────── */

.gebra-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--space-xs);
	font-family: var(--font-body);
	font-weight: 600;
	border: 1px solid transparent;
	border-radius: var(--radius-sm);
	cursor: pointer;
	user-select: none;
	white-space: nowrap;
	transition:
		transform var(--dur-fast) var(--ease-out),
		background var(--dur-fast) var(--ease-out),
		box-shadow var(--dur-base) var(--ease-out);
}

.gebra-btn--md {
	height: 40px;
	padding: 0 18px;
	font-size: var(--text-small);
}

.gebra-btn--lg {
	height: 48px;
	padding: 0 24px;
	font-size: var(--text-base);
}

.gebra-btn--primary {
	background: var(--accent-primary);
	color: var(--text-on-accent);
	box-shadow: var(--shadow-sm);
}

.gebra-btn--primary:hover {
	background: var(--accent-primary-hover);
	color: var(--text-on-accent);
	box-shadow: var(--shadow-md);
	transform: var(--lift-hover);
}

.gebra-btn--primary:active {
	background: var(--accent-primary-press);
	transform: var(--scale-press);
}

.gebra-btn--outline {
	background: var(--surface-card);
	color: var(--text-heading);
	border-color: var(--border-hairline);
	box-shadow: var(--shadow-xs);
}

.gebra-btn--outline:hover {
	background: var(--surface-sunken);
	color: var(--text-heading);
	transform: var(--lift-hover);
}

.gebra-btn--outline:active {
	transform: var(--scale-press);
}

.gebra-btn:focus-visible {
	outline: none;
	box-shadow: var(--shadow-focus);
}

/* ── Medienflächen (Bild oder Platzhalter) ───────────────────────────── */

.gebra-media {
	overflow: hidden;
}

.gebra-media .gebra-media__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	border-radius: inherit;
}

.gebra-media__placeholder {
	width: 100%;
	height: 100%;
	background: var(--surface-sunken);
	border: 1px dashed var(--border-strong);
	border-radius: inherit;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: var(--space-lg);
	color: var(--text-muted);
	font-size: var(--text-small);
}

/* ── Modul 1: Sticky Header ──────────────────────────────────────────── */

/* Sticky muss am Elementor-Container hängen, nicht am Widget-Markup —
   sonst klebt der Header nur innerhalb seines (header-hohen) Containers. */
.e-con:has(.gebra-header) {
	position: sticky;
	top: 0;
	z-index: 50;
}

.gebra-header {
	position: relative;
	background: var(--surface-card);
	border-bottom: 1px solid var(--border-hairline);
}

.gebra-header__inner {
	height: var(--header-h);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-lg);
}

.gebra-header__brand {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 1.3rem;
	letter-spacing: var(--display-tracking);
	color: var(--text-heading);
}

.gebra-header__brand:hover {
	color: var(--text-heading);
}

.gebra-header__nav {
	display: flex;
	align-items: center;
	gap: var(--space-xl);
}

.gebra-header__nav a {
	color: var(--text-body);
	font-size: var(--text-small);
	font-weight: 500;
}

.gebra-header__nav a:hover {
	color: var(--accent-primary);
}

.gebra-header__actions {
	display: flex;
	align-items: center;
	gap: var(--space-sm);
}

.gebra-header__burger {
	display: none;
	appearance: none;
	background: transparent;
	border: 0;
	padding: var(--space-2xs);
	cursor: pointer;
	color: var(--text-heading);
	border-radius: var(--radius-sm);
	line-height: 0;
}

.gebra-header__burger:focus-visible {
	outline: none;
	box-shadow: var(--shadow-focus);
}

.gebra-header__burger-close {
	display: none;
}

.gebra-header__burger[aria-expanded='true'] .gebra-header__burger-open {
	display: none;
}

.gebra-header__burger[aria-expanded='true'] .gebra-header__burger-close {
	display: inline;
}

@media (max-width: 767px) {
	.gebra-header__burger {
		display: inline-flex;
	}

	.gebra-header__nav {
		display: none;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		background: var(--surface-card);
		border-bottom: 1px solid var(--border-hairline);
		box-shadow: var(--shadow-md);
		padding: var(--space-xs) var(--space-xl) var(--space-lg);
	}

	.gebra-header__nav.is-open {
		display: flex;
	}

	.gebra-header__nav a {
		padding: var(--space-sm) 0;
		font-size: var(--text-base);
	}
}

/* ── Modul 2: Hero ───────────────────────────────────────────────────── */

.gebra-hero {
	/* Design (content-box): min-height 100vh−Header + vertikales Padding. */
	min-height: calc(100vh - var(--header-h) + 2 * var(--space-2xl));
	display: flex;
	align-items: center;
	padding: var(--space-2xl) 0;
	background: var(--bg-page);
}

.gebra-hero__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
	gap: var(--space-3xl);
	align-items: center;
	width: 100%;
}

.gebra-hero__content {
	display: flex;
	flex-direction: column;
	gap: var(--space-lg);
}

.gebra-hero__title {
	font-size: clamp(2.75rem, 5.2vw, 4rem);
	font-weight: var(--display-weight-strong);
}

.gebra-hero__lead {
	font-size: var(--text-lead);
	color: var(--text-muted);
	max-width: 34rem;
	margin: 0;
	text-wrap: pretty;
}

.gebra-hero__ctas {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-md);
	align-items: center;
}

.gebra-hero__note {
	font-size: var(--text-small);
	color: var(--text-muted);
}

.gebra-hero__media {
	height: min(540px, 62vh);
	min-height: 380px;
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-lg);
}

/* ── Modul 3: Leistungen ─────────────────────────────────────────────── */

.gebra-leistungen {
	padding: var(--section-y) 0;
	background: var(--bg-page);
}

.gebra-leistungen__inner {
	display: flex;
	flex-direction: column;
	gap: var(--space-2xl);
}

.gebra-leistungen__head {
	display: flex;
	flex-direction: column;
	gap: var(--space-sm);
	max-width: 40rem;
}

.gebra-leistungen__title {
	font-size: var(--text-h2);
}

.gebra-leistungen__intro {
	color: var(--text-muted);
	margin: 0;
	text-wrap: pretty;
}

.gebra-leistungen__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
	gap: var(--space-lg);
}

/* Card-Rezept aus dem Design-System */
.gebra-card {
	background: var(--surface-card);
	border: 1px solid var(--border-hairline);
	border-radius: var(--radius-lg);
	padding: var(--space-lg);
	box-shadow: var(--shadow-sm);
	transition:
		transform var(--dur-base) var(--ease-out),
		box-shadow var(--dur-base) var(--ease-out);
}

.gebra-card--interactive:hover {
	transform: var(--lift-hover);
	box-shadow: var(--shadow-md);
}

.gebra-card__body {
	display: flex;
	flex-direction: column;
	gap: var(--space-md);
}

.gebra-card__icon {
	width: 48px;
	height: 48px;
	border-radius: var(--radius-md);
	background: var(--accent-soft);
	color: var(--accent-primary);
	display: flex;
	align-items: center;
	justify-content: center;
}

.gebra-card__title {
	font-size: var(--text-h3);
}

.gebra-card__text {
	font-size: var(--text-small);
	color: var(--text-muted);
	margin: 0;
	text-wrap: pretty;
}

/* ── Modul 4: Über uns ───────────────────────────────────────────────── */

.gebra-ueberuns {
	padding: var(--section-y) 0;
	background: var(--bg-page);
}

.gebra-ueberuns__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
	gap: var(--space-3xl);
	align-items: center;
}

.gebra-ueberuns__media {
	height: 440px;
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-md);
}

.gebra-ueberuns__content {
	display: flex;
	flex-direction: column;
	gap: var(--space-lg);
}

.gebra-ueberuns__title {
	font-size: var(--text-h2);
}

.gebra-ueberuns__body {
	color: var(--text-body);
	margin: 0;
	text-wrap: pretty;
}

.gebra-ueberuns__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: var(--space-sm);
}

.gebra-ueberuns__list li {
	display: flex;
	align-items: center;
	gap: var(--space-sm);
	color: var(--text-body);
}

.gebra-ueberuns__check {
	flex: none;
	width: 22px;
	height: 22px;
	border-radius: var(--radius-pill);
	background: var(--accent-soft);
	color: var(--accent-primary);
	display: flex;
	align-items: center;
	justify-content: center;
}

.gebra-ueberuns__note {
	background: var(--accent-soft);
	border-radius: var(--radius-md);
	padding: var(--space-md) var(--space-lg);
	font-size: var(--text-small);
	color: var(--text-body);
}

/* ── Modul 5: Conversion (invertiert) ────────────────────────────────── */

.gebra-conversion {
	background: var(--surface-invert);
	padding: var(--section-y) 0;
}

.gebra-conversion__inner {
	max-width: calc(720px + 2 * var(--space-xl));
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: var(--space-lg);
}

.gebra-conversion__kicker {
	color: var(--gebra-violet-300);
}

/* .gebra-mod als Präfix nötig: schlägt sonst gegen `.gebra-mod h2` (0,1,1). */
.gebra-mod .gebra-conversion__title {
	font-size: var(--text-h1);
	color: var(--text-invert);
}

.gebra-conversion__lead {
	color: var(--gebra-ink-300);
	margin: 0;
	font-size: var(--text-lead);
	text-wrap: pretty;
}

.gebra-conversion__cta {
	margin-top: var(--space-xs);
}

.gebra-conversion__channels {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-md);
	justify-content: center;
	margin-top: var(--space-md);
}

.gebra-conversion__channel {
	display: flex;
	align-items: center;
	gap: var(--space-sm);
	border: 1px solid var(--border-invert);
	border-radius: var(--radius-md);
	padding: var(--space-md) var(--space-lg);
	transition:
		border-color var(--dur-fast) var(--ease-out),
		transform var(--dur-fast) var(--ease-out);
}

.gebra-conversion__channel:hover {
	border-color: var(--gebra-violet-300);
	transform: var(--lift-hover);
}

.gebra-conversion__channel-icon {
	color: var(--gebra-violet-300);
	display: flex;
}

.gebra-conversion__channel-info {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--space-3xs);
}

.gebra-conversion__channel-label {
	font-size: var(--text-micro);
	letter-spacing: var(--tracking-caps);
	text-transform: uppercase;
	color: var(--gebra-ink-300);
}

.gebra-conversion__channel-value {
	color: var(--text-invert);
	font-weight: 500;
}

/* ── Modul 6: Footer ─────────────────────────────────────────────────── */

.gebra-footer {
	background: var(--surface-invert);
	border-top: 1px solid var(--border-invert-soft);
}

.gebra-footer__inner {
	padding-top: var(--space-2xl);
	padding-bottom: var(--space-2xl);
	display: flex;
	flex-direction: column;
	gap: var(--space-2xl);
}

.gebra-footer__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: var(--space-2xl);
}

.gebra-footer__col {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--space-sm);
}

.gebra-footer__brand {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 1.3rem;
	letter-spacing: var(--display-tracking);
	color: var(--text-invert);
}

.gebra-footer__desc {
	font-size: var(--text-small);
	color: var(--gebra-ink-300);
	text-wrap: pretty;
}

.gebra-footer__heading {
	font-size: var(--text-micro);
	letter-spacing: var(--tracking-caps);
	text-transform: uppercase;
	color: var(--gebra-ink-300);
}

.gebra-footer__link {
	color: var(--text-invert);
	font-size: var(--text-small);
}

.gebra-footer__link:hover {
	color: var(--gebra-violet-300);
}

.gebra-footer__bottom {
	border-top: 1px solid var(--border-invert-soft);
	padding-top: var(--space-lg);
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: var(--space-md);
}

.gebra-footer__copy {
	font-size: var(--text-micro);
	color: var(--gebra-ink-300);
}

.gebra-footer__legal {
	display: flex;
	gap: var(--space-lg);
}

.gebra-footer__legal a {
	color: var(--gebra-ink-300);
	font-size: var(--text-micro);
}

.gebra-footer__legal a:hover {
	color: var(--text-invert);
}

/* ── Floating WhatsApp-Button ────────────────────────────────────────── */

.gebra-fab {
	position: fixed;
	bottom: 24px;
	right: 24px;
	z-index: 60;
	width: 56px;
	height: 56px;
	border-radius: var(--radius-pill);
	background: var(--accent-primary);
	color: var(--text-on-accent);
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: var(--shadow-lg);
	transition:
		transform var(--dur-fast) var(--ease-out),
		background var(--dur-fast) var(--ease-out);
}

.gebra-fab:hover {
	background: var(--accent-primary-hover);
	color: var(--text-on-accent);
	transform: var(--lift-hover);
}

.gebra-fab:active {
	transform: var(--scale-press);
}

.gebra-fab:focus-visible {
	outline: none;
	box-shadow: var(--shadow-focus);
}

/* ── Scroll-Reveal (JS setzt .gebra-reveal nur unterhalb des Folds) ──── */

@media (prefers-reduced-motion: no-preference) {
	.gebra-reveal {
		opacity: 0;
		transform: translateY(18px);
		transition:
			opacity var(--dur-slow) var(--ease-out),
			transform var(--dur-slow) var(--ease-out);
	}

	.gebra-reveal.is-visible {
		opacity: 1;
		transform: none;
	}
}

/* ── Reduced Motion ──────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
	[class^='gebra-'],
	[class^='gebra-'] * {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
	}
}
