*,
*::before,
*::after {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

/* scroll on inner container, not directly on cube face */
.face {
	overflow: hidden !important;
}

.face-scroll {
	position: absolute;
	inset: 0;
	overflow-x: hidden;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	touch-action: pan-y;
}

/* touch scrolling/swiping is fully JS-driven */
.touch-js-scroll .face-scroll,
.touch-js-scroll #nav-face .overlay-content,
.touch-js-scroll #info-face .overlay-content,
.touch-js-scroll .legal-content-wrapper {
	overflow: hidden !important;
	-webkit-overflow-scrolling: auto !important;
	touch-action: none !important;
}

/* touch ux: disable selection/callout while keeping links/buttons tappable */
@media (hover: none) and (pointer: coarse) {
	html,
	body,
	.face,
	.face-scroll,
	#nav-face .overlay-content,
	#info-face .overlay-content,
	.legal-content-wrapper {
		-webkit-user-select: none;
		user-select: none;
		-webkit-touch-callout: none;
	}

	img,
	picture,
	svg {
		-webkit-user-drag: none;
		user-select: none;
		pointer-events: none;
	}

	a,
	button,
	input,
	textarea,
	select,
	label,
	[role="button"] {
		-webkit-user-select: none;
		user-select: none;
		pointer-events: auto;
	}
}

.face-scroll {
	scrollbar-width: none;
}

.face-scroll::-webkit-scrollbar {
	display: none;
}

html {
	touch-action: pan-y;
	font-size: 100%;
}

:root {
	--safe-top: env(safe-area-inset-top, 0px);
	--safe-right: env(safe-area-inset-right, 0px);
	--safe-bottom: env(safe-area-inset-bottom, 0px);
	--safe-left: env(safe-area-inset-left, 0px);
	--ui-inset: 20px;
	--ui-top: max(var(--ui-inset), var(--safe-top));
	--ui-right: max(var(--ui-inset), var(--safe-right));
	--ui-left: max(var(--ui-inset), var(--safe-left));
	--ui-bottom: max(var(--ui-inset), var(--safe-bottom));
	--content-offset-top: max(4.375rem, calc(var(--ui-top) + 2.75rem));

	--title-slide-offset-top: clamp(8.50rem, calc(8.071rem + 2.143vw), 10.00rem);
	--title-slide-safe-offset-top: calc(var(--safe-top) + var(--title-slide-offset-top));
}

body {
	overflow: hidden;
	width: 100vw;
	height: 100vh;
	height: 100dvh;
	height: var(--stable-vh, 100dvh);
	touch-action: pan-y;
	background: #f2f2f2;
	font-family: "freight-micro-pro", Georgia, "Times New Roman", serif;
	font-size: 1.2rem;
	line-height: 1.3;
	/* letter-spacing: 0.0625em; */
	letter-spacing: 2%; /* 0.04166em; */
}

em {
	letter-spacing: 0.0625em;
}

a, #openOverlay {
	color: inherit;
	text-decoration: none;
	cursor: pointer;
	transition: text-decoration 0.2s ease;
	position: relative;
	z-index: 100;
}

#openOverlay {
	pointer-events: auto;
}

.topbar-openoverlay-text {
	font-family: "freight-text-pro", Georgia, "Times New Roman", serif;
	font-weight: 500;
	font-style: normal;
	font-size: clamp(1.75rem, calc(1.521rem + 1.147vw), 2.50rem);
	line-height: 0.9;
	em {
		font-family: inherit;
		font-weight: inherit;
		font-style: italic;
		font-size: inherit;
		letter-spacing: 0.02083em; /* 1/48 em */
	}
}

a:hover {
	text-decoration: underline;
	text-underline-offset: 6px;
	text-decoration-thickness: 1px;
}

#topbar.hidden,
#topbar.hidden #openOverlay,
#menu-btn.hidden {
	opacity: 0;
	pointer-events: none;
}

