/**
 * Startness: Layout und Komponenten.
 *
 * Farben, Schriften und Abstände kommen aus der theme.json und
 * stehen hier als CSS-Variablen zur Verfügung. Komponenten von
 * Check, Rechnern, Formularen und Vorlagen stylt das Core-Plugin.
 */

:root {
	--st-ink: var(--wp--preset--color--ink);
	--st-slate: var(--wp--preset--color--slate);
	--st-muted: var(--wp--preset--color--muted);
	--st-base: var(--wp--preset--color--base);
	--st-surface: var(--wp--preset--color--surface);
	--st-sand: var(--wp--preset--color--sand);
	--st-sand-deep: var(--wp--preset--color--sand-deep);
	--st-line: var(--wp--preset--color--line);
	--st-line-strong: var(--wp--preset--color--line-strong);
	--st-accent: var(--wp--preset--color--accent);
	--st-accent-soft: var(--wp--preset--color--accent-soft);
	--st-rust: var(--wp--preset--color--rust);
	--st-rust-dark: var(--wp--preset--color--rust-dark);
	--st-shadow: var(--wp--preset--shadow--soft);
	--st-radius-s: 12px;
	--st-radius-m: 20px;
	--st-radius-l: 28px;
	--st-display: var(--wp--preset--font-family--bricolage);
	--st-hand: var(--wp--preset--font-family--kalam);
}

/* ---------- Grundlagen ---------- */

::selection {
	background: var(--st-accent-soft);
	color: var(--st-ink);
}

:where(a, button, input, select, textarea, summary):focus-visible {
	outline: 3px solid var(--st-rust);
	outline-offset: 3px;
	border-radius: 4px;
}

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

.wp-site-blocks {
	overflow-x: clip;
}

main {
	margin-block-start: 0;
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		scroll-behavior: auto !important;
		transition: none !important;
		animation: none !important;
	}
}

