/* =========================================================================
   AirPixel Studios — Apple-Design system
   Built to the "Apple Design" fluid-interface principles:
   response, direct manipulation, interruptibility, springs, materials,
   optical typography, and reduced-motion / -transparency / -contrast.
   ========================================================================= */

/* ---------- Design tokens ---------- */
:root {
	/* Neutral scale — the site reads as a dark, cinematic canvas */
	--ink: #0b0b0d;
	--ink-2: #141417;
	--surface: #17171b;
	--text: #f5f5f7; /* Apple's off-white, easier on the eye than pure #fff */
	--text-dim: rgba(245, 245, 247, 0.62);
	--text-faint: rgba(245, 245, 247, 0.4);
	--accent: #5e9dff;
	--accent-strong: #2f7bff;

	/* Materials — translucent layers that let content pass beneath */
	--mat-chrome: rgba(20, 20, 23, 0.62);
	--mat-chrome-solid: #141417;
	--mat-card: rgba(255, 255, 255, 0.06);
	--mat-card-border: rgba(255, 255, 255, 0.1);
	--mat-hairline: rgba(255, 255, 255, 0.12);

	/* Springs — response = how fast it reaches target (not "duration") */
	--resp-fast: 180ms;
	--resp: 320ms;
	--resp-slow: 520ms;
	/* Critically-damped-feeling easing for CSS-only transitions.
	   Anything gesture-driven is handled by the Motion spring in JS. */
	--ease-out: cubic-bezier(0.22, 1, 0.36, 1);
	--ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

	--radius: 16px;
	--radius-lg: 24px;
	--radius-pill: 999px;

	/* Layout rhythm — spacing in rem so it scales with Dynamic Type */
	--gutter: clamp(1.25rem, 4vw, 4rem);
	--section-pad: clamp(4rem, 10vh, 8rem);
	--maxw: 78rem;

	color-scheme: dark;
}

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

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	/* System font first — it ships optical sizing, tracking tables and
	   legibility tuning; comfortable body leading. */
	font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
		system-ui, Roboto, Helvetica, Arial, sans-serif;
	font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
	line-height: 1.6;
	color: var(--text);
	background: var(--ink);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
	overflow-x: hidden;
}

img,
video,
iframe {
	max-width: 100%;
	display: block;
}

a {
	color: inherit;
	text-decoration: none;
}

ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

button {
	font: inherit;
	color: inherit;
	cursor: pointer;
	border: none;
	background: none;
}

/* Visible, consistent focus for keyboard users (agency + accessibility) */
:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
	border-radius: 6px;
}

/* ---------- Typography — optical sizing, size-specific tracking/leading -----
   Large display text: tight leading + negative tracking (letters read too far
   apart as they grow). Body text: near-zero tracking, looser leading. -------- */
h1,
h2,
h3,
h4 {
	margin: 0 0 0.5em;
	font-weight: 600;
	text-wrap: balance;
}

.display {
	font-size: clamp(2.4rem, 7vw, 5rem);
	line-height: 1.02;
	letter-spacing: -0.025em;
	font-weight: 700;
}

h2,
.h2 {
	font-size: clamp(1.9rem, 4vw, 3rem);
	line-height: 1.08;
	letter-spacing: -0.02em;
}

h3,
.h3 {
	font-size: clamp(1.25rem, 2vw, 1.6rem);
	line-height: 1.2;
	letter-spacing: -0.01em;
	font-weight: 600;
}

.eyebrow {
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.14em; /* small text wants positive tracking */
	text-transform: uppercase;
	color: var(--accent);
	margin: 0 0 1rem;
}

p {
	margin: 0 0 1rem;
	letter-spacing: 0;
}

.lead {
	font-size: clamp(1.1rem, 1.4vw, 1.35rem);
	line-height: 1.55;
	color: var(--text-dim);
}

.text-dim {
	color: var(--text-dim);
}