/* Menü Button */
#menu-btn {
	position: fixed;
	left: var(--ui-left);
	top: var(--ui-top);
	z-index: 5500;
	color: white;
	cursor: pointer;
	width: 44px;
	height: 44px;
	transition: opacity 0.4s ease;
}

#topbar {
	position: fixed;
	text-align: right;
	z-index: 5000;
	right: max(24px, var(--safe-right));
	top: var(--ui-top);
	color: white;
	font-size: 15px;
	pointer-events: none;
	transition: opacity 0.4s ease;
}

#icon-cube {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}

/* Klick-Zonen für Navigation */
.nav-zone {
	position: fixed;
	z-index: 4000;
	top: 0;
	width: 20vw;
	height: 100vh;
	pointer-events: none;
	cursor: pointer;
}

#nav-left {
	left: 0;
}

#nav-right {
	right: 0;
}

#cube-wrapper {
	width: 100vw;
	height: 100vh;
	height: 100dvh;
	height: var(--stable-vh, 100dvh);
	touch-action: pan-y;
}

#cube {
	width: 100%;
	height: 100%;
	transform-style: preserve-3d;
	will-change: transform;
}

.face {
	position: absolute;
	inset: 0;
	backface-visibility: hidden;
	-webkit-backface-visibility: hidden;
	pointer-events: none;
	visibility: hidden;
	touch-action: pan-y;
	background: #f2f2f2;
}

.face.active {
	pointer-events: auto;
}

#nav-face,
#info-face {
	touch-action: pan-y;
}

#nav-face.active,
#info-face.active {
	backface-visibility: visible;
	-webkit-backface-visibility: visible;
}

/* info face */
#info-face {
	color: black;
}

#nav-close-btn,
#info-close-btn,
#legal-close-btn {
	position: absolute;
	top: var(--ui-top);
	z-index: 20;
	width: 44px;
	height: 44px;
	padding: 0;
	border: none;
	border-radius: 50%;
	-webkit-appearance: none;
	appearance: none;
	cursor: pointer;
	backdrop-filter: blur(0.1rem);
}

#nav-close-btn {
	left: var(--ui-left);
	background: rgba(0, 0, 0, 0.85);
	color: #e6e6e6;
}

#info-close-btn,
#legal-close-btn {
	right: var(--ui-right);
	background: rgba(230, 230, 230, 0.85);
	color: #000000;
}

#legal-close-btn {
	z-index: 10001;
}

#nav-close-btn svg,
#info-close-btn svg,
#legal-close-btn svg {
	position: relative;
	z-index: 1;
	display: block;
	width: 100%;
	height: 100%;
}

#nav-face {
	color: #e6e6e6;
}

.overlay-content {
	padding: 20px 24px;
	height: 100%;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
}

#nav-face .overlay-content,
#info-face .overlay-content {
	position: absolute;
	inset: 0;
	min-height: 0;
	height: auto;
}