.wp-element-button,
.wp-block-button__link {
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

/* Dunkler Button (Navigation, Rechner) */
.wp-block-button.is-style-dunkel .wp-block-button__link {
	background: var(--st-ink);
	color: var(--st-base);
	font-weight: 600;
}

.wp-block-button.is-style-dunkel .wp-block-button__link:hover,
.wp-block-button.is-style-dunkel .wp-block-button__link:focus {
	background: #3a4147;
	color: var(--st-base);
}

.wp-block-button.is-style-outline .wp-block-button__link:hover,
.wp-block-button.is-style-outline .wp-block-button__link:focus {
	border-color: var(--st-ink);
	background: var(--st-surface);
	color: var(--st-ink);
}

/* ---------- Kopfbereich ---------- */

.st-header {
	border-bottom: 1px solid var(--st-line);
	background: var(--st-base);
}

.st-header__inner {
	padding-block: 1.1rem;
	gap: 1rem 2rem;
}

.st-logo {
	display: inline-flex;
	flex-direction: column;
	gap: 5px;
	color: var(--st-ink);
	text-decoration: none;
}

.st-logo:hover {
	color: var(--st-ink);
}

.st-logo__text {
	font-family: var(--st-display);
	font-weight: 800;
	font-size: 1.75rem;
	line-height: 1;
	letter-spacing: -0.03em;
}

.st-logo__bar {
	display: flex;
	gap: 4px;
}

.st-logo__bar span {
	width: 22px;
	height: 4px;
	border-radius: 2px;
	background: var(--st-accent);
}

.st-logo__bar span:last-child {
	background: #e3dacd;
}

.st-header .wp-block-navigation a {
	color: var(--st-ink);
}

.st-header .wp-block-navigation a:hover {
	color: var(--st-rust);
}

.st-header .wp-block-button__link {
	padding: 0.7rem 1.2rem;
	font-size: 1rem;
}

/* ---------- Abschnitte ---------- */

.st-band {
	padding-block: var(--wp--preset--spacing--60);
}

.st-band--white {
	background: var(--st-surface);
	border-block: 1px solid var(--st-line);
}

.st-band--sand {
	background: var(--st-sand);
}

.st-section {
	padding-block: var(--wp--preset--spacing--60);
}

.st-section-head {
	gap: 1rem 2.5rem;
	margin-block-end: 2.5rem;
}

.st-section-head > .wp-block-heading {
	margin: 0;
	max-width: 32rem;
}

.st-section-head > p {
	margin: 0;
	max-width: 32rem;
	color: var(--st-slate);
}

.st-lead {
	font-size: var(--wp--preset--font-size--medium);
	color: var(--st-slate);
	max-width: 36rem;
}

/* ---------- Hero ---------- */

.st-hero {
	padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(3.5rem, 8vw, 5.5rem);
	align-items: center;
}

.st-hero__title {
	margin-block: 0.4rem 0;
	font-size: clamp(2.4rem, 4.4vw, 3.6rem);
}

.st-hero .wp-block-buttons {
	margin-block-start: 1.75rem;
	gap: 0.75rem;
}

/* Byline mit Foto */
.st-byline {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin: 0;
	font-size: var(--wp--preset--font-size--small);
	color: var(--st-slate);
}

.st-byline strong {
	color: var(--st-ink);
}

.st-byline__img {
	flex: none;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	object-fit: cover;
	background: #e6dccf;
}

/* Checkliste im Hero */
.st-checkcard-wrap {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1rem;
}

.st-checkcard {
	position: relative;
	width: 100%;
	max-width: 26rem;
	box-sizing: border-box;
	padding: 2.1rem 1.9rem 1.6rem;
	background: var(--st-surface);
	border-radius: var(--st-radius-m);
	box-shadow: var(--st-shadow);
	transform: rotate(-1.5deg);
}

.st-checkcard__tape {
	position: absolute;
	top: -12px;
	left: 50%;
	width: 96px;
	height: 26px;
	margin-left: -48px;
	border-radius: 3px;
	background: rgba(246, 168, 107, 0.6);
	transform: rotate(2deg);
}

.st-checkcard__head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 0.75rem;
	margin-bottom: 0.6rem;
}

.st-checkcard__title {
	font-family: var(--st-hand);
	font-weight: 700;
	font-size: 1.55rem;
	line-height: 1.2;
}

.st-checkcard__count {
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--st-slate);
}

.st-checkcard__bar {
	height: 6px;
	border-radius: 3px;
	background: var(--st-sand-deep);
	margin-bottom: 0.5rem;
}

.st-checkcard__bar span {
	display: block;
	width: 50%;
	height: 100%;
	border-radius: 3px;
	background: var(--st-accent);
}

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

.st-checkcard li {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.6rem 0;
	border-bottom: 1px solid #f0eae1;
	font-size: 1.03rem;
}

.st-checkcard li:last-child {
	border-bottom: 0;
}

.st-checkcard li.is-done {
	color: var(--st-muted);
}

.st-checkcard svg {
	flex: none;
}

.st-checkcard__box {
	flex: none;
	width: 20px;
	height: 20px;
	margin: 0 2px;
	box-sizing: border-box;
	border: 2px solid var(--st-ink);
	border-radius: 6px;
}

/* Handschrift */
.st-handnote {
	font-family: var(--st-hand);
	font-size: 1.25rem;
	line-height: 1.3;
	color: var(--st-rust-dark);
}

.st-checkcard-wrap .st-handnote {
	margin: 0;
	max-width: 21rem;
	text-align: center;
}

.st-signature {
	font-family: var(--st-hand);
	font-weight: 700;
	font-size: 2.1rem;
	line-height: 1;
}

/* ---------- Karten ---------- */

.st-card {
	padding: 1.75rem;
	border-radius: var(--st-radius-m);
	background: var(--st-base);
}

.st-card--white {
	background: var(--st-surface);
	border: 1px solid var(--st-line);
}

.st-card > :first-child {
	margin-block-start: 0;
}

