/* Kindergarten Rund und Bunt e.V.
   Leitmotiv: das achteckige Haus. Stil: „Sticker“ – dicke Tintenkontur wie im Logo,
   harte, farbige Versatzschatten, die sieben Markenfarben als Rubrikfarben. */

@font-face {
	font-family: "Grandstander";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("../fonts/grandstander-var.woff2") format("woff2");
}

@font-face {
	font-family: "Atkinson Hyperlegible";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("../fonts/atkinson-400.woff2") format("woff2");
}

@font-face {
	font-family: "Atkinson Hyperlegible";
	font-style: italic;
	font-weight: 400;
	font-display: swap;
	src: url("../fonts/atkinson-400-italic.woff2") format("woff2");
}

@font-face {
	font-family: "Atkinson Hyperlegible";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url("../fonts/atkinson-700.woff2") format("woff2");
}

:root {
	--red: #cd1719;
	--orange: #f18800;
	--yellow: #fecc00;
	--green: #3fa535;
	--blue: #009fe3;
	--navy: #0069b4;
	--purple: #814997;

	--sky: #dcEFFB;
	--sky-deep: #b1defa;
	--paper: #fff;
	--ink: #17324d;
	--ink-soft: #4a5d70;
	--grass: #529f2e;
	--grass-light: #92be6c;

	--line: 3px;
	--lift: 6px;
	--r-sm: 12px;
	--r-md: 20px;
	--r-lg: 32px;

	--font-display: "Grandstander", "Comic Neue", "Chalkboard SE", sans-serif;
	--font-text: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;

	--wrap: 1180px;
	--gutter: clamp(16px, 4vw, 40px);

	/* Seitenfarbe, wird pro Rubrik gesetzt */
	--c: var(--red);
	--c-on: #fff;
	--c-text: #b5141a;
}

