/* ==========================================================
   Saskia Hahn – Theme-Styles
   Übernommen aus dem bisherigen "Zusätzlichen CSS" (Blocksy),
   aufgeräumt und um Touch/Tastatur/Bewegung-reduzieren ergänzt.
   ========================================================== */

/* Kompatibilität: Inhalte nutzen noch die Blocksy-Farbvariablen
   (z. B. Stackable-Buttons, WPForms). Hier zeigen sie auf unsere Palette. */
:root {
	--theme-palette-color-1: var(--wp--preset--color--palette-color-1);
	--theme-palette-color-2: var(--wp--preset--color--palette-color-2);
	--theme-palette-color-3: var(--wp--preset--color--palette-color-3);
	--theme-palette-color-4: var(--wp--preset--color--palette-color-4);
	--theme-palette-color-5: var(--wp--preset--color--palette-color-5);
	--theme-palette-color-6: var(--wp--preset--color--palette-color-6);
	--theme-palette-color-7: var(--wp--preset--color--palette-color-7);
	--theme-palette-color-8: var(--wp--preset--color--palette-color-8);
}

/* Keine horizontale Scrollleiste durch 100vw-Elemente (Banner, Karussell) */
html,
body {
	overflow-x: clip;
}

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

/* ---------- Header ---------- */
.saskia-header {
	position: relative;
	z-index: 50;
}

.saskia-menu {
	position: relative;
}

.saskia-menu__list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.25rem 1.75rem;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 0.85rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.saskia-menu__list a {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	min-height: 44px;
	text-decoration: none;
	color: var(--wp--preset--color--palette-color-1);
}

.saskia-menu__list a:hover,
.saskia-menu__list .current-menu-item > a {
	color: var(--wp--preset--color--palette-color-4);
}

.saskia-menu__list .sub-menu {
	display: none;
}

