/*
 * Eigene Story „Weil gutes Brot eine gute Zukunft verdient.“ (Heft 03/2025, S. 8) – Namensraum .koeck-gg, Präfix gg-.
 * Welt: Jede Zahl wird sichtbar. Weißer Grund, Fotos schwarz-weiß wie im Heft. Köck-Rot nur für den Raster der 48 Module,
 * die Linie des Wärmekreislaufs, die Nabe, die Kette und die Raute „Hard Facts“ – nie als Schriftfarbe.
 * Ohne JavaScript und bei „Bewegung reduzieren“ steht jede Grafik fertig da; .gg-lauf (gesetzt von gogreen.js) schaltet die
 * Anfangszustände ein. Alles Bewegte: transform, opacity, stroke-dashoffset.
 */
.koeck-gg {
	--gg-r: #ed6c84;       /* Köck-Rot (Website; Design-System #ed6c84) */
	--gg-rand: max(20px, env(safe-area-inset-left), env(safe-area-inset-right));
	--gg-ease: cubic-bezier(.23, 1, .32, 1);
	--gg-luft: clamp(72px, 16vw, 120px);
	container-type: inline-size; /* auf großen Bildschirmen begrenzt das Theme die Breite (--sm-b); alles misst sich daran */
	background: #fff;
	color: #000;
	font: 400 17px/1.6 var(--sans);
	overflow-x: clip;
}
.koeck-gg p { margin: 0; }
.koeck-gg p + p { margin-top: 1em; }
.koeck-gg figure { margin: 0; }
.koeck-gg img { display: block; width: 100%; height: auto; }
.koeck-gg figcaption { font: 400 14px/1.45 var(--sans); margin-top: 10px; max-width: 34em; }

/* Einblenden (3a): Text früh, Grafiken an der Leselinie; zurück zügig */
.koeck-gg [data-gg-auf] { transition: opacity 1.1s var(--gg-ease), transform 1.4s var(--gg-ease); transition-delay: calc(var(--sm-stufe, 0) * 100ms); }
.koeck-gg.gg-lauf [data-gg-auf]:not(.gg-auf) { opacity: 0; transform: translateY(20px); transition-duration: .45s, .6s; transition-delay: 0s; }

