/*
Theme Name: Immer wieder neu
Author: Voelkl IT
Description: Eigenes Block-Theme für Mathilde und Bianca. Nachtviolett, Malve, Gold, Fäden und Herz. Nach dem Muster des Iwicki-Themes.
Version: 0.2.0
Requires at least: 6.7
Requires PHP: 8.1
Text Domain: immerwiederneu
*/

:root {
	--iwn-nacht: var(--wp--preset--color--nacht, #241A2B);
	--iwn-papier: var(--wp--preset--color--papier, #F8F3F7);
	--iwn-malve: var(--wp--preset--color--malve, #EFE5ED);
	--iwn-pflaume: var(--wp--preset--color--pflaume, #4F3350);
	--iwn-mauve: var(--wp--preset--color--mauve, #7A5A73);
	--iwn-magenta: var(--wp--preset--color--magenta, #A8306C);
	--iwn-gold: var(--wp--preset--color--gold, #F7B955);
	--iwn-tinte: var(--wp--preset--color--tinte, #2B2230);
	--iwn-grau: var(--wp--preset--color--grau, #62555F);
	--iwn-linie: var(--wp--preset--color--linie, #E2D2DE);
	--iwn-kante: var(--wp--preset--color--kante, #C9B4C4);
	/* Aus Design/main.html: Schrift auf dunklem Grund. */
	--iwn-hell: #F6EEF4;
	--iwn-tief: #170F1E;
	--iwn-licht: #FFE08A;
	--iwn-titelschrift: var(--wp--preset--font-family--alegreya, Alegreya, Georgia, serif);
	--iwn-handschrift: var(--wp--preset--font-family--caveat, Caveat, cursive);
	--iwn-rand: clamp(16px, 4vw, 24px);
	--iwn-luft: clamp(64px, 9vw, 120px);
	--iwn-rund: 14px;
	--iwn-schatten: 0 18px 40px -22px rgba(36, 26, 43, .55);
	/* Abdunkelung unter hellem Text. Über einem Foto kommt --iwn-fotoschleier dazu (functions.php), zusammen hält das auch auf einem ganz weißen Foto 4,5:1. */
	--iwn-schleier: rgba(23, 15, 30, .58);
	--iwn-weich: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Grundlagen ---------- */
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body { margin: 0; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid var(--iwn-magenta); outline-offset: 2px; }
.iwn-band--nacht :focus-visible, .iwn-kopf :focus-visible, .iwn-fuss :focus-visible { outline-color: var(--iwn-gold); }
h1, h2, h3 { text-wrap: balance; overflow-wrap: break-word; hyphens: manual; margin-block: 0; letter-spacing: -.005em; }
p { text-wrap: pretty; overflow-wrap: break-word; }
.wp-site-blocks { padding: 0; }
body .wp-site-blocks > * { margin-block: 0; }
body .iwn-band, body main > * { margin-block: 0; }

/* Offene Stellen sind bis zum Start sichtbar und per Suche nach "iwn-offen" auffindbar. */
mark.iwn-offen { background: #FFF1B8; color: #2B2230; padding: 0 .2em; border-radius: 2px; font-family: 'Alegreya Sans', 'Segoe UI', sans-serif; font-weight: 400; font-size: .8em; letter-spacing: 0; -webkit-text-fill-color: #2B2230; }

/* ---------- Bildplätze: Foto aus assets/img/fotos über der eigenen Zeichnung, Regeln in bilder.css ---------- */
:where(.iwn-bild) { --iwn-bild: url(assets/img/motive/morgenlicht.svg); --iwn-fotoschleier: none; }
.iwn-bild { position: relative; overflow: hidden; isolation: isolate; background-color: var(--iwn-nacht); }
.iwn-bild::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: var(--iwn-bild); background-size: cover; background-position: center; transition: transform 1.4s var(--iwn-weich); }

/* ---------- Abschnitte: eine Breite, ein Rand, gleiche linke Kanten ---------- */
.iwn-band { position: relative; width: 100%; overflow-x: clip; }
.iwn-band--papier { background: var(--iwn-papier); color: var(--iwn-tinte); }
.iwn-band--malve { background: var(--iwn-malve); color: var(--iwn-tinte); }
.iwn-band--nacht { background: var(--iwn-nacht); color: var(--iwn-hell); }
.iwn-band--nacht h1, .iwn-band--nacht h2, .iwn-band--nacht h3 { color: inherit; }
.iwn-band--nacht a { color: var(--iwn-hell); }
.iwn-band--nacht a:hover { color: var(--iwn-gold); }
.iwn-innen { position: relative; max-width: 1200px; margin-inline: auto; padding: var(--iwn-luft) var(--iwn-rand); box-sizing: border-box; }
body .iwn-innen > * { margin-block: 0; }
body .iwn-innen > * + * { margin-block-start: 18px; }
body .iwn-innen > h2:not(:first-child) { margin-block-start: 48px; }
body .iwn-innen > .wp-block-post-content > * { margin-block: 0; }
body .iwn-innen > .wp-block-post-content > * + * { margin-block-start: 16px; }
body .iwn-innen > .wp-block-post-content > h2:not(:first-child) { margin-block-start: 40px; }
body .iwn-innen > .iwn-karten, body .iwn-innen > .iwn-neun, body .iwn-innen > .iwn-kacheln, body .iwn-innen > .wp-block-buttons { margin-block-start: 36px; }

/* Goldener Faden als Übergang zwischen hellen Abschnitten. */
.iwn-band--malve::before, .iwn-band--papier + .iwn-band--papier::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 90px; background: url(assets/img/motive/fadenband.svg) center / 100% 100% no-repeat; opacity: .55; pointer-events: none; }

.iwn-band h2 { font-size: clamp(2.25rem, 4.6vw, 3.75rem); line-height: 1.06; }
.iwn-kicker { font-family: var(--iwn-handschrift); font-weight: 600; font-size: clamp(1.75rem, 3vw, 2.25rem); line-height: 1.15; color: var(--iwn-magenta); }
.iwn-band--nacht .iwn-kicker { color: var(--iwn-licht); }
.iwn-band--nacht .iwn-kicker a { color: inherit; }
.iwn-vorspann { max-width: 34em; font-size: clamp(1.1875rem, 1.9vw, 1.4375rem); line-height: 1.5; }
.iwn-lese { max-width: 42em; }
.iwn-klein { font-size: var(--wp--preset--font-size--klein, 1rem); color: var(--iwn-grau); }
.iwn-band--nacht .iwn-klein { color: inherit; }

/* ---------- Knöpfe ---------- */
.wp-block-button__link { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; min-height: 52px; box-sizing: border-box; border-radius: 999px; text-align: center; text-decoration: none; transition: transform .25s var(--iwn-weich), box-shadow .25s var(--iwn-weich), background-color .25s, color .25s; }
.wp-block-button__link:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -12px rgba(36, 26, 43, .7); }
.iwn-knopf-gold .wp-block-button__link { background: linear-gradient(135deg, var(--iwn-licht), var(--iwn-gold) 55%, #F4874B); color: var(--iwn-nacht); }
.iwn-knopf-gold .wp-block-button__link:hover { background: linear-gradient(135deg, #FFF3CF, var(--iwn-licht) 55%, var(--iwn-gold)); color: var(--iwn-nacht); }
.iwn-knopf-gold .wp-block-button__link::after { content: ""; position: absolute; inset: -40% auto -40% -40%; width: 30%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .75), transparent); transform: skewX(-18deg); transition: left .7s var(--iwn-weich); }
.iwn-knopf-gold .wp-block-button__link:hover::after { left: 120%; }
.is-style-outline .wp-block-button__link { background: transparent; color: var(--iwn-pflaume); border: 1px solid currentColor; font-weight: 500; }
.iwn-band--nacht .is-style-outline .wp-block-button__link { color: var(--iwn-hell); border-color: #C9A9C2; }
.is-style-outline .wp-block-button__link:hover { background: transparent; color: var(--iwn-magenta); }
.iwn-band--nacht .is-style-outline .wp-block-button__link:hover { color: var(--iwn-gold); }
.iwn-band--nacht .wp-block-button:not(.is-style-outline):not(.iwn-knopf-gold) .wp-block-button__link { background: var(--iwn-hell); color: var(--iwn-nacht); }
.iwn-band--nacht .wp-block-button:not(.is-style-outline):not(.iwn-knopf-gold) .wp-block-button__link:hover { background: var(--iwn-gold); color: var(--iwn-nacht); }
.wp-block-buttons { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Kopf ---------- */
.wp-block-template-part:has(> .iwn-kopf) { position: sticky; top: 0; z-index: 50; }
.admin-bar .wp-block-template-part:has(> .iwn-kopf) { top: 32px; }
.iwn-kopf { position: relative; background: rgba(23, 15, 30, .94); color: var(--iwn-hell); box-shadow: 0 1px 0 rgba(247, 185, 85, .28); }
.iwn-kopf__innen { max-width: 1200px; margin-inline: auto; padding: 10px var(--iwn-rand); box-sizing: border-box; display: flex; align-items: center; gap: 12px 24px; }
body .iwn-kopf__innen > * { margin-block: 0; }
.iwn-marke { display: flex; align-items: center; gap: 10px; margin-right: auto; color: var(--iwn-hell); text-decoration: none; font-family: var(--iwn-titelschrift); font-weight: 700; font-size: 1.5rem; line-height: 1.1; white-space: nowrap; }
.iwn-marke:hover { color: var(--iwn-gold); }
.iwn-marke img { width: 58px; height: 48px; object-fit: contain; display: block; transition: transform .6s var(--iwn-weich); }
.iwn-marke:hover img { transform: scale(1.08) rotate(-3deg); }
.iwn-menue summary { display: none; list-style: none; cursor: pointer; }
.iwn-menue summary::-webkit-details-marker { display: none; }
/* Am Rechner ist das Menü immer offen: bewegung.js öffnet die Klappe, neuere Browser schaffen es schon per CSS. */
@media (min-width: 1100px) { .iwn-menue::details-content { display: contents; content-visibility: visible; } }
.iwn-nav { font-weight: 500; }
.iwn-nav ul, .iwn-nav .wp-block-navigation__container { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 0; padding: 0; list-style: none; }
.iwn-nav a { position: relative; display: inline-flex; align-items: center; min-height: 44px; color: var(--iwn-hell); text-decoration: none; }
.iwn-nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 8px; height: 2px; background: var(--iwn-gold); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--iwn-weich); }
.iwn-nav a:hover { color: var(--iwn-gold); }
.iwn-nav a:hover::after, .iwn-nav a:focus-visible::after { transform: scaleX(1); }
.iwn-kopf__knopf .wp-block-button__link { min-height: 42px; padding: 6px 16px; font-size: 1rem; white-space: nowrap; }

/* ---------- Erster Eindruck der Startseite ---------- */
.iwn-held { position: relative; isolation: isolate; display: flex; align-items: center; min-height: calc(100svh - 68px); overflow: clip; background-color: var(--iwn-tief); }
.iwn-held::before { z-index: -4; background-position: 66% 100%; }
.iwn-held::after { content: ""; position: absolute; inset: 0; z-index: -3; background-image: linear-gradient(90deg, rgba(23, 15, 30, .9), rgba(23, 15, 30, .62) 42%, rgba(23, 15, 30, .08) 72%), linear-gradient(180deg, rgba(23, 15, 30, .72), rgba(23, 15, 30, .05) 62%), var(--iwn-fotoschleier, none); }
body .iwn-held > .wp-block-html, body .iwn-held > figure { margin: 0; }
.iwn-held__licht { position: absolute; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }
.iwn-held__licht::before { content: ""; position: absolute; left: 68%; top: 46%; width: min(120vh, 90vw); aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(closest-side, rgba(247, 185, 85, .42), rgba(168, 48, 108, .28) 48%, transparent); animation: iwn-atmen 8s ease-in-out infinite; }
.iwn-held__licht i { position: absolute; left: var(--x); top: var(--y); width: var(--g, 5px); height: var(--g, 5px); border-radius: 50%; background: radial-gradient(circle, #FFF3CF, rgba(247, 185, 85, .75) 40%, transparent 72%); opacity: 0; animation: iwn-funke var(--d, 8s) ease-in var(--v, 0s) infinite; }
.iwn-held__phoenix { position: absolute; z-index: -1; right: max(0px, calc((100vw - 1500px) / 2)); top: 50%; width: min(58vw, 108vh, 900px); margin: 0; translate: 0 -50%; transform: translate(var(--iwn-mx, 0px), var(--iwn-my, 0px)); transition: transform .9s var(--iwn-weich); }
.iwn-held__phoenix img { display: block; width: 100%; height: auto; animation: iwn-schweben 9s ease-in-out infinite; -webkit-mask-image: linear-gradient(90deg, transparent, #000 16%); mask-image: linear-gradient(90deg, transparent, #000 16%); }
.iwn-held > .iwn-innen { width: 100%; padding-block: clamp(40px, 7vh, 96px); }
.iwn-held__text { max-width: min(640px, 50%); }
body .iwn-held__text > * { margin-block: 0; }
body .iwn-held__text > * + * { margin-block-start: 22px; }
body .iwn-held__text > .iwn-kicker + h1 { margin-block-start: 6px; }
.iwn-held h1 { font-size: clamp(3.25rem, 6.4vw, 6.5rem); line-height: .98; letter-spacing: -.015em; }
@supports (-webkit-background-clip: text) {
	.iwn-held h1 { background: linear-gradient(100deg, #F6EEF4 0%, #F6EEF4 34%, var(--iwn-licht) 48%, var(--iwn-gold) 54%, #F6EEF4 68%, #F6EEF4 100%) 0 0 / 260% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: iwn-goldglanz 11s ease-in-out infinite; }
}
.iwn-held .iwn-klein { font-size: 1rem; }

/* Der Absatz gleich nach dem ersten Eindruck: groß gesetzt statt als Textblock auf dem Bild. */
.iwn-einstieg { max-width: 30em; margin: 0; font-family: var(--iwn-titelschrift); font-weight: 500; font-size: clamp(1.375rem, 2.5vw, 2.125rem); line-height: 1.32; color: var(--iwn-pflaume); }
.iwn-band:has(> .iwn-innen > .iwn-einstieg) > .iwn-innen { padding-block: clamp(56px, 7vw, 96px); }

@keyframes iwn-atmen { 0%, 100% { opacity: .75; scale: .96; } 50% { opacity: 1; scale: 1.04; } }
@keyframes iwn-schweben { 0%, 100% { transform: translateY(-1.2%); } 50% { transform: translateY(1.2%); } }
@keyframes iwn-funke { 0% { opacity: 0; transform: translateY(0) scale(.6); } 18% { opacity: 1; } 70% { opacity: .75; } 100% { opacity: 0; transform: translateY(-34vh) translateX(3vw) scale(1.1); } }
@keyframes iwn-goldglanz { 0%, 18% { background-position: 100% 0; } 72%, 100% { background-position: 0 0; } }

/* ---------- Karten: gemeinsame Grid-Zeilen, Bildkopf, Titel, Text, Preis und Knopf fluchten ---------- */
.iwn-karten { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.iwn-karten--breit { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 32px; }
.iwn-karten > .iwn-karte { display: grid; grid-template-rows: subgrid; row-gap: 12px; min-width: 0; margin: 0; }
.iwn-karten--3 > .iwn-karte { grid-row: span 3; }
.iwn-karten--4 > .iwn-karte { grid-row: span 4; }
.iwn-karten--5 > .iwn-karte { grid-row: span 5; }
.iwn-karten--6 > .iwn-karte { grid-row: span 6; }
.iwn-karten > .iwn-karte > * { margin: 0; min-width: 0; }
.iwn-band--malve .iwn-karte { background: var(--iwn-papier); padding: 24px; border-radius: var(--iwn-rund); }
/* Karten mit Bildkopf: Das Bild läuft bis an den Rand, alles andere hält denselben Einzug. */
.iwn-karten > .iwn-karte:has(> .iwn-karte__bild), .iwn-stempelt .iwn-karten > .iwn-karte { position: relative; padding: 0 0 22px; overflow: hidden; border-radius: var(--iwn-rund); background: #FFFFFF; box-shadow: var(--iwn-schatten); transition: transform .45s var(--iwn-weich), box-shadow .45s var(--iwn-weich); }
.iwn-band--malve .iwn-karten > .iwn-karte:has(> .iwn-karte__bild) { background: #FFFFFF; }
.iwn-karten > .iwn-karte:has(> .iwn-karte__bild) > *:not(.iwn-karte__bild), .iwn-stempelt .iwn-karten > .iwn-karte > * { margin-inline: 22px; }
.iwn-karten > .iwn-karte:has(> .iwn-karte__bild):hover { transform: translateY(-6px); box-shadow: 0 30px 50px -26px rgba(36, 26, 43, .7); }
.iwn-karte__bild { aspect-ratio: 16 / 10; margin-block-end: 6px !important; }
.iwn-karte:hover .iwn-karte__bild::before { transform: scale(1.07); }
.iwn-karte--porträt .iwn-karte__bild, .iwn-karten--breit .iwn-karte__bild { aspect-ratio: 4 / 3; }
/* Knopf füllt seine Grid-Zeile: Auch wenn ein Text umbricht, bleiben Ober- und Unterkante gleich. */
.iwn-karte .wp-block-buttons { display: flex; align-self: stretch; }
.iwn-karte .wp-block-button { display: flex; flex: 1 1 100%; margin: 0; }
.iwn-karte .wp-block-button__link { display: flex; width: 100%; height: auto; }
.iwn-karte ul { padding-left: 1.1em; }
.iwn-karte li + li { margin-top: 6px; }
.iwn-karte h3, .iwn-karte h2 { font-size: var(--wp--preset--font-size--karte, 1.75rem); line-height: 1.15; }
.iwn-preis { font-family: var(--iwn-titelschrift); font-weight: 700; font-size: 1.875rem; line-height: 1.2; color: var(--iwn-magenta); align-self: end; }
.iwn-preiszeile { font-size: var(--wp--preset--font-size--klein, 1rem); line-height: 1.35; color: var(--iwn-grau); }

/* ---------- Bild und Text im großen Paar: Das Bild läuft bis an den Fensterrand ---------- */
.iwn-paar { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
body .iwn-paar > * { margin-block: 0; min-width: 0; }
.iwn-paar__bild { min-height: clamp(320px, 42vw, 620px); margin-inline-start: calc((min(100vw, 1200px) - 100vw) / 2 - var(--iwn-rand)); border-start-end-radius: 28px; border-end-end-radius: 28px; }
.iwn-paar__bild::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(247, 185, 85, .35); pointer-events: none; }
.iwn-paar:hover .iwn-paar__bild::before { transform: scale(1.04); }
.iwn-paar--gespiegelt { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.iwn-paar--gespiegelt > .iwn-paar__bild { order: 2; margin-inline: 0 calc((min(100vw, 1200px) - 100vw) / 2 - var(--iwn-rand)); border-radius: 28px 0 0 28px; }
body .iwn-paar__text > * { margin-block: 0; }
body .iwn-paar__text > * + * { margin-block-start: 18px; }
body .iwn-paar__text > .iwn-kicker + h2 { margin-block-start: 4px; }
body .iwn-paar__text > h2:not(:first-child) { margin-block-start: 40px; }
body .iwn-paar__text > .wp-block-buttons { margin-block-start: 28px; }
body .iwn-innen > .iwn-paar + .iwn-karten { margin-block-start: clamp(40px, 6vw, 72px); }

/* ---------- Bilder über die volle Breite mit Text darauf ---------- */
.iwn-bildband { display: flex; align-items: center; min-height: clamp(460px, 74vh, 760px); background-color: var(--iwn-tief); }
.iwn-bildband::after { content: ""; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(var(--iwn-schleier), var(--iwn-schleier)), var(--iwn-fotoschleier, none); pointer-events: none; }
.iwn-bildband > .iwn-innen { width: 100%; }
@media (min-width: 1200px) {
	.iwn-bildband:not(.iwn-bildband--mitte)::after { background-image: linear-gradient(90deg, rgba(23, 15, 30, .8), rgba(23, 15, 30, .56) 64%, rgba(23, 15, 30, .06)), var(--iwn-fotoschleier, none); }
}
.iwn-bildband--mitte { min-height: clamp(520px, 88vh, 900px); }
.iwn-bildband--mitte::after { background-image: radial-gradient(ellipse 88% 72% at 50% 50%, rgba(23, 15, 30, .64), rgba(23, 15, 30, .58) 76%, rgba(23, 15, 30, .16)), var(--iwn-fotoschleier, none); }
.iwn-bildband .iwn-lese, .iwn-bildband .iwn-vorspann { max-width: 36em; }

/* ---------- Seitenkopf: Der erste nachtfarbene Abschnitt jeder Seite trägt ihr Bild, festgelegt über die Klasse am body ---------- */
:is(main, main > .wp-block-post-content) > .iwn-band--nacht:first-child:not(.iwn-held, .iwn-bildband, :has(#iwn-sitzungsraum)) { isolation: isolate; display: flex; align-items: flex-end; min-height: clamp(380px, 66vh, 680px); background-color: var(--iwn-tief); }
:is(main, main > .wp-block-post-content) > .iwn-band--nacht:first-child:not(.iwn-held, .iwn-bildband, :has(#iwn-sitzungsraum))::before { content: ""; position: absolute; inset: 0; z-index: -2; background-image: var(--iwn-bild, url(assets/img/motive/morgenlicht.svg)); background-size: cover; background-position: center; animation: iwn-langsam 24s ease-out both; }
:is(main, main > .wp-block-post-content) > .iwn-band--nacht:first-child:not(.iwn-held, .iwn-bildband, :has(#iwn-sitzungsraum))::after { content: ""; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(var(--iwn-schleier), var(--iwn-schleier)), var(--iwn-fotoschleier, none); }
@media (min-width: 1200px) {
	:is(main, main > .wp-block-post-content) > .iwn-band--nacht:first-child:not(.iwn-held, .iwn-bildband, :has(#iwn-sitzungsraum))::after { background-image: linear-gradient(90deg, rgba(23, 15, 30, .8), rgba(23, 15, 30, .56) 64%, rgba(23, 15, 30, .06)), var(--iwn-fotoschleier, none); }
}
:is(main, main > .wp-block-post-content) > .iwn-band--nacht:first-child:not(.iwn-held, .iwn-bildband, :has(#iwn-sitzungsraum)) > .iwn-innen { width: 100%; padding-block-end: clamp(40px, 6vw, 72px); }
:is(main, main > .wp-block-post-content) > .iwn-band--nacht:first-child:not(.iwn-held) h1, .iwn-band--nacht:first-child .wp-block-post-title { font-size: clamp(2.75rem, 6.2vw, 5.5rem); line-height: 1.02; letter-spacing: -.012em; color: var(--iwn-hell); }
@media (min-width: 1200px) {
	:is(main, main > .wp-block-post-content) > .iwn-band--nacht:first-child:not(.iwn-held) h1, .iwn-band--nacht:first-child .wp-block-post-title { max-width: 62%; }
	:is(main, main > .wp-block-post-content) > .iwn-band--nacht:first-child:not(.iwn-held) .iwn-vorspann { max-width: 60%; }
}
.single-iwn_lektion main > .iwn-band--nacht:first-child { min-height: clamp(280px, 40vh, 420px) !important; }
.single-iwn_lektion main > .iwn-band--nacht:first-child .wp-block-post-title { font-size: clamp(2.25rem, 4.6vw, 3.75rem); }
.single-iwn_lektion .iwn-kicker { font-size: clamp(1.5rem, 2.4vw, 1.875rem); }
@keyframes iwn-langsam { from { transform: scale(1.08); } to { transform: scale(1); } }

/* ---------- Der Weg: neun Schritte als Aufstieg, der Phönix am Ziel ---------- */
.iwn-wegband { background: radial-gradient(70% 60% at 88% 8%, rgba(247, 185, 85, .32), transparent 70%), radial-gradient(60% 80% at 10% 100%, rgba(168, 48, 108, .34), transparent 70%), linear-gradient(180deg, var(--iwn-tief), var(--iwn-nacht) 50%, #33223A); }
/* Text und Zeichnung liegen übereinander: Die Kurve bleibt links unten, der Abstand unter dem Text hält sie frei, auch bei längeren Texten. */
.iwn-wegbuehne { position: relative; display: grid; }
body .iwn-wegbuehne > * { margin-block: 0; min-width: 0; grid-area: 1 / 1; }
.iwn-wegbuehne__text { position: relative; z-index: 1; align-self: start; max-width: min(540px, 46%); padding-block-end: 190px; }
body .iwn-wegbuehne__text > * { margin-block: 0; }
body .iwn-wegbuehne__text > * + * { margin-block-start: 16px; }
.iwn-wegbild { position: relative; align-self: end; pointer-events: none; }
.iwn-wegbild svg { position: relative; z-index: 1; display: block; width: 100%; height: auto; overflow: visible; }
.iwn-wegbild__klein { display: none !important; }
.iwn-wegbild__faden { fill: none; stroke-linecap: round; }
.iwn-wegbild__ziel { position: absolute; right: -1.3%; top: -10.5%; width: 36%; height: auto; }
.iwn-wegbild text { font-family: var(--iwn-titelschrift); font-weight: 700; font-size: 26px; fill: var(--iwn-hell); text-anchor: middle; dominant-baseline: central; }
.iwn-wegbild__punkt { fill: var(--iwn-tief); stroke: var(--iwn-gold); stroke-width: 2; }
.iwn-zeige .iwn-wegbild__faden, .iwn-zeige.iwn-wegbild .iwn-wegbild__faden { stroke-dasharray: 2600; stroke-dashoffset: 2600; transition: stroke-dashoffset 2.6s var(--iwn-weich); }
.iwn-zeige.ist-da .iwn-wegbild__faden { stroke-dashoffset: 0; }

/* Liste der Schritte: Der Text kommt aus der Quelle, die Spalten fluchten. */
.iwn-neun { list-style: none; margin: 0; padding: 0; counter-reset: iwn-schritt; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 clamp(20px, 3vw, 40px); }
body .iwn-neun > li { counter-increment: iwn-schritt; display: grid; grid-template-columns: 52px minmax(0, 1fr); align-items: start; margin: 0; padding: 18px 0; border-top: 1px solid rgba(247, 185, 85, .32); font-size: 1.1875rem; line-height: 1.3; transition: border-color .3s; }
body .iwn-neun > li:hover { border-top-color: var(--iwn-gold); }
.iwn-neun > li::before { content: counter(iwn-schritt); font-family: var(--iwn-titelschrift); font-weight: 700; font-size: 2rem; line-height: 1; color: var(--iwn-gold); }
.iwn-band--papier .iwn-neun > li::before, .iwn-band--malve .iwn-neun > li::before { color: var(--iwn-magenta); }
/* Karten der neun Schritte auf der Seite „Unser Weg“. */
.iwn-weg-karten .iwn-weg__nr { font-family: var(--iwn-titelschrift); font-weight: 700; font-size: 3rem; line-height: 1; background: linear-gradient(135deg, var(--iwn-licht), #F4874B); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.iwn-weg-karten .iwn-weg__name { font-family: var(--iwn-titelschrift); font-weight: 700; font-size: 1.5rem; line-height: 1.15; }
.iwn-weg-karten > .iwn-karte { padding: 24px; border-radius: var(--iwn-rund); background: rgba(246, 238, 244, .07); box-shadow: inset 0 0 0 1px rgba(247, 185, 85, .22); transition: background-color .35s, box-shadow .35s, transform .45s var(--iwn-weich); }
.iwn-weg-karten > .iwn-karte:hover { background: rgba(246, 238, 244, .12); box-shadow: inset 0 0 0 1px rgba(247, 185, 85, .6); transform: translateY(-4px); }

/* ---------- Lebensthemen als Bildkacheln: Bild oben, Titel in gemeinsamer Zeile ---------- */
.iwn-kacheln { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: clamp(140px, 17vw, 230px) auto; gap: 12px; }
body .iwn-kacheln > * { margin: 0; min-width: 0; }
.iwn-kachel { display: grid; grid-template-rows: subgrid; grid-row: span 2; row-gap: 0; border-radius: var(--iwn-rund); box-shadow: var(--iwn-schatten); transition: transform .45s var(--iwn-weich), box-shadow .45s var(--iwn-weich); }
body .iwn-kachel > p { grid-row: 2; margin: 0; padding: 14px 18px 18px; background: rgba(23, 15, 30, .76); font-family: var(--iwn-titelschrift); font-weight: 700; font-size: clamp(1.1875rem, 1.8vw, 1.4375rem); line-height: 1.15; color: var(--iwn-hell); }
.iwn-kachel a { color: var(--iwn-hell); text-decoration: none; }
.iwn-kachel a::after { content: ""; position: absolute; inset: 0; }
.iwn-kachel:hover { transform: translateY(-6px); box-shadow: 0 30px 50px -26px rgba(36, 26, 43, .8); }
.iwn-kachel:hover::before { transform: scale(1.09); }
.iwn-kachel:hover a { color: var(--iwn-gold); }
.iwn-kachel:focus-within { outline: 3px solid var(--iwn-magenta); outline-offset: 2px; }

/* ---------- Linkraster ---------- */
.iwn-linkraster { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); column-gap: 32px; }
body .iwn-linkraster > p { margin: 0; padding: 12px 0; border-top: 1px solid var(--iwn-kante); font-weight: 500; }

/* ---------- Zwei Spalten ---------- */
.iwn-zweispaltig { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 40px; align-items: center; }
.iwn-zweispaltig--oben { align-items: start; }
body .iwn-zweispaltig > * { margin-block: 0; min-width: 0; }
body .iwn-zweispaltig > .wp-block-group > * { margin-block: 0; }
body .iwn-zweispaltig > .wp-block-group > * + * { margin-block-start: 16px; }
body .iwn-zweispaltig > .wp-block-group > h2:not(:first-child) { margin-block-start: 40px; }
.iwn-zweispaltig h2 { font-size: clamp(1.75rem, 3vw, 2.25rem); }
.iwn-kontaktwege { margin: 0; padding: 0; list-style: none; }
.iwn-kontaktwege li + li { margin-top: 8px; }

/* ---------- Themenseiten: Überschrift links, Text rechts ---------- */
@media (min-width: 900px) {
	body .iwn-themainhalt { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); column-gap: clamp(32px, 5vw, 72px); row-gap: 16px; }
	body .iwn-innen > .iwn-themainhalt > * { grid-column: 2; margin-block: 0; }
	body .iwn-innen > .iwn-themainhalt > h2 { grid-column: 1; margin-block-start: 0; }
	body .iwn-innen > .iwn-themainhalt > h2:not(:first-child) { padding-block-start: 32px; border-top: 1px solid var(--iwn-kante); }
	body .iwn-innen > .iwn-themainhalt > h2:not(:first-child) + * { padding-block-start: 32px; border-top: 1px solid var(--iwn-kante); margin-inline-start: calc(-1 * clamp(32px, 5vw, 72px)); padding-inline-start: clamp(32px, 5vw, 72px); }
	body .iwn-innen > .iwn-themainhalt > .iwn-klein { grid-column: 1 / -1; margin-block-start: 24px; }
}
.iwn-themainhalt h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); line-height: 1.1; }

/* ---------- Kurs-, Lektions- und Terminseiten: Der Phönix steht als Bild neben dem Text ---------- */
@media (min-width: 1200px) {
	.iwn-kursinhalt::before { content: ""; float: right; width: 340px; aspect-ratio: 4 / 5; margin: 0 0 32px 48px; border-radius: var(--iwn-rund); background: url(assets/img/phoenix.svg) center / 88% no-repeat, radial-gradient(circle at 50% 42%, #5B2A4E, var(--iwn-nacht) 70%); box-shadow: var(--iwn-schatten); }
	.iwn-kursinhalt > .iwn-medien, .iwn-kursinhalt > .iwn-abfrage, .iwn-kursinhalt > .iwn-hausaufgabe, .iwn-kursinhalt > .iwn-anmeldung { overflow: hidden; }
}
.iwn-kursinhalt > .iwn-kursuebersicht { clear: both; }

/* ---------- Stempel „Coming soon“: Absatz löschen, sobald es Folgen gibt ---------- */
.iwn-stempelt, .iwn-medien { position: relative; }
.iwn-stempelt > .iwn-karten { opacity: .62; }
/* Podcasts & Videos: Das Bild steckt im Vorelement, das Markup der Seite bleibt unverändert. Regeln in bilder.css. */
.iwn-stempelt .iwn-karten--3 > .iwn-karte { grid-row: span 4; }
.iwn-stempelt .iwn-karte::before { content: ""; aspect-ratio: 16 / 10; margin-block-end: 6px; background-image: var(--iwn-bild); background-size: cover; background-position: center; }
p.iwn-stempel { position: absolute; z-index: 2; top: 38%; left: 50%; margin: 0; transform: translate(-50%, -50%) rotate(-7deg); padding: .25em .55em; border: .085em solid currentColor; outline: .025em solid currentColor; outline-offset: .07em; border-radius: .08em; font-family: var(--iwn-titelschrift); font-weight: 700; font-size: clamp(1.5rem, 6vw, 3rem); line-height: 1; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; color: var(--iwn-magenta); background: color-mix(in srgb, var(--iwn-papier) 72%, transparent); pointer-events: none; }
.iwn-stempelt > p.iwn-stempel--gross { top: 42%; font-size: clamp(1.9rem, 8.4vw, 5rem); }

/* ---------- Häufige Fragen ---------- */
.iwn-faq { max-width: 52em; }
body .iwn-faq > * { margin-block: 0; }
.iwn-faq details { padding: 16px 0; border-top: 1px solid var(--iwn-kante); }
.iwn-faq summary { position: relative; padding-inline-end: 36px; cursor: pointer; list-style: none; font-weight: 700; font-size: 1.1875rem; color: var(--iwn-pflaume); min-height: 28px; transition: color .25s; }
.iwn-faq summary::-webkit-details-marker { display: none; }
.iwn-faq summary::after { content: "+"; position: absolute; right: 4px; top: -4px; font-family: var(--iwn-titelschrift); font-size: 1.75rem; line-height: 1; color: var(--iwn-magenta); transition: transform .35s var(--iwn-weich); }
.iwn-faq details[open] summary::after { transform: rotate(45deg); }
.iwn-faq summary:hover { color: var(--iwn-magenta); }
.iwn-faq details > p { margin: 10px 0 0; }

/* ---------- Zitat als Bildmoment ---------- */
.iwn-zitat { max-width: 1000px; margin-inline: auto; text-align: center; }
body .iwn-zitat > * { margin-block: 0; }
.iwn-zitat__satz { font-family: var(--iwn-titelschrift); font-weight: 500; font-size: clamp(2.375rem, 6.4vw, 5.5rem); line-height: 1.06; letter-spacing: -.01em; color: var(--iwn-hell); }
body .iwn-zitat__wer { margin-block-start: 24px; font-family: var(--iwn-handschrift); font-weight: 600; font-size: clamp(1.75rem, 3vw, 2.5rem); color: var(--iwn-licht); }

/* ---------- Fuß ---------- */
.iwn-fuss { position: relative; isolation: isolate; overflow: clip; background: linear-gradient(180deg, var(--iwn-nacht), var(--iwn-tief)); color: #D9CBD5; font-size: var(--wp--preset--font-size--klein, 1rem); }
.iwn-fuss::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 90px; background: url(assets/img/motive/fadenband.svg) center / 100% 100% no-repeat; opacity: .5; z-index: -1; }
.iwn-fuss::after { content: ""; position: absolute; z-index: -1; right: max(-40px, calc((100vw - 1320px) / 2)); bottom: -8%; width: min(420px, 46vw); aspect-ratio: 1000 / 1050; background: url(assets/img/phoenix.svg) center / contain no-repeat; opacity: .22; }
.iwn-fuss .iwn-innen { padding-block: 72px 56px; }
.iwn-fuss p { max-width: 54em; }
.iwn-fuss a { color: var(--iwn-hell); }
.iwn-fuss a:hover { color: var(--iwn-gold); }

/* ---------- Textseiten: Impressum, Datenschutz ---------- */
.iwn-textseite { position: relative; background: var(--iwn-papier); }
.iwn-textseite::before { content: ""; display: block; height: 10px; background: linear-gradient(90deg, var(--iwn-tief), var(--iwn-magenta) 45%, #F4874B 72%, var(--iwn-gold)); }
.iwn-textseite .iwn-innen > * { max-width: 760px; }
.iwn-textseite .wp-block-post-title { font-size: clamp(2.5rem, 5vw, 4rem); color: var(--iwn-pflaume); }
body .iwn-textseite .wp-block-post-content > * { margin-block: 0; }
body .iwn-textseite .wp-block-post-content > * + * { margin-block-start: 16px; }

/* ---------- Sitzungsraum auf der Seite: Der Raum bringt seinen eigenen Rand mit ---------- */
.iwn-band--nacht:has(#iwn-sitzungsraum) > .iwn-innen { max-width: none; padding: 0; }
.iwn-band--papier:has(#iwn-lebensrad) > .iwn-innen { padding-top: 40px; }

/* ---------- Bewegung beim Scrollen: bewegung.js setzt die Klassen, ohne JavaScript bleibt alles sichtbar ---------- */
.iwn-zeige:not(.iwn-wegbild) { opacity: 0; translate: 0 26px; transition: opacity .9s var(--iwn-weich) var(--iwn-verzug, 0s), translate .9s var(--iwn-weich) var(--iwn-verzug, 0s), transform .45s var(--iwn-weich), box-shadow .45s var(--iwn-weich); }
.iwn-zeige.ist-da:not(.iwn-wegbild) { opacity: 1; translate: 0 0; }
@supports (animation-timeline: view()) {
	@media (prefers-reduced-motion: no-preference) {
		.iwn-bildband::before { inset: -9% 0; animation: iwn-parallaxe linear both; animation-timeline: view(); }
		@keyframes iwn-parallaxe { from { transform: translateY(-5%); } to { transform: translateY(5%); } }
	}
}

/* ---------- Mittlere Breiten ---------- */
@media (max-width: 1199px) {
	.iwn-held::after { background-image: linear-gradient(90deg, rgba(23, 15, 30, .86), rgba(23, 15, 30, .7) 58%, rgba(23, 15, 30, .15)), linear-gradient(180deg, rgba(23, 15, 30, .6), transparent 60%), var(--iwn-fotoschleier, none); }
	.iwn-neun { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.iwn-kacheln { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: clamp(130px, 24vw, 220px) auto; }
}
@media (max-width: 1099px) {
	/* Klappmenü: ohne JavaScript über die Klappe selbst bedienbar. */
	.iwn-menue summary { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 10px; font-size: 0; }
	.iwn-menue summary::before { content: ""; width: 24px; height: 16px; background: linear-gradient(currentColor, currentColor) 0 0 / 100% 2px no-repeat, linear-gradient(currentColor, currentColor) 0 50% / 100% 2px no-repeat, linear-gradient(currentColor, currentColor) 0 100% / 100% 2px no-repeat; }
	.iwn-menue[open] summary { background: rgba(246, 238, 244, .14); }
	.iwn-menue[open] .iwn-nav { position: absolute; left: 0; right: 0; top: 100%; padding: 8px var(--iwn-rand) 16px; background: var(--iwn-tief); box-shadow: 0 24px 40px -20px rgba(0, 0, 0, .7); }
	.iwn-nav ul, .iwn-nav .wp-block-navigation__container { flex-direction: column; flex-wrap: nowrap; gap: 0; }
	.iwn-nav a { display: flex; min-height: 48px; font-size: 1.125rem; }
	.iwn-nav a::after { display: none; }
}
@media (max-width: 899px) {
	.wp-block-template-part:has(> .iwn-kopf) { position: static; }
	.iwn-held { min-height: calc(100svh - 68px); align-items: flex-end; }
	.iwn-held::after { background-image: linear-gradient(180deg, rgba(23, 15, 30, .2), rgba(23, 15, 30, .3) 34%, rgba(23, 15, 30, .78) 54%, rgba(23, 15, 30, .88)), var(--iwn-fotoschleier, none); }
	.iwn-held__licht::before { left: 50%; top: 24%; width: 130vw; }
	.iwn-held__phoenix { top: 6px; right: auto; left: 50%; width: min(88vw, 560px); translate: -50% 0; }
	.iwn-held__phoenix img { -webkit-mask-image: none; mask-image: none; }
	.iwn-held > .iwn-innen { padding-block: calc(min(88vw, 560px) * 1.05 + 4px) 40px; }
	.iwn-held__text { max-width: none; }
	.iwn-paar, .iwn-paar--gespiegelt { grid-template-columns: minmax(0, 1fr); }
	.iwn-paar__bild, .iwn-paar--gespiegelt > .iwn-paar__bild { order: 0; min-height: 0; aspect-ratio: 16 / 10; margin-inline: calc(-1 * var(--iwn-rand)); border-radius: 0; }
	.iwn-paar__bild::after { display: none; }
	.iwn-innen > .iwn-paar:first-child { margin-block-start: calc(-1 * var(--iwn-luft) + 0px); }
	.iwn-wegbuehne { display: block; }
	.iwn-wegbuehne__text { max-width: none; padding-block-end: 0; }
	body .iwn-wegbuehne > .iwn-wegbild { margin-block-start: 28px; }
	.iwn-wegbild__gross { display: none !important; }
	.iwn-wegbild__klein { display: block !important; }
	.iwn-wegbild__ziel { right: 0; top: -3%; width: 44%; }
	.iwn-wegbild text { font-size: 24px; }
	body .iwn-innen > .iwn-themainhalt > * + h2 { margin-block-start: 40px; }
}

/* ---------- Handy: alles einspaltig, nichts ragt seitlich heraus ---------- */
@media (max-width: 640px) {
	:root { --iwn-schleier: rgba(23, 15, 30, .62); }
	.iwn-karten, .iwn-karten--breit, .iwn-neun, .iwn-linkraster, .iwn-zweispaltig { grid-template-columns: minmax(0, 1fr); }
	.iwn-marke { font-size: 1.0625rem; gap: 6px; }
	.iwn-marke img { width: 36px; height: 32px; }
	.iwn-menue { order: 3; }
	.wp-block-buttons > .wp-block-button { flex: 1 1 100%; }
	.wp-block-button__link { width: 100%; }
	.iwn-kopf__innen { gap: 6px 10px; }
	.iwn-kopf__knopf.wp-block-buttons { flex: 0 0 auto; }
	.iwn-kopf__knopf .wp-block-button { flex: 0 0 auto; }
	.iwn-kopf__knopf .wp-block-button__link { width: auto; min-height: 40px; padding: 4px 10px; font-size: .8125rem; }
	.iwn-bildband { min-height: 0; }
	.iwn-bildband--mitte { min-height: 76svh; }
}
@media (max-width: 360px) {
	.iwn-kopf__knopf { display: none; }
}
@media (hover: none) {
	.iwn-paar:hover .iwn-paar__bild::before { transform: none; }
}

/* ---------- Bewegung auf Wunsch aus ---------- */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation: none !important; transition: none !important; }
	.iwn-held h1 { background-position: 0 0; }
	/* Der Phönix steht sofort fertig da: Datei ohne Zeichnen. */
	.iwn-held__phoenix img { content: url(assets/img/phoenix.svg); }
	.iwn-zeige, .iwn-zeige:not(.iwn-wegbild) { opacity: 1; translate: none; }
	.iwn-zeige .iwn-wegbild__faden { stroke-dashoffset: 0; }
}

@media print {
	.iwn-kopf, .iwn-fuss { display: none; }
	.iwn-band { background: #FFFFFF; color: #000000; }
	.iwn-zeige { opacity: 1 !important; translate: none !important; }
	.iwn-bild::before, .iwn-bildband::after, .iwn-held__licht, .iwn-held__phoenix, .iwn-wegbild { display: none; }
}

/* Warenkorb, Kasse, Dankeseite und Konto: gleiche Breite und linke Kante wie der Rest der Seite. */
body.woocommerce-cart main, body.woocommerce-checkout main, body.woocommerce-account main { max-width: 1200px; margin-inline: auto; padding: clamp(32px, 5vw, 64px) var(--iwn-rand); box-sizing: border-box; }
body.woocommerce-cart main > *, body.woocommerce-checkout main > *, body.woocommerce-account main > * { max-width: 100%; margin-inline: 0; padding-inline: 0; }
.iwn-nach-kauf { margin-block: 40px 16px; }
.iwn-nach-kauf h2 { margin-block: 0 16px; }

/* Rechtstexte: ruhigere Überschriften, damit Abschnitte nicht wie Seitentitel wirken. */
.iwn-seite-impressum main h2, .iwn-seite-datenschutz main h2, .iwn-seite-agb main h2, .iwn-seite-widerruf main h2 { font-size: clamp(1.4rem, 2.4vw, 1.75rem); margin-block: 2em .5em; }
.iwn-seite-widerruf main h3 { font-size: 1.2rem; margin-block: 1.6em .4em; }

/* Widerrufsfunktion: gleiche linke Kante und Schrift wie der Rest der Seite, im Seitenfuß klar als Knopf. */
.iwn-seite-vertrag-widerrufen main form .form-row { padding-inline: 0; }
.iwn-seite-vertrag-widerrufen main form input:not([type=submit]), .iwn-seite-vertrag-widerrufen main form select { font: inherit; }
.iwn-fuss a[href="/vertrag-widerrufen/"] { display: inline-block; margin-block: 4px; padding: 4px 14px; border: 1px solid currentColor; border-radius: 999px; text-decoration: none; }

/* Kasse im klassischen Formular: volle Breite, eine Spalte für die Daten, gleiche Kanten und Schrift. */
body.woocommerce-checkout main .woocommerce { max-width: none; }
body.woocommerce-checkout .col2-set .col-1 { float: none; width: 100%; }
body.woocommerce-checkout .col2-set .col-2:not(:has(.woocommerce-shipping-fields *, .woocommerce-account-fields *)) { display: none; }
body.woocommerce-checkout form .form-row, .woocommerce-privacy-policy-text { padding-inline: 0; }
body.woocommerce-checkout form .form-row input.input-text, body.woocommerce-checkout form .form-row select, body.woocommerce-checkout form .select2-container { font: inherit; }