.saskia-menu__toggle {
	display: none;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

.saskia-menu-hint {
	margin: 0;
	font-size: 0.8rem;
	opacity: 0.7;
}

/* Handy: Menü hinter einem Button */
@media (max-width: 780px) {
	.saskia-menu__toggle {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 44px;
		height: 44px;
		padding: 0;
		border: 0;
		background: none;
		cursor: pointer;
		color: var(--wp--preset--color--palette-color-1);
	}

	.saskia-menu__toggle-icon,
	.saskia-menu__toggle-icon::before,
	.saskia-menu__toggle-icon::after {
		display: block;
		width: 24px;
		height: 3px;
		border-radius: 2px;
		background: currentColor;
		transition: transform 0.25s, opacity 0.25s;
	}

	.saskia-menu__toggle-icon {
		position: relative;
	}

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

	.saskia-menu__toggle-icon::before { top: -8px; }
	.saskia-menu__toggle-icon::after  { top: 8px; }

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

	.saskia-menu__list {
		display: none;
		position: absolute;
		right: 0;
		top: calc(100% + 0.5rem);
		flex-direction: column;
		align-items: flex-end;
		min-width: 200px;
		padding: 1rem 1.25rem;
		background: var(--wp--preset--color--palette-color-8);
		border: 2px solid var(--wp--preset--color--palette-color-3);
		border-radius: 8px;
		box-shadow: 0 8px 24px rgba(71, 32, 27, 0.15);
	}

	.saskia-menu.is-open .saskia-menu__list {
		display: flex;
	}
}

/* ---------- Footer ---------- */
.saskia-footer {
	border-top: 2px solid var(--wp--preset--color--palette-color-3);
}

/* ---------- Portfolio-Kacheln (Cover mit Hover) ---------- */
.portfolio-hover .wp-block-cover__inner-container {
	opacity: 0;
	transition: opacity 0.4s ease-in-out;
}

.portfolio-hover .wp-block-cover__background {
	opacity: 0 !important;
	transition: opacity 0.4s ease-in-out !important;
}

.portfolio-hover:hover .wp-block-cover__inner-container,
.portfolio-hover:focus-within .wp-block-cover__inner-container {
	opacity: 1;
}

.portfolio-hover:hover .wp-block-cover__background,
.portfolio-hover:focus-within .wp-block-cover__background {
	opacity: 0.6 !important;
}

/* ---------- Kachel-Hover: anheben & leicht kippen, gelber Versatz-Schatten ---------- */
.portfolio-hover {
	transition: transform 0.35s cubic-bezier(.2,.7,.3,1), box-shadow 0.35s;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
	.portfolio-hover:is(:hover, :focus-within) {
		transform: translateY(-8px) rotate(-1.2deg);
		box-shadow: 0 18px 0 -6px #E8A856;
	}
	.wp-block-column:nth-child(2) > .portfolio-hover:is(:hover, :focus-within) {
		transform: translateY(-8px) rotate(1deg);
	}
}

/* Touch-Geräte haben kein Hover: Titel immer zeigen */
@media (hover: none) {
	.portfolio-hover .wp-block-cover__inner-container {
		opacity: 1;
	}
	.portfolio-hover .wp-block-cover__background {
		opacity: 0.45 !important;
	}
}

/* ---------- Endlos-Karussell ---------- */
.mein-art-carousel {
	overflow: hidden !important;
	width: 100vw !important;
	position: relative;
	left: 50%;
	margin-left: -50vw !important;
	margin-right: 0 !important;
	display: block !important;
}

.mein-art-carousel .stk-row {
	display: flex !important;
	flex-wrap: nowrap !important;
	width: max-content !important;
	animation: saskia-drift 60s linear infinite !important;
}

.mein-art-carousel:hover .stk-row {
	animation-play-state: paused !important;
}

.mein-art-carousel .stk-column {
	flex: 0 0 30vw !important;
	min-width: 30vw !important;
	max-width: 30vw !important;
	padding: 10px !important;
	margin: 0 !important;
}

@media (max-width: 700px) {
	.mein-art-carousel .stk-column {
		flex-basis: 70vw !important;
		min-width: 70vw !important;
		max-width: 70vw !important;
	}
}

@keyframes saskia-drift {
	from { transform: translateX(0); }
	to   { transform: translateX(-50%); }
}

/* ---------- Bildunterschriften: im Raster versteckt, in der Lightbox sichtbar ---------- */
.stk-img-caption {
	display: none !important;
}

.stk-lightbox .stk-img-caption,
.lightbox-caption,
.sl-caption {
	display: block !important;
}

.wp-block-video figcaption {
	display: none !important;
}

/* ---------- Bild-Infos: Hover am Rechner, Leiste am Handy ---------- */
figure[data-info] {
	position: relative;
	overflow: hidden;
}

figure[data-info]::after {
	content: attr(data-info);
	position: absolute;
	inset: 0;
	display: flex;
	align-items: flex-end;
	padding: 24px;
	background: rgba(71, 32, 27, 0.82);
	color: var(--wp--preset--color--palette-color-8);
	font-size: 15px;
	font-weight: 500;
	line-height: 1.4;
	opacity: 0;
	transition: opacity 0.3s ease;
	pointer-events: none;
	z-index: 5;
}

figure[data-info]:hover::after,
figure[data-info]:focus-within::after {
	opacity: 1;
}

@media (hover: none) {
	figure[data-info]::after {
		opacity: 1;
		inset: auto 0 0 0;
		padding: 28px 12px 10px;
		font-size: 12px;
		background: linear-gradient(transparent, rgba(71, 32, 27, 0.85));
	}
}

img.is-zoomable {
	cursor: zoom-in;
}

img.is-zoomable:focus-visible {
	outline: 3px solid var(--wp--preset--color--palette-color-4);
	outline-offset: 3px;
}

/* ---------- Saskia Banner (Verhalten wie Saskias Original) ---------- */
.saskia-banner {
	position: relative;
	margin-top: 0 !important;
}

.saskia-banner__stage {
	position: relative;
	width: 100%;
	aspect-ratio: var(--art-w) / var(--art-h);
	overflow: hidden;
}

.saskia-banner__title {
	position: absolute;
	top: 15px;
	left: 0;
	right: 0;
	z-index: 10;
	margin: 0;
	padding: 0 20px;
	text-align: center;
	font-size: 1.8rem;
	font-weight: 500;
	color: var(--wp--preset--color--palette-color-1);
	pointer-events: none;
}

.saskia-banner__layer {
	position: absolute;
	top: 0;
	left: -7.5%;
	width: 115%;
	transform-origin: center top;
	will-change: transform;
}

.saskia-banner__layer > img {
	display: block;
	width: 100%;
	height: auto;
	image-rendering: pixelated;
	image-rendering: crisp-edges;
	user-select: none;
	pointer-events: none;
}

.saskia-banner__huhn {
	position: absolute;
	z-index: 2;
	transform: translate(-50%, -100%);
}

.saskia-banner__huhn .saskia-huhn {
	width: 100%;
}

.saskia-banner__huhn .saskia-huhn img {
	width: 100%;
	height: auto;
}

@media (max-width: 1024px) {
	.saskia-banner__stage {
		aspect-ratio: var(--art-w) / calc(var(--art-w) * 0.5625);
	}
	.saskia-banner__title {
		font-size: 1.4rem;
		top: 10px;
	}
	/* Wie im Original: Bild mittig, keine Bewegung */
	.saskia-banner__layer {
		--lw: calc(100% * 0.5625 * var(--art-w) / var(--art-h));
		width: var(--lw);
		left: calc(50% - var(--lw) / 2);
		top: 50%;
		transform: translateY(-50%) !important;
	}
}

/* ---------- Verstecktes Huhn ---------- */
.saskia-huhn-block {
	position: relative;
	z-index: 6;
	line-height: 0;
}

.saskia-huhn-block.alignright { text-align: right; float: none; margin-left: auto; }
.saskia-huhn-block.aligncenter { text-align: center; }

.saskia-huhn {
	--huhn-scale: 3;
	position: relative;
	display: inline-block;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
	line-height: 0;
	-webkit-tap-highlight-color: transparent;
}

.saskia-huhn img {
	display: block;
	width: calc(18px * var(--huhn-scale));
	height: auto;
	image-rendering: pixelated;
	image-rendering: crisp-edges;
	transition: transform 0.2s ease;
}

.saskia-huhn-block.is-flipped .saskia-huhn img {
	transform: scaleX(-1);
}

.saskia-huhn:hover img {
	transform: translateY(-2px) rotate(-4deg);
}

.saskia-huhn-block.is-flipped .saskia-huhn:hover img {
	transform: scaleX(-1) translateY(-2px) rotate(-4deg);
}

.saskia-huhn:focus-visible {
	outline: 3px solid var(--wp--preset--color--palette-color-4);
	outline-offset: 4px;
	border-radius: 4px;
}

.saskia-huhn.is-found img {
	filter: drop-shadow(0 0 0 transparent);
}

.saskia-huhn.is-hopping {
	animation: saskia-hop 0.5s steps(5) 1;
}

@keyframes saskia-hop {
	0%   { transform: translateY(0); }
	30%  { transform: translateY(-30%); }
	60%  { transform: translateY(0); }
	80%  { transform: translateY(-8%); }
	100% { transform: translateY(0); }
}

.saskia-huhn__bubble {
	position: absolute;
	bottom: 100%;
	left: 50%;
	transform: translate(-50%, -6px);
	padding: 6px 10px;
	border: 2px solid var(--wp--preset--color--palette-color-6);
	border-radius: 10px;
	background: var(--wp--preset--color--palette-color-8);
	color: var(--wp--preset--color--palette-color-6);
	font-size: 13px;
	font-weight: 700;
	line-height: 1.2;
	white-space: nowrap;
	pointer-events: none;
	animation: saskia-pop 0.25s ease-out;
}

@keyframes saskia-pop {
	from { opacity: 0; transform: translate(-50%, 4px) scale(0.8); }
	to   { opacity: 1; transform: translate(-50%, -6px) scale(1); }
}

/* Zähler unten links */
.saskia-hud {
	position: fixed;
	left: 16px;
	bottom: 16px;
	z-index: 900;
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 14px 6px 8px;
	border: 2px solid var(--wp--preset--color--palette-color-6);
	border-radius: 999px;
	background: var(--wp--preset--color--palette-color-8);
	color: var(--wp--preset--color--palette-color-6);
	font-size: 13px;
	font-weight: 700;
	box-shadow: 0 4px 0 var(--wp--preset--color--palette-color-3);
}

.saskia-hud__icon {
	width: 27px;
	height: auto;
	image-rendering: pixelated;
}

.saskia-hud.is-complete {
	background: var(--wp--preset--color--palette-color-3);
	cursor: pointer;
}

.saskia-hud.is-complete:focus-visible {
	outline: 3px solid var(--wp--preset--color--palette-color-1);
	outline-offset: 3px;
}

.saskia-hud.is-bump {
	animation: saskia-pop-hud 0.35s ease-out;
}

@keyframes saskia-pop-hud {
	50% { transform: scale(1.12); }
}

/* Belohnung */
.saskia-reward {
	position: fixed;
	left: 16px;
	bottom: 72px;
	z-index: 950;
	width: min(320px, calc(100vw - 32px));
	padding: 20px 20px 18px;
	border: 2px solid var(--wp--preset--color--palette-color-6);
	border-radius: 14px;
	background: var(--wp--preset--color--palette-color-8);
	color: var(--wp--preset--color--palette-color-6);
	box-shadow: 0 6px 0 var(--wp--preset--color--palette-color-3);
	animation: saskia-pop-in 0.3s ease-out;
}

@keyframes saskia-pop-in {
	from { opacity: 0; transform: translateY(12px); }
}

.saskia-reward__img {
	width: 54px;
	image-rendering: pixelated;
	float: right;
	margin: 0 0 6px 10px;
}

.saskia-reward__title {
	display: block;
	font-size: 17px;
}

.saskia-reward__text {
	margin: 6px 0 12px;
	font-size: 14px;
}

.saskia-reward__link {
	display: inline-block;
	padding: 8px 14px;
	border-radius: 4px;
	background: var(--wp--preset--color--palette-color-1);
	color: var(--wp--preset--color--palette-color-8) !important;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
}

.saskia-reward__close {
	position: absolute;
	top: 4px;
	right: 6px;
	width: 32px;
	height: 32px;
	border: 0;
	background: none;
	font-size: 22px;
	cursor: pointer;
	color: inherit;
}

/* ---------- Lightbox ---------- */
.saskia-no-scroll {
	overflow: hidden;
}

.saskia-lightbox {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 56px 64px;
	background: rgba(40, 18, 15, 0.94);
}

.saskia-lightbox[hidden] {
	display: none;
}

.saskia-lightbox__figure {
	margin: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	max-width: 100%;
	max-height: 100%;
}

.saskia-lightbox__img {
	max-width: 100%;
	max-height: calc(100vh - 160px);
	object-fit: contain;
	border-radius: 6px;
}

.saskia-lightbox__caption {
	margin: 0;
	max-width: 70ch;
	text-align: center;
	color: var(--wp--preset--color--palette-color-8);
	font-size: 15px;
}

.saskia-lightbox__btn {
	position: absolute;
	width: 48px;
	height: 48px;
	border: 0;
	border-radius: 50%;
	background: rgba(250, 243, 224, 0.12);
	color: var(--wp--preset--color--palette-color-8);
	font-size: 30px;
	line-height: 1;
	cursor: pointer;
}

.saskia-lightbox__btn:hover,
.saskia-lightbox__btn:focus-visible {
	background: rgba(250, 243, 224, 0.28);
}

.saskia-lightbox__close { top: 12px; right: 12px; }
.saskia-lightbox__prev  { left: 8px; top: 50%; transform: translateY(-50%); }
.saskia-lightbox__next  { right: 8px; top: 50%; transform: translateY(-50%); }

@media (max-width: 600px) {
	.saskia-lightbox { padding: 56px 8px; }
	.saskia-lightbox__prev, .saskia-lightbox__next { top: auto; bottom: 8px; transform: none; }
}

/* ---------- Kategorie-Leiste ---------- */
.saskia-subnav {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 800;
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 6px;
	padding: 8px 12px;
	background: var(--wp--preset--color--palette-color-8);
	border-bottom: 2px solid var(--wp--preset--color--palette-color-3);
	transform: translateY(-100%);
	opacity: 0;
	transition: transform 0.3s, opacity 0.3s;
}

.admin-bar .saskia-subnav { top: 32px; }

.saskia-subnav.is-visible {
	transform: none;
	opacity: 1;
}

.saskia-subnav__link {
	padding: 8px 12px;
	border-radius: 4px;
	color: var(--wp--preset--color--palette-color-1);
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
}

.saskia-subnav__link:hover { background: var(--wp--preset--color--palette-color-3); }

.saskia-subnav__link.is-active {
	background: var(--wp--preset--color--palette-color-1);
	color: var(--wp--preset--color--palette-color-8);
}

html { scroll-padding-top: 80px; }

/* ---------- Nach oben ---------- */
.saskia-totop {
	position: fixed;
	right: 16px;
	bottom: 16px;
	z-index: 900;
	padding: 10px 16px;
	border: 0;
	border-radius: 4px;
	background: var(--wp--preset--color--palette-color-1);
	color: var(--wp--preset--color--palette-color-8);
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	cursor: pointer;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s, visibility 0.3s;
}

.saskia-totop.is-visible {
	opacity: 1;
	visibility: visible;
}

.saskia-totop:hover { background: var(--wp--preset--color--palette-color-2); }

/* ---------- Weniger Bewegung, wenn im System eingestellt ---------- */
@media (prefers-reduced-motion: reduce) {
	.saskia-huhn.is-hopping,
	.saskia-hud.is-bump,
	.saskia-reward,
	.saskia-huhn__bubble {
		animation: none !important;
	}
	.mein-art-carousel .stk-row {
		animation: none !important;
	}
	.mein-art-carousel {
		overflow-x: auto !important;
	}
	* {
		scroll-behavior: auto !important;
	}
}

/* ==========================================================
   Kapitel & Einrasten beim Scrollen
   ========================================================== */
:root {
	--header-h: 96px;
}

/* Header klebt oben (Sticky muss am äußeren Template-Part-Element sitzen) */
.wp-site-blocks > header.wp-block-template-part {
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--wp--preset--color--palette-color-8);
}

