/*
 * Hero "Bögen": the greeting on the left, three photographs in arches like
 * school windows on the right. Behind them the sun rises, two leaves sway.
 * The whole hero lies on the light tone of the school colour and ends in a
 * soft curve. Sun and leaves are decoration next to the text.
 */
.sbs-hero-boegen {
	--sbs-bg: var(--wp--preset--color--primary-soft);
	--sbs-fg: var(--wp--preset--color--text);
	--sbs-fg-muted: var(--wp--preset--color--text);
	--sbs-link: var(--wp--preset--color--primary-strong);
	--sbs-link-hover: var(--wp--preset--color--primary-strong);
	--sbs-blatt: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cpath d='M20 2C9 9 4 17 4 25a13 13 0 0 0 14 13v-9l-6-5 1.500-1.800L18 26V16h4v7l4.500-3.800L28 21l-6 5v12a13 13 0 0 0 14-13c0-8-5-16-16-23z'/%3E%3C/svg%3E");
	position: relative;
	overflow-x: clip;
	padding-block: clamp(1.25rem, 3vw, 2rem) clamp(4rem, 8vw, 6rem);
	border-radius: 0 0 50% 50% / 0 0 clamp(2rem, 5vw, 4.4rem) clamp(2rem, 5vw, 4.4rem);
	background-color: var(--sbs-bg);
	color: var(--sbs-fg);
}

.sbs-hero-boegen .sbs-hero__innen {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	align-items: center;
	gap: clamp(1.75rem, 4vw, 3.25rem) clamp(1.5rem, 4vw, 4rem);
	margin-inline: max(var(--wp--style--root--padding-left, 1rem), calc(50% - var(--wp--style--global--wide-size, 76rem) / 2));
	padding-inline: 0;
}

.sbs-hero-boegen .sbs-hero__innen > * {
	margin-block: 0;
}

.sbs-hero-boegen h1 {
	margin-block: 0;
	color: var(--wp--preset--color--primary-strong);
	font-size: clamp(2.625rem, 4.8vw, 4rem);
	line-height: 1.04;
	letter-spacing: -0.015em;
	text-decoration: none;
}

/* A brush stroke under the greeting. */
.sbs-hero-boegen h1::after {
	content: "";
	display: block;
	inline-size: min(11.9rem, 60%);
	block-size: 0.875rem;
	margin-block-start: 0.625rem;
	background-color: var(--wp--preset--color--accent);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 190 14' preserveAspectRatio='none'%3E%3Cpath d='M3 9C40 2 70 12 105 6S160 4 187 8' fill='none' stroke='%23000' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 190 14' preserveAspectRatio='none'%3E%3Cpath d='M3 9C40 2 70 12 105 6S160 4 187 8' fill='none' stroke='%23000' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}

.sbs-hero-boegen .sbs-hero__text > p {
	max-inline-size: 30em;
	margin-block: 1.1rem 0;
	font-size: clamp(1.1rem, 1.6vw, 1.25rem);
	line-height: 1.5;
}

.sbs-hero-boegen .sbs-hero__text .wp-block-buttons {
	margin-block-start: 1.6rem;
}

.sbs-hero-boegen .wp-block-button__link {
	min-block-size: 3.4rem;
	padding-inline: 1.6rem;
	border-radius: 999px;
	transition: translate 0.3s;
}

.sbs-hero-boegen .is-style-sbs-zweitrangig .wp-block-button__link {
	border: 2px solid var(--wp--preset--color--primary);
	background-color: var(--wp--preset--color--base);
	color: var(--wp--preset--color--primary-strong);
}

.sbs-hero-boegen .wp-block-button__link:hover {
	translate: 0 -3px;
}

/* Three arches, the middle one the tallest. */
.sbs-hero-boegen .sbs-hero__boegen {
	position: relative;
	isolation: isolate;
	display: grid;
	grid-template-columns: 1fr 1.25fr 1fr;
	align-items: end;
	gap: clamp(0.6rem, 1.4vw, 1.1rem);
	padding-block-start: clamp(1.75rem, 4vw, 2.75rem);
}

.sbs-hero-boegen .sbs-hero__boegen > * {
	margin: 0;
}

.sbs-hero-boegen .sbs-hero__boegen img {
	display: block;
	inline-size: 100%;
	block-size: clamp(11rem, 26vw, 20rem);
	object-fit: cover;
	border-radius: 999px 999px 1.25rem 1.25rem;
	box-shadow: 0 0.875rem 1.9rem rgb(20 40 60 / 20%);
}

.sbs-hero-boegen .sbs-hero__boegen > :nth-child(2) img {
	block-size: clamp(15rem, 36vw, 28rem);
}

.sbs-hero-boegen .sbs-hero__boegen > :nth-child(3) img {
	block-size: clamp(12.5rem, 30vw, 23rem);
}

