/* Sebastian Heudorfer – site styles */

@font-face {
	font-family: 'Open Sans';
	font-style: normal;
	font-weight: 300 800;
	font-display: swap;
	src: url(../fonts/open-sans-latin.woff2) format('woff2');
}

:root {
	--bg: #f7f6f3;
	--surface: #ffffff;
	--ink: #14202b;
	--muted: #5d6873;
	--line: #e3e1dc;
	--accent: #0a6fb0;
	--radius: 6px;
	--wrap: 1080px;
	--ease: cubic-bezier(.2, .7, .2, 1);
	--fly: 90px;
}

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

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

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: 'Open Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
	font-size: 17px;
	font-weight: 400;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

/* fly-in elements start outside the viewport; clip them here, since mobile browsers ignore overflow on body */
main { overflow-x: hidden; overflow-x: clip; }

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 300; line-height: 1.2; }
p { margin: 0; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- Language ---------- */
html[lang="de"] body [lang="en"],
html[lang="en"] body [lang="de"] { display: none; }

.lang-switch {
	position: absolute;
	top: 18px;
	right: 20px;
	z-index: 10;
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 4px 10px;
	border-radius: 999px;
	background: rgba(20, 32, 43, .35);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	color: rgba(255, 255, 255, .6);
	font-size: 12px;
	letter-spacing: .08em;
}
.lang-switch button {
	border: 0;
	background: none;
	padding: 2px 3px;
	font: inherit;
	color: inherit;
	cursor: pointer;
}
html[lang="de"] .lang-switch [data-set-lang="de"],
html[lang="en"] .lang-switch [data-set-lang="en"] { color: #fff; font-weight: 600; }

/* ---------- Hero ---------- */
.hero {
	position: relative;
	display: grid;
	place-items: start center;
	min-height: 100vh;
	min-height: 100svh;
	padding: 0 24px;
	color: #fff;
	text-align: center;
	background:
		linear-gradient(180deg, rgba(10, 18, 26, .25) 0%, rgba(10, 18, 26, .15) 45%, rgba(10, 18, 26, .55) 100%),
		url(../images/web/hero-1680.jpg) center / cover no-repeat;
}
@media (max-width: 900px) {
	.hero {
		background-image:
			linear-gradient(180deg, rgba(10, 18, 26, .25) 0%, rgba(10, 18, 26, .15) 45%, rgba(10, 18, 26, .55) 100%),
			url(../images/web/hero-1000.jpg);
	}
}
/* keep the text in the sky: the summit sits at ~36–41% of the hero height */
.hero-inner { margin-top: 14vh; margin-top: 14svh; }
.hero h1 {
	font-size: clamp(38px, 7vw, 76px);
	font-weight: 300;
	letter-spacing: -.01em;
	text-shadow: 0 2px 24px rgba(10, 18, 26, .35);
	animation: rise 1.2s var(--ease) both;
}
.hero-sub {
	margin-top: 14px;
	font-size: clamp(15px, 1.9vw, 20px);
	font-weight: 400;
	letter-spacing: .02em;
	opacity: .95;
	text-shadow: 0 1px 12px rgba(10, 18, 26, .6);
	animation: rise 1.2s .2s var(--ease) both;
}
.hero-sub .sep { margin: 0 .5em; opacity: .55; }

.scroll-hint {
	position: absolute;
	bottom: 28px;
	left: 50%;
	width: 44px;
	height: 44px;
	margin-left: -22px;
	color: #fff;
	animation: bob 2.2s ease-in-out infinite;
}
.scroll-hint svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.5; }

/* very small phones */
@media (max-width: 380px) {
	.hero-inner { margin-top: 10vh; margin-top: 10svh; }
	.hero h1 { font-size: 32px; }
}

/* landscape phones: less height, so smaller text placed higher */
@media (max-height: 500px) and (orientation: landscape) {
	.hero-inner { margin-top: 8vh; }
	.hero h1 { font-size: 34px; }
	.hero-sub { margin-top: 8px; font-size: 14px; }
}

@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes bob {
	0%, 100% { transform: translateY(-6px); opacity: .4; }
	50% { transform: translateY(6px); opacity: 1; }
}

/* ---------- Sections ---------- */
.choose, .panel {
	max-width: var(--wrap);
	margin: 0 auto;
	padding: 110px 24px;
}
.section-title {
	font-size: clamp(26px, 3.4vw, 38px);
	text-align: center;
	margin-bottom: 48px;
}
.section-title::after {
	content: '';
	display: block;
	width: 40px;
	height: 1px;
	margin: 22px auto 0;
	background: var(--accent);
}

/* ---------- Choice ---------- */
.choice-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 28px;
}
.choice {
	position: relative;
	display: block;
	aspect-ratio: 1;
	overflow: hidden;
	border-radius: var(--radius);
	background: var(--ink);
	color: #fff;
	isolation: isolate;
	transition: opacity .5s var(--ease), filter .5s var(--ease);
}
.choice img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 1.2s var(--ease);
}
.choice::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(10, 18, 26, 0) 45%, rgba(10, 18, 26, .7) 100%);
	transition: background .5s var(--ease);
}
.choice:hover img, .choice:focus-visible img { transform: scale(1.05); }
/* EU AI-Act label: sits under the shading, scales with the card (70px per 600px) */
.choice img.ai-label {
	inset: auto 0 0 auto;
	width: auto;
	height: 11.667%;
	object-fit: contain;
	transform: none;
	transition: none;
}
.choice-label {
	position: absolute;
	left: 32px;
	right: 32px;
	bottom: 28px;
	z-index: 1;
	display: flex;
	flex-direction: column;
}
.choice-title { font-size: clamp(24px, 2.8vw, 32px); font-weight: 300; line-height: 1.2; }
.choice-text {
	margin-top: 6px;
	font-size: 14px;
	letter-spacing: .06em;
	text-transform: uppercase;
	opacity: .85;
}
.choice-title::after {
	content: '→';
	display: inline-block;
	margin-left: .4em;
	transition: transform .4s var(--ease);
}
.choice:hover .choice-title::after { transform: translateX(6px); }