.admin-bar .wp-site-blocks > header.wp-block-template-part {
	top: 32px;
}

@media (max-width: 782px) {
	.admin-bar .wp-site-blocks > header.wp-block-template-part { top: 46px; }
}

html {
	scroll-padding-top: var(--header-h);
}

:root {
	--header-h: 130px; /* Startwert, JS misst nach */
	--footer-h: 118px;
}

.saskia-kapitel {
	position: relative;
	z-index: 1;
	min-height: calc(100svh - var(--header-h));
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding-top: 48px;
	padding-bottom: 48px;
	margin-top: 0 !important;
	box-sizing: border-box;
}

.saskia-kapitel > *:not(.alignfull) {
	width: 100%;
}

/* Das erste Kapitel (Banner) beginnt direkt unter dem Header */
/* Banner-Szene: mittig unter dem Header, mit Luft nach oben */
.saskia-kapitel.is-trail-none {
	justify-content: center;
	padding-top: clamp(16px, 4vh, 48px);
}

/* Letzte Szene endet mit Kontaktformular + Footer, danach ist Schluss */
.saskia-kapitel.is-last {
	min-height: calc(100svh - var(--header-h) - var(--footer-h, 0px));
	padding-bottom: 32px;
}

body:has(.saskia-kapitel) .wp-site-blocks > main {
	margin-bottom: 0 !important;
	padding-bottom: 0 !important;
}