/* Phasen-Karten */
.st-phase {
	display: flex;
	flex-direction: column;
}

.st-phase > .wp-block-heading {
	margin-block-start: 0.9rem;
}

.st-phase > p:not(.st-phase__num) {
	color: var(--st-slate);
	font-size: 1rem;
}

.st-phase__num {
	display: flex;
	align-items: center;
	gap: 0.9rem;
	margin: 0;
	font-family: var(--st-display);
	font-weight: 800;
	font-size: 2.75rem;
	line-height: 1;
	letter-spacing: -0.04em;
}

.st-phase__num::after {
	content: "";
	flex: 1;
	height: 4px;
	border-radius: 2px;
	background: var(--st-accent);
}

.st-phase > .wp-block-buttons {
	margin-block-start: auto;
	padding-block-start: 1.25rem;
}

.st-phase .wp-block-button,
.st-phase .wp-block-button__link {
	width: 100%;
}

/* Themenliste in Karten: Boxen, mit Pfeil sobald verlinkt */
.st-topics {
	margin-block: 0.9rem 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	font-size: 0.97rem;
	font-weight: 500;
}

.st-topics li {
	padding: 0.55rem 0.9rem;
	border: 1px solid var(--st-line);
	border-radius: 10px;
	background: var(--st-surface);
	color: var(--st-slate);
}

.st-topics li:has(> a) {
	padding: 0;
}

.st-topics li > a {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 0.6rem;
	padding: 0.55rem 0.9rem;
	color: var(--st-ink);
}

.st-topics li > a::after {
	content: "→";
	color: var(--st-rust);
}

.st-topics li > a:hover {
	color: var(--st-rust);
}

/* Nummerierte Schritte (Phasen-Seiten, Startplan) */
ol.st-steps {
	counter-reset: st-step;
	margin: 1.5rem 0 0;
	padding: 0;
	list-style: none;
}

ol.st-steps > li {
	position: relative;
	counter-increment: st-step;
	margin: 0 0 0.75rem;
	padding: 1.1rem 1.25rem 1.1rem 4.1rem;
	border: 1px solid var(--st-line);
	border-radius: 16px;
	background: var(--st-surface);
}

ol.st-steps > li::before {
	content: counter(st-step);
	position: absolute;
	top: 1rem;
	left: 1.1rem;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.1rem;
	height: 2.1rem;
	border-radius: 50%;
	background: var(--st-accent);
	font-family: var(--st-display);
	font-weight: 800;
	font-size: 0.95rem;
}

ol.st-steps > li strong {
	display: block;
	font-size: 1.08rem;
}

/* Box-Links (z. B. Rechner-Liste) */
.st-boxlinks {
	margin: 1.25rem 0 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
}

.st-boxlinks li > a {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 0.75rem;
	padding: 1rem 1.25rem;
	border-radius: 14px;
	background: var(--st-surface);
	color: var(--st-ink);
	font-weight: 600;
}

.st-boxlinks li > a::after {
	content: "→";
	color: var(--st-rust);
}

.st-boxlinks li > a:hover {
	color: var(--st-rust);
}

/* ---------- Über-mich-Teaser ---------- */

.st-about {
	align-items: center;
}

.st-photo {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 4 / 3;
	padding: 1.5rem;
	box-sizing: border-box;
	border-radius: 24px;
	background: #e6dccf;
	color: #6b6259;
	text-align: center;
	font-size: var(--wp--preset--font-size--small);
}

.st-photo p {
	margin: 0;
}