#info-face {
	font-family: "freight-text-pro", Georgia, "Times New Roman", serif;
	font-size: clamp(1.19rem, calc(1.111rem + 0.382vw), 1.44rem);
	font-weight: normal;
	line-height: 1.4;
	.overlay-content {
		padding-top: var(--content-offset-top);
		padding-bottom: 3.75rem;
		padding-left: 24px;
		padding-right: 24px;
	}
	h1 {
		margin-bottom: 1.5rem;
		font-family: "freight-macro-pro", Arial, Helvetica, sans-serif;
		/* font-size: clamp(3.0625rem, 0.586vw + 2.875rem, 3.675rem); */
		font-size: clamp(2.75rem, 0.884vw + 2.467rem, 3.675rem);
		line-height: 1.0;
		font-weight: normal;
		color: inherit;
		word-break: break-word;
	}
	h2 {
		margin: 0;
		font-family: "freight-text-pro", Georgia, "Times New Roman", serif;
		font-size: inherit;
		font-weight: inherit;
		font-style: italic;
		line-height: inherit;
		/* letter-spacing: 0.0625em; */
		letter-spacing: 0;
	}
	p {
		margin-bottom: 2rem;
		line-height: inherit;
		letter-spacing: 0;
	}
	p.text-contact {
		a {
			font-family: "freight-text-pro", Georgia, "Times New Roman", serif;
			font-size: clamp(1.75rem, calc(1.521rem + 1.147vw), 2.50rem);
			line-height: 1.0;
		}
	}
	ul {
		list-style: none;
	}
	li {
		margin-bottom: 0;
		line-height: inherit;
		text-indent: -1em;
		padding-left: 1em;
	}
	em {
		letter-spacing: 0;
	}
	a {
		border: none;
		border-bottom: 1px solid transparent;
		text-decoration: none;
		transition: border-bottom-color ease-in-out 150ms;
		&:hover {
			border-bottom: 1px solid #000000;
		}
	}
	.info-face-image-wrapper {
		margin: 0;
		margin-top: -3rem;
		padding: 0;
	}
	.info-face-image {
		display: block;
		margin: 0;
		padding: 0;
	}
	.text-columns--row2 .col2 {
		margin-top: -1rem;
	}
}

.overlay-content {
	text-decoration: none;
	transition: border-bottom-color ease-in-out 150ms;
	a {
		&:hover {
			border-bottom: 1px solid #000000;
		}
	}
}

.nav-face-content {
	position: absolute;
	inset: 0;
	justify-content: space-between;
	align-items: flex-start;
	/* margin-left: 0.3125rem;
	margin-right: 0.3125rem; */
	padding: 1.25rem;
	padding-top: var(--content-offset-top);
	padding-bottom: 2.75rem;
	padding-left: 28px;
	padding-right: 28px;
}

.nav-face-content-top {
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	align-items: flex-start;
	width: 100%;
	/* padding-top: 2rem; */
}
.nav-face-content-bottom {
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	align-items: flex-start;
	/* padding-bottom: 1.75rem; */
}

.nav-face-list {
	list-style: none;
	text-align: left;
}

.nav-face-item,
#nav-info-link {
	appearance: none;
	border: none;
	background: none;
	padding: 0;
	margin: 0;
	font: inherit;
	color: #FFFFFF;
	cursor: pointer;
	text-align: left;
}

.nav-face-item {
	border: none;
}

.nav-face-item {
	display: block;
	color: #FFFFFF;
	font-size: clamp(1.75rem, calc(1.597rem + 0.765vw), 2.25rem);
	line-height: 1.5;
	border-bottom: 1px solid transparent;
	transition: border-bottom-color ease-in-out 150ms;
}
.nav-face-item:hover {
	border-bottom-color: #FFFFFF;
}

/*
.nav-face-item.active {
	color: rgba(255, 255, 255, 1.0);
	font-weight: bold;
}
*/

.nav-info-link-wrapper {
	width: 100%;
	margin-top: 2rem;
	padding-top: 1.5rem;
	border-top: 1px solid #e6e6e6;
}

#nav-info-link {
	display: block;
	border-bottom: 1px solid transparent;
	font-size: clamp(1.75rem, calc(1.597rem + 0.765vw), 2.25rem);
	line-height: 1.5;
	transition: border-bottom-color ease-in-out 150ms;
}
#nav-info-link:hover {
	border-bottom-color: #FFFFFF;
}


.footer-links {
	text-align: left;
	padding-bottom: 10px;
	list-style: none;
}

.footer-link {
	margin: 0;
	padding: 0;
}

.footer-link-link {
	font-size: clamp(1.38rem, calc(1.222rem + 0.765vw), 1.88rem);
	line-height: 1.5;
	color: #FFFFFF;
}



.col2-3 picture {
	display: block;
	line-height: 0;
}

.col2-3 img {
	width: 100%;
	height: auto;
	display: block;
}

/* legal overlay (datenschutz / impressum) — plain layer above the cube */
.legal-overlay {
	position: fixed;
	inset: 0;
	z-index: 10000;
	background: #e6e6e6;
	display: flex;
}

