/*
 * Abschnitte der Standardseiten (patterns/startseite-*.php).
 *
 * Maße aus dem Sketch-Dokument, Frames „Desktop – Das Programm“ (1920 px) und
 * „Mobil – Das Programm“ (390 px). Die Abschnitte gehen über die volle Breite,
 * ihr Inhalt steht wie der des Headers in 1144 px.
 */

/*
 * Gemeinsames Gerüst der Abschnitte nach dem Hero: 120 px Abstand oben und
 * unten (mobil 64 px), der Inhalt steht in der Inhaltsbreite von 1200 px.
 */

.wp-block-group.ls-section {
	padding: 7.5rem var(--wp--preset--spacing--gutter);
}

.ls-section > .ls-section__inner {
	max-width: var(--wp--style--global--wide-size);
	margin-inline: auto;
}

/* Fließtext der Abschnitte: 18/30 px, mobil 17/28 px. */
.ls-section p {
	font-size: clamp(1.0625rem, 1.042rem + 0.083vw, 1.125rem);
	line-height: 1.66;
}

/* Kleine Versalzeile über einer Überschrift. */
.ls-section .ls-kicker {
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	line-height: 1.385;
	text-transform: uppercase;
}

@media (max-width: 48.9375rem) {

	.wp-block-group.ls-section {
		padding-block: 4rem;
	}
}

/* Hero (patterns/startseite-hero.php) */

.ls-hero {
	padding: 5rem var(--wp--preset--spacing--gutter) 0;
	overflow: hidden;
}

/*
 * Die Spalten sind Anteile der 1144 px (556 und 520 px, dazwischen 50 px),
 * damit Text und Bild auf schmaleren Bildschirmen im selben Verhältnis bleiben.
 */
.wp-block-group.ls-hero > .ls-hero__inner {
	display: grid;
	grid-template-columns: 48.6% 45.45%;
	column-gap: 4.37%;
	align-items: start;
	max-width: 71.5rem;
	margin-inline: auto;
}

.ls-hero .ls-hero__inner > * {
	margin-block: 0;
}

.ls-hero .ls-hero__content {
	padding-bottom: 3rem;
}

.ls-hero .ls-hero__content > * {
	margin-block: 0;
}

/* 88 px bei 1600 px Breite, 46 px bei 390 px, dazwischen fließend. */
.ls-hero .ls-hero__content > h1 {
	font-size: clamp(2.875rem, 2.029rem + 3.471vw, 5.5rem);
	line-height: 1.045;
}

.ls-hero .ls-hero__content > p {
	max-width: 32.5rem;
	margin-top: 1.5rem;
	font-size: clamp(1.0625rem, 1.002rem + 0.248vw, 1.25rem);
}

.ls-hero .ls-hero__content > .wp-block-buttons {
	gap: 0.75rem;
	margin-top: 1.5rem;
}

/*
 * Bildbühne: Das Porträt steht auf der Unterkante des Abschnitts. Die Maße
 * des Siegels hängen an der Breite der Bühne (cqw), damit es mit dem Bild
 * mitwächst: 196 px bei 520 px Bildbreite.
 */
.ls-hero .ls-hero__visual {
	position: relative;
	container-type: inline-size;
}

.ls-hero .ls-hero__visual > * {
	margin-block: 0;
}

.ls-hero .ls-hero__portrait img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 520 / 641;
}

.ls-hero .ls-hero__visual > .ls-hero__badge {
	position: absolute;
	right: -1.7%;
	bottom: 12%;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 37.7cqw;
	height: 37.7cqw;
	border: 1.15cqw solid var(--wp--preset--color--white);
	border-radius: 50%;
	background-color: var(--wp--preset--color--accent);
	box-shadow: 0 3.46cqw 7.7cqw rgba(59, 15, 31, 0.18);
	color: var(--wp--preset--color--white);
	text-align: center;
	rotate: -8deg;
}

.ls-hero .ls-hero__badge > p {
	margin: 0;
}

.ls-hero .ls-hero__badge > .ls-hero__badge-kicker {
	color: var(--wp--preset--color--accent-light);
	font-size: 2.31cqw;
	font-weight: 600;
	letter-spacing: 0.14em;
	line-height: 1.33;
	text-transform: uppercase;
}

.ls-hero .ls-hero__badge > .ls-hero__badge-title {
	margin-top: 0.77cqw;
	font-family: var(--wp--preset--font-family--dm-serif-display);
	font-size: 5.58cqw;
	line-height: 1.17;
}