/* the unselected card steps back once a choice is made */
.choice-grid.has-active .choice:not(.is-active) { opacity: .45; filter: grayscale(.6); }
.choice-grid.has-active .choice:not(.is-active):hover { opacity: .8; filter: none; }
.choice.is-active::before {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 2;
	border: 2px solid #fff;
	border-radius: var(--radius);
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08);
	pointer-events: none;
}

/* ---------- Panels ---------- */
.panel { padding-top: 40px; }
/* all panels show without JS; with JS only the chosen one */
.js .panel:not(.is-open) { display: none; }
.panel-intro {
	max-width: 680px;
	margin: 0 auto 90px;
	text-align: center;
	color: var(--muted);
}
.panel-intro .section-title { color: var(--ink); }
.panel-intro p + p { margin-top: 16px; }
.portrait {
	width: 180px;
	height: 180px;
	margin: 0 auto 36px;
	border-radius: 50%;
	object-fit: cover;
	box-shadow: 0 0 0 6px var(--surface), 0 10px 30px rgba(20, 32, 43, .15);
	transition: transform .4s var(--ease);
}
.portrait-open {
	display: block;
	width: fit-content;
	margin: 0 auto 36px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: none;
	cursor: zoom-in;
}
.portrait-open .portrait { margin: 0; }
.portrait-open:hover .portrait { transform: scale(1.04); }

/* ---------- Portrait lightbox ---------- */
html:has(.lightbox[open]) { overflow: hidden; }
.lightbox {
	padding: 0;
	border: 0;
	background: none;
	overflow: visible;
	max-width: none;
	max-height: none;
}
.lightbox::backdrop { background: rgba(10, 18, 26, .85); }
.lightbox[open] { animation: lightbox-in .35s var(--ease); }
.lightbox[open]::backdrop { animation: fade-in .35s ease; }
.lightbox-inner { position: relative; }
.lightbox-inner img {
	width: min(80vw, 75vh, 800px);
	height: auto;
	border-radius: var(--radius);
	box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
}
.lightbox-close {
	position: absolute;
	top: -48px;
	right: -48px;
	width: 40px;
	height: 40px;
	padding: 8px;
	border: 0;
	border-radius: 50%;
	background: none;
	color: #fff;
	cursor: pointer;
	opacity: .8;
	transition: opacity .2s;
}
.lightbox-close:hover, .lightbox-close:focus-visible { opacity: 1; }
.lightbox-close svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}
@keyframes lightbox-in { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* Guiding fields: alternating image / text */
.fields { display: grid; gap: 120px; }
.field {
	display: grid;
	grid-template-columns: 1fr 1fr;
	align-items: center;
	gap: 72px;
}
.field:nth-child(even) .field-media { order: 2; }
.field-media {
	overflow: hidden;
	border-radius: var(--radius);
	aspect-ratio: 1;
	background: var(--line);
}
.field-media { position: relative; }
.field-media img { width: 100%; height: 100%; object-fit: cover; }
/* location caption: fades in on hover; only opacity animates, so it never interferes with the fly-in transform on .field-media */
.field .field-caption {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: flex-end;
	padding: 24px 26px;
	background: linear-gradient(to top, rgba(10, 16, 22, .82), rgba(10, 16, 22, .45) 25%, rgba(10, 16, 22, 0) 50%);
	color: #fff;
	font-size: 15px;
	line-height: 1.5;
	text-shadow: 0 1px 3px rgba(0, 0, 0, .4);
	opacity: 0;
	transition: opacity .4s var(--ease);
	pointer-events: none;
}
/* hover only on real pointers; touch devices toggle .show-caption by tap (see site.js), avoiding sticky hover */
@media (hover: hover) {
	.field-media:hover .field-caption { opacity: 1; }
}
.field-media.show-caption .field-caption { opacity: 1; }
.field-num {
	display: block;
	margin-bottom: 10px;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .14em;
	color: var(--accent);
}
.field h3 {
	font-size: clamp(26px, 3vw, 36px);
	margin-bottom: 20px;
}
.field p { color: var(--muted); }

/* Call to action */
.cta { margin-top: 140px; text-align: center; }
.cta .section-title { margin-bottom: 20px; }
.cta-note {
	max-width: 560px;
	margin: 0 auto 36px;
	color: var(--muted);
}
.button {
	display: inline-block;
	padding: 15px 38px;
	border: 1px solid var(--ink);
	border-radius: 999px;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: .1em;
	text-transform: uppercase;
	transition: background .3s, color .3s;
}
.button:hover, .button:focus-visible { background: var(--ink); color: #fff; }

/* Software links */
.links {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 24px;
}
.link-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 48px 24px 40px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--surface);
	text-align: center;
	transition: border-color .3s, transform .3s var(--ease), box-shadow .3s;
}
.link-card:hover, .link-card:focus-visible {
	border-color: transparent;
	transform: translateY(-4px);
	box-shadow: 0 18px 40px -20px rgba(20, 32, 43, .35);
}
.link-card svg {
	width: 40px;
	height: 40px;
	margin-bottom: 22px;
	fill: none;
	stroke: var(--accent);
	stroke-width: 1.4;
	stroke-linecap: round;
	stroke-linejoin: round;
}
.link-title { font-size: 22px; font-weight: 300; }
.link-text { margin-top: 4px; font-size: 14px; color: var(--muted); }
.links .reveal:nth-child(2) { transition-delay: .1s; }
.links .reveal:nth-child(3) { transition-delay: .2s; }
.links .reveal:nth-child(4) { transition-delay: .3s; }