/* Farbe einer Rubrik: Fläche, Schrift darauf, Schrift auf Weiß */
.c-red,    .theme-red    { --c: var(--red);    --c-on: #fff;       --c-text: #b5141a; }
.c-orange, .theme-orange { --c: var(--orange); --c-on: var(--ink); --c-text: #b35900; }
.c-yellow, .theme-yellow { --c: var(--yellow); --c-on: var(--ink); --c-text: #8a6d00; }
.c-green,  .theme-green  { --c: var(--green);  --c-on: var(--ink); --c-text: #2a7a22; }
.c-blue,   .theme-blue   { --c: var(--blue);   --c-on: var(--ink); --c-text: #0071a8; }
.c-navy,   .theme-navy   { --c: var(--navy);   --c-on: #fff;       --c-text: var(--navy); }
.c-purple, .theme-purple { --c: var(--purple); --c-on: #fff;       --c-text: var(--purple); }

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: 1.5rem;
}

body {
	margin: 0;
	background: var(--sky);
	color: var(--ink);
	font-family: var(--font-text);
	font-size: 1.0625rem;
	line-height: 1.6;
	overflow-x: hidden;
}

img {
	max-width: 100%;
	height: auto;
}

a {
	color: var(--c-text);
	text-decoration-thickness: 2px;
	text-underline-offset: 0.18em;
}

a:hover {
	text-decoration-thickness: 3px;
}

:focus-visible {
	outline: 3px solid var(--ink);
	outline-offset: 3px;
	border-radius: 6px;
}

.skip-link {
	position: absolute;
	left: 1rem;
	top: -5rem;
	z-index: 20;
	padding: 0.6rem 1rem;
	border: var(--line) solid var(--ink);
	border-radius: var(--r-sm);
	background: var(--paper);
	color: var(--ink);
	font-weight: 700;
}

.skip-link:focus {
	top: 1rem;
}

h1,
h2,
h3 {
	margin: 0;
	font-family: var(--font-display);
	font-weight: 800;
	line-height: 1.1;
	text-wrap: balance;
}

/* ---------- Kopf ---------- */

.topbar {
	display: grid;
	grid-template-columns: auto 1fr auto;
	grid-template-areas:
		"brand . phone"
		"nav   nav nav";
	align-items: center;
	gap: 0.75rem 1.5rem;
	max-width: var(--wrap);
	margin: 0 auto;
	padding: 1.25rem var(--gutter) 0;
}

.brand {
	grid-area: brand;
	display: flex;
	align-items: center;
	gap: 0.9rem;
	color: var(--ink);
	text-decoration: none;
}

.brand img {
	width: clamp(64px, 8vw, 96px);
	transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.brand:hover img {
	transform: rotate(-4deg) scale(1.04);
}

.brand-name {
	white-space: nowrap;
	font-family: var(--font-display);
	font-size: clamp(1.05rem, 1.6vw, 1.3rem);
	font-weight: 600;
	line-height: 1.05;
}

.brand-name strong {
	display: block;
	font-size: 1.45em;
	font-weight: 800;
	color: var(--red);
}

.phone-pill {
	grid-area: phone;
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.55rem 1.1rem;
	border: var(--line) solid var(--ink);
	border-radius: 999px;
	background: var(--paper);
	box-shadow: 3px 3px 0 var(--ink);
	color: var(--ink);
	font-family: var(--font-display);
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
	transition: transform 0.15s ease-out, box-shadow 0.15s ease-out;
}

.phone-pill svg {
	color: var(--green);
}

.phone-pill:hover {
	transform: translate(-1px, -1px);
	box-shadow: 4px 4px 0 var(--ink);
}

.phone-pill:active {
	transform: translate(2px, 2px);
	box-shadow: 1px 1px 0 var(--ink);
}

.menu-button {
	display: none;
}

/* Eine Zeile nur, wenn Logo, alle Reiter und Telefon nebeneinander passen (ca. 1270 px) */
@media (min-width: 1400px) {
	.topbar {
		grid-template-columns: auto 1fr auto;
		grid-template-areas: "brand nav phone";
		max-width: 1440px;
	}

	.brand {
		flex-shrink: 0;
	}

	.topbar .blocks ul {
		flex-wrap: nowrap;
		justify-content: center;
		gap: 0.45rem;
	}

	.topbar .blocks a {
		padding-inline: 0.75rem;
		font-size: 1.02rem;
	}
}

/* Navigation als Bauklötze */

.blocks {
	grid-area: nav;
}

.blocks ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.blocks li:nth-child(odd) a { rotate: -1.2deg; }
.blocks li:nth-child(even) a { rotate: 1deg; }

.blocks a {
	display: block;
	padding: 0.5rem 1rem 0.45rem;
	border: var(--line) solid var(--ink);
	border-radius: var(--r-sm);
	background: var(--paper);
	box-shadow: 0 var(--line) 0 var(--ink), inset 0 -7px 0 var(--c);
	color: var(--ink);
	font-family: var(--font-display);
	font-size: 1.1rem;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color 0.15s ease-out, color 0.15s ease-out, transform 0.15s ease-out, box-shadow 0.15s ease-out;
}

.blocks a:hover {
	background: var(--c);
	color: var(--c-on);
	transform: translateY(-2px);
	box-shadow: 0 5px 0 var(--ink), inset 0 0 0 var(--c);
}

.blocks a[aria-current="page"] {
	rotate: 0deg;
	background: var(--c);
	color: var(--c-on);
	box-shadow: 0 var(--line) 0 var(--ink);
}

/* ---------- Bausteine ---------- */

main {
	display: block;
	max-width: var(--wrap);
	margin: 0 auto;
	padding: 0 var(--gutter);
}

.btn {
	display: inline-flex;
	align-items: center;
	padding: 0.75rem 1.4rem;
	border: var(--line) solid var(--ink);
	border-radius: 999px;
	background: var(--paper);
	box-shadow: 4px 4px 0 var(--ink);
	color: var(--ink);
	font-family: var(--font-display);
	font-size: 1.1rem;
	font-weight: 700;
	text-decoration: none;
	transition: transform 0.15s ease-out, box-shadow 0.15s ease-out;
}

.btn:hover {
	transform: translate(-2px, -2px);
	box-shadow: 6px 6px 0 var(--ink);
}

.btn:active {
	transform: translate(3px, 3px);
	box-shadow: 1px 1px 0 var(--ink);
}

.btn-primary {
	background: var(--red);
	color: #fff;
}

.lead {
	max-width: 38em;
	font-size: clamp(1.1rem, 1.6vw, 1.3rem);
	line-height: 1.55;
}

/* Achteck */
.octo-photo,
.octo-badge {
	--octo: polygon(29.3% 0, 70.7% 0, 100% 29.3%, 100% 70.7%, 70.7% 100%, 29.3% 100%, 0 70.7%, 0 29.3%);
}

/* ---------- Startseite ---------- */

.home-hero {
	display: grid;
	grid-template-columns: 1.1fr 0.9fr;
	align-items: center;
	gap: clamp(1.5rem, 4vw, 4rem);
	padding: clamp(2rem, 6vw, 5rem) 0 clamp(2rem, 4vw, 3.5rem);
}

.home-hero h1 {
	font-size: clamp(2.1rem, 6vw, 4.6rem);
	letter-spacing: -0.01em;
}

.home-hero .lead {
	margin: 1.25rem 0 1.75rem;
	color: var(--ink-soft);
}

.actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.9rem;
	margin: 0;
}

.home-hero-art {
	position: relative;
	justify-self: center;
	width: min(100%, 460px);
	aspect-ratio: 1;
}

.octo-photo {
	position: absolute;
	inset: 6%;
	padding: 6px;
	background: var(--ink);
	clip-path: var(--octo);
	animation: pop 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s both;
}

/* Versatzschatten als zweites Achteck (clip-path schneidet Schatten ab) */
.home-hero-art::before {
	content: "";
	position: absolute;
	inset: 6%;
	translate: 14px 14px;
	background: var(--yellow);
	clip-path: polygon(29.3% 0, 70.7% 0, 100% 29.3%, 100% 70.7%, 70.7% 100%, 29.3% 100%, 0 70.7%, 0 29.3%);
	animation: pop 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
}

.octo-photo img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	clip-path: var(--octo);
}

.sun {
	position: absolute;
	top: -2%;
	right: 2%;
	z-index: 2;
	width: 22%;
	aspect-ratio: 1;
	border: var(--line) solid var(--ink);
	border-radius: 50%;
	background: var(--yellow);
	box-shadow: 0 0 0 8px rgb(254 204 0 / 0.35);
	animation: pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.45s both;
}

.cloud {
	position: absolute;
	z-index: 2;
	height: auto;
	overflow: visible;
}

.cloud-a {
	left: -8%;
	top: 12%;
	width: 34%;
	animation: drift 9s ease-in-out 0.8s infinite alternate;
}

.cloud-b {
	right: -6%;
	bottom: 8%;
	width: 27%;
	animation: drift 11s ease-in-out 0.8s infinite alternate-reverse;
}

@keyframes pop {
	from { scale: 0.6; opacity: 0; }
	to { scale: 1; opacity: 1; }
}

@keyframes drift {
	from { translate: 0 0; }
	to { translate: 18px -4px; }
}

.facts {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
	gap: 1.25rem;
	margin: 0 0 clamp(3rem, 7vw, 5rem);
}

.fact {
	padding: 1.2rem 1.4rem 1.3rem;
	border: var(--line) solid var(--ink);
	border-radius: var(--r-md);
	background: var(--c);
	box-shadow: var(--lift) var(--lift) 0 var(--ink);
	color: var(--c-on);
}

.fact:nth-child(2) { rotate: 0.8deg; }
.fact:nth-child(3) { rotate: -0.6deg; }

.fact h2 {
	font-size: 1.15rem;
	font-weight: 700;
}

.fact p {
	margin: 0.2rem 0 0;
	font-family: var(--font-display);
	font-size: clamp(1.35rem, 2.2vw, 1.6rem);
	font-weight: 800;
	line-height: 1.15;
}

.home-section {
	margin: 0 0 clamp(3rem, 7vw, 5rem);
}

.section-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1.25rem;
}

.section-head h2 {
	font-size: clamp(1.8rem, 3.5vw, 2.6rem);
}

.more {
	font-family: var(--font-display);
	font-weight: 700;
	color: var(--ink);
}

/* Rubrik-Kacheln */
.tiles {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr));
	gap: 1.4rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.tile a {
	display: flex;
	flex-direction: column;
	height: 100%;
	padding: 1.1rem 1.2rem 1.3rem;
	border: var(--line) solid var(--ink);
	border-radius: var(--r-md);
	background: var(--paper);
	box-shadow: var(--lift) var(--lift) 0 var(--c);
	color: var(--ink);
	text-decoration: none;
	transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease-out;
}

.tile a:hover {
	transform: translate(-3px, -3px);
	box-shadow: calc(var(--lift) + 3px) calc(var(--lift) + 3px) 0 var(--c);
}

.tile img {
	width: 84px;
	margin: -0.2rem 0 0.4rem -0.3rem;
	transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tile a:hover img {
	transform: rotate(-8deg) scale(1.08);
}

.tile-title {
	font-family: var(--font-display);
	font-size: 1.4rem;
	font-weight: 800;
	line-height: 1.1;
	color: var(--c-text);
}

.tile-text {
	margin-top: 0.35rem;
	color: var(--ink-soft);
	font-size: 0.97rem;
	line-height: 1.45;
}

/* Foto-Streifen */
.photo-strip {
	display: flex;
	gap: 1rem;
	margin: 0 calc(var(--gutter) * -1);
	padding: 0.5rem var(--gutter) 1.2rem;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	list-style: none;
	scrollbar-width: thin;
}

.photo-strip li {
	flex: 0 0 clamp(170px, 22vw, 240px);
	scroll-snap-align: start;
}

.photo-strip li:nth-child(odd) { rotate: -1.5deg; }
.photo-strip li:nth-child(even) { rotate: 1.2deg; }

.photo-strip a {
	display: block;
	overflow: hidden;
	border: var(--line) solid var(--ink);
	border-radius: var(--r-md);
	background: var(--paper);
}

.photo-strip img {
	display: block;
	aspect-ratio: 9 / 11;
	object-fit: cover;
	transition: scale 0.3s ease-out;
}

.photo-strip a:hover img {
	scale: 1.05;
}

/* ---------- Unterseiten ---------- */

.page-hero {
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: center;
	gap: 1.5rem;
	padding: clamp(2rem, 5vw, 3.75rem) 0 clamp(1.5rem, 3vw, 2.25rem);
}

.page-hero h1 {
	max-width: 18em;
	font-size: clamp(2.1rem, 4.6vw, 3.6rem);
	color: var(--ink);
}

.page-hero-teaser {
	max-width: 38em;
	margin: 0.9rem 0 0;
	color: var(--ink-soft);
	font-size: clamp(1.05rem, 1.5vw, 1.2rem);
}

.crumb {
	margin: 0 0 0.6rem;
	font-family: var(--font-display);
	font-weight: 700;
}

.crumb a {
	color: var(--ink);
}

.octo-badge {
	position: relative;
	width: clamp(96px, 14vw, 168px);
	aspect-ratio: 1;
	padding: 5px;
	background: var(--ink);
	clip-path: var(--octo);
	rotate: 6deg;
}

.octo-badge::before {
	content: "";
	position: absolute;
	inset: 5px;
	background: var(--c);
	clip-path: var(--octo);
}

.octo-badge img {
	position: relative;
	display: block;
	width: 100%;
	padding: 12%;
	rotate: -6deg;
}

.cover-photo {
	margin: 0 0 -3.5rem;
	position: relative;
	z-index: 1;
}

.cover-photo img {
	display: block;
	width: 100%;
	max-height: 440px;
	object-fit: cover;
	border: var(--line) solid var(--ink);
	border-radius: var(--r-lg);
	box-shadow: 10px 10px 0 var(--c);
}

.cover-photo + .sheet {
	padding-top: calc(3.5rem + clamp(1.5rem, 4vw, 3rem));
}

.sheet {
	margin: 0 0 clamp(3rem, 7vw, 5rem);
	padding: clamp(1.5rem, 4vw, 3rem);
	border: var(--line) solid var(--ink);
	border-radius: var(--r-lg);
	background: var(--paper);
}

.sheet.has-toc {
	display: grid;
	grid-template-columns: 220px 1fr;
	gap: clamp(1.5rem, 4vw, 3.5rem);
	align-items: start;
}

.toc {
	position: sticky;
	top: 1.5rem;
	padding: 1rem 1.1rem;
	border-radius: var(--r-md);
	background: color-mix(in srgb, var(--c) 12%, white);
}

.toc-title {
	margin: 0 0 0.4rem;
	font-family: var(--font-display);
	font-weight: 800;
}

.toc ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.toc li + li {
	margin-top: 0.15rem;
}

.toc a {
	display: block;
	padding: 0.2rem 0;
	color: var(--ink);
	font-size: 0.97rem;
	line-height: 1.35;
	text-decoration: none;
}

.toc a:hover {
	color: var(--c-text);
	text-decoration: underline;
}

/* Fließtext */
.prose {
	max-width: 68ch;
}

.prose > :first-child {
	margin-top: 0;
}

.prose h2 {
	margin: 2.6rem 0 0.9rem;
	color: var(--c-text);
	font-size: clamp(1.6rem, 2.8vw, 2.1rem);
}

.prose h3 {
	margin: 1.9rem 0 0.5rem;
	font-size: 1.3rem;
	font-weight: 700;
}

.prose p,
.prose ul,
.prose ol {
	margin: 0 0 1.1rem;
}

.prose ul {
	padding-left: 0;
	list-style: none;
}

.prose ul li {
	position: relative;
	padding-left: 1.6rem;
}

.prose ul li + li {
	margin-top: 0.45rem;
}

/* kleine Achteck-Aufzählungszeichen */
.prose ul li::before {
	content: "";
	position: absolute;
	left: 0.1rem;
	top: 0.5em;
	width: 0.7rem;
	height: 0.7rem;
	background: var(--c);
	clip-path: polygon(29.3% 0, 70.7% 0, 100% 29.3%, 100% 70.7%, 70.7% 100%, 29.3% 100%, 0 70.7%, 0 29.3%);
}

.prose hr {
	height: 6px;
	margin: 2.5rem 0;
	border: 0;
	border-radius: 3px;
	background: linear-gradient(90deg, var(--red) 0 14.28%, var(--orange) 0 28.57%, var(--yellow) 0 42.85%, var(--green) 0 57.14%, var(--blue) 0 71.42%, var(--navy) 0 85.71%, var(--purple) 0);
}

.block-image {
	margin: 2rem 0;
}

.block-image img {
	display: block;
	border: var(--line) solid var(--ink);
	border-radius: var(--r-md);
}

.block-image.is-half {
	max-width: 50%;
}

figcaption {
	margin-top: 0.5rem;
	color: var(--ink-soft);
	font-size: 0.95rem;
}

.downloads {
	display: flex;
	flex-wrap: wrap;
	gap: 0.8rem;
	margin: 1rem 0 1.5rem;
	padding: 0 !important;
}

.downloads li {
	padding: 0 !important;
}

.downloads li::before {
	content: none !important;
}

.downloads a {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	padding: 0.65rem 1.1rem;
	border: var(--line) solid var(--ink);
	border-radius: var(--r-sm);
	background: var(--paper);
	box-shadow: 4px 4px 0 var(--c);
	color: var(--ink);
	font-weight: 700;
	text-decoration: none;
	transition: transform 0.15s ease-out, box-shadow 0.15s ease-out;
}

.downloads a:hover {
	transform: translate(-2px, -2px);
	box-shadow: 6px 6px 0 var(--c);
}

.dl-icon {
	display: grid;
	place-items: center;
	width: 1.8rem;
	height: 1.8rem;
	border-radius: 50%;
	background: var(--c);
	color: var(--c-on);
	font-size: 0.9rem;
}

.dl-meta {
	color: var(--ink-soft);
	font-size: 0.85rem;
	font-weight: 400;
}

/* ---------- Fotos ---------- */

.photo-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(45%, 170px), 1fr));
	gap: 0.9rem;
	margin: 1.5rem 0 2rem;
	padding: 0 !important;
	list-style: none;
}

.photo-grid li {
	padding: 0 !important;
}

.photo-grid li::before {
	content: none !important;
}

.photo-grid a {
	display: block;
	overflow: hidden;
	border-radius: var(--r-sm);
	background: var(--sky);
}

.photo-grid img {
	display: block;
	width: 100%;
	aspect-ratio: 1;
	object-fit: cover;
	transition: scale 0.3s ease-out;
}

.photo-grid a:hover img {
	scale: 1.05;
}

.photo-grid.is-masonry {
	display: block;
	columns: 4 220px;
	column-gap: 1rem;
}

.photo-grid.is-masonry li {
	margin-bottom: 1rem;
	break-inside: avoid;
}

.photo-grid.is-masonry img {
	aspect-ratio: auto;
}

.albums {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
	gap: 2.5rem 2rem;
	margin: 0;
	padding: 1rem 0 0;
	list-style: none;
}

.album {
	display: grid;
	color: var(--ink);
	text-decoration: none;
}

/* drei Fotos als kleiner Stapel */
.album-stack {
	position: relative;
	display: block;
	aspect-ratio: 4 / 3;
	margin: 0.5rem 0.75rem 1.1rem;
}

.album-stack img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border: var(--line) solid var(--ink);
	border-radius: var(--r-md);
	background: var(--paper);
	transition: rotate 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), translate 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.album-stack img:nth-child(1) { z-index: 3; }