/* Die Trennlinie gehört zur Gestaltung, nicht zum Inhalt. */
.ls-hero .ls-hero__badge > .ls-hero__badge-text {
	margin-top: 1.54cqw;
	font-size: 2.69cqw;
	font-weight: 500;
	line-height: 1.29;
}

.ls-hero .ls-hero__badge > .ls-hero__badge-text::before {
	content: "";
	display: block;
	width: 15cqw;
	height: 0.38cqw;
	margin: 0 auto 1.54cqw;
	background-color: rgba(255, 255, 255, 0.4);
}

/* Einspaltig: Text, darunter die Buttons in voller Breite, dann das Bild. */
@media (max-width: 48.9375rem) {

	.ls-hero {
		padding-top: 2.5rem;
	}

	.wp-block-group.ls-hero > .ls-hero__inner {
		grid-template-columns: minmax(0, 1fr);
		row-gap: 2rem;
	}

	.ls-hero .ls-hero__content {
		padding-bottom: 0;
	}

	.ls-hero .ls-hero__content > p {
		max-width: none;
		margin-top: 1.25rem;
	}

	.ls-hero .ls-hero__content > .wp-block-buttons {
		flex-direction: column;
		align-items: stretch;
	}

	.ls-hero .ls-hero__content .wp-block-button,
	.ls-hero .ls-hero__content .wp-block-button__link {
		box-sizing: border-box;
		width: 100%;
	}

	.ls-hero .ls-hero__visual > .ls-hero__badge {
		right: 1.4%;
		width: 39.4cqw;
		height: 39.4cqw;
	}
}

/* Teufelskreis (patterns/startseite-teufelskreis.php) */

/* Links der Text (552 px), rechts die Grafik, dazwischen 80 px. Beide Spalten stehen mittig zueinander. */
.ls-teufelskreis > .ls-section__inner {
	display: grid;
	grid-template-columns: 46% minmax(0, 1fr);
	column-gap: 6.667%;
	align-items: center;
}

.ls-teufelskreis .ls-section__inner > *,
.ls-teufelskreis .ls-teufelskreis__content > * {
	margin-block: 0;
}

.ls-teufelskreis .ls-teufelskreis__content > * + * {
	margin-top: 1.5rem;
}

.ls-teufelskreis .ls-teufelskreis__content > .ls-teufelskreis__solution {
	padding: 1.75rem 2rem;
	border-radius: 1.375rem;
	box-shadow: 0 24px 50px -24px rgba(76, 127, 56, 0.6);
}

.ls-teufelskreis .ls-teufelskreis__solution > * {
	margin-block: 0;
}

.ls-teufelskreis .ls-teufelskreis__solution > .ls-kicker {
	margin-bottom: 0.625rem;
	color: var(--wp--preset--color--primary-pale);
}

.ls-teufelskreis .ls-teufelskreis__content > .ls-teufelskreis__sources {
	font-size: var(--wp--preset--font-size--x-small);
	line-height: 1.54;
}

/*
 * Grafik: Ring mit Kern, darum vier Schritte als nummerierte Liste (oben,
 * rechts, unten, links). Maße aus dem Entwurf bei 583 × 497 px. Sie hängen
 * an der Breite der Grafik (cqw), damit sie als Ganzes skaliert. Im Entwurf
 * ragt sie rechts 15 px über die Inhaltsbreite hinaus.
 */
.ls-teufelskreis .ls-teufelskreis__cycle {
	position: relative;
	container-type: inline-size;
	width: calc(100% + 0.9375rem);
	aspect-ratio: 583 / 497;
}

.ls-teufelskreis__cycle::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	box-sizing: border-box;
	width: 66.72%;
	aspect-ratio: 1;
	border: 1.715cqw solid var(--wp--preset--color--primary-border);
	border-radius: 50%;
	translate: -50% -50%;
}

.ls-teufelskreis .ls-teufelskreis__cycle > .ls-teufelskreis__core {
	position: absolute;
	top: 50%;
	left: 50%;
	display: grid;
	place-items: center;
	width: 25.9%;
	aspect-ratio: 1;
	margin: 0;
	border-radius: 50%;
	background-color: var(--wp--preset--color--accent);
	box-shadow: 0 20px 40px -14px rgba(175, 26, 78, 0.55);
	color: var(--wp--preset--color--white);
	font-family: var(--wp--preset--font-family--dm-serif-display);
	font-size: 5.49cqw;
	line-height: 1;
	text-align: center;
	translate: -50% -50%;
}