/* ---------- 1 · Kopf ---------- */
.koeck-gg .gg-kopf { padding: max(76px, calc(env(safe-area-inset-top) + 64px)) var(--gg-rand) 0; }
.koeck-gg .gg-titel { margin: 0; font: 300 max(34px, min(11vw, 60px))/1.02 var(--serif); letter-spacing: -.015em; text-wrap: balance; hyphens: none; max-width: 14em; }
.koeck-gg .gg-zaehler { list-style: none; margin: 26px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid #000; border-bottom: 1px solid #000; } /* taste-skill-ignore: Zählerleiste wie die Hard Facts im Heft */
.koeck-gg .gg-zaehler li { padding: 12px 12px 14px 0; min-width: 0; }
.koeck-gg .gg-zaehler li + li { border-left: 1px solid #000; padding-left: 12px; }
.koeck-gg .gg-zaehler b { display: block; font: 300 max(26px, min(8vw, 40px))/1.05 var(--serif); font-variant-numeric: tabular-nums; white-space: nowrap; }
.koeck-gg .gg-zaehler span { display: block; margin-top: 6px; font-size: 14px; line-height: 1.4; }
.koeck-gg .gg-pero { margin: 30px calc(var(--gg-rand) * -1) 0; }
.koeck-gg .gg-pero img { aspect-ratio: 3 / 2; object-fit: cover; object-position: 60% 50%; }
.koeck-gg .gg-pero figcaption { padding: 0 var(--gg-rand); }
.koeck-gg .gg-vor { margin-top: 40px; font: 300 max(20px, min(5.6vw, 24px))/1.42 var(--sans); max-width: 30em; }

/* ---------- Abschnitte ---------- */
.koeck-gg .gg-abschnitt { padding: var(--gg-luft) var(--gg-rand) 0; }
.koeck-gg .gg-h { margin: 0 0 22px; font: 300 max(26px, min(8.4vw, 40px))/1.06 var(--serif); letter-spacing: -.01em; text-wrap: balance; hyphens: none; max-width: 16em; }
.koeck-gg .gg-text { margin-top: 30px; max-width: 34em; }
.koeck-gg .gg-brot { padding-top: 40px; } /* der Ofen-Text endet mit „… gilt auch für unser Brot:“ – die Antwort folgt gleich */
.koeck-gg .gg-foto { margin-top: 30px; }

/* 2 · Sonne: 48 Module im Köck-Raster (8 × 6) */
.koeck-gg .gg-dach { display: grid; grid-template-columns: repeat(8, 1fr); border-top: 1px solid var(--gg-r); border-left: 1px solid var(--gg-r); } /* taste-skill-ignore: Köck-Raster (CI) */
.koeck-gg .gg-m { position: relative; aspect-ratio: 1; border-right: 1px solid var(--gg-r); border-bottom: 1px solid var(--gg-r); }
.koeck-gg .gg-m::after { content: ""; position: absolute; inset: 3px; background: var(--gg-r); transition: opacity .45s var(--gg-ease), transform .6s var(--gg-ease); }
.koeck-gg.gg-lauf .gg-m:not(.gg-an)::after { opacity: 0; transform: scale(.82); }
.koeck-gg.gg-lauf .gg-m.gg-an::after { transition-duration: 1.1s, 1.4s; }
.koeck-gg .gg-dach-zahlen { display: flex; justify-content: space-between; gap: 12px; margin-top: 12px; max-width: none; font-size: 14px; }
.koeck-gg .gg-dach-zahlen b { display: block; font: 300 28px/1 var(--serif); font-variant-numeric: tabular-nums; }
.koeck-gg .gg-balken { margin-top: 26px; }
.koeck-gg .gg-balken p { font-size: 14px; }
.koeck-gg .gg-balken > i { display: block; height: 12px; margin-top: 8px; border: 1px solid #000; }
.koeck-gg .gg-balken > i > i { display: block; height: 100%; width: 99.3%; background: #000; transform-origin: 0 50%; transition: transform 1.4s var(--gg-ease) .2s; }
.koeck-gg.gg-lauf .gg-balken:not(.gg-voll) > i > i { transform: scaleX(0); transition-duration: .6s; transition-delay: 0s; } /* füllt sich, wenn alle 48 Module leuchten (am Scrollen, 3a) */

/* 3 · Straße */
.koeck-gg .gg-strasse { padding-top: var(--gg-luft); }
.koeck-gg .gg-strasse-bild { margin: 0 calc(var(--gg-rand) * -1) 34px; }
.koeck-gg .gg-strasse-bild img { aspect-ratio: 4 / 3; object-fit: cover; object-position: 45% 30%; }
.koeck-gg .gg-woche { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid #000; }
.koeck-gg .gg-woche li { position: relative; isolation: isolate; display: grid; place-items: center; min-height: 48px; font: 600 15px/1 var(--sans); color: #fff; border-right: 1px solid #000; transition: color .8s var(--gg-ease); }
.koeck-gg .gg-woche li:last-child { border-right: 0; }
.koeck-gg .gg-woche li::before { content: ""; position: absolute; inset: 0; z-index: -1; background: #000; transform-origin: 0 50%; transition: transform 1.1s var(--gg-ease); } /* der Tag füllt sich von links */
.koeck-gg .gg-woche .gg-frei { color: #5f5f5f; }  /* Sonntag: keine Lieferung (Kontrast 6,4:1) */
.koeck-gg .gg-woche .gg-frei::before { display: none; }
.koeck-gg.gg-lauf .gg-woche .gg-tag:not(.gg-an) { color: #000; transition-duration: .45s; }
.koeck-gg.gg-lauf .gg-woche .gg-tag:not(.gg-an)::before { transform: scaleX(0); transition-duration: .6s; }
.koeck-gg .gg-woche-weg figcaption { font-size: 14px; }

/* 4 · Wind: das Rad dreht sich mit dem Scrollen */
.koeck-gg .gg-wind-kopf { display: grid; grid-template-columns: clamp(64px, 20vw, 110px) minmax(0, 1fr); gap: 18px; align-items: start; }
.koeck-gg .gg-rad { width: 100%; height: auto; overflow: visible; }
.koeck-gg .gg-mast { fill: #000; }
.koeck-gg .gg-rotor path { fill: #fff; stroke: #000; stroke-width: 1.6; stroke-linejoin: round; }
.koeck-gg .gg-rotor { transform-box: view-box; transform-origin: 50px 50px; }
.koeck-gg .gg-nabe { fill: var(--gg-r); }
.koeck-gg .gg-scherzl { margin-top: 4px; max-width: 34em; }
.koeck-gg .gg-foto--hoch { max-width: 420px; }
.koeck-gg .gg-foto--hoch + p { margin-top: 26px; }

/* 5 · Ofen: Wärmekreislauf */
.koeck-gg .gg-kreis { display: block; width: 100%; max-width: 440px; height: auto; overflow: visible; font: 400 15px/1 var(--sans); }
.koeck-gg .gg-bahn { fill: none; stroke: var(--gg-r); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.koeck-gg .gg-spitze { fill: none; stroke: var(--gg-r); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; transition: opacity .45s; }
.koeck-gg .gg-k rect { fill: #fff; stroke: #000; stroke-width: 1; }
.koeck-gg .gg-k text { text-anchor: middle; fill: #000; }
.koeck-gg .gg-k .gg-klein { font-size: 13px; }
.koeck-gg .gg-k { transition: opacity .45s var(--gg-ease), transform .6s var(--gg-ease); transform-box: fill-box; transform-origin: 50% 50%; }
.koeck-gg.gg-lauf .gg-k:not(.gg-an) { opacity: 0; transform: scale(.94); }
.koeck-gg.gg-lauf .gg-k.gg-an { transition-duration: 1.1s, 1.4s; }
.koeck-gg.gg-lauf .gg-kreis-weg:not(.gg-fertig) .gg-spitze { opacity: 0; }

/* 6 · Brot: Kette der zweiten Chance – rote Linie, rote Felder */
.koeck-gg .gg-kette { list-style: none; margin: 0; padding: 0; position: relative; }
.koeck-gg .gg-kette li { position: relative; padding: 0 0 22px 34px; transition: opacity 1.1s var(--gg-ease), transform 1.4s var(--gg-ease); }
.koeck-gg .gg-kette li:last-child { padding-bottom: 0; }
.koeck-gg .gg-kette li:not(:last-child)::after { content: ""; position: absolute; left: 7px; top: 15px; bottom: -15px; width: 2px; background: var(--gg-r); } /* Linie zum nächsten Feld, endet am letzten */
.koeck-gg .gg-kette li::before { content: ""; position: absolute; z-index: 1; left: 0; top: 7px; width: 16px; height: 16px; background: var(--gg-r); box-shadow: 0 0 0 4px #fff; } /* taste-skill-ignore: weißer Abstand um das Feld, kein Schatten */
.koeck-gg .gg-kette b { display: block; font: 300 max(22px, min(6.4vw, 30px))/1.15 var(--serif); }
.koeck-gg .gg-kette span { display: block; margin-top: 4px; font-size: 15px; line-height: 1.4; }
.koeck-gg.gg-lauf .gg-kette li:not(.gg-an) { opacity: 0; transform: translateY(16px); transition-duration: .45s, .6s; }

/* 7 · Uhr und Weg */
.koeck-gg .gg-uhr { display: block; width: clamp(96px, 28vw, 150px); height: auto; margin-bottom: 20px; overflow: visible; }
.koeck-gg .gg-zifferblatt { fill: #fff; stroke: #000; stroke-width: 2; }
.koeck-gg .gg-striche line { stroke: #000; stroke-width: 2; }
.koeck-gg .gg-minute { stroke: #000; stroke-width: 2.5; stroke-linecap: round; transform-box: view-box; transform-origin: 60px 60px; transform: rotate(0deg); }
.koeck-gg .gg-stunde { stroke: var(--gg-r); stroke-width: 5; stroke-linecap: round; transform-box: view-box; transform-origin: 60px 60px; transform: rotate(90deg); }
.koeck-gg .gg-weg { margin: var(--gg-luft) calc(var(--gg-rand) * -1) 0; }
.koeck-gg .gg-weg img { aspect-ratio: 3 / 2; object-fit: cover; object-position: 30% 60%; }

/* 8 · Hard Facts: roter Rahmen, Raute wie beim Mandelcroissant */
.koeck-gg .gg-fakten { position: relative; margin: calc(var(--gg-luft) + 30px) var(--gg-rand) var(--gg-luft); border: 2px solid var(--gg-r); padding: 46px 20px 18px; max-width: 760px; }
.koeck-gg .gg-raute { position: absolute; top: -52px; right: 12px; width: 108px; height: 108px; margin: 0; display: grid; place-items: center; transform: rotate(-7deg); }
.koeck-gg .gg-raute::before, .koeck-gg .gg-raute::after { content: ""; position: absolute; inset: 14.6%; border-radius: 10%; transform: rotate(45deg); }
.koeck-gg .gg-raute::before { background: var(--gg-r); }
.koeck-gg .gg-raute::after { inset: 16.8%; border: 1px solid #fff; border-radius: 7%; }
.koeck-gg .gg-raute span { position: relative; z-index: 1; width: 60%; font: 400 18px/1.02 var(--serif); text-align: center; color: #000; }
.koeck-gg .gg-fakten ul { list-style: none; margin: 0; padding: 0; }
.koeck-gg .gg-fakten li { padding: 12px 0; border-bottom: 1px solid #000; font-size: 15px; line-height: 1.45; } /* taste-skill-ignore: Liste wie im Heft */
.koeck-gg .gg-fakten li:last-child { border-bottom: 0; padding-bottom: 4px; }
.koeck-gg .gg-fakten b { display: block; font-weight: 600; }

/* ---------- schmale Handys und Zoom ---------- */
@media (max-width: 359px) {
	.koeck-gg .gg-zaehler { grid-template-columns: 1fr; }
	.koeck-gg .gg-zaehler li + li { border-left: 0; border-top: 1px solid #000; padding-left: 0; }
	.koeck-gg .gg-woche li { font-size: 13px; }
}

/* sehr schmal (Zoom 200 %): Windrad über die Überschrift, Kreislauf als Liste statt kleiner Grafik */
.koeck-gg .gg-kreis-liste { display: none; }
@container (max-width: 300px) {
	.koeck-gg .gg-wind-kopf { grid-template-columns: 1fr; }
	.koeck-gg .gg-rad { width: 64px; }
	.koeck-gg .gg-kreis { display: none; }
	.koeck-gg .gg-kreis-liste { display: block; list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--gg-r); }
	.koeck-gg .gg-kreis-liste li { padding: 4px 0 4px 12px; }
}

/* ---------- quer am Handy ---------- */
@media (orientation: landscape) and (max-height: 540px) and (max-width: 999px) {
	.koeck-gg .gg-kopf { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 28px; align-items: start; }
	.koeck-gg .gg-pero { margin: 0; grid-row: span 2; }
	.koeck-gg .gg-pero figcaption { padding: 0; }
	.koeck-gg .gg-vor { grid-column: 1 / -1; }
	.koeck-gg .gg-titel { font-size: max(30px, min(5vw, 44px)); }
	.koeck-gg .gg-zaehler b { font-size: clamp(20px, 3.4cqi, 34px); }
	.koeck-gg .gg-dach-weg, .koeck-gg .gg-woche-weg, .koeck-gg .gg-kreis { max-width: 420px; }
	.koeck-gg .gg-text, .koeck-gg .gg-scherzl, .koeck-gg .gg-vor { max-width: 28em; }
	.koeck-gg .gg-strasse-bild img, .koeck-gg .gg-weg img { aspect-ratio: 21 / 9; }
}

/* ---------- Tablet ---------- */
@media (min-width: 700px) and (max-width: 999px) {
	.koeck-gg { --gg-rand: max(40px, env(safe-area-inset-left), env(safe-area-inset-right)); font-size: 18px; }
	.koeck-gg .gg-dach-weg, .koeck-gg .gg-woche-weg { max-width: 560px; }
	.koeck-gg .gg-text, .koeck-gg .gg-scherzl { max-width: 28em; }
	.koeck-gg .gg-strasse-bild img, .koeck-gg .gg-weg img { aspect-ratio: 16 / 9; }
}

/* ---------- Desktop: zwei Spalten, Grafik und Text wechseln die Seite ---------- */
@media (min-width: 1000px) {
	.koeck-gg { --gg-luft: clamp(130px, 12vw, 220px); font-size: 19px; }
	.koeck-gg > * { --gg-rand: max(48px, 4cqi); }
	.koeck-gg figcaption { font-size: 15px; }
	.koeck-gg .gg-kopf { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); grid-template-rows: auto auto; column-gap: clamp(48px, 5vw, 96px); align-items: end; padding-top: max(96px, 7vw); }
	.koeck-gg .gg-kopf-text { grid-column: 1; grid-row: 1; }
	.koeck-gg .gg-titel { font-size: clamp(56px, 4.6cqi, 112px); max-width: 9.5em; }
	.koeck-gg .gg-zaehler { margin-top: 40px; }
	.koeck-gg .gg-zaehler b { font-size: clamp(34px, 2.6cqi, 60px); }
	.koeck-gg .gg-pero { grid-column: 2; grid-row: 1; margin: 0; }
	.koeck-gg .gg-pero figcaption { padding: 0; max-width: 30em; }
	.koeck-gg .gg-vor { grid-column: 1 / -1; margin-top: clamp(64px, 6vw, 110px); font-size: clamp(24px, 1.7vw, 32px); max-width: 30em; }

	.koeck-gg .gg-abschnitt { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: clamp(56px, 7vw, 140px); align-items: start; }
	.koeck-gg .gg-text { margin-top: 0; max-width: 27em; }
	.koeck-gg .gg-brot { padding-top: clamp(48px, 4vw, 72px); }
	.koeck-gg .gg-grafik { position: sticky; top: max(90px, 12vh); }
	.koeck-gg .gg-h { font-size: clamp(40px, 3cqi, 70px); max-width: 14em; }
	.koeck-gg .gg-dach-zahlen b { font-size: clamp(30px, 2.2vw, 42px); }
	.koeck-gg .gg-dach-zahlen, .koeck-gg .gg-balken p, .koeck-gg .gg-woche-weg figcaption { font-size: 15px; }

	/* Straße: Foto über die ganze Breite, darunter Grafik | Text */
	.koeck-gg .gg-strasse-bild { grid-column: 1 / -1; margin: 0 calc(var(--gg-rand) * -1) clamp(56px, 5vw, 96px); }
	.koeck-gg .gg-strasse-bild img { aspect-ratio: auto; height: min(78svh, 56vw); }
	.koeck-gg .gg-woche li { min-height: 60px; font-size: 17px; }

	/* Wind und Brot: Text links, Grafik rechts */
	.koeck-gg .gg-wind .gg-grafik, .koeck-gg .gg-brot .gg-grafik { grid-column: 2; grid-row: 1; }
	.koeck-gg .gg-wind .gg-text, .koeck-gg .gg-brot .gg-text { grid-column: 1; grid-row: 1; }
	.koeck-gg .gg-foto { margin-top: 40px; }
	.koeck-gg .gg-foto--hoch { margin-top: 0; max-width: 460px; }
	.koeck-gg .gg-kreis { max-width: 520px; font-size: 15px; }
	.koeck-gg .gg-kette b { font-size: clamp(28px, 2vw, 38px); }
	.koeck-gg .gg-kette li { padding-bottom: 30px; }

	.koeck-gg .gg-welt .gg-grafik { position: static; }
	.koeck-gg .gg-weg { grid-column: 1 / -1; }
	.koeck-gg .gg-weg img { aspect-ratio: auto; height: min(80svh, 52vw); }
	.koeck-gg .gg-fakten { margin-left: auto; margin-right: auto; padding: 56px 40px 24px; }
	.koeck-gg .gg-fakten li { font-size: 17px; }
	.koeck-gg .gg-raute { width: 132px; height: 132px; top: -64px; right: 28px; }
	.koeck-gg .gg-raute span { font-size: 22px; }
}
@media (min-width: 1000px) and (max-height: 700px) {
	.koeck-gg .gg-grafik { position: static; }
}
@media (min-width: 1800px) {
	.koeck-gg { font-size: 21px; }
	.koeck-gg figcaption, .koeck-gg .gg-zaehler span, .koeck-gg .gg-dach-zahlen, .koeck-gg .gg-balken p, .koeck-gg .gg-woche-weg figcaption, .koeck-gg .gg-kette span { font-size: 17px; }
	.koeck-gg .gg-fakten { max-width: 900px; }
	.koeck-gg .gg-fakten li { font-size: 19px; }
}
@media (min-width: 2400px) {
	.koeck-gg { font-size: clamp(24px, .95vw, 30px); }
	.koeck-gg figcaption, .koeck-gg .gg-zaehler span, .koeck-gg .gg-dach-zahlen, .koeck-gg .gg-balken p, .koeck-gg .gg-woche-weg figcaption, .koeck-gg .gg-kette span, .koeck-gg .gg-fakten li { font-size: .82em; }
	.koeck-gg .gg-text, .koeck-gg .gg-vor, .koeck-gg .gg-scherzl { max-width: 26em; }
	.koeck-gg .gg-fakten { max-width: 1100px; }
}

/* ---------- Hover nur mit Maus ---------- */

/* ---------- Bewegung reduzieren: alles fertig ---------- */
@media (prefers-reduced-motion: reduce) {
	.koeck-gg [data-gg-auf], .koeck-gg .gg-m::after, .koeck-gg .gg-woche li, .koeck-gg .gg-woche li::before, .koeck-gg .gg-k, .koeck-gg .gg-kette li, .koeck-gg .gg-balken > i > i { transition: none !important; opacity: 1 !important; transform: none !important; }
	.koeck-gg .gg-woche .gg-tag { color: #fff !important; }
	.koeck-gg .gg-bahn { stroke-dashoffset: 0 !important; }
	.koeck-gg .gg-spitze { opacity: 1 !important; }
	.koeck-gg .gg-stunde { transform: rotate(90deg) !important; }
}
@media print {
	.koeck-gg [data-gg-auf], .koeck-gg .gg-m::after, .koeck-gg .gg-k, .koeck-gg .gg-kette li { opacity: 1 !important; transform: none !important; }
}

/* Lesefortschritt oben in der Rasterfarbe dieser Story (sonst Theme-Grün) */
body:has(.koeck-gg) .sm-fortschritt i { background: #ed6c84; }