.st-about .wp-block-image img,
.st-photo-img img {
	border-radius: 24px;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

.st-about figcaption,
.st-about .st-handnote {
	color: var(--st-slate);
}

/* ---------- Dunkler Abschluss (Startpaket) ---------- */

.st-dark {
	padding: clamp(1.75rem, 4vw, 2.75rem);
	border-radius: var(--st-radius-l);
	background: var(--st-ink);
	color: var(--st-base);
	align-items: center;
}

.st-dark .wp-block-heading {
	color: var(--st-base);
	font-size: clamp(1.85rem, 3.2vw, 2.6rem);
}

.st-dark p {
	color: #d6d0c7;
}

.st-dark .wp-block-button.is-style-outline .wp-block-button__link {
	background: transparent;
	border-color: #5a6168;
	color: var(--st-base);
}

.st-dark .wp-block-button.is-style-outline .wp-block-button__link:hover {
	border-color: var(--st-base);
}

/* ---------- Ratgeber-Karten (Query Loop) ---------- */

.st-post-grid .wp-block-post-template {
	gap: 1.5rem;
}

.st-post-card {
	height: 100%;
	box-sizing: border-box;
	padding: 0.875rem 0.875rem 1.4rem;
	border: 1px solid var(--st-line);
	border-radius: var(--st-radius-m);
	background: var(--st-surface);
	gap: 0.7rem !important;
}

.st-post-card .wp-block-post-featured-image {
	margin: 0;
}

.st-post-card .wp-block-post-featured-image img {
	border-radius: var(--st-radius-s);
	aspect-ratio: 16 / 10;
	object-fit: cover;
}

.st-post-card .st-post-card__meta,
.st-post-card .wp-block-post-title {
	padding-inline: 0.5rem;
}

.st-post-card__meta {
	gap: 0.4rem 0.6rem !important;
	font-size: 0.875rem;
	color: var(--st-slate);
}

.st-post-card__meta .wp-block-post-terms a {
	font-weight: 700;
	color: var(--st-rust);
}

.st-post-card .wp-block-post-title {
	margin: 0;
	font-size: 1.3rem;
	line-height: 1.25;
}

.st-post-card .wp-block-post-title a {
	color: var(--st-ink);
}

.st-post-card .wp-block-post-title a:hover {
	color: var(--st-rust);
}

.st-geprueft::before {
	content: "geprüft im ";
}

.st-empty {
	padding: 1.5rem;
	border: 1px dashed var(--st-line-strong);
	border-radius: var(--st-radius-m);
	color: var(--st-slate);
}

.wp-block-query-pagination {
	margin-block-start: 2.5rem;
	gap: 0.5rem;
}

.wp-block-query-pagination a,
.wp-block-query-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	padding: 0 0.75rem;
	box-sizing: border-box;
	border: 1px solid var(--st-line);
	border-radius: var(--st-radius-s);
	background: var(--st-surface);
	color: var(--st-ink);
}

.wp-block-query-pagination .page-numbers.current {
	background: var(--st-ink);
	border-color: var(--st-ink);
	color: var(--st-base);
}

/* ---------- Seitenkopf ---------- */

.st-pagehead {
	padding-block: clamp(2rem, 5vw, 3rem) clamp(1.5rem, 4vw, 2.5rem);
}

.st-pagehead .wp-block-post-title,
.st-pagehead h1 {
	margin-block: 0.75rem 0;
	max-width: 48rem;
	font-size: clamp(2.2rem, 4.2vw, 3.4rem);
	line-height: 1.06;
}

.st-pagehead .st-lead {
	margin-block-start: 1rem;
}

/* Seiten: Text bündig mit dem Seitentitel (linke Kante des breiten Rasters) */
.st-page > .wp-block-post-content > :where(:not(.alignwide):not(.alignfull)) {
	margin-left: max(0px, calc((100% - var(--wp--style--global--wide-size)) / 2)) !important;
}

/* ---------- Artikel ---------- */

.st-article-meta {
	gap: 0.4rem 1rem !important;
	font-size: var(--wp--preset--font-size--small);
	color: var(--st-slate);
}

.st-article-meta .wp-block-post-terms a {
	font-weight: 700;
	color: var(--st-rust);
}

.st-article .wp-block-post-featured-image img {
	border-radius: var(--st-radius-m);
}