.album-stack img:nth-child(2) { z-index: 2; rotate: 5deg; translate: 8px 2px; }
.album-stack img:nth-child(3) { z-index: 1; rotate: -6deg; translate: -10px 4px; }

.album:hover .album-stack img:nth-child(2) { rotate: 9deg; translate: 22px 0; }
.album:hover .album-stack img:nth-child(3) { rotate: -10deg; translate: -22px 4px; }

.album-title {
	font-family: var(--font-display);
	font-size: 1.5rem;
	font-weight: 800;
	line-height: 1.15;
}

.album:hover .album-title {
	color: var(--c-text);
}

.album-count {
	color: var(--ink-soft);
}

.empty-state {
	text-align: center;
}

.empty-state img {
	width: min(360px, 80%);
}

.empty-state h1 {
	margin: 1rem 0 0.5rem;
	font-size: clamp(1.8rem, 3.5vw, 2.6rem);
}

.empty-state p {
	font-size: 1.15rem;
}

/* ---------- Termine ---------- */

.month + .month {
	margin-top: 2.25rem;
}

.month-title {
	margin-bottom: 1rem;
	color: var(--c-text);
	font-size: 1.6rem;
}

.date-list {
	display: grid;
	gap: 1rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.next-dates .date-list {
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
	gap: 1.25rem;
}

.termin {
	display: flex;
	align-items: flex-start;
	gap: 1.1rem;
	padding: 1rem 1.1rem;
	border: var(--line) solid var(--ink);
	border-radius: var(--r-md);
	background: var(--paper);
}

.next-dates .termin {
	box-shadow: var(--lift) var(--lift) 0 var(--blue);
}

.date-badge {
	--octo: polygon(29.3% 0, 70.7% 0, 100% 29.3%, 100% 70.7%, 70.7% 100%, 29.3% 100%, 0 70.7%, 0 29.3%);
	flex: none;
	display: grid;
	place-content: center;
	width: 4.4rem;
	aspect-ratio: 1;
	background: var(--blue);
	clip-path: var(--octo);
	color: var(--ink);
	font-family: var(--font-display);
	line-height: 1;
	text-align: center;
}

.date-badge .day {
	font-size: 1.6rem;
	font-weight: 800;
}

.date-badge .month {
	font-weight: 700;
	font-size: 0.95rem;
}

.is-closed .date-badge {
	background: var(--red);
	color: #fff;
}

.termin-body h3 {
	font-size: 1.25rem;
	font-weight: 800;
}

.termin-body p {
	margin: 0.15rem 0 0;
}

.termin-date {
	font-weight: 700;
}

.termin-note {
	color: var(--ink-soft);
}

.termin-flag {
	display: inline-block;
	margin-top: 0.5rem !important;
	padding: 0.1rem 0.65rem;
	border: 2px solid var(--red);
	border-radius: 999px;
	color: #b5141a;
	font-size: 0.88rem;
	font-weight: 700;
}

/* ---------- Fuß ---------- */

.site-footer {
	margin-top: clamp(2rem, 6vw, 4rem);
	color: #fff;
}

.hills {
	display: block;
	width: 100%;
	height: clamp(60px, 9vw, 140px);
	margin-bottom: -1px;
}

.footer-inner {
	display: grid;
	grid-template-columns: 1.4fr 1fr auto;
	gap: 1.5rem 3rem;
	padding: 1rem max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter))) 2.5rem;
	background: var(--grass);
}