/* The sun behind the arches. */
.sbs-hero-boegen .sbs-hero__boegen::before {
	content: "";
	position: absolute;
	z-index: -1;
	inset-block-start: 0;
	inset-inline-start: 8%;
	inline-size: clamp(8rem, 18vw, 14.4rem);
	aspect-ratio: 1;
	border-radius: 50%;
	background-color: var(--wp--preset--color--accent);
}

/* Two leaves. */
.sbs-hero-boegen .sbs-hero__boegen::after,
.sbs-hero-boegen .sbs-hero__text::after {
	content: "";
	position: absolute;
	inline-size: 4.6rem;
	aspect-ratio: 1;
	background-color: var(--wp--preset--color--primary);
	-webkit-mask: var(--sbs-blatt) center / contain no-repeat;
	mask: var(--sbs-blatt) center / contain no-repeat;
	rotate: 24deg;
	transform-origin: 50% 100%;
	pointer-events: none;
}

/* In one column the arches reach the edge of the page: the leaf, leaning to the right, stays inside it. */
.sbs-hero-boegen .sbs-hero__boegen::after {
	inset-block-start: 0.5rem;
	inset-inline-end: 3.5rem;
}

.sbs-hero-boegen .sbs-hero__text {
	position: relative;
}

.sbs-hero-boegen .sbs-hero__text::after {
	display: none;
	inset-block-start: 0;
	inset-inline-end: 0;
	inline-size: 2.9rem;
	background-color: var(--wp--preset--color--accent);
	rotate: -30deg;
}

@media (prefers-reduced-motion: no-preference) {
	.sbs-hero-boegen .sbs-hero__boegen::after {
		animation: sbs-wiegen 5s ease-in-out infinite alternate;
	}

	.sbs-hero-boegen .sbs-hero__text::after {
		animation: sbs-wiegen-2 6.5s ease-in-out infinite alternate;
	}

	@keyframes sbs-wiegen {
		from {
			rotate: 16deg;
		}

		to {
			rotate: 34deg;
		}
	}

	@keyframes sbs-wiegen-2 {
		from {
			rotate: -38deg;
		}

		to {
			rotate: -20deg;
		}
	}
}

/* Quick access: white pills in a loose row. */
.sbs-hero-boegen .sbs-kacheln {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.875rem;
}

.sbs-hero-boegen .sbs-kachel {
	flex: 0 1 auto;
}

.sbs-hero-boegen .sbs-kachel__link {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	align-items: center;
	gap: 0 0.75rem;
	padding: 0.56rem 1.5rem 0.56rem 0.56rem;
	border: 0;
	border-radius: 999px;
	background-color: var(--wp--preset--color--base);
	color: var(--wp--preset--color--text);
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.19rem;
	font-weight: 700;
	line-height: 1.15;
	box-shadow: 0 0.375rem 1.1rem rgb(20 40 60 / 12%);
	transition: translate 0.3s;
}

.sbs-hero-boegen .sbs-kachel__link:hover {
	color: var(--wp--preset--color--primary-strong);
	text-decoration: none;
	translate: 0 -4px;
}

.sbs-hero-boegen .sbs-kachel__icon {
	grid-row: span 2;
	inline-size: 3.25rem;
	block-size: 3.25rem;
	border-radius: 50%;
	background-color: var(--wp--preset--color--primary-soft);
	color: var(--wp--preset--color--primary-strong);
	transition: background-color 0.2s, color 0.2s;
}

.sbs-hero-boegen .sbs-kachel__link:hover .sbs-kachel__icon {
	background-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--on-accent);
}

.sbs-hero-boegen .sbs-kachel__icon .sbs-icon {
	inline-size: 1.6rem;
	block-size: 1.6rem;
}

.sbs-hero-boegen .sbs-kachel__text {
	align-self: end;
}

.sbs-hero-boegen .sbs-kachel__hinweis {
	grid-column: 2;
	align-self: start;
	color: var(--wp--preset--color--text-muted);
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 400;
	line-height: 1.25;
}

@media (max-width: 34rem) {
	.sbs-hero-boegen .sbs-kachel {
		flex: 1 1 100%;
	}
}

@media (min-width: 62.5rem) {
	.sbs-hero-boegen .sbs-hero__innen {
		grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
	}

	.sbs-hero-boegen .sbs-hero__text::after {
		display: block;
	}

	.sbs-hero-boegen .sbs-hero__boegen::after {
		inset-inline-end: 1.5rem;
	}

	.sbs-hero-boegen .sbs-hero__schnell {
		grid-column: 1 / -1;
		margin-block-start: 0.5rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sbs-hero-boegen .wp-block-button__link:hover,
	.sbs-hero-boegen .sbs-kachel__link:hover {
		translate: none;
	}
}
