/* Phase 1 – modern layout, vertical client marquee, hero fade slideshows */

/* Hauptnavigation: beide Punkte rechts bündig, „Wohnbau“ näher an „Gewerbe …“ */
@media (min-width: 768px) {
	header nav ul {
		justify-content: flex-end;
		gap: 2.25rem;
	}
}

body.has-kunden-marquee {
	padding-right: 0;
}

@media (min-width: 768px) {
	body.has-kunden-marquee {
		padding-right: 7.5rem;
	}
}

/* Vertical endless logo marquee – right */
.kunden-marquee {
	display: none;
	position: fixed;
	top: 0;
	right: 0;
	width: 7.5rem;
	height: 100vh;
	z-index: 200;
	overflow: hidden;
	pointer-events: none;
	background: rgba(255, 255, 255, 0.92);
	border-left: 1px solid rgba(0, 0, 0, 0.06);
}

@media (min-width: 768px) {
	.kunden-marquee {
		display: block;
	}
}

.kunden-marquee__fade {
	position: absolute;
	left: 0;
	right: 0;
	height: 4rem;
	z-index: 2;
	pointer-events: none;
}

.kunden-marquee__fade--top {
	top: 0;
	background: linear-gradient(to bottom, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
}

.kunden-marquee__fade--bottom {
	bottom: 0;
	background: linear-gradient(to top, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
}

.kunden-marquee__viewport {
	height: 100%;
	overflow: hidden;
}

.kunden-marquee__track {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2rem;
	padding: 2rem 0;
	animation: kunden-marquee-scroll 90s linear infinite;
	will-change: transform;
}

.kunden-marquee__item {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 5.5rem;
	height: 2.75rem;
}

.kunden-marquee__item img {
	max-width: 100%;
	max-height: 2.5rem;
	width: auto;
	height: auto;
	object-fit: contain;
	opacity: 0.85;
	filter: grayscale(15%);
}

@keyframes kunden-marquee-scroll {
	0% {
		transform: translateY(0);
	}
	100% {
		transform: translateY(-50%);
	}
}

@media (prefers-reduced-motion: reduce) {
	.kunden-marquee__track {
		animation-duration: 180s;
	}
}

/* Hero fade slideshow */
.hero-fade {
	padding: 0;
	margin: 0;
	width: 100%;
	line-height: 0;
}

.hero-fade__stage {
	position: relative;
	width: 100%;
	height: 55vh;
	min-height: 320px;
	max-height: 720px;
	overflow: hidden;
	background: #1a1a1a;
}

.hero-fade__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	opacity: 0;
	transition: opacity 1.2s ease-in-out;
}

.hero-fade__img.is-active {
	opacity: 1;
	z-index: 2;
}

.hero-fade__img:not(.is-active) {
	z-index: 0;
}

/* Startseite: Hero-Bühne = Seitenverhältnis 2048∶1266 (alle Bilder in dieser Größe/Zuschneidung) */
.startseite .hero-fade__stage {
	--hero-max-h: min(78vh, 960px);
	width: min(100%, calc(var(--hero-max-h) * 2048 / 1266));
	aspect-ratio: 2048 / 1266;
	max-height: var(--hero-max-h);
	height: auto;
	min-height: 0;
	margin-left: auto;
	margin-right: auto;
	box-sizing: border-box;
	padding: 0;
}

.startseite .hero-fade__img {
	object-fit: cover;
	object-position: center center;
}

/* Start page – centered intro */
.startseite .section.intro.intro--centered {
	padding: 3.5rem 2rem 4rem;
	text-align: center;
}

.intro-center {
	max-width: 58rem;
	margin: 0 auto;
}

.intro--centered h1 {
	font-size: clamp(1.5rem, 2.8vw, 2.2rem);
	line-height: 1.3;
	margin-bottom: 2rem;
	text-align: center;
}

.intro--centered h1 span {
	display: block;
	margin-top: 0.5rem;
}

.intro-lead {
	margin: 0 auto 2.5rem;
	max-width: 52rem;
}

.intro-lead__tagline {
	font-size: 1.15rem;
	margin-bottom: 1.25rem;
}

.intro-lead__text {
	display: block;
	text-align: center;
	font-size: 1.05rem;
	line-height: 1.55;
}

@media (min-width: 900px) {
	.intro-lead__text {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 2rem 2.5rem;
		text-align: left;
	}
}

.intro-lead__text p {
	margin: 0;
}

/* Praxisvideo – HTML5 */
.video-praxis {
	max-width: 40rem;
	margin: 0 auto;
}

.video-praxis__player {
	width: 100%;
	height: auto;
	display: block;
	background: #111;
	border: none;
	vertical-align: top;
}

.video-praxis__caption {
	margin-top: 0.75rem;
	font-size: 0.95rem;
	color: #555;
}

/* Bereich tiles – two columns */
.section.bereiche.bereiche--zwei .col {
	flex: 0 0 100%;
}

@media (min-width: 768px) {
	.section.bereiche.bereiche--zwei .col {
		flex: 0 0 50%;
		max-width: 50%;
	}
}

.section.bereiche.bereiche--zwei a img {
	min-height: 280px;
	object-fit: cover;
}

/* Merged gewerbe page – section headings */
.bereich-section {
	padding-top: 4rem;
}

.bereich-section:first-of-type {
	padding-top: 2rem;
}

.bereich-heading {
	text-align: center;
	margin: 0 0 2.5rem;
	padding: 0 2rem;
	font-size: clamp(1.4rem, 2.5vw, 2rem);
	font-weight: 700;
	line-height: 1.3;
}

.bereich-heading span {
	display: block;
	text-transform: uppercase;
	font-weight: 200;
	font-size: 0.85rem;
	letter-spacing: 0.12em;
	color: #a1b9be;
	margin-bottom: 0.4rem;
}

/* Larger project gallery images */
.galerie .projekte figure img {
	max-width: 100%;
	width: auto;
	height: auto;
	max-height: 85vh;
}

.galerie .projekte .slick-slide figure img {
	max-width: min(90vw, 900px);
}

.galerie .projekte .slick-track {
	padding: 2rem 0;
}

.wohnbau-projekte-stage__inner {
	position: relative;
}

/* Zweites Karussell: gleiche Section-Klassen wie Studien-Karussell; globales section-Padding aushebeln */
.wohnbau-projekte-stage__inner .wohnbau-3d-carousel.section.wohnbau-3d-carousel--projekte {
	padding-top: 0;
	padding-bottom: 0;
}

.wohnbau-projekte-stage .wohnbau-3d-carousel--projekte .wohnbau-3d-carousel__counter {
	color: #d8d8d8;
}

/* Wohnbau 3D block label */
/* Wohnbau: eine Vorschau-Spur links, gleiches Seitenverhältnis (4:3) wie Hauptfläche, contain */
@keyframes wohnbau3d-progress {
	from {
		transform: scaleX(0);
	}
	to {
		transform: scaleX(1);
	}
}

@keyframes wohnbau3d-main-in-next {
	from {
		opacity: 0;
		transform: translateX(2.25rem) scale(0.98);
	}
	to {
		opacity: 1;
		transform: translateX(0) scale(1);
	}
}

@keyframes wohnbau3d-main-in-prev {
	from {
		opacity: 0;
		transform: translateX(-2.25rem) scale(0.98);
	}
	to {
		opacity: 1;
		transform: translateX(0) scale(1);
	}
}

@keyframes wohnbau3d-main-in-jump {
	from {
		opacity: 0;
		transform: translateY(1.35rem) scale(0.96);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

@keyframes wohnbau3d-card-in {
	from {
		opacity: 0.25;
		transform: translateX(-14px);
		filter: blur(1px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
		filter: blur(0);
	}
}

.wohnbau-3d-carousel {
	position: relative;
	max-width: min(100%, 1320px);
	margin: 0 auto 0.25rem;
	padding: 0 1rem;
}

.wohnbau-3d-carousel__root {
	position: relative;
	padding: 0;
	outline: none;
}

.wohnbau-3d-carousel__root:focus-visible {
	box-shadow: 0 0 0 3px rgba(161, 185, 190, 0.8);
	border-radius: 8px;
}

.wohnbau-3d-carousel__body {
	display: flex;
	flex-direction: row;
	align-items: stretch;
	gap: 0.65rem;
	min-height: min(72vh, 820px);
}

.wohnbau-3d-carousel__rails {
	display: flex;
	flex-direction: column;
	flex: 0 0 auto;
	align-self: stretch;
	align-items: center;
	justify-content: stretch;
	min-height: min(72vh, 820px);
	padding: 0;
}

.wohnbau-3d-carousel__track {
	display: flex;
	flex-direction: column;
	justify-content: stretch;
	gap: 0.35rem;
	flex: 1 1 auto;
	min-height: 0;
	height: 100%;
	width: 100%;
	max-width: clamp(5.5rem, 11vw, 8.5rem);
}

.wohnbau-3d-carousel__card {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 1 1 0;
	min-height: 0;
	width: 100%;
	padding: 0;
	border: 2px solid rgba(255, 255, 255, 0.12);
	border-radius: 6px;
	overflow: hidden;
	cursor: pointer;
	background: #0a0a0a;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
	transition:
		border-color 0.2s ease,
		box-shadow 0.2s ease,
		transform 0.2s ease;
}

.wohnbau-3d-carousel__card:hover,
.wohnbau-3d-carousel__card:focus {
	border-color: rgba(161, 185, 190, 0.75);
	outline: none;
	transform: scale(1.03);
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}

.wohnbau-3d-carousel__card.is-active {
	border-color: #a1b9be;
	box-shadow:
		0 0 0 1px rgba(161, 185, 190, 0.5),
		0 6px 18px rgba(0, 0, 0, 0.5);
}

.wohnbau-3d-carousel__card img {
	display: block;
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	object-position: center center;
}

.wohnbau-3d-carousel__rails.is-rein .wohnbau-3d-carousel__card img {
	animation: wohnbau3d-card-in 0.48s cubic-bezier(0.22, 1, 0.36, 1) both;
	animation-delay: calc(var(--stagger, 0) * 0.038s);
}

.wohnbau-3d-carousel__mainCol {
	position: relative;
	flex: 1 1 auto;
	min-width: 0;
	min-height: min(72vh, 820px);
	align-self: stretch;
	display: flex;
	flex-direction: column;
}

.wohnbau-3d-carousel__viewport {
	position: relative;
	flex: 1 1 auto;
	min-height: 38vh;
	max-height: min(72vh, 820px);
	height: min(72vh, 820px);
	width: 100%;
	margin: 0 auto;
	background: linear-gradient(145deg, #242424 0%, #101010 50%, #1c1c1c 100%);
	border-radius: 8px;
	overflow: hidden;
	box-shadow:
		0 2px 4px rgba(0, 0, 0, 0.12),
		0 20px 50px rgba(0, 0, 0, 0.35);
	display: flex;
	align-items: center;
	justify-content: center;
}

.wohnbau-3d-carousel__shine {
	pointer-events: none;
	position: absolute;
	inset: 0;
	background: linear-gradient(
		118deg,
		rgba(255, 255, 255, 0.14) 0%,
		transparent 38%,
		transparent 62%,
		rgba(255, 255, 255, 0.05) 100%
	);
	mix-blend-mode: soft-light;
	opacity: 0.4;
	z-index: 2;
}

.wohnbau-3d-carousel__main {
	position: relative;
	z-index: 1;
	max-width: 100%;
	max-height: min(68vh, 760px);
	width: auto;
	height: auto;
	object-fit: contain;
	object-position: center center;
	will-change: transform, opacity;
}

.wohnbau-3d-carousel__main.is-switching {
	opacity: 0.55;
	transform: scale(0.99);
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.wohnbau-3d-carousel__main--enter-next {
	animation: wohnbau3d-main-in-next 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.wohnbau-3d-carousel__main--enter-prev {
	animation: wohnbau3d-main-in-prev 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.wohnbau-3d-carousel__main--enter-jump {
	animation: wohnbau3d-main-in-jump 0.52s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.wohnbau-3d-carousel__mainCol .wohnbau-3d-carousel__arrow {
	position: absolute;
	top: 50%;
	z-index: 4;
	transform: translateY(-50%);
	width: 3rem;
	height: 3rem;
	border: none;
	border-radius: 50%;
	cursor: pointer;
	font-size: 1.85rem;
	line-height: 1;
	padding: 0;
	color: #fff;
	background: rgba(0, 0, 0, 0.5);
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
	transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.wohnbau-3d-carousel__mainCol .wohnbau-3d-carousel__arrow:hover,
.wohnbau-3d-carousel__mainCol .wohnbau-3d-carousel__arrow:focus {
	background: rgba(161, 185, 190, 0.95);
	color: #111;
	transform: translateY(-50%) scale(1.06);
	outline: none;
	box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

.wohnbau-3d-carousel__mainCol [data-carousel="prev"] {
	left: 0.65rem;
}

.wohnbau-3d-carousel__mainCol [data-carousel="next"] {
	right: 0.65rem;
}

@media (max-width: 720px) {
	.wohnbau-3d-carousel__body {
		flex-direction: column;
		min-height: 0;
	}

	.wohnbau-3d-carousel__rails {
		order: 2;
		width: 100%;
		flex-direction: row;
		justify-content: flex-start;
		min-height: 0;
		padding: 0.5rem 0 0;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	.wohnbau-3d-carousel__track {
		flex-direction: row;
		flex: 0 0 auto;
		flex-wrap: nowrap;
		gap: 0.4rem;
		min-height: 0;
		height: auto;
		max-width: none;
		width: auto;
	}

	.wohnbau-3d-carousel__card {
		flex: 0 0 auto;
		width: clamp(4.25rem, 22vw, 6rem);
		min-height: 0;
		aspect-ratio: 4 / 3;
	}

	.wohnbau-3d-carousel__mainCol {
		order: 1;
		min-height: 0;
	}

	.wohnbau-3d-carousel__viewport {
		height: min(58vh, 520px);
		max-height: min(58vh, 520px);
	}

	.wohnbau-3d-carousel--projekte .wohnbau-3d-carousel__main {
		max-height: min(52.2vh, 468px);
		max-width: 90%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.wohnbau-3d-carousel__main--enter-next,
	.wohnbau-3d-carousel__main--enter-prev,
	.wohnbau-3d-carousel__main--enter-jump {
		animation: none !important;
	}

	.wohnbau-3d-carousel__rails.is-rein .wohnbau-3d-carousel__card img {
		animation: none !important;
	}

	.wohnbau-3d-carousel__progress-bar {
		animation: none !important;
	}
}

.wohnbau-3d-carousel__toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.75rem 1.25rem;
	margin-top: 0.85rem;
	padding: 0.15rem 0 0.5rem;
}

.wohnbau-3d-carousel__toggle {
	min-width: 7.5rem;
	padding: 0.45rem 1rem;
	font-size: 0.82rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	border: 1px solid #ccc;
	border-radius: 4px;
	background: #fff;
	color: #111;
	cursor: pointer;
	transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.wohnbau-3d-carousel__toggle:hover,
.wohnbau-3d-carousel__toggle:focus {
	background: #a1b9be;
	border-color: #8aa9ae;
	color: #111;
	outline: none;
}

.wohnbau-3d-carousel__counter {
	font-size: 0.88rem;
	font-weight: 600;
	color: #555;
	min-width: 5.5rem;
	text-align: center;
}

.wohnbau-3d-carousel__progress {
	flex: 1 1 140px;
	max-width: 300px;
	height: 4px;
	background: rgba(0, 0, 0, 0.1);
	border-radius: 999px;
	overflow: hidden;
}

.wohnbau-3d-carousel__progress-bar {
	height: 100%;
	width: 100%;
	transform-origin: left center;
	transform: scaleX(0);
	background: linear-gradient(90deg, #6d8f94, #a1b9be);
}

.wohnbau-3d-label {
	text-align: center;
	padding: 1rem 2rem 0;
	font-size: 0.85rem;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: #888;
}

/* Wohnbau: Projekte-Bereich optisch an die Studien-Präsentation angeglichen */
.wohnbau-projekte-stage {
	max-width: min(100%, 1320px);
	margin: 0 auto;
	padding: 0 1rem 2rem;
}

.wohnbau-projekte-stage__inner {
	margin-top: 0.75rem;
	padding: 1.25rem 0.75rem 1.75rem;
	background: linear-gradient(145deg, #242424 0%, #151515 45%, #1e1e1e 100%);
	border-radius: 8px;
	box-shadow:
		0 2px 4px rgba(0, 0, 0, 0.15),
		0 18px 44px rgba(0, 0, 0, 0.35);
}

.wohnbau-3d-carousel--projekte {
	margin-bottom: 1rem;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

/* Projektkarussell: gleiche Section-/Root-Struktur wie Studien-Karussell; Flex-Fallbacks im dunklen Block */
.wohnbau-3d-carousel--projekte .wohnbau-3d-carousel__root {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

.wohnbau-3d-carousel--projekte .wohnbau-3d-carousel__body {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

.wohnbau-3d-carousel--projekte .wohnbau-3d-carousel__mainCol {
	flex: 1 1 0;
	min-width: 0;
}

.wohnbau-3d-carousel--projekte .wohnbau-3d-carousel__viewport {
	min-width: 0;
}

/* Projektkarussell: Hauptbild etwas kleiner (weniger Hochskalierung → wirkt bei kleinen Motiven schärfer) */
.wohnbau-3d-carousel--projekte .wohnbau-3d-carousel__main {
	max-width: 90%;
	max-height: min(61.2vh, 684px);
}

.wohnbau-3d-carousel--projekte .wohnbau-3d-carousel__rails {
	flex-shrink: 0;
}

.wohnbau-projekte-stage .wohnbau-3d-carousel__empty,
.wohnbau-projekte-stage .wohnbau-projekte-strip-fallback {
	color: #c8c8c8;
}

.wohnbau-projekte-stage .wohnbau-3d-carousel__empty code,
.wohnbau-projekte-stage .wohnbau-projekte-strip-fallback code {
	color: #a1b9be;
}

.wohnbau-3d-carousel__empty {
	text-align: center;
	padding: 1.5rem 1rem 2rem;
	max-width: min(100%, 1320px);
	margin: 0 auto;
	color: #666;
	font-size: 0.92rem;
	line-height: 1.5;
}

.wohnbau-3d-carousel__empty code {
	font-size: 0.88em;
	color: #444;
}

/* Hide old horizontal partner strip */
#partner {
	display: none !important;
}