.footer-brand {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.footer-brand img {
	width: 84px;
	padding: 8px;
	border: var(--line) solid var(--ink);
	border-radius: 50%;
	background: var(--paper);
}

.footer-brand p {
	margin: 0;
	line-height: 1.45;
}

.footer-brand strong {
	font-family: var(--font-display);
	font-size: 1.2rem;
}

.footer-contact,
.footer-links {
	align-self: center;
	margin: 0;
	padding: 0;
	list-style: none;
}

.footer-contact li + li,
.footer-links li + li {
	margin-top: 0.3rem;
}

.site-footer a {
	color: #fff;
	font-weight: 700;
}

/* ---------- Tablet & Handy ---------- */

@media (max-width: 900px) {
	.home-hero {
		grid-template-columns: 1fr;
	}

	.home-hero-art {
		order: -1;
		width: min(78%, 360px);
	}

	.sheet.has-toc {
		display: block;
	}

	.toc {
		position: static;
		margin-bottom: 2rem;
	}

	.footer-inner {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 760px) {
	.topbar {
		grid-template-columns: 1fr auto auto;
		grid-template-areas:
			"brand phone menu"
			"nav   nav   nav";
		gap: 0.75rem;
		padding-top: 0.9rem;
	}

	.brand {
		gap: 0.6rem;
		min-width: 0;
	}

	.brand img {
		width: 54px;
	}

	.brand-name {
		font-size: 0.85rem;
		white-space: normal;
	}

	.brand-name strong {
		font-size: 1.25em;
	}

	.phone-pill {
		padding: 0;
		width: 48px;
		height: 48px;
		justify-content: center;
	}

	.phone-pill span {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
	}

	.menu-button {
		grid-area: menu;
		display: inline-flex;
		align-items: center;
		gap: 0.5rem;
		height: 48px;
		padding: 0 0.9rem;
		border: var(--line) solid var(--ink);
		border-radius: 999px;
		background: var(--yellow);
		box-shadow: 3px 3px 0 var(--ink);
		color: var(--ink);
		font-family: var(--font-display);
		font-size: 1rem;
		font-weight: 700;
		cursor: pointer;
	}

	.menu-icon,
	.menu-icon::before,
	.menu-icon::after {
		display: block;
		width: 18px;
		height: 3px;
		border-radius: 2px;
		background: var(--ink);
		transition: transform 0.2s ease-out, background-color 0.2s;
	}

	.menu-icon {
		position: relative;
	}

	.menu-icon::before,
	.menu-icon::after {
		content: "";
		position: absolute;
		left: 0;
	}

	.menu-icon::before { top: -6px; }
	.menu-icon::after { top: 6px; }

	.menu-button[aria-expanded="true"] .menu-icon { background: transparent; }
	.menu-button[aria-expanded="true"] .menu-icon::before { transform: translateY(6px) rotate(45deg); }
	.menu-button[aria-expanded="true"] .menu-icon::after { transform: translateY(-6px) rotate(-45deg); }

	.js .blocks {
		display: none;
	}

	.js .blocks.is-open {
		display: block;
		animation: pop 0.25s ease-out;
	}

	.blocks ul {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 0.7rem;
		padding: 0.5rem 0 0.25rem;
	}

	.blocks a {
		padding: 0.85rem 1rem;
		background: var(--c);
		color: var(--c-on);
		box-shadow: 0 var(--line) 0 var(--ink);
	}

	.page-hero {
		grid-template-columns: 1fr;
	}

	.octo-badge {
		grid-row: 1;
		width: 88px;
	}

	.cover-photo img {
		border-radius: var(--r-md);
		box-shadow: 6px 6px 0 var(--c);
	}

	.sheet {
		border-radius: var(--r-md);
	}

	.block-image.is-half {
		max-width: 100%;
	}

	.photo-grid.is-masonry {
		columns: 2;
		column-gap: 0.7rem;
	}

	.photo-grid.is-masonry li {
		margin-bottom: 0.7rem;
	}
}

@media (max-width: 400px) {
	.menu-label {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
	}

	.menu-button {
		width: 48px;
		justify-content: center;
		padding: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation: none !important;
		transition: none !important;
	}
}

@media print {
	.topbar nav,
	.menu-button,
	.phone-pill,
	.hills,
	.home-hero-art {
		display: none;
	}

	body {
		background: #fff;
	}

	.footer-inner {
		background: none;
		color: var(--ink);
	}
}