.ls-teufelskreis .ls-teufelskreis__cycle > .ls-teufelskreis__steps {
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: ls-step;
	font-size: clamp(0.75rem, 2.573cqw, 0.9375rem);
	font-weight: 600;
	line-height: 1.333;
}

/* Der lange Selektor überstimmt den Editor, der jeden Block auf position: relative setzt. */
.ls-teufelskreis .ls-teufelskreis__steps > li {
	position: absolute;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	gap: 0.667em;
	width: 41.17%;
	margin: 0;
	padding: 0.933em 1.067em;
	border-radius: 1.067em;
	background-color: var(--wp--preset--color--white);
	box-shadow: 0 10px 30px rgba(59, 15, 31, 0.1);
	counter-increment: ls-step;
}

.ls-teufelskreis .ls-teufelskreis__steps > li::before {
	content: counter(ls-step);
	flex: none;
	display: grid;
	place-items: center;
	width: 2.267em;
	height: 2.267em;
	border-radius: 50%;
	background-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--white);
}

/* Der erste Schritt ist der Einstieg in den Kreislauf und deshalb umrandet. */
.ls-teufelskreis .ls-teufelskreis__steps > li:nth-child(1) {
	top: 0;
	left: 50%;
	padding: calc(0.933em - 2px) calc(1.067em - 2px);
	border: 2px solid var(--wp--preset--color--accent);
	translate: -50% 0;
}

.ls-teufelskreis .ls-teufelskreis__steps > li:nth-child(2) {
	top: 50%;
	right: 0;
	width: 34.3%;
	translate: 0 -50%;
}

.ls-teufelskreis .ls-teufelskreis__steps > li:nth-child(3) {
	bottom: 0;
	left: 50%;
	translate: -50% 0;
}

.ls-teufelskreis .ls-teufelskreis__steps > li:nth-child(4) {
	top: 50%;
	left: 0;
	width: 34.3%;
	translate: 0 -50%;
}

/*
 * Kleine Grafik (im Entwurf 362 × 329 px): Die Karten links und rechts
 * stellen die Nummer über den Text, sonst passen sie nicht neben den Kern.
 */
@container (max-width: 28rem) {

	.ls-teufelskreis .ls-teufelskreis__steps > li {
		gap: 0.667em;
		width: 44.5%;
		padding: 0.833em;
		border-radius: 1em;
		box-shadow: 0 8px 20px rgba(59, 15, 31, 0.1);
	}

	.ls-teufelskreis .ls-teufelskreis__steps > li::before {
		width: 2em;
		height: 2em;
	}

	.ls-teufelskreis .ls-teufelskreis__steps > li:nth-child(1) {
		padding: calc(0.833em - 2px);
	}

	.ls-teufelskreis .ls-teufelskreis__steps > li:nth-child(2),
	.ls-teufelskreis .ls-teufelskreis__steps > li:nth-child(4) {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.5em;
		width: 32.6%;
	}
}

/* Einspaltig: Die Grafik steht mittig unter dem Text. */
@media (max-width: 61.9375rem) {

	.ls-teufelskreis > .ls-section__inner {
		grid-template-columns: minmax(0, 1fr);
		row-gap: 3rem;
	}

	.ls-teufelskreis .ls-teufelskreis__cycle {
		width: 100%;
		max-width: 36.4375rem;
		margin-inline: auto;
	}
}

@media (max-width: 48.9375rem) {

	.wp-block-group.ls-teufelskreis {
		padding-bottom: 4.625rem;
	}

	.ls-teufelskreis .ls-teufelskreis__content > * + * {
		margin-top: 1.25rem;
	}

	.ls-teufelskreis .ls-teufelskreis__content > .ls-teufelskreis__solution {
		padding: 1.5rem;
	}

	.ls-teufelskreis .ls-teufelskreis__solution > .ls-kicker {
		margin-bottom: 0.5rem;
	}

	/* Im Entwurf ragt die Grafik mobil je 6 px in den Seitenrand. */
	.ls-teufelskreis .ls-teufelskreis__cycle {
		width: calc(100% + 0.75rem);
		max-width: none;
		margin-inline: -0.375rem;
		aspect-ratio: 362 / 329;
	}

	.ls-teufelskreis__cycle::before {
		width: 69.6%;
		border-width: 2.21cqw;
	}

	.ls-teufelskreis .ls-teufelskreis__cycle > .ls-teufelskreis__core {
		width: 27.07%;
		box-shadow: 0 14px 30px -10px rgba(175, 26, 78, 0.55);
	}
}