/* ---------- Layout ---------- */
.wrap {
	width: 100%;
	max-width: var(--maxw);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

/* Native scroll-snap replaces fullpage.js — real scrolling, interruptible,
   momentum-preserving, zero JS to fight the browser. */
.snap {
	scroll-snap-type: y proximity;
}

.section {
	position: relative;
	min-height: 100svh;
	display: flex;
	align-items: center;
	padding-block: var(--section-pad);
	scroll-snap-align: start;
	scroll-snap-stop: normal;
}

.section--auto {
	min-height: auto;
	scroll-snap-align: none;
}

.center {
	text-align: center;
}

.section-head {
	max-width: 46rem;
	margin-inline: auto;
	margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

/* Divider — a hairline, not a heavy rule */
.rule {
	width: 3rem;
	height: 2px;
	background: var(--accent);
	border-radius: 2px;
	margin: 1.25rem auto 0;
}

/* Breathing room between the accent rule and any intro text below it.
   Targets every .lead in a section head (both language duplicates) so the
   spacing holds regardless of which language is visible. */
.section-head .lead {
	margin-top: 1.75rem;
}

/* ---------- Buttons — press feedback lives on pointer-down (§1) ---------- */
.btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.85rem 1.6rem;
	border-radius: var(--radius-pill);
	font-size: 0.98rem;
	font-weight: 600;
	letter-spacing: -0.01em;
	/* transform springs handled here for the press; response, not duration */
	transition: transform var(--resp-fast) var(--ease-out),
		background-color var(--resp) var(--ease-out),
		border-color var(--resp) var(--ease-out), box-shadow var(--resp) var(--ease-out);
	will-change: transform;
	border: 1px solid transparent;
	touch-action: manipulation;
}

.btn-primary {
	background: var(--text);
	color: var(--ink);
}

.btn-primary:hover {
	box-shadow: 0 8px 30px rgba(255, 255, 255, 0.18);
}

.btn-ghost {
	border-color: rgba(245, 245, 247, 0.4);
	color: var(--text);
	backdrop-filter: blur(8px);
}

.btn-ghost:hover {
	border-color: var(--text);
	background: rgba(245, 245, 247, 0.08);
}

/* The instant, continuous feedback — press = immediate scale down */
.btn:active,
.press:active {
	transform: scale(0.96);
	transition-duration: 80ms;
}

/* ---------- Navbar — translucent floating chrome (§12) ------------------
   A material layer that content scrolls *under*, not an opaque strip. ------- */
.nav {
	position: fixed;
	inset: 0 0 auto 0;
	z-index: 100;
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 0.9rem var(--gutter);
	background: transparent;
	transition: background-color var(--resp) var(--ease-out),
		backdrop-filter var(--resp) var(--ease-out),
		box-shadow var(--resp) var(--ease-out), padding var(--resp) var(--ease-out);
}

/* Materialises once content passes beneath it */
.nav.is-scrolled {
	background: var(--mat-chrome);
	backdrop-filter: blur(24px) saturate(180%);
	-webkit-backdrop-filter: blur(24px) saturate(180%);
	box-shadow: 0 1px 0 var(--mat-hairline), 0 10px 40px rgba(0, 0, 0, 0.35);
	padding-block: 0.7rem;
}

.nav-brand img {
	height: 2.4rem;
	width: auto;
}

.nav-links {
	display: flex;
	align-items: center;
	gap: 0.35rem;
	margin-left: auto;
}

.nav-link {
	position: relative;
	padding: 0.5rem 0.85rem;
	font-size: 0.9rem;
	font-weight: 500;
	letter-spacing: 0.01em;
	color: var(--text-dim);
	border-radius: var(--radius-pill);
	transition: color var(--resp) var(--ease-out),
		background-color var(--resp) var(--ease-out);
}

.nav-link:hover {
	color: var(--text);
}

.nav-link.is-active {
	color: var(--text);
}

/* Active pill — anchored highlight that slides between items */
.nav-link.is-active::before {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(255, 255, 255, 0.1);
	border-radius: var(--radius-pill);
	z-index: -1;
}

.nav-cta {
	color: var(--text);
	border: 1px solid rgba(245, 245, 247, 0.35);
	margin-left: 0.4rem;
}

.nav-cta:hover {
	background: rgba(245, 245, 247, 0.1);
	border-color: var(--text);
}

/* Language toggle — segmented control */
.lang {
	position: relative;
	display: inline-flex;
	background: rgba(255, 255, 255, 0.08);
	border-radius: var(--radius-pill);
	padding: 3px;
	margin-left: 0.5rem;
}

/* Sliding highlight pill — glides between EN and DE with a little spring
   (§4/§7) instead of the highlight hard-cutting from one button to the other.
   It sits behind the buttons and covers exactly one half of the track. */
.lang-thumb {
	position: absolute;
	top: 3px;
	left: 3px;
	bottom: 3px;
	width: calc(50% - 3px);
	background: var(--text);
	border-radius: var(--radius-pill);
	z-index: 0;
	transition: transform 0.42s cubic-bezier(0.34, 1.56, 0.64, 1); /* slight overshoot */
	will-change: transform;
}

/* DE is the second button → shift the thumb fully to the right */
.lang.is-de .lang-thumb {
	transform: translateX(100%);
}

.lang button {
	position: relative;
	z-index: 1;
	padding: 0.35rem 0.7rem;
	font-size: 0.78rem;
	font-weight: 600;
	color: var(--text-dim);
	border-radius: var(--radius-pill);
	background: transparent;
	transition: color var(--resp) var(--ease-out), transform var(--resp-fast) var(--ease-out);
}

.lang button:active {
	transform: scale(0.94);
}

.lang button.is-active {
	color: var(--ink); /* the sliding thumb provides the background now */
	background: transparent;
}

@media (prefers-reduced-motion: reduce) {
	.lang-thumb {
		transition: transform 150ms ease; /* no overshoot */
	}
}

/* Mobile menu toggle */
.nav-toggle {
	display: none;
	width: 2.75rem;
	height: 2.75rem;
	margin-left: auto;
	border-radius: 50%;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.08);
	backdrop-filter: blur(12px);
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
	content: "";
	position: absolute;
	width: 1.1rem;
	height: 2px;
	background: var(--text);
	border-radius: 2px;
	transition: transform var(--resp) var(--ease-out),
		opacity var(--resp-fast) var(--ease-out);
}

.nav-toggle span::before {
	transform: translateY(-6px);
}

.nav-toggle span::after {
	transform: translateY(6px);
}