.legal-overlay.hidden {
	display: none;
}

.legal-content-wrapper {
	flex: 1 1 auto;
	width: 100%;
	height: 100%;
	padding: var(--content-offset-top) var(--ui-right) 4.375rem var(--ui-left);

	font-family: "freight-text-pro", Georgia, "Times New Roman", serif;
	font-size: clamp(1.19rem, calc(1.111rem + 0.382vw), 1.44rem);
	font-weight: normal;
	line-height: 1.4;

	h1 {
		margin-bottom: 1.5rem;
		font-family: "freight-macro-pro", Arial, Helvetica, sans-serif;
		/* font-size: clamp(3.0625rem, 0.586vw + 2.875rem, 3.675rem); */
		font-size: clamp(2.75rem, 0.884vw + 2.467rem, 3.675rem);
		line-height: 1.0;
		font-weight: normal;
		color: inherit;
		word-break: break-word;
	}
	h2 {
		margin: 0;
		font-family: "freight-text-pro", Georgia, "Times New Roman", serif;
		font-size: inherit;
		font-weight: inherit;
		font-style: italic;
		line-height: inherit;
		/* letter-spacing: 0.0625em; */
		letter-spacing: 0;
	}
	p {
		margin-bottom: 2rem;
		line-height: inherit;
		letter-spacing: 0;
	}
	em {
		letter-spacing: 0;
	}
	ul {
		list-style: none;
	}
	li {
		margin-bottom: 0;
		line-height: inherit;
		text-indent: -1em;
		padding-left: 1em;
	}
	a {
		border: none;
		border-bottom: 1px solid transparent;
		text-decoration: none;
		transition: border-bottom-color ease-in-out 150ms;
		&:hover {
			border-bottom: 1px solid #000000;
		}
	}
}

/* Portfolio Slides */
.title-slide {
	width: 100%;
	/* min-height: 60vh; */
	display: flex;
	flex-direction: column;
	padding: 136px 20px 0 20px;
	padding-top: var(--title-slide-safe-offset-top);
	align-items: flex-start;
	color: white;
}

.title-slide-kicker {
	display: block;
	margin-bottom: 0.5rem;
	/* margin-left: 0.0625em; */
	/* font-size: clamp(1.19rem, calc(1.111rem + 0.382vw), 1.44rem); */
	font-size: clamp(1.50rem, calc(1.286rem + 1.071vw), 2.25rem);
	line-height: 1.0;
	letter-spacing: 2%;
	color: inherit;
}

.title-slide-headline {
	display: block;
	margin-bottom: 2.5em;
	font-family: "freight-macro-pro", Arial, Helvetica, sans-serif;
	/* font-size: clamp(3.0625rem, 0.586vw + 2.875rem, 3.675rem); */
	/* font-size: clamp(2.75rem, 0.884vw + 2.467rem, 3.675rem); */
	font-size: clamp(2.75rem, calc(1.929rem + 4.107vw), 5.625rem);
	line-height: 1.0;
	font-weight: normal;
	letter-spacing: 0;
	color: inherit;
	word-break: break-word;
}

.title-num {
	display: none;
	font-size: 0.5em;
	vertical-align: super;
	/* font-family: 'JetBrains Mono', monospace;  */
	font-family: "freight-micro-pro", Georgia, "Times New Roman", serif;
	text-decoration: underline;
	text-underline-offset: 15px;
}

.gallery {
	background: #000000;
	width: 100%;
	display: flex;
	flex-direction: column;
}

.img-slide {
	width: 100%;
	position: relative;
	background: #000000;
	overflow: hidden;
	line-height: 0;
}

.img-slide picture {
	width: 100%;
	display: block;
	line-height: 0;
}

.img-slide img {
	width: 100%;
	height: auto;
	display: block;
}