.st-article .wp-block-post-content {
	font-size: 1.0938rem;
	line-height: 1.7;
}

.st-article .wp-block-post-content > h2 {
	margin-block-start: 2.75rem;
	font-size: clamp(1.6rem, 2.6vw, 2.1rem);
}

.st-article .wp-block-post-content > h3 {
	margin-block-start: 2rem;
}

.st-article .wp-block-post-content a {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

.wp-block-post-content :where(ul, ol):not(.st-topics):not(.st-boxlinks) li + li {
	margin-top: 0.35rem;
}

.wp-block-details {
	padding: 1.1rem 1.4rem;
	border: 1px solid var(--st-line);
	border-radius: 16px;
	background: var(--st-surface);
}

.wp-block-details + .wp-block-details {
	margin-block-start: 0.75rem;
}

.wp-block-details summary {
	cursor: pointer;
	font-weight: 700;
	font-size: 1.05rem;
}

.wp-block-details[open] summary {
	margin-bottom: 0.6rem;
}

.st-box {
	padding: 1.5rem 1.75rem;
	border-radius: var(--st-radius-m);
	background: var(--st-sand);
}

.st-box > :first-child {
	margin-block-start: 0;
}

.st-box--white {
	background: var(--st-surface);
	border: 1px solid var(--st-line);
}

.st-box--accent {
	background: var(--st-accent-soft);
}

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

.st-footer__inner {
	padding-block: 3.5rem 2rem;
}

.st-footer__cols {
	margin-block-end: 2.25rem;
}

.st-footer__title {
	margin: 0 0 0.6rem;
	font-weight: 700;
	color: var(--st-ink);
}

.st-footer {
	border-top: 1px solid var(--st-line);
	background: var(--st-base);
	font-size: var(--wp--preset--font-size--small);
}

.st-footer .wp-block-heading {
	font-family: var(--wp--preset--font-family--figtree);
	font-size: 0.9375rem;
	font-weight: 700;
	letter-spacing: 0;
	margin-bottom: 0.6rem;
}

.st-footer ul {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 0.45rem;
}

.st-footer a {
	color: #3e4348;
}

.st-footer a:hover {
	color: var(--st-rust);
}

.st-footer__brand {
	font-family: var(--st-display);
	font-weight: 800;
	font-size: 1.5rem;
	letter-spacing: -0.03em;
	color: var(--st-ink);
	margin: 0;
}

.st-footer__bottom {
	border-top: 1px solid var(--st-line);
	padding-top: 1.4rem;
	color: var(--st-muted);
}

.st-footer__legal a + a {
	margin-left: 1.25rem;
}

.st-footer__bottom p {
	margin: 0;
}

.st-footer__bottom a {
	color: var(--st-muted);
}

/* ---------- Druckansicht (z. B. Ergebnis des Checks) ---------- */

@media print {
	.st-header,
	.st-footer,
	.st-noprint,
	.wp-block-buttons {
		display: none !important;
	}

	body {
		background: #fff;
	}
}

/* Zweispaltige Raster: mehr Luft zwischen den Spalten.
   Bewusst als Innenabstand, denn WordPress berechnet die
   Spaltenbreite mit dem Standard-Abstand. */
@media (min-width: 900px) {
	.st-hero > :first-child,
	.st-about > :first-child,
	.st-dark > :first-child {
		padding-inline-end: clamp(1rem, 3vw, 2.5rem);
	}
}

/* ---------- Kleine Bildschirme ---------- */

@media (max-width: 599px) {
	.st-header__inner {
		flex-wrap: nowrap !important;
		gap: 0.75rem !important;
	}

	.st-header__inner > .wp-block-navigation {
		order: 3;
	}

	.st-header__inner > .wp-block-buttons {
		margin-left: auto;
	}
}

@media (max-width: 781px) {
	.st-checkcard {
		transform: none;
	}

	.st-header .wp-block-button__link {
		padding: 0.6rem 1rem;
		font-size: 0.95rem;
	}
}