body.menu-open .nav-toggle span {
	background: transparent;
}

body.menu-open .nav-toggle span::before {
	transform: rotate(45deg);
}

body.menu-open .nav-toggle span::after {
	transform: rotate(-45deg);
}

/* ---------- Hero ---------- */
.hero {
	color: var(--text);
	overflow: hidden;
	background: var(--ink); /* fallback behind the video while it loads */
}

/* Background video layer — sits inside the hero, behind the content but in
   FRONT of the section background (z-index 0, not negative, or the opaque
   section bg would paint over it). Dimmed by the scrim so text stays legible. */
.hero-media {
	position: absolute;
	inset: 0;
	z-index: 0;
	overflow: hidden;
}

.hero-media video {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.hero-media::after {
	content: "";
	position: absolute;
	inset: 0;
	/* Vibrancy: gradient scrim so type reads over changing video */
	background: linear-gradient(
		180deg,
		rgba(11, 11, 13, 0.55) 0%,
		rgba(11, 11, 13, 0.35) 45%,
		rgba(11, 11, 13, 0.85) 100%
	);
}

/* Keep the hero copy above the video layer */
.hero .wrap {
	position: relative;
	z-index: 1;
}

.hero .display {
	/* Give the headline the full column so the longest typed string can use
	   the available width instead of wrapping early at a fixed ch-limit
	   (which made the break point jump around as the text typed out).
	   Left-aligned so a two-line break reads naturally instead of centering. */
	max-width: 22ch;
	margin-inline: auto;
	text-align: left;
	text-wrap: balance;
}

@media (min-width: 768px) {
	.hero .display {
		max-width: none;
	}
}

.typed-cursor {
	font-weight: 200;
	color: var(--accent);
	animation: blink 1.1s steps(1) infinite;
}

@keyframes blink {
	50% {
		opacity: 0;
	}
}

.hero-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.9rem;
	margin-top: 2rem;
}

/* Scroll hint — telegraphs the gesture (§8) */
.scroll-hint {
	position: absolute;
	bottom: 2rem;
	left: 50%;
	transform: translateX(-50%);
	z-index: 1;
	color: var(--text-faint);
	font-size: 0.75rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.5rem;
}

.scroll-hint i {
	animation: nudge 1.8s var(--ease-in-out) infinite;
}

@keyframes nudge {
	0%,
	100% {
		transform: translateY(0);
	}
	50% {
		transform: translateY(6px);
	}
}

/* ---------- Section backgrounds ---------- */
.bg-ink {
	background: var(--ink);
}
.bg-ink-2 {
	background: var(--ink-2);
}
.bg-black {
	background: #000;
}

/* ---------- Showreel ---------- */
.showreel-frame {
	position: relative;
	width: min(100%, 64rem);
	margin-inline: auto;
	aspect-ratio: 16 / 9;
	border-radius: var(--radius-lg);
	overflow: hidden;
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
	border: 1px solid var(--mat-hairline);
}

.showreel-frame iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

/* ---------- Cards / services grid ---------- */
.grid {
	display: grid;
	gap: 1.25rem;
}

.grid-3 {
	grid-template-columns: repeat(3, 1fr);
}

.grid-2 {
	grid-template-columns: repeat(2, 1fr);
}

/* Translucent card material — lighter than the chrome, draws the eye.
   Never stacked on another translucent surface (legibility). */
.card {
	background: var(--mat-card);
	border: 1px solid var(--mat-card-border);
	border-radius: var(--radius);
	padding: 1.75rem;
	transition: transform var(--resp) var(--ease-out),
		background-color var(--resp) var(--ease-out),
		border-color var(--resp) var(--ease-out);
}

/* .card.card / .step.step doubles specificity so the hover transform beats
   `.reveal.is-in { transform: none }` (same specificity, declared later). */
.card.card:hover {
	transform: translateY(-4px);
	background: rgba(255, 255, 255, 0.09);
	border-color: rgba(255, 255, 255, 0.18);
}

.card .icon {
	font-size: 2rem;
	color: var(--accent);
	margin-bottom: 1rem;
	display: inline-block;
}

.card h3 {
	margin-bottom: 0.5rem;
}

.card p {
	color: var(--text-dim);
	font-size: 0.98rem;
	margin: 0;
}

/* ---------- Process — stepped flow ---------- */
.process-phase + .process-phase {
	margin-top: 3rem;
}

.phase-label {
	font-size: 0.85rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--accent);
	margin-bottom: 1.25rem;
}

.steps {
	display: grid;
	gap: 1.25rem;
	grid-template-columns: repeat(3, 1fr);
}

.step {
	background: var(--mat-card);
	border: 1px solid var(--mat-card-border);
	border-radius: var(--radius);
	padding: 1.75rem; /* match .card so process + services cards are the same size */
	transition: transform var(--resp) var(--ease-out),
		background-color var(--resp) var(--ease-out),
		border-color var(--resp) var(--ease-out);
}

.step.step:hover {
	transform: translateY(-4px);
	background: rgba(255, 255, 255, 0.09);
	border-color: rgba(255, 255, 255, 0.18);
}

.step .icon {
	font-size: 2rem;
	color: var(--accent);
	margin-bottom: 1rem;
	display: inline-block;
}