.caption-overlay {
	display: none;
	width: auto;
	height: auto;
	border-radius: 20px;
	padding: 15px 30px;
	align-items: center;
	position: absolute;
	bottom: 20px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 10;
	color: #000000;
	background: rgba(230, 230, 230, 0.2);
	backdrop-filter: blur(25px);
	-webkit-backdrop-filter: blur(25px);
	font-size: 12px;
	pointer-events: none;
}

.image-description {
	position: absolute;
	left: 20px;
	bottom: 20px;
	z-index: 20;
	color: #ffffff;
	/* font-size: 0.875rem; */ 
	font-size: clamp(0.875rem, calc(0.750rem + 0.625vw), 1.31rem);
	line-height: 1.25;
	pointer-events: none;
	max-width: calc(100% - 40px);
}

.info-face-text-grid {
	display: flex;
	flex-direction: column;
	gap: 2rem;
	width: 100%;
}

.info-face-text-grid .text-columns {
	display: contents;
}

.info-face-text-grid .col1,
.info-face-text-grid .col2,
.info-face-text-grid .col3,
.info-face-text-grid .col2-3 {
	width: 100%;
}

.info-face-text-grid .text-columns--row1 .col1 {
	order: 1;
}

.info-face-text-grid .text-columns--row2 .col1 {
	order: 2;
}

.info-face-text-grid .text-columns--row1 .col2-3 {
	order: 3;
}

.info-face-text-grid .text-columns--row2 .col2 {
	order: 4;
}

.info-face-text-grid .text-columns--row2 .col3 {
	order: 5;
}

@media (min-width: 768px) {

	/*	
	#topbar {
		right: max(34px, var(--safe-right));
	}

	#info-close-btn,
	#legal-close-btn {
		right: max(34px, var(--safe-right));
	}
	*/

	.nav-face-content {
		padding-top: clamp(6rem, 15vh, 10rem);
	}

	.nav-face-list {
		text-align: left;
	}


	.nav-zone {
		width: 15vw;
	}

	#info-face {
		.info-face-image-wrapper {
			margin: 0;
		}
		.text-columns--row2 .col2 {
			margin: 0;
		}
	}

	.info-face-text-grid {
		display: grid;
		grid-template-columns: 2fr 1fr 1fr;
		column-gap: 4%;
		row-gap: 2.25rem;
	}

	.info-face-text-grid .text-columns--row1 .col1 {
		grid-column: 1;
		grid-row: 1;
		order: unset;
	}

	.info-face-text-grid .text-columns--row1 .col2-3 {
		grid-column: 2 / 4;
		grid-row: 1;
		order: unset;
	}

	.info-face-text-grid .text-columns--row2 .col1 {
		grid-column: 1;
		grid-row: 2;
		order: unset;
	}

	.info-face-text-grid .text-columns--row2 .col2 {
		grid-column: 2;
		grid-row: 2;
		order: unset;
	}

	.info-face-text-grid .text-columns--row2 .col3 {
		grid-column: 3;
		grid-row: 2;
		order: unset;
	}

	/*
	.title-slide {
		height: 85vh;
	}
	*/

	.title-slide-headline {
		max-width: 70%;
	}

	.caption-overlay {
		padding: 25px 50px;
		font-size: 15px;
	}
}


/* scrollbars */
html {
	overscroll-behavior: none;
}

body {
	overscroll-behavior: none;
}

.face {
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

#nav-face,
#info-face {
	overflow: hidden;
	overscroll-behavior: contain;
}

#nav-face .overlay-content,
#info-face .overlay-content {
	overflow-x: hidden;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
}

.legal-content-wrapper {
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

.face,
.face-scroll,
#nav-face .overlay-content,
#info-face .overlay-content,
.legal-content-wrapper {
	scrollbar-width: none;
}

.face::-webkit-scrollbar,
.face-scroll::-webkit-scrollbar,
#nav-face .overlay-content::-webkit-scrollbar,
#info-face .overlay-content::-webkit-scrollbar,
.legal-content-wrapper::-webkit-scrollbar {
	display: none;
}