body:has(.saskia-kapitel) .wp-site-blocks > main .entry-content,
body:has(.saskia-kapitel) .wp-site-blocks > main .wp-block-post-content {
	margin-bottom: 0 !important;
	padding-bottom: 0 !important;
}

body:has(.saskia-kapitel) .wp-site-blocks > footer,
body:has(.saskia-kapitel) .wp-site-blocks > footer > :first-child {
	margin-block-start: 0 !important;
}

.saskia-kapitel.is-trail-none .saskia-banner + .wp-block-buttons {
	margin-top: 3rem;
}

/* Punkte rechts */
.saskia-dots {
	position: fixed;
	right: 14px;
	top: 50%;
	transform: translateY(-50%);
	z-index: 700;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.saskia-dots__dot {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
}

.saskia-dots__dot::before {
	content: "";
	width: 10px;
	height: 10px;
	border-radius: 50%;
	border: 2px solid var(--wp--preset--color--palette-color-1);
	background: transparent;
	transition: background 0.2s, transform 0.2s;
}

.saskia-dots__dot:hover::before { transform: scale(1.2); }
.saskia-dots__dot.is-active::before { background: var(--wp--preset--color--palette-color-1); }

.saskia-dots__dot:focus-visible {
	outline: 2px solid var(--wp--preset--color--palette-color-4);
	border-radius: 50%;
}

@media (max-width: 1000px) {
	.saskia-dots { display: none; }
}

/* Kategorie-Leiste (Portfolio) unter dem Header */
.saskia-subnav {
	top: var(--header-h);
}

.admin-bar .saskia-subnav {
	top: calc(var(--header-h) + 32px);
}

/* ==========================================================
   Roter Faden: gepunktete Route (runde Punkte, gleicher Abstand)
   ========================================================== */
.saskia-trail {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	z-index: 0;
	pointer-events: none;
	overflow: hidden;
}

.saskia-trail svg {
	display: block;
}

.saskia-trail__route {
	fill: none;
	stroke: #E8A856;
	stroke-width: 5;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-dasharray: 16 14;
}

.saskia-trail__end {
	fill: #E8A856;
	r: 6;
}

@media (max-width: 1000px) {
	.saskia-trail { display: none; }
}

/* Inhalte liegen über dem Pfad */
main, .saskia-footer {
	position: relative;
	z-index: 1;
}


/* ==========================================================
   Szenen (Desktop): eine Scrollgeste = nächste Szene
   html.saskia-scenes wird per JS gesetzt
   ========================================================== */
html.saskia-scenes {
	scroll-snap-type: none !important;
	scroll-behavior: auto !important;
}

html.saskia-scenes .saskia-kapitel:not(.is-trail-none) > *,
html.saskia-scenes .saskia-kapitel:not(.is-trail-none) .wp-block-columns > .wp-block-column {
	opacity: 0;
	transform: translateY(36px);
	transition: opacity 0.6s ease, transform 0.9s cubic-bezier(.2,.7,.3,1);
}

html.saskia-scenes .saskia-kapitel.is-shown > *,
html.saskia-scenes .saskia-kapitel.is-shown .wp-block-columns > .wp-block-column {
	opacity: 1;
	transform: none;
}

html.saskia-scenes .saskia-kapitel.is-shown > :nth-child(2) { transition-delay: 0.08s; }
html.saskia-scenes .saskia-kapitel.is-shown > :nth-child(3) { transition-delay: 0.16s; }
html.saskia-scenes .saskia-kapitel.is-shown > :nth-child(n+4) { transition-delay: 0.24s; }
html.saskia-scenes .saskia-kapitel.is-shown .wp-block-column:nth-child(2) { transition-delay: 0.12s; }
html.saskia-scenes .saskia-kapitel.is-shown .wp-block-column:nth-child(3) { transition-delay: 0.24s; }

/* ==========================================================
   Huhn-Cursor (Maus-Geräte)
   ========================================================== */
html.saskia-cursor-on,
html.saskia-cursor-on * {
	cursor: none !important;
}

html.saskia-cursor-on :is(input, textarea, select, [contenteditable="true"]) {
	cursor: text !important;
}

html.saskia-cursor-on select {
	cursor: default !important;
}

.saskia-cursor {
	position: fixed;
	left: 0;
	top: 0;
	z-index: 10000;
	pointer-events: none;
	will-change: transform;
}

.saskia-cursor img {
	display: block;
	width: 36px;
	height: auto;
	image-rendering: pixelated;
	transform-origin: 50% 100%;
	transition: transform 0.12s ease-out;
}

.saskia-cursor.is-moving img {
	animation: saskia-tippel 0.24s steps(2) infinite;
}

.saskia-cursor.is-point img {
	transform: rotate(-16deg);
	animation: none;
}

.saskia-cursor.is-down img {
	transform: rotate(-32deg) translateY(2px);
	animation: none;
}

.saskia-cursor.is-hidden {
	opacity: 0;
}

@keyframes saskia-tippel {
	from { transform: translateY(0); }
	to   { transform: translateY(-3px); }
}

/* Kachel-Titel nie unterstreichen (eine Kachel hatte keinen Inline-Stil) */
.portfolio-hover a {
	text-decoration: none !important;
	box-shadow: none !important;
}


/* Kein Gummiband-Überziehen oben/unten, wenn Szenen aktiv sind */
html.saskia-scenes,
html.saskia-scenes body {
	overscroll-behavior-y: none;
}


/* Zentrierte Fließtexte schmaler (Current Focus, Vision): bessere Lesebreite, mehr Luft zur Linie */
.saskia-kapitel > p.has-text-align-center {
	max-width: 50rem;
	margin-left: auto !important;
	margin-right: auto !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
	box-sizing: border-box;
}


/* Huhn neben den Social-Buttons (Kontakt) statt darunter */
.wp-block-social-links:has(+ .saskia-huhn-block) {
	display: inline-flex !important;
	vertical-align: middle;
	margin-bottom: 0 !important;
}

.wp-block-social-links + .saskia-huhn-block {
	display: inline-block;
	vertical-align: middle;
	margin: 0 0 0 14px !important;
	position: relative;
	top: 9px; /* Füße auf Höhe der Buttons */
}


/* Sammel-Hühner einheitlich ×2 (gleiche Pixelgröße wie Cursor und Stationen) */
.saskia-huhn-block .saskia-huhn {
	--huhn-scale: 2 !important;
}

/* Stationen an der Linie (Pixel Art ×2) */
.saskia-station {
	position: absolute;
	display: none;
	image-rendering: pixelated;
	pointer-events: none;
	user-select: none;
}

/* Oma: Saskias 2 Frames (Schal + Haare im Fahrtwind), Sheet 114×67, ×2 */
.saskia-station--oma {
	background: url(../img/station-oma-anim.png) 0 0 / 228px 134px no-repeat;
}

@media (prefers-reduced-motion: no-preference) {
	.saskia-station--oma {
		animation: saskia-oma-frames 0.5s steps(1) infinite;
	}
}

@keyframes saskia-oma-frames {
	0%   { background-position: 0 0; }
	50%  { background-position: -114px 0; }
}

@keyframes saskia-tuckern {
	0%   { transform: translateY(0); }
	50%  { transform: translateY(-2px); }
}


/* Performance: Stationen und Linie auf eigenen Ebenen, damit die Animation
   der Stationen nicht die lange Linie neu zeichnen lässt (sonst ruckeln die Szenenwechsel) */
.saskia-station {
	will-change: transform;
	transform: translateZ(0);
}


html.is-scene-moving .saskia-station {
	animation-play-state: paused;
}

.saskia-trail__holes rect {
	fill: var(--wp--preset--color--palette-color-8, #FAF3E0);
}


/* Cursor-Huhn dreht sich: kleiner Hüpfer, Bildwechsel oben im Sprung (kein Stauchen) */
.saskia-cursor__turn {
	display: block;
	transform-origin: 50% 100%;
}

.saskia-cursor__turn.is-turning {
	animation: saskia-turn 0.17s ease-in-out;
}

@keyframes saskia-turn {
	0%   { transform: translateY(0); }
	50%  { transform: translateY(-4px); }
	100% { transform: translateY(0); }
}


/* Picken in Blickrichtung: nach rechts schauend kippt das Huhn nach rechts,
   von vorne/hinten nickt es nur nach unten */
.saskia-cursor.is-dir-right.is-point img { transform: rotate(16deg); }
.saskia-cursor.is-dir-right.is-down img { transform: rotate(32deg) translateY(2px); }
.saskia-cursor.is-dir-front.is-point img,
.saskia-cursor.is-dir-back.is-point img { transform: translateY(2px); }
.saskia-cursor.is-dir-front.is-down img,
.saskia-cursor.is-dir-back.is-down img { transform: translateY(5px); }

/* ==========================================================
   Schrift: Tagesschrift (Überschriften) + Nunito Sans (Text)
   selbst gehostet über theme.json (assets/fonts, SIL OFL)
   ========================================================== */
:is(h1, h2, h3, h4, h5, h6, .saskia-banner__title) {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 400;
	font-synthesis: none;
	letter-spacing: 0;
}


/* Zwischentitel in den Szenen größer (z. B. „Interactive Storytelling“) */


/* Banner-Titel (Tagline) größer */
.saskia-banner__title {
	font-size: clamp(1.9rem, 1.2rem + 1.8vw, 2.9rem);
	line-height: 1.1;
}

@media (max-width: 1024px) {
	.saskia-banner__title {
		font-size: clamp(1.5rem, 1rem + 2vw, 2rem);
	}
}

/* Button unter dem Banner: die Ebenen ragen 15 % unter die Banner-Box, darunter + etwas Luft
   (der Inhalt hatte -50px Abstand nach oben, das wird hier überschrieben) */
@media (min-width: 1025px) {
	.saskia-kapitel.is-trail-none .saskia-banner + .wp-block-buttons {
		margin-top: calc(100vw * 0.375 * 0.15) !important;
	}
}

/* Einheitliche Überschriften-Hierarchie:
   Tagline (Banner) > Szenen-Titel = Kachel-Titel > Zwischentitel */
.saskia-kapitel h2 {
	font-size: clamp(1.9rem, 1.3rem + 1.3vw, 2.4rem) !important;
	line-height: 1.15;
}

.saskia-kapitel h3 {
	font-size: clamp(1.35rem, 1rem + 0.8vw, 1.75rem) !important;
	line-height: 1.15;
	margin-bottom: 0.4em;
}

/* Tagline etwas tiefer im Banner */
@media (min-width: 1025px) {
	.saskia-banner__title {
		top: clamp(28px, 3.6vw, 60px);
	}
}

/* ==========================================================
   Portfolio: Reihen (1–3 Bilder, gleiche Höhe, zugeschnitten)
   Die Anzahl der Elemente bestimmt die Breite. Hochformate werden
   zugeschnitten, die Lightbox zeigt immer das ganze Bild.
   ========================================================== */
.wp-block-group.is-style-reihe {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: minmax(0, 1fr);
	gap: 24px;
	margin-block: 24px;
	--reihe-ratio: 3 / 2;
}

.is-style-reihe > :is(.wp-block-image, .wp-block-video) {
	position: relative;
	margin: 0;
	aspect-ratio: var(--reihe-ratio);
	overflow: hidden;
	border-radius: 18px;
	transition: transform 0.35s cubic-bezier(.2,.7,.3,1), box-shadow 0.35s;
}

.is-style-reihe > :is(.wp-block-image, .wp-block-video) :is(img, video) {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: var(--fokus, 50% 50%);
}

.is-style-reihe > .is-style-fokus-oben   { --fokus: 50% 0; }
.is-style-reihe > .is-style-fokus-unten  { --fokus: 50% 100%; }
.is-style-reihe > .is-style-fokus-oben-mitte  { --fokus: 50% 20%; }
.is-style-reihe > .is-style-fokus-unten-mitte { --fokus: 50% 80%; }
.is-style-reihe > .is-style-fokus-links  { --fokus: 0 50%; }
.is-style-reihe > .is-style-fokus-rechts { --fokus: 100% 50%; }

/* Kachel-Hover wie auf der Startseite: anheben, leicht kippen, gelber Versatz-Schatten */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
	.is-style-reihe > :is(.wp-block-image, .wp-block-video):is(:hover, :focus-within) {
		transform: translateY(-8px) rotate(-1.2deg);
		box-shadow: 0 18px 0 -6px #E8A856;
	}
	.is-style-reihe > :nth-child(2):is(.wp-block-image, .wp-block-video):is(:hover, :focus-within) {
		transform: translateY(-8px) rotate(1deg);
	}
}

/* Bild-Info in der Reihe: schmale Leiste unten, das Bild bleibt sichtbar */
.is-style-reihe > figure[data-info]::after {
	inset: auto 0 0 0;
	padding: 32px 18px 14px;
	font-size: 14px;
	background: linear-gradient(transparent, rgba(71, 32, 27, 0.88));
}

@media (max-width: 600px) {
	.wp-block-group.is-style-reihe {
		grid-auto-flow: row;
		grid-auto-columns: auto;
		gap: 16px;
	}
}

/* Portfolio: mehr Luft zwischen dem Ende einer Galerie und dem nächsten Abschnitt */
.wp-block-group.is-style-reihe + :not(.is-style-reihe):not(.saskia-huhn-block),
.wp-block-group.is-style-reihe + .saskia-huhn-block + :not(.is-style-reihe) {
	margin-block-start: clamp(3.5rem, 7vw, 6rem);
}

.wp-block-post-content:has(.is-style-reihe) h2.wp-block-heading {
	margin-block-start: clamp(3rem, 6vw, 5rem);
}

/* Portfolio: Hühner nehmen keinen Platz ein, sie sitzen auf der Kante und schieben nichts */
.wp-block-post-content:has(.is-style-reihe) .saskia-huhn-block {
	height: 0;
	margin: 0 !important;
	overflow: visible;
}

.wp-block-post-content:has(.is-style-reihe) .saskia-huhn-block .saskia-huhn {
	position: absolute;
	left: 0;
	bottom: -18px;
}

.wp-block-post-content:has(.is-style-reihe) .saskia-huhn-block.alignright .saskia-huhn {
	left: auto;
	right: 0;
}

/* ==========================================================
   Ladezustand: Seite verbergen, braunes Huhn dreht sich (erst nach 0,3 s sichtbar)
   ========================================================== */
.saskia-loader { display: none; }

html.saskia-loading body > :not(.saskia-loader):not(script):not(style) {
	opacity: 0;
}

html.saskia-loading .saskia-loader {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	animation: saskia-loader-in 0.2s 0.3s forwards;
}

.saskia-loader img {
	position: absolute;
	width: 36px;
	height: 44px;
	image-rendering: pixelated;
	image-rendering: crisp-edges;
	opacity: 0;
	animation: saskia-loader-turn 0.9s step-end infinite;
}

.saskia-loader img:nth-child(2) { animation-delay: 0.225s; }
.saskia-loader img:nth-child(3) { animation-delay: 0.45s; }
.saskia-loader img:nth-child(4) { animation-delay: 0.675s; }

@keyframes saskia-loader-turn {
	0%   { opacity: 1; }
	25%  { opacity: 0; }
	100% { opacity: 0; }
}

@keyframes saskia-loader-in { to { opacity: 1; } }

html.saskia-revealing body > :not(.saskia-loader):not(script):not(style) {
	animation: saskia-reveal 0.4s ease both;
}

@keyframes saskia-reveal { from { opacity: 0; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
	.saskia-loader img { animation: none; }
	.saskia-loader img:first-child { opacity: 1; }
	html.saskia-revealing body > :not(.saskia-loader) { animation: none; }
}

/* Portfolio-Überschriften: gleiche Skala wie die Kapitel der Startseite */
.wp-block-post-content:has(.is-style-reihe) h2.wp-block-heading {
	font-size: clamp(1.9rem, 1.3rem + 1.3vw, 2.4rem);
	line-height: 1.15;
}

.wp-block-post-content:has(.is-style-reihe) h3.wp-block-heading {
	font-size: clamp(1.35rem, 1rem + 0.8vw, 1.75rem);
	line-height: 1.15;
	margin-bottom: 0.4em;
}

/* Sprungziele (Kapitel-Anker) landen unterhalb von Header UND Kategorie-Leiste */
html:has(.saskia-subnav) {
	scroll-padding-top: calc(var(--header-h) + var(--subnav-h, 56px) + 24px);
}

/* Social-Icons im Menü */
.saskia-menu__list .saskia-menu__social {
	display: flex;
	align-items: center;
}

.saskia-menu__social .wp-block-social-links {
	margin: 0;
	padding: 0;
	gap: 0.35rem;
	font-size: 26px;
}

.saskia-menu__social .wp-block-social-links .wp-social-link a {
	min-height: 0;
	padding: 0.4em;
}

@media (max-width: 780px) {
	.saskia-menu__list .saskia-menu__social {
		justify-content: flex-end;
		padding-top: 0.4rem;
	}
}

/* ==========================================================
   Buttons: gleiche Sprache wie die Kacheln
   Hover = anheben, leicht kippen, gelber Versatz-Schatten. Gedrückt = einsacken wie ein Pick.
   ========================================================== */
.wp-element-button,
.wp-block-button__link {
	transition: transform 0.3s cubic-bezier(.2,.7,.3,1), box-shadow 0.3s, background-color 0.2s;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
	.wp-element-button:is(:hover, :focus-visible),
	.wp-block-button__link:is(:hover, :focus-visible) {
		transform: translateY(-3px) rotate(-1.2deg);
		box-shadow: 0 6px 0 -1px #E8A856;
	}

	.wp-element-button:active,
	.wp-block-button__link:active {
		transform: translateY(1px) rotate(0deg);
		box-shadow: 0 0 0 0 #E8A856;
		transition-duration: 0.08s;
	}
}

/* Portfolio: Kategorie-Buttons oben brauchen Luft zum Header, sonst verschwindet der Hover-Hub darunter */
.wp-block-post-content:has(.is-style-reihe) > .wp-block-group:first-child:has(> .wp-block-buttons) {
	padding-top: 1.25rem;
	padding-bottom: 0.5rem;
}

/* Eingeloggt (schwarze WordPress-Leiste oben): Sprungziel um deren Höhe tiefer, damit der Abstand stimmt */
html:has(body.admin-bar .saskia-subnav) {
	scroll-padding-top: calc(var(--header-h) + var(--subnav-h, 56px) + 24px + 32px);
}

@media (max-width: 782px) {
	html:has(body.admin-bar .saskia-subnav) {
		scroll-padding-top: calc(var(--header-h) + var(--subnav-h, 56px) + 24px + 46px);
	}
}

/* Header-Menü: mehr Luft vor der Sprach-Flagge und vor den Social-Icons */
@media (min-width: 781px) {
	.saskia-menu__list .lang-item {
		margin-left: 1.25rem;
	}

	.saskia-menu__list .saskia-menu__social {
		margin-left: 1.5rem;
	}
}

/* Banner-Szene: passt sich auch der Fensterhöhe an.
   Breite = so groß wie die Fensterbreite, aber nie so breit, dass Banner + Button höher werden als das Fenster.
   (Höhe des Fensters minus Kopfzeile minus Platz für Button und Abstände, geteilt durch 1,15 für die überstehenden Ebenen.) */
@media (min-width: 1025px) {
	.saskia-banner {
		--bw: min(100vw, calc((100svh - var(--header-h, 130px) - 7.25rem) / 1.15 * var(--art-w) / var(--art-h)));
		margin-bottom: calc(var(--bw) * var(--art-h) / var(--art-w) * 0.15) !important;
	}

	.saskia-banner__stage {
		width: var(--bw);
		margin-inline: auto;
	}

	.saskia-kapitel.is-trail-none .saskia-banner + .wp-block-buttons {
		margin-top: 0 !important;
	}
}

/* ==========================================================
   Mobil (Handy): kompakter Header, Banner mit Luft, ruhigere Kacheln,
   kleineres Portrait, aufgeräumtes Menü, keine Bildinfos im Scrollen
   ========================================================== */
@media (max-width: 780px) {
	/* Header kleiner, damit mehr Platz für den Inhalt bleibt */
	.saskia-header .wp-block-site-logo img { width: 104px !important; height: auto; }
	.saskia-header .alignwide { padding-top: 0.45rem !important; padding-bottom: 0.45rem !important; }

	/* Banner-Szene: höhere Fläche, Spruch oben, Kunst unten, Button mit Abstand */
	/* Die Kunst ist nur von ca. 20 % bis 95 % ihrer Höhe gemalt. Deshalb: Fläche 3:2, Kunst unten bündig
	   (die leeren 5 % unten werden abgeschnitten), darüber genau Platz für den Spruch. */
	.saskia-banner__stage { aspect-ratio: 3 / 2; }
	.saskia-banner__title { top: 16px; padding: 0 18px; font-size: 1.35rem; line-height: 1.15; }
	.saskia-banner__layer { top: auto; bottom: 0; transform: translateY(5%) !important; }
	.saskia-kapitel.is-trail-none {
		min-height: 0;
		justify-content: flex-start;
		padding-top: 0;
		padding-bottom: 1rem;
	}
	.saskia-kapitel.is-trail-none .saskia-banner + .wp-block-buttons { margin-top: 1.25rem !important; }

	/* „Hi! I’m Saskia.“: Portrait links, Überschrift daneben in drei Zeilen (Hi! / I’m / Saskia.), Text darunter.
	   Beide Spalten lösen sich in ein gemeinsames Raster auf. */
	.saskia-kapitel .wp-block-columns:has(> .wp-block-column > .wp-block-image.is-style-rounded) {
		display: grid;
		grid-template-columns: 140px 1fr;
		column-gap: 22px;
		row-gap: 0;
		align-items: center;
	}
	.saskia-kapitel .wp-block-columns:has(> .wp-block-column > .wp-block-image.is-style-rounded) > .wp-block-column {
		display: contents;
	}
	.saskia-kapitel .wp-block-columns:has(> .wp-block-column > .wp-block-image.is-style-rounded) > .wp-block-column > :not(h2):not(.is-style-rounded) {
		grid-column: 1 / -1;
	}
	.saskia-kapitel .wp-block-column > .wp-block-image.is-style-rounded {
		grid-column: 1;
		grid-row: 1;
		width: 140px;
		margin: 0;
	}
	.saskia-kapitel .wp-block-columns:has(> .wp-block-column > .wp-block-image.is-style-rounded) h2 {
		grid-column: 2;
		grid-row: 1;
		word-spacing: 100vw; /* erzwingt: jedes Wort in einer eigenen Zeile (Hi! / I’m / Saskia.) */
		overflow-wrap: normal;
		word-break: normal;
		margin: 0;
		font-size: clamp(2.1rem, 9.5vw, 2.8rem) !important;
		line-height: 1.05;
	}
	.saskia-kapitel .wp-block-columns:has(> .wp-block-column > .wp-block-image.is-style-rounded) > .wp-block-column > p:first-of-type {
		margin-top: 1.4rem;
	}
	.saskia-kapitel .wp-block-columns:has(> .wp-block-column > .wp-block-image.is-style-rounded) .saskia-huhn-block {
		height: 0;
		margin: 0 !important;
		overflow: visible;
	}

	/* Aufgeklapptes Menü: Social-Icons als eine Gruppe in einer Zeile, durch eine gestrichelte Linie abgesetzt */
	.saskia-menu__list .saskia-menu__social {
		align-self: stretch;
		justify-content: center;
		margin-top: 0.4rem;
		padding-top: 0.5rem;
		border-top: 2px dashed var(--wp--preset--color--palette-color-3);
	}
	.saskia-menu__social .wp-block-social-links {
		flex-wrap: nowrap;
		gap: 0.1rem;
		font-size: 22px;
	}

	/* Portfolio: Die drei Kategorie-Buttons oben entfallen am Handy, die mitlaufende Kategorie-Leiste übernimmt */
	.wp-block-post-content:has(.is-style-reihe) > .wp-block-group:first-child:has(> .wp-block-buttons) {
		display: none;
	}
	/* die Leiste liegt über dem Anfang des Inhalts: etwas Luft darunter */
	.wp-block-post-content:has(.is-style-reihe) {
		padding-top: 1.5rem;
	}

	/* „To top“ kleiner */
	.saskia-totop { right: 12px; bottom: 12px; padding: 7px 11px; font-size: 12px; }
}

/* Touch-Geräte: es gibt kein Hover. Kacheln der Startseite ohne Abdunkeln, Titel als kleines Schild unten links;
   Bildinfos im Portfolio nur in der Lightbox, nicht beim Scrollen. */
@media (hover: none) {
	.portfolio-hover .wp-block-cover__background,
	.portfolio-hover:is(:hover, :focus-within, :active) .wp-block-cover__background { opacity: 0 !important; }

	.wp-block-cover.portfolio-hover {
		align-items: flex-end;
		justify-content: flex-start;
	}

	.portfolio-hover .wp-block-cover__inner-container {
		width: auto;
		max-width: calc(100% - 32px);
		margin: 0 0 16px 16px !important;
		padding: 0.35em 0.85em;
		background: var(--wp--preset--color--palette-color-1);
		border-radius: 4px;
		box-shadow: 0 4px 0 #E8A856;
		transform: rotate(-1.2deg);
		opacity: 1;
	}

	.saskia-kapitel .portfolio-hover h2 {
		margin: 0;
		font-size: 1.25rem !important;
		text-align: left;
		color: var(--wp--preset--color--palette-color-8);
	}

	figure[data-info]::after,
	.is-style-reihe > figure[data-info]::after {
		display: none;
	}
}

/* Handy: Kategorie-Leiste im Portfolio in einer Zeile, damit Platz für die Bilder bleibt */
@media (max-width: 600px) {
	.saskia-subnav {
		flex-wrap: nowrap;
		justify-content: center;
		gap: 2px;
		padding: 6px 6px;
	}
	.saskia-subnav__link {
		padding: 7px 8px;
		font-size: 12px;
		white-space: nowrap;
	}
}

/* Header (und damit das aufgeklappte Menü) liegt über der mitlaufenden Kategorie-Leiste (800),
   aber unter Lightbox, „To top“ und Hühner-Anzeige */
.wp-site-blocks > header.wp-block-template-part {
	z-index: 850;
}

/* Briefkasten: Saskias 2 Frames, Sheet 208×96, ×2. Fahne unten (Frame 2), nach dem Absenden des
   Kontaktformulars oben (Frame 1). Frame 2 sitzt im Original 8 px weiter links, das gleicht die Position aus. */
.saskia-station--briefkasten {
	background: url(../img/station-briefkasten-anim.png) -192px 0 / 416px 192px no-repeat;
}

html.saskia-mail-sent .saskia-station--briefkasten {
	background-position: 0 0;
}
