/* Startseite */

:root {
	--lfg-blau: #4081CF;
	--lfg-hell: #7198D6;
	--lfg-grau: #888FA1;

	/* Text dunkler als --lfg-grau, das hat auf Weiß zu wenig Kontrast */
	--lfg-flaeche: #F1F5FB;
	--lfg-schatten: 0, 0, 0;
	--lfg-text:    #4B4E59;

	--rail:   1240px;
	--gutter: clamp(1.25rem, 5vw, 4rem);

	--sp-1: .5rem;  --sp-2: 1rem;   --sp-3: 1.75rem;
	--sp-4: 2.75rem; --sp-5: 4.5rem; --sp-6: 7rem;

	--t-xl: clamp(2.4rem, 6.4vw, 5.5rem);
	--t-l:  clamp(1.75rem, 3.4vw, 3rem);
	--t-m:  clamp(1.25rem, 1.9vw, 1.75rem);
	--t-s:  clamp(1.02rem, 1.1vw, 1.18rem);
	--t-xs: clamp(.82rem, .85vw, .95rem);
}

/* Achse */
.st-rail {
	width: 100%; max-width: var(--rail);
	margin-inline: auto; padding-inline: var(--gutter);
}

.st-abschnitt { padding-block: clamp(var(--sp-4), 8vw, var(--sp-6)); }
.st-abschnitt--flaeche { background: var(--lfg-flaeche); }

.st-kopf {
	margin: 0 0 var(--sp-1); font-size: var(--t-l); font-weight: 500;
	line-height: 1.1; letter-spacing: -.02em; color: var(--lfg-blau);
}
.st-kopf__satz {
	margin: 0 0 var(--sp-3);
	font-size: var(--t-s); line-height: 1.5; color: var(--lfg-grau);
}