.step h3 {
	margin-bottom: 0.5rem;
}

.step p {
	color: var(--text-dim);
	font-size: 0.98rem;
	margin: 0;
}

/* ---------- Carousels — native scroll, 1:1 finger tracking, momentum ------
   Overflow scroll with snap: the browser gives us velocity handoff and
   rubber-banding for free, and it's interruptible by nature. ---------------- */
.rail {
	display: flex;
	gap: 1.25rem;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	padding: 0.5rem var(--gutter) 2rem;
	margin-inline: calc(-1 * var(--gutter));
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
	cursor: grab;
}

.rail::-webkit-scrollbar {
	display: none;
}

.rail.is-dragging {
	cursor: grabbing;
	scroll-snap-type: none; /* let free-drag win while grabbing */
}

.rail > * {
	scroll-snap-align: center;
	flex: 0 0 auto;
}

/* Stop the browser's native image/link drag inside a rail — otherwise a drag
   grabs the image (ghost + copy cursor) instead of scrolling the rail. */
.rail a,
.rail img {
	-webkit-user-drag: none;
	-khtml-user-drag: none;
	-moz-user-drag: none;
	user-drag: none;
	user-select: none;
	-webkit-touch-callout: none;
}

/* Mission images */
.mission-img {
	width: clamp(14rem, 30vw, 22rem);
	aspect-ratio: 1;
	object-fit: cover;
	border-radius: var(--radius-lg);
	border: 1px solid var(--mat-hairline);
	user-select: none;
	-webkit-user-drag: none;
	cursor: zoom-in;
	transition: transform var(--resp) var(--ease-out),
		box-shadow var(--resp) var(--ease-out);
}

.mission-img:hover {
	transform: scale(1.02);
	box-shadow: 0 16px 44px rgba(0, 0, 0, 0.45);
}

.mission-img:active {
	transform: scale(0.99);
}

/* ---------- Lightbox — full-frame image viewer -------------------------
   A dimming scrim pushes the page back; the image materialises with a
   scale spring (§12). Interruptible: click scrim / Esc closes it. ------- */
.lightbox {
	position: fixed;
	inset: 0;
	z-index: 300;
	display: grid;
	place-items: center;
	padding: clamp(1rem, 4vw, 3rem);
	background: rgba(6, 6, 8, 0.82);
	backdrop-filter: blur(20px) saturate(160%);
	-webkit-backdrop-filter: blur(20px) saturate(160%);
	opacity: 0;
	pointer-events: none;
	transition: opacity var(--resp) var(--ease-out);
	cursor: zoom-out;
}

.lightbox.is-open {
	opacity: 1;
	pointer-events: auto;
}

.lightbox figure {
	margin: 0;
	max-width: min(92vw, 72rem);
	max-height: 86vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.9rem;
	transform: scale(0.92);
	transition: transform var(--resp) var(--ease-out);
	cursor: default;
}

.lightbox.is-open figure {
	transform: scale(1);
}

.lightbox img {
	max-width: 100%;
	max-height: 80vh;
	width: auto;
	height: auto;
	object-fit: contain;
	border-radius: var(--radius-lg);
	box-shadow: 0 40px 120px rgba(0, 0, 0, 0.7);
	border: 1px solid var(--mat-hairline);
}

.lightbox figcaption {
	color: var(--text-dim);
	font-size: 0.9rem;
	letter-spacing: 0.01em;
	text-align: center;
}

.lightbox-close {
	position: fixed;
	top: 1.25rem;
	right: 1.25rem;
	width: 3rem;
	height: 3rem;
	display: grid;
	place-items: center;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.1);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	border: 1px solid var(--mat-hairline);
	color: var(--text);
	font-size: 1.4rem;
	line-height: 1;
	cursor: pointer;
	transition: background-color var(--resp) var(--ease-out),
		transform var(--resp-fast) var(--ease-out);
}

.lightbox-close:hover {
	background: rgba(255, 255, 255, 0.2);
}

.lightbox-close:active {
	transform: scale(0.92);
}

/* Prev / next controls */
.lightbox-nav {
	position: fixed;
	top: 50%;
	transform: translateY(-50%);
	width: 3.25rem;
	height: 3.25rem;
	display: grid;
	place-items: center;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.1);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	border: 1px solid var(--mat-hairline);
	color: var(--text);
	font-size: 1.3rem;
	cursor: pointer;
	transition: background-color var(--resp) var(--ease-out),
		transform var(--resp-fast) var(--ease-out);
}

.lightbox-nav:hover {
	background: rgba(255, 255, 255, 0.2);
}

.lightbox-nav:active {
	transform: translateY(-50%) scale(0.92);
}

.lightbox-prev {
	left: 1.25rem;
}

.lightbox-next {
	right: 1.25rem;
}

@media (max-width: 720px) {
	.lightbox-nav {
		top: auto;
		bottom: 1.25rem;
		transform: none;
	}
	.lightbox-nav:active {
		transform: scale(0.92);
	}
	.lightbox-prev {
		left: 1.25rem;
	}
	.lightbox-next {
		right: 1.25rem;
	}
}