/* ---------- Scroll reveal (only with JS, so content stays visible without it) ---------- */
.js .reveal {
	opacity: 0;
	transition: opacity .9s var(--ease), transform 1.1s var(--ease);
	will-change: opacity, transform;
}
.js .reveal.from-left { transform: translateX(calc(-1 * var(--fly))); }
.js .reveal.from-right { transform: translateX(var(--fly)); }
.js .reveal.from-bottom { transform: translateY(40px); }
.field-body.reveal { transition-delay: .12s; }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Footer ---------- */
.footer {
	padding: 28px 24px;
	border-top: 1px solid var(--line);
	text-align: center;
	font-size: 14px;
	color: var(--muted);
}

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
	.links { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
	.field { gap: 40px; }
	.links { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
}

@media (max-width: 720px) {
	:root { --fly: 40px; }
	body { font-size: 16px; }
	.choose, .panel { padding: 80px 16px; }
	.panel { padding-top: 24px; }
	.section-title { margin-bottom: 36px; }
	.choice-grid { grid-template-columns: 1fr; gap: 16px; }
	.choice { aspect-ratio: 4 / 3; }
	.choice-label { left: 22px; right: 22px; bottom: 20px; }
	.panel-intro { margin-bottom: 64px; }
	.fields { gap: 80px; }
	.field { grid-template-columns: 1fr; gap: 26px; }
	.field:nth-child(even) .field-media { order: 0; }
	.cta { margin-top: 100px; }
	.lang-switch { top: 12px; right: 12px; }
	.hero-sub .role { display: block; }
	.hero-sub .sep { display: none; }
	.link-card { padding: 30px 20px 26px; }
	.link-card svg { margin-bottom: 14px; }
	/* no room beside the picture on phones: put the X above its top-right edge */
	.lightbox-close { right: 0; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation: none !important; transition: none !important; }
	.js .reveal, .js .reveal.from-left, .js .reveal.from-right, .js .reveal.from-bottom { opacity: 1; transform: none; }
}

/* ---------- Legal pages ---------- */
.legal-header {
	max-width: 760px;
	margin: 0 auto;
	padding: 28px 24px 0;
}
.legal-header a {
	font-size: 14px;
	letter-spacing: .06em;
	color: var(--muted);
	transition: color .2s;
}
.legal-header a:hover { color: var(--ink); }
.legal {
	max-width: 760px;
	margin: 0 auto;
	padding: 56px 24px 96px;
}
.legal h1 { font-size: clamp(32px, 5vw, 44px); margin-bottom: 12px; }
.legal .lead { color: var(--muted); font-size: 15px; margin-bottom: 48px; }
.legal .lead.stand { margin-top: 48px; }
.legal h2 { font-size: 22px; font-weight: 400; margin: 44px 0 12px; }
.legal h3 { font-size: 17px; font-weight: 600; margin: 24px 0 6px; }
.legal p, .legal ul { margin: 0 0 14px; }
.legal ul { padding-left: 1.2em; }
.legal a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.legal address { font-style: normal; margin-bottom: 14px; }
.legal .todo {
	background: #fff1b8;
	color: #7a5b00;
	padding: 0 4px;
	border-radius: 3px;
}
.footer nav { margin-top: 4px; }
.footer nav a { margin: 0 8px; transition: color .2s; }
.footer nav a:hover { color: var(--ink); }
@media (max-width: 720px) {
	.legal { padding: 40px 16px 72px; }
	.legal-header { padding: 20px 16px 0; }
}