/* Hero */
.st-hero {
	position: relative; isolation: isolate; overflow: hidden;
	height: min(88svh, max(32rem, 48vw));
	/* Höhe der Wellengrafik (148/1977) */
	--welle: 7.5vw;
	background: var(--lfg-blau);
	color: #fff;
}
.st-hero__bilder { position: absolute; inset: 0; z-index: 0; }
.st-hero__bild {
	position: absolute; inset: 0; background-size: cover; background-position: center;
	opacity: 0; transition: opacity 1.1s ease;
}
.st-hero__bild.ist-aktiv { opacity: 1; }
.st-hero__clip { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* Abdunklung: oben für die Überschrift, unten für die Kennzahlen */
.st-hero__schleier {
	position: absolute; inset: 0; z-index: 1; pointer-events: none;
	background:
		radial-gradient(ellipse 72% 62% at 50% 46%,
			rgba(var(--lfg-schatten), 0) 35%,
			rgba(var(--lfg-schatten), .30) 72%,
			rgba(var(--lfg-schatten), .58) 100%),
		linear-gradient(180deg, rgba(var(--lfg-schatten), .50) 0%, rgba(var(--lfg-schatten), 0) 38%),
		linear-gradient(0deg,  rgba(var(--lfg-schatten), .55) 0%, rgba(var(--lfg-schatten), 0) 40%);
}

.st-hero__inhalt {
	position: relative; z-index: 3; height: 100%;
	/* bewusst nicht an .st-rail, sondern an der Fensterkante */
	padding-inline: var(--gutter);
	display: grid; grid-template-rows: auto 1fr auto;
	padding-block: clamp(var(--sp-2), 5vh, var(--sp-4));
}

.st-hero__titel {
	grid-row: 1; margin: 0; max-width: 30ch;
	font-size: clamp(1.85rem, 4.2vw, 3.8rem); font-weight: 400; line-height: 1.12;
	letter-spacing: -.015em;
	--ungefuellt: rgba(255,255,255,.6);
	text-shadow: 0 2px 16px rgba(var(--lfg-schatten), .4);
}
.st-titel__gruss  { display: none; color: #fff; }
.st-titel__spruch { display: block; color: var(--ungefuellt); text-transform: uppercase; }
/* fit-content nötig, sonst füllt sich der Verlauf über die ganze Zeilenbreite */
.st-titel__spruch .st-wort { display: block; width: fit-content; }
.st-titel__zeile  { display: block; }
.st-hero.ist-erste .st-titel__gruss  { display: block; }
.st-hero.ist-erste .st-titel__spruch { display: none; }

/* Wort-Fortschritt */
@property --p     { syntax: "<percentage>"; inherits: false; initial-value: 0%; }
@property --fuell { syntax: "<color>";      inherits: false; initial-value: transparent; }
.st-wort {
	--p: 0%; --fuell: transparent;
	background-image: linear-gradient(90deg, var(--fuell) var(--p), var(--ungefuellt) var(--p));
	-webkit-background-clip: text; background-clip: text; color: transparent;
}

/* Boot: drei Ebenen, damit sich die transforms nicht überschreiben */
.st-boot {
	--mx: 0; --my: 0;
	flex: 0 0 auto; width: clamp(150px, 23vw, 350px);
	transform: translate(calc(var(--mx) * 22px), calc(var(--my) * 12px)) rotate(calc(var(--mx) * 1.5deg));
	transition: transform .5s cubic-bezier(.22,.61,.36,1);
	cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.st-boot__welle { display: block; transform-origin: 50% 88%; }
.st-boot__welle.ist-welle { animation: st-welle 1.5s cubic-bezier(.3,.6,.4,1); }
.st-boot img {
	display: block; width: 100%; height: auto;
	transform-origin: 50% 88%;
	animation: st-segeln 5.5s ease-in-out infinite;
}
@keyframes st-segeln {
	0%, 100% { transform: rotate(-4deg)   translateY(0); }
	22%      { transform: rotate(1.5deg)  translateY(-7px); }
	48%      { transform: rotate(4.5deg)  translateY(-2px); }
	74%      { transform: rotate(-1deg)   translateY(-8px); }
}
@keyframes st-welle {
	0%   { transform: none; }
	16%  { transform: translateY(-18px) rotate(-2.5deg); }
	38%  { transform: translateY(4px)   rotate(2deg); }
	58%  { transform: translateY(-6px)  rotate(-1deg); }
	78%  { transform: translateY(1px)   rotate(.5deg); }
	100% { transform: none; }
}

.st-hero__rechts {
	display: flex; flex-direction: column; align-items: flex-end;
}

.st-hero__fuss {
	grid-row: 3; display: flex; align-items: flex-end;
	justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap;
}

.st-bedienung {
	position: absolute; left: 50%; translate: -50% 0;
	bottom: clamp(var(--sp-3), 6vh, var(--sp-4));
	display: flex; align-items: center; gap: var(--sp-2);
}
.st-schritte { display: flex; align-items: center; gap: var(--sp-1); }
.st-schritt {
	position: relative; width: clamp(24px, 3.4vw, 46px); height: 4px;
	padding: 0; border: 0; overflow: hidden; cursor: pointer;
	background: rgba(255,255,255,.35); transition: background .25s ease;
}
.st-schritt.ist-aktiv { background: rgba(255,255,255,.35); }
.st-schritt:hover { background: rgba(255,255,255,.6); }
.st-schritt__fuell { position: absolute; inset: 0 auto 0 0; width: 0; background: #fff; }

/* Link aus Feld „Kennzahlen: Ziel“ */
.st-zahlen-link { display: block; color: #fff; text-decoration: none; }
.st-zahlen-link:hover .st-zahl__was { text-decoration: underline; text-underline-offset: 3px; }
.st-zahlen-link:focus-visible { outline: 3px solid #fff; outline-offset: 6px; }
.st-zahlen dt, .st-zahlen dd { margin: 0; }
.st-zahlen { display: flex; align-items: flex-end; gap: clamp(var(--sp-3), 4.5vw, var(--sp-5)); margin: 0; }
.st-zahl { position: relative; text-align: center; }
.st-zahl__wert {
	position: relative; display: block; z-index: 0;
	font-size: clamp(2.1rem, 4.4vw, 4.2rem); font-weight: 600;
	line-height: 1; letter-spacing: -.02em;
}
.st-zahl__wert::before {
	content: ""; position: absolute; z-index: -1;
	left: 50%; bottom: -.22em; translate: -48% 0;
	/* mitwachsen, sonst verschwindet das Segel bei vierstelligen Zahlen */
	width: max(2.1em, calc(100% + .6em)); height: 1.35em;
	background: var(--segel) center/contain no-repeat;
}
.st-zahl__was { display: block; margin-top: .2em; font-size: clamp(1.1rem, 1.35vw, 1.4rem); color: rgba(255,255,255,.9); }
/* Treppe nach rechts abwärts */
.st-zahl:nth-child(1) { transform: translateY(var(--sp-1)); }
.st-zahl:nth-child(2) { transform: translateY(calc(var(--sp-1) * 2)); }
.st-zahl:nth-child(3) { transform: translateY(calc(var(--sp-1) * 3)); }

.st-pfeil {
	display: flex; align-items: center; justify-content: center;
	width: 1.9rem; height: 1.9rem; padding: 0; border: 0; cursor: pointer;
	background: none; color: rgba(255,255,255,.65); font-size: 1.25rem;
}
.st-pfeil:hover { color: #fff; }
.st-pfeil:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Begrüßung */
.st-gruss {
	position: relative;
	background: var(--lfg-blau);
	padding-block: clamp(var(--sp-3), 3.5vw, var(--sp-4)) clamp(var(--sp-4), 5vw, var(--sp-5));
}
.st-uebergang {
	position: absolute; left: 0; right: 0; bottom: -1px; top: auto;
	width: 100%; height: auto; display: block;
	z-index: 2; pointer-events: none;
}
.st-gruss p {
	/* Blocksatz nur mit Silbentrennung, sonst große Lücken */
	margin: 0;
	font-size: clamp(1.3rem, 2.3vw, 2.05rem); font-weight: 500; line-height: 1.32;
	letter-spacing: -.015em; color: #fff;
	text-align: justify; hyphens: auto; -webkit-hyphens: auto;
}

/* Einbettungen */
.st-einbettung { position: relative; background: var(--lfg-blau); }
.st-einbettung--video { aspect-ratio: 16 / 9; }
.st-einbettung iframe { display: block; width: 100%; height: 100%; border: 0; }

.st-tor {
	position: absolute; inset: 0;
	display: grid; place-content: center; justify-items: center;
	gap: var(--sp-2); padding: var(--sp-3); text-align: center;
}
.st-tor__knopf {
	display: inline-flex; align-items: center; gap: .55em;
	padding: .7em 1.4em; border: 0; cursor: pointer;
	background: #fff; color: var(--lfg-blau);
	font-family: inherit; font-size: var(--t-s); font-weight: 600;
}
.st-tor__knopf ion-icon { font-size: 1.25em; }
.st-tor__knopf:hover { background: var(--lfg-flaeche); }
.st-tor__knopf:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.st-tor__hinweis { margin: 0; max-width: 40ch; font-size: var(--t-xs); line-height: 1.5; color: rgba(255,255,255,.75); }
.st-tor__hinweis a { color: #fff; }
.st-tor__merken { display: inline-flex; align-items: center; gap: .4em; font-size: var(--t-xs); color: rgba(255,255,255,.75); cursor: pointer; }

/* Kanäle */
/* max. 500px, breiter rendert das Facebook-Plugin nicht */
.st-kanaele {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 500px));
	justify-content: start;
	gap: var(--sp-2);
}
.st-kanal { display: flex; flex-direction: column; background: var(--lfg-flaeche); }
.st-abschnitt--flaeche .st-kanal { background: #fff; }
.st-kanal__kopf {
	display: flex; align-items: center; gap: .6em;
	padding: var(--sp-2); text-decoration: none; color: var(--lfg-blau);
}
.st-kanal__kopf h3 { margin: 0; font-size: var(--t-s); font-weight: 600; }
.st-kanal__zeichen { font-size: 1.5em; color: var(--lfg-blau); }
.st-kanal__kopf:hover { color: var(--lfg-blau); }
.st-kanal .st-einbettung { flex: 1; min-height: 26rem; }

/* Bereiche */
.st-kacheln { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-1); }
.st-kachel {
	position: relative; display: flex; align-items: flex-end; gap: var(--sp-2);
	aspect-ratio: 16 / 10; padding: var(--sp-2);
	background: var(--lfg-blau) center/cover no-repeat;
	color: #fff; text-decoration: none; overflow: hidden;
}
.st-kachel::before {
	content: ""; position: absolute; inset: 0;
	background: linear-gradient(180deg, rgba(var(--lfg-schatten), 0) 45%, rgba(var(--lfg-schatten), .75) 100%);
}
.st-kachel > * { position: relative; }
.st-kachel__wort { font-size: var(--t-m); font-weight: 500; line-height: 1.15; }
.st-kachel__weiter { margin-left: auto; font-size: 1.4em; }
.st-kachel, .st-kachel:hover, .st-kachel:focus { color: #fff; }
.st-kachel:hover .st-kachel__wort { text-decoration: underline; text-underline-offset: 4px; }
.st-kachel:focus-visible { outline: 3px solid var(--lfg-blau); outline-offset: 3px; }

/* Bedienung unter die Zeile */
@media (max-width: 63rem) {
	.st-hero__fuss { padding-bottom: 2.6rem; }
	.st-bedienung  { bottom: var(--sp-1); }
}

/* Handy quer */
@media (max-height: 30rem) {
	.st-boot { width: clamp(90px, 14vw, 150px); }
	.st-zahl__wert { font-size: clamp(1.3rem, 3vw, 2.1rem); }
	.st-zahl__was  { font-size: var(--t-xs); }
	.st-hero__fuss { padding-bottom: 2.4rem; }
}

/* Handy */
@media (max-width: 46rem) {
	/* Boot und Zahlen liegen auf der Welle, die Slide-Striche rutschen in den Block darunter */
	.st-hero { overflow: visible; z-index: 2; }
	.st-hero__bilder, .st-hero__schleier { overflow: hidden; }
	.st-hero__inhalt { padding-block: clamp(var(--sp-2), 4vh, var(--sp-3)) 0; }
	.st-bedienung { bottom: -3.4rem; }
	.st-gruss { padding-top: 4.6rem; }
	.st-hero__titel { max-width: calc(100% - 60px); font-size: clamp(1.45rem, 6.6vw, 1.85rem); }
	.st-hero__fuss { flex-wrap: nowrap; gap: var(--sp-1); padding-bottom: 0; }
	.st-boot { width: clamp(84px, 27vw, 150px); }
	.st-zahlen { gap: clamp(.6rem, 3vw, var(--sp-2)); }
	.st-zahl__wert { font-size: clamp(1.45rem, 7.4vw, 2.1rem); }
	.st-zahl__was { font-size: clamp(.78rem, 3.4vw, 1rem); }
	.st-zahl:nth-child(1) { transform: translateY(0); }
	.st-zahl:nth-child(2) { transform: translateY(.35rem); }
	.st-zahl:nth-child(3) { transform: translateY(.7rem); }
	.st-kacheln { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
	.st-hero__bild { transition: none; }
	.st-boot { transition: none; }
	.st-boot img, .st-boot__welle.ist-welle { animation: none; }
	.st-boot { cursor: default; }
	.st-wort { transition: none !important; }
}