/* Portfolio tiles */
.tile {
	position: relative;
	width: clamp(18rem, 40vw, 30rem);
	aspect-ratio: 4 / 3;
	border-radius: var(--radius-lg);
	overflow: hidden;
	border: 1px solid var(--mat-hairline);
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.tile img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform var(--resp-slow) var(--ease-out);
}

.tile:hover img {
	transform: scale(1.06);
}

.tile-cap {
	position: absolute;
	inset: auto 0 0 0;
	padding: 2.5rem 1.5rem 1.25rem;
	background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.85));
}

.tile-cap h3 {
	margin: 0;
	font-size: 1.35rem;
	text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

.tile-cap span {
	color: var(--text-dim);
	font-size: 0.85rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

.tile-source {
	position: absolute;
	top: 0.75rem;
	right: 0.85rem;
	font-size: 0.65rem;
	color: rgba(255, 255, 255, 0.7);
	background: rgba(0, 0, 0, 0.45);
	padding: 0.15rem 0.5rem;
	border-radius: var(--radius-pill);
	backdrop-filter: blur(6px);
}

/* Rail affordance */
.rail-hint {
	text-align: center;
	color: var(--text-faint);
	font-size: 0.8rem;
	letter-spacing: 0.08em;
	margin-top: 0.5rem;
}

/* ---------- Team ----------
   Two columns side by side: Team Karlsruhe left, Team Mannheim right.
   Inside each column the members are stacked vertically (women above men). */
.team-groups {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: clamp(2rem, 5vw, 4rem);
	max-width: 60rem;
	margin-inline: auto;
}

.team-group + .team-group {
	margin-top: 0; /* columns now, no vertical stacking between groups */
}

.team-group-title {
	text-align: center;
	color: var(--text);
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	font-size: 1rem;
	margin-bottom: 2.25rem;
}

/* Accent underline so the city title reads clearly as a group heading */
.team-group-title::after {
	content: "";
	display: block;
	width: 2.25rem;
	height: 2px;
	background: var(--accent);
	border-radius: 2px;
	margin: 0.6rem auto 0;
}

.team-grid {
	display: grid;
	grid-template-columns: 1fr; /* members stacked within a column */
	gap: 2.5rem;
	margin-inline: auto;
}

.member {
	text-align: center;
}

.member-photo {
	position: relative;
	width: clamp(12rem, 22vw, 16rem);
	aspect-ratio: 1;
	margin: 0 auto 1.25rem;
	border-radius: 50%;
	overflow: hidden;
	border: 1px solid var(--mat-hairline);
}

.member-photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform var(--resp-slow) var(--ease-out);
}

.member:hover .member-photo img {
	transform: scale(1.05);
}

/* Bio overlay — dims to focus (§12), fades in on hover/focus */
.member-bio {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.75rem;
	background: rgba(11, 11, 13, 0.82);
	backdrop-filter: blur(4px);
	color: var(--text);
	font-size: 0.9rem;
	line-height: 1.5;
	opacity: 0;
	overflow-y: auto; /* safety net if a bio is longer than the circle */
	transition: opacity var(--resp) var(--ease-out);
}

.member-photo:hover .member-bio,
.member-photo:focus-within .member-bio {
	opacity: 1;
}

.member h3 {
	font-size: 1.1rem;
	margin-bottom: 0.15rem;
}

.member .role {
	color: var(--text-faint);
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.14em;
}

.member-social {
	display: flex;
	gap: 0.75rem;
	justify-content: center;
	margin-top: 0.75rem;
	font-size: 1.05rem;
}

.member-social a {
	color: var(--text-dim);
	transition: color var(--resp) var(--ease-out),
		transform var(--resp-fast) var(--ease-out);
}

.member-social a:hover {
	color: var(--text);
}

.member-social a:active {
	transform: scale(0.9);
}

/* ---------- Contact ---------- */
.contact-grid {
	display: grid;
	grid-template-columns: 0.8fr 1.2fr;
	gap: 3rem;
	align-items: start;
}

.contact-methods {
	display: grid;
	gap: 2rem;
}

.contact-method {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.contact-method .icon {
	width: 3rem;
	height: 3rem;
	display: grid;
	place-items: center;
	border-radius: 50%;
	background: var(--mat-card);
	border: 1px solid var(--mat-card-border);
	font-size: 1.2rem;
	color: var(--accent);
	flex: 0 0 auto;
}

.contact-method a {
	color: var(--text);
	transition: color var(--resp) var(--ease-out);
}

.contact-method a:hover {
	color: var(--accent);
}

/* Form fields — translucent, generous hit targets, inline focus feedback */
.field {
	margin-bottom: 1rem;
}

.field input,
.field textarea {
	width: 100%;
	padding: 0.95rem 1.1rem;
	font: inherit;
	font-size: 1rem;
	color: var(--text);
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid var(--mat-card-border);
	border-radius: var(--radius);
	transition: border-color var(--resp) var(--ease-out),
		background-color var(--resp) var(--ease-out),
		box-shadow var(--resp) var(--ease-out);
}

.field input::placeholder,
.field textarea::placeholder {
	color: var(--text-faint);
}

.field input:focus,
.field textarea:focus {
	outline: none;
	border-color: var(--accent);
	background: rgba(255, 255, 255, 0.09);
	box-shadow: 0 0 0 4px rgba(94, 157, 255, 0.15);
}

.field textarea {
	resize: vertical;
	min-height: 9rem;
}

.field-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
}

.form-note {
	margin-top: 1rem;
	font-size: 0.85rem;
	color: var(--text-dim);
	min-height: 1.2em;
}

/* Honeypot */
.hp {
	position: absolute;
	left: -9999px;
}

/* ---------- Back to top ---------- */
.to-top {
	position: fixed;
	right: 1.5rem;
	bottom: 1.5rem;
	z-index: 90;
	width: 3rem;
	height: 3rem;
	display: grid;
	place-items: center;
	border-radius: 50%;
	background: var(--mat-chrome);
	backdrop-filter: blur(18px) saturate(180%);
	-webkit-backdrop-filter: blur(18px) saturate(180%);
	border: 1px solid var(--mat-hairline);
	color: var(--text);
	opacity: 0;
	transform: translateY(12px) scale(0.9);
	pointer-events: none;
	transition: opacity var(--resp) var(--ease-out),
		transform var(--resp) var(--ease-out);
}

.to-top.is-visible {
	opacity: 1;
	transform: translateY(0) scale(1);
	pointer-events: auto;
}

.to-top:active {
	transform: scale(0.92);
}

/* ---------- Footer ---------- */
.footer {
	padding-block: 3rem;
	text-align: center;
	background: var(--ink-2);
	border-top: 1px solid var(--mat-hairline);
}

.footer-social {
	display: flex;
	gap: 0.5rem;
	justify-content: center;
	margin-bottom: 1.25rem;
	font-size: 1.3rem;
}

.footer-social a {
	width: 2.75rem;
	height: 2.75rem;
	display: grid;
	place-items: center;
	border-radius: 50%;
	color: var(--text-dim);
	transition: color var(--resp) var(--ease-out),
		background-color var(--resp) var(--ease-out),
		transform var(--resp-fast) var(--ease-out);
}

.footer-social a:hover {
	color: var(--text);
	background: var(--mat-card);
}

.footer-social a:active {
	transform: scale(0.9);
}

.footer-legal {
	color: var(--text-faint);
	font-size: 0.85rem;
}

.footer-legal a {
	color: var(--text-dim);
	margin-left: 0.75rem;
	transition: color var(--resp) var(--ease-out);
}

.footer-legal a:hover {
	color: var(--text);
}

/* ---------- Modal — materialises with blur + scale (§12) ---------- */
.modal {
	position: fixed;
	inset: 0;
	z-index: 200;
	display: grid;
	place-items: center;
	padding: 1.5rem;
	background: rgba(0, 0, 0, 0.5);
	backdrop-filter: blur(6px);
	opacity: 0;
	pointer-events: none;
	transition: opacity var(--resp) var(--ease-out);
}

.modal.is-open {
	opacity: 1;
	pointer-events: auto;
}

.modal-card {
	width: min(30rem, 100%);
	background: var(--surface);
	border: 1px solid var(--mat-hairline);
	border-radius: var(--radius-lg);
	padding: 2rem;
	box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
	transform: scale(0.92);
	transition: transform var(--resp) var(--ease-out);
}

.modal.is-open .modal-card {
	transform: scale(1);
}

.modal-card h3 {
	margin-top: 0;
}

.modal-card p {
	color: var(--text-dim);
	font-size: 0.95rem;
}

.modal-close {
	float: right;
	font-size: 1.5rem;
	line-height: 1;
	color: var(--text-dim);
}

/* ---------- Scroll reveal — set by JS; springs applied via Motion ----------
   Starting hidden state; Motion animates to the resting state and can be
   interrupted. Falls back to visible if JS never runs. -------------------- */
.reveal {
	opacity: 0;
	transform: translateY(24px);
	transition: opacity 0.55s var(--ease-out), transform 0.55s var(--ease-out);
}

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

/* If JS is disabled, never leave content hidden */
.no-js .reveal {
	opacity: 1;
	transform: none;
}

/* ---------- Portfolio detail page ----------------------------------------
   Two-column: media hero on one side, project meta on the other. Below,
   the social/video embed. Shares the nav, footer, materials and springs. */
.detail-main {
	padding-top: 6rem; /* clear the fixed nav */
}

.detail-back {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	color: var(--text-dim);
	font-size: 0.9rem;
	font-weight: 500;
	margin-bottom: 2rem;
	transition: color var(--resp) var(--ease-out), transform var(--resp-fast) var(--ease-out);
}

.detail-back:hover {
	color: var(--text);
}

.detail-back:active {
	transform: scale(0.97);
}

.detail-grid {
	display: grid;
	grid-template-columns: 1.1fr 0.9fr;
	gap: clamp(1.5rem, 4vw, 3.5rem);
	align-items: start;
}

.detail-media {
	position: relative;
	border-radius: var(--radius-lg);
	overflow: hidden;
	border: 1px solid var(--mat-hairline);
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.detail-media img {
	width: 100%;
	height: auto;
	display: block;
}

.detail-source {
	position: absolute;
	top: 0.85rem;
	right: 0.85rem;
	font-size: 0.7rem;
	color: rgba(255, 255, 255, 0.85);
	background: rgba(0, 0, 0, 0.5);
	padding: 0.2rem 0.6rem;
	border-radius: var(--radius-pill);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	transition: background-color var(--resp) var(--ease-out);
}

.detail-source:hover {
	background: rgba(0, 0, 0, 0.75);
	color: #fff;
}

.detail-body h1 {
	font-size: clamp(1.9rem, 4vw, 3rem);
	line-height: 1.08;
	letter-spacing: -0.02em;
	margin-bottom: 1.5rem;
}

/* Meta as a definition list — label + value pairs, mapped tightly */
.detail-meta {
	display: grid;
	gap: 0.85rem;
	margin: 0 0 1.75rem;
}

.detail-meta div {
	display: grid;
	grid-template-columns: 9.5rem 1fr;
	gap: 0.75rem;
	padding-bottom: 0.85rem;
	border-bottom: 1px solid var(--mat-hairline);
}

.detail-meta dt {
	color: var(--text-faint);
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	margin: 0;
	padding-top: 0.1rem;
}

.detail-meta dd {
	margin: 0;
	color: var(--text);
	font-size: 0.98rem;
}

.detail-meta dd a {
	color: var(--accent);
	transition: color var(--resp) var(--ease-out);
}

.detail-meta dd a:hover {
	color: var(--text);
}

.detail-desc {
	color: var(--text-dim);
	line-height: 1.65;
}

.detail-desc-label {
	display: block;
	color: var(--text-faint);
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	margin-bottom: 0.5rem;
}

/* Embed area (Instagram reel or YouTube video) */
.detail-embed {
	margin-top: clamp(3rem, 8vh, 5rem);
	display: flex;
	justify-content: center;
}

.detail-embed .video-frame {
	position: relative;
	width: min(100%, 56rem);
	aspect-ratio: 16 / 9;
	border-radius: var(--radius-lg);
	overflow: hidden;
	border: 1px solid var(--mat-hairline);
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.detail-embed .video-frame iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

/* Instagram embeds ship a white card with header/footer chrome we can't
   recolour (cross-origin iframe). We frame the rendered iframe in a dark card
   and clip its top header + bottom action bar so only the reel shows, then
   offer a styled "view on Instagram" button beneath. */
.ig-embed {
	width: min(100%, 34rem);
	margin-inline: auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1rem;
}

.ig-card {
	position: relative;
	width: 100%;
	aspect-ratio: 4 / 5;
	border-radius: var(--radius-lg);
	overflow: hidden;
	border: 1px solid var(--mat-hairline);
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
	background: #000;
}

/* Soft dark fade over the bottom edge — masks the hairline of Instagram's
   footer that would otherwise peek through where video meets chrome, and
   reads as a deliberate scroll-edge effect rather than a hard cut. */
.ig-card::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 40px;
	z-index: 2;
	pointer-events: none;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, #000 82%);
}

/* Pull the iframe up to hide IG's ~54px header, and make it taller than the
   card so the ~130px like/comment footer is clipped off the bottom. The iframe
   is also made WIDER than the card and overflowed left/right, so Instagram's
   own rounded corners + coloured border sit outside the card and get clipped
   by overflow:hidden (otherwise they peek through as notches at the edges). */
.ig-card .instagram-media,
.ig-card iframe.instagram-media {
	position: absolute !important;
	top: -60px;
	left: 50%;
	transform: translateX(-50%);
	width: 112% !important;
	min-width: 0 !important;
	height: calc(100% + 220px) !important;
	margin: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	background: #000 !important;
}

/* Before embed.js swaps in the iframe, keep the blockquote from flashing white */
.ig-card > blockquote.instagram-media {
	background: #000 !important;
}

.ig-link {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.7rem 1.4rem;
	border-radius: var(--radius-pill);
	font-size: 0.92rem;
	font-weight: 600;
	letter-spacing: -0.01em;
	color: var(--text);
	border: 1px solid var(--mat-card-border);
	background: var(--mat-card);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	transition: transform var(--resp-fast) var(--ease-out),
		background-color var(--resp) var(--ease-out),
		border-color var(--resp) var(--ease-out);
}

.ig-link:hover {
	background: rgba(255, 255, 255, 0.1);
	border-color: rgba(255, 255, 255, 0.28);
}

.ig-link:active {
	transform: scale(0.96);
}

.ig-link i {
	font-size: 1.05rem;
}

@media (max-width: 820px) {
	.detail-grid {
		grid-template-columns: 1fr;
	}
	.detail-meta div {
		grid-template-columns: 8rem 1fr;
	}
}

@media (max-width: 480px) {
	.detail-meta div {
		grid-template-columns: 1fr;
		gap: 0.15rem;
	}
}

/* ---------- Legal / prose pages (Impressum, Datenschutz) ----------------
   Long-form text: comfortable measure, clear heading rhythm, readable links. */
.legal-main {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	padding-top: 7rem; /* clear the fixed nav */
}

/* Push the footer to the bottom even when the legal text is short */
.legal-main > .wrap {
	flex: 1 0 auto;
	padding-bottom: 4rem;
}

.legal-main > .footer {
	flex-shrink: 0;
}

.legal-head {
	text-align: center;
	margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.legal-head .rule {
	margin-top: 1.25rem;
}

.legal-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 20rem;
	gap: clamp(1.5rem, 4vw, 3rem);
	align-items: start;
}

.prose {
	max-width: 44rem;
	color: var(--text-dim);
	line-height: 1.7;
	font-size: 1rem;
}

.prose h2 {
	color: var(--text);
	font-size: clamp(1.3rem, 2.5vw, 1.7rem);
	line-height: 1.2;
	letter-spacing: -0.01em;
	margin: 2.5rem 0 0.75rem;
}

.prose h2:first-child {
	margin-top: 0;
}

.prose h3 {
	color: var(--text);
	font-size: 1.15rem;
	margin: 1.75rem 0 0.5rem;
}

.prose p {
	margin: 0 0 1rem;
}

.prose a {
	color: var(--accent);
	text-decoration: none;
	transition: color var(--resp) var(--ease-out);
	word-break: break-word;
}

.prose a:hover {
	color: var(--text);
	text-decoration: underline;
}

.prose strong {
	color: var(--text);
	font-weight: 600;
}

.prose ul {
	list-style: disc;
	padding-left: 1.25rem;
	margin: 0 0 1rem;
}

.prose li {
	margin-bottom: 0.4rem;
}

/* Sticky help/aside card */
.legal-aside {
	position: sticky;
	top: 6rem;
}

.legal-aside .card {
	padding: 1.75rem;
}

.legal-aside h3 {
	margin-top: 0;
	font-size: 1.1rem;
	color: var(--text);
}

.legal-aside p {
	color: var(--text-dim);
	font-size: 0.95rem;
	margin: 0;
}

.legal-aside a {
	color: var(--accent);
}

@media (max-width: 820px) {
	.legal-layout {
		grid-template-columns: 1fr;
	}
	.legal-aside {
		position: static;
	}
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
	.grid-3,
	.steps {
		grid-template-columns: 1fr 1fr;
	}
	.contact-grid {
		grid-template-columns: 1fr;
		gap: 2rem;
	}
}

@media (max-width: 720px) {
	.nav-links {
		position: fixed;
		inset: 0 0 0 auto;
		width: min(20rem, 82vw);
		flex-direction: column;
		align-items: stretch;
		justify-content: center;
		gap: 0.5rem;
		padding: 5rem 2rem 2rem;
		margin: 0;
		background: var(--mat-chrome);
		backdrop-filter: blur(28px) saturate(180%);
		-webkit-backdrop-filter: blur(28px) saturate(180%);
		border-left: 1px solid var(--mat-hairline);
		/* Enter/exit along the same path — slides in from the right,
		   dismisses to the right (§7 spatial consistency) */
		transform: translateX(100%);
		transition: transform var(--resp) var(--ease-out);
	}
	body.menu-open .nav-links {
		transform: translateX(0);
	}
	.nav-toggle {
		display: flex;
		position: relative;
	}
	.nav-link {
		font-size: 1.05rem;
		padding: 0.75rem 1rem;
		text-align: center;
	}
	.lang {
		align-self: center;
		margin-top: 1rem;
	}
	.grid-3,
	.steps,
	.grid-2,
	.team-groups,
	.team-grid {
		grid-template-columns: 1fr;
	}
	.team-group + .team-group {
		margin-top: 3rem; /* space between stacked city groups on small screens */
	}
	.field-row {
		grid-template-columns: 1fr;
	}
}

/* ---------- Reduced motion (§14) — gentler, non-vestibular equivalent -----
   Replace slides/springs with short cross-fades; drop overshoot & parallax. */
@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
	*,
	*::before,
	*::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 150ms !important;
	}
	.reveal {
		transform: none; /* fade only, no travel */
	}
	.hero-media video {
		display: none; /* no full-viewport moving background */
	}
	.scroll-hint i,
	.typed-cursor {
		animation: none;
	}
	.card:hover,
	.step:hover,
	.tile:hover img,
	.mission-img:hover,
	.member:hover .member-photo img {
		transform: none;
	}
	.lightbox figure {
		transform: none;
	}
}

/* ---------- Reduced transparency (§14) — frostier / solid materials ---- */
@media (prefers-reduced-transparency: reduce) {
	.nav.is-scrolled,
	.to-top,
	.modal,
	.member-bio,
	.lightbox,
	.lightbox-close,
	.lightbox-nav,
	.nav-links {
		background: var(--mat-chrome-solid);
		backdrop-filter: none;
		-webkit-backdrop-filter: none;
	}
	.card,
	.step,
	.field input,
	.field textarea {
		background: #202024;
	}
}

/* ---------- More contrast (§14) — near-solid, defined borders ---------- */
@media (prefers-contrast: more) {
	:root {
		--text-dim: rgba(245, 245, 247, 0.85);
		--text-faint: rgba(245, 245, 247, 0.7);
		--mat-card: #1e1e22;
		--mat-card-border: rgba(255, 255, 255, 0.4);
	}
	.nav.is-scrolled {
		background: var(--mat-chrome-solid);
	}
	.btn-ghost,
	.nav-cta {
		border-color: var(--text);
	}
}
