/*
Theme Name: Wildblumen
Description: Hochzeits-Theme für Steffi & Moritz: Wildblumen rahmen die Seite ein, dazu Nachtblau, Playfair Display, Liana und Brittany Signature. Abgestimmt auf das Plugin wedding.planner. Alle Schriften lokal eingebunden.
Version: 1.12.0
Requires at least: 6.4
Tested up to: 7.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: wildblumen
Tags: block-patterns, full-site-editing, one-column, wide-blocks, custom-colors, editor-style
*/

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

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

body {
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	font-variant-numeric: lining-nums;
}

::selection { background: var(--wp--preset--color--line); }

a { text-decoration-thickness: 1px; text-underline-offset: 0.18em; }

:where(h1, h2, h3, h4) { text-wrap: balance; }
:where(p) { text-wrap: pretty; }

.wp-site-blocks { position: relative; }

/* ------------------------------------------------------------- Akzente */

/* Schreibschrift-Überschrift (Blockstil „Schreibschrift“) */
.is-style-wb-script,
.wb-kicker {
	font-family: var(--wp--preset--font-family--script) !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
	font-weight: 400 !important;
	font-size: var(--wp--preset--font-size--script);
	line-height: 1.1 !important;
}

.wb-kicker { margin-bottom: 0 !important; line-height: 1.35 !important; }

/* Trenner mit Blüte (Blockstil „Blüte“) */
hr.wp-block-separator.is-style-wb-blossom,
hr.wp-block-separator.is-style-wb-blossom-watercolor {
	border: 0 !important;
	height: 48px;
	width: min(280px, 70%) !important;
	max-width: none;
	margin-left: auto !important;
	margin-right: auto !important;
	background:
		url("assets/images/daisy.webp") center / auto 46px no-repeat,
		linear-gradient(currentColor, currentColor) left 50% / calc(50% - 34px) 1px no-repeat,
		linear-gradient(currentColor, currentColor) right 50% / calc(50% - 34px) 1px no-repeat;
	color: var(--wp--preset--color--line);
	opacity: 1;
}

/* Rahmen wie bei einer Karte (Blockstil „Karte“) */
.is-style-wb-frame {
	position: relative;
	border: 1px solid var(--wp--preset--color--navy);
	background: var(--wp--preset--color--base);
	padding: clamp(2rem, 6vw, 4rem) clamp(1.25rem, 5vw, 4rem) !important;
}
.is-style-wb-frame::before {
	content: "";
	position: absolute;
	inset: 6px;
	border: 1px solid var(--wp--preset--color--line);
	pointer-events: none;
}

/* Kleine Kapitälchen-Zeile */
.wb-caps {
	font-family: var(--wp--preset--font-family--display);
	text-transform: uppercase;
	letter-spacing: 0.16em;
	font-size: var(--wp--preset--font-size--small);
}

/* Abschnitte */
.wb-section { padding-block: clamp(4rem, 11vw, 8rem); scroll-margin-top: 1rem; }
.wb-section + .wb-section { padding-top: 0; }
.wb-section .wb-heading { text-align: center; margin-bottom: clamp(2rem, 5vw, 3rem); }
.wb-heading > * { margin-block: 0; }
.wb-heading > * + * { margin-top: 0.75rem; }

/* ------------------------------------------------------------- Blumenrahmen */

/*
 * Breite Bildschirme: links und rechts rahmen Wildblumen die ganze Seite ein
 * (fest stehend, der Inhalt scrollt dazwischen). Schmale Bildschirme: Blumenecken.
 */
:root { --wb-frame: 0px; }

@media (min-width: 1100px) {
	/* Links und rechts spiegelbildlich, von unten wachsend. */
	:root { --wb-frame: min(16vw, calc(84vh * 0.3236), 270px); }
	body:not(.editor-styles-wrapper)::before,
	body:not(.editor-styles-wrapper)::after {
		content: "";
		position: fixed;
		height: 84vh;
		width: var(--wb-frame);
		background-repeat: no-repeat;
		background-size: contain;
		pointer-events: none;
		z-index: 0;
	}
	body:not(.editor-styles-wrapper)::before {
		left: 0;
		bottom: 0;
		background-image: url("assets/images/frame-left.webp");
		background-position: left bottom;
	}
	body:not(.editor-styles-wrapper)::after {
		right: 0;
		bottom: 0;
		background-image: url("assets/images/frame-right.webp");
		background-position: right bottom;
	}
	body:not(.editor-styles-wrapper) .wp-site-blocks {
		padding-inline: var(--wb-frame);
	}
}

/*
 * Schmal (Handy, Tablet): Blumenranke als Kopf. Sie wächst links am Rand von
 * unten nach oben und rankt dann oben von links nach rechts – endet vor dem
 * rechten Rand. Beim ersten Seitenaufruf „wächst“ sie sichtbar (ohne Einblenden).
 */
@media (max-width: 1099px) {
	:root {
		--wb-hdr-w: min(100vw, 820px);
		--wb-band: calc(var(--wb-hdr-w) * 0.17);
	}
	body:not(.editor-styles-wrapper) .wp-site-blocks::before {
		content: "";
		position: absolute;
		top: 0;
		left: 0;
		width: var(--wb-hdr-w);
		aspect-ratio: 1170 / 658;
		background: url("assets/images/header-m.webp") left top / 100% auto no-repeat;
		pointer-events: none;
		z-index: 0;
	}
	/* Titel und Menü sitzen unter der Ranke */
	.site-header { padding-top: calc(var(--wb-band) + 0.2rem) !important; }
	.site-header { padding-left: calc(var(--wb-hdr-w) * 0.36) !important; }
	body:not(.home) .wb-page-head { padding-top: calc(var(--wb-hdr-w) * 0.2); }
}

/* Wachsen: Die Ranke wird entlang ihres Bogens freigegeben – von unten links
   nach oben und dann nach rechts. Harte Kante statt Überblendung; nur beim ersten
   Aufruf pro Besuch und erst, wenn das Bild geladen ist (Klassen wb-grow / wb-go). */
@property --wb-sweep {
	syntax: "<angle>";
	inherits: false;
	initial-value: 100deg;
}
@keyframes wb-sweep {
	from { --wb-sweep: 0deg; }
	to { --wb-sweep: 100deg; }
}
@media (max-width: 1099px) and (prefers-reduced-motion: no-preference) {
	.wb-grow body:not(.editor-styles-wrapper) .wp-site-blocks::before {
		--wb-sweep: 0deg;
		-webkit-mask-image: conic-gradient(from 268deg at 86% 100%, #000 var(--wb-sweep), transparent var(--wb-sweep));
		mask-image: conic-gradient(from 268deg at 86% 100%, #000 var(--wb-sweep), transparent var(--wb-sweep));
	}
	.wb-grow.wb-go body:not(.editor-styles-wrapper) .wp-site-blocks::before { animation: wb-sweep 3.4s cubic-bezier(.4, .1, .4, 1) both; }
	.wb-grow.wb-go body.home:not(.editor-styles-wrapper) .wp-site-blocks::before { animation-duration: 4s; }
}

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

.site-header {
	position: relative;
	z-index: 10;
	padding: 1.1rem var(--wp--style--root--padding-right) 1.1rem var(--wp--style--root--padding-left);
}
.site-header .wp-block-site-title a { color: var(--wp--preset--color--navy); }
.home .site-header .wp-block-site-title { visibility: hidden; }

/* Navigation */
.wp-block-navigation .wp-block-navigation-item__content { padding: 0.35em 0; }
.wp-block-navigation .wp-block-navigation-item__content:hover { color: var(--wp--preset--color--poppy); }
.wp-block-navigation .current-menu-item > .wp-block-navigation-item__content { text-decoration: underline; text-underline-offset: 0.5em; text-decoration-thickness: 1px; }

.wp-block-navigation__responsive-container.is-menu-open {
	background:
		url("assets/images/meadow.webp") center bottom / min(900px, 160%) auto no-repeat,
		var(--wp--preset--color--base) !important;
	padding-bottom: 40vw;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	align-items: center !important;
	padding-top: 3rem;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	align-items: center !important;
	gap: 1.2rem !important;
	font-size: 1rem;
}

/* ------------------------------------------------------------- Startbild */

.wb-intro {
	position: relative;
	min-height: calc(100svh - 5.5rem - var(--wp-admin--admin-bar--height, 0px));
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding-block: clamp(3rem, 8vh, 6rem) !important;
	margin-top: 0 !important;
}
.wb-intro > * { position: relative; z-index: 1; margin-block: 0 !important; }
.wb-intro .wb-kicker { font-size: clamp(1.8rem, 4.4vw, 2.6rem); margin-bottom: 0 !important; }
.wb-intro .wb-intro__names {
	font-family: var(--wp--preset--font-family--signature);
	font-weight: 400;
	text-transform: none;
	letter-spacing: 0;
	font-size: clamp(2.7rem, 10vw, 5.6rem);
	line-height: 1.55;
	white-space: nowrap;
	padding-inline: 0.15em;
}
.wb-intro .wp-block-separator { margin-block: clamp(0.8rem, 2vw, 1.4rem) !important; }
.wb-intro .wb-intro__names + .wp-block-separator { margin-top: clamp(1.2rem, 3vw, 2rem) !important; }
.wb-intro .wb-intro__date {
	font-family: var(--wp--preset--font-family--display);
	font-size: clamp(1.5rem, 3.4vw, 2.3rem);
	letter-spacing: 0.22em;
	line-height: 1.2;
	padding-left: 0.22em;
}
.wb-intro .wb-intro__place {
	font-family: var(--wp--preset--font-family--display);
	font-size: clamp(1rem, 1.7vw, 1.2rem);
	letter-spacing: 0.04em;
	margin-top: 0.6rem !important;
}
.wb-intro .wp-block-buttons { margin-top: clamp(1.8rem, 4vh, 2.6rem) !important; gap: 0.6rem; }
.wb-quicklinks { max-width: 640px; margin-inline: auto !important; }
.wb-quicklinks .wp-block-button__link { font-size: 0.74rem; padding: 0.7em 1.4em; letter-spacing: 0.14em; }

/* Schmal: oben die Ranke (siehe Seitenrahmen), unten eine kleine Blumenwiese */
@media (max-width: 1099px) {
	.wb-intro {
		min-height: calc(100svh - var(--wb-band) - 3.6rem - var(--wp-admin--admin-bar--height, 0px));
		background: url("assets/images/meadow.webp") center bottom / var(--wb-hdr-w) auto no-repeat;
		padding-block: max(2rem, calc(var(--wb-hdr-w) * 0.4 - 6.2rem)) calc(var(--wb-hdr-w) * 0.338 + 1.6rem) !important;
	}
}

/* ------------------------------------------------------------- Inhalte */

/* Unterschrift „Steffi & Moritz“ – dieselbe Schrift wie im Fuß. Greift auch für
   die bisherige Schreibschrift-Zeile im Willkommen-Abschnitt. */
.is-style-wb-signature,
#willkommen > p.is-style-wb-script {
	font-family: var(--wp--preset--font-family--signature) !important;
	font-size: clamp(2rem, 7vw, 2.9rem) !important;
	font-weight: 400 !important;
	line-height: 1.6 !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
}
#willkommen > .is-style-wb-signature,
#willkommen > p.is-style-wb-script { margin-top: clamp(1.6rem, 5vw, 2.6rem) !important; }
#willkommen .wb-countdown-wrap { margin-top: clamp(2.6rem, 7vw, 4rem) !important; }


.wb-page-head { position: relative; z-index: 1; text-align: center; padding-top: clamp(2.5rem, 7vw, 5rem); }
.wb-page-head .wp-block-post-title { margin-bottom: 0; }

.wb-countdown-wrap .wedp-countdown { margin: 1.6rem auto 0; }

/* FAQ */
.wp-block-details summary {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--medium);
	cursor: pointer;
	list-style: none;
	position: relative;
	padding-right: 2rem;
}
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after {
	content: "+";
	position: absolute;
	right: 0.2rem;
	top: 50%;
	transform: translateY(-50%);
	font-size: 1.4em;
	line-height: 1;
	transition: transform 0.2s;
}
.wp-block-details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.wedp-faq__item summary { font-weight: 400; }
.wedp-faq { margin: 0; }
.wp-block-details > :not(summary) { margin-top: 0.6rem; }

/* Bilder sanft */
.wp-block-image img { border-radius: 2px; }

/* Buttons: Kontur-Variante */
.wp-block-button.is-style-outline .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--navy);
	border: 1px solid var(--wp--preset--color--navy);
}
.wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: var(--wp--preset--color--navy);
	color: var(--wp--preset--color--base);
}

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

.site-footer {
	position: relative;
	text-align: center;
	padding-top: clamp(3rem, 7vw, 5rem) !important;
	padding-bottom: 2.5rem !important;
	margin-top: clamp(3rem, 8vw, 6rem) !important;
}
.site-footer > * { position: relative; }
.site-footer .wb-footer-names {
	font-family: var(--wp--preset--font-family--signature);
	font-size: clamp(1.8rem, 7vw, 2.8rem);
	line-height: 1.6;
	margin: 0;
	white-space: nowrap;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: clamp(0.6rem, 2.5vw, 1.4rem);
	max-width: none;
}
/* Standard: kleine bunte Blumenwiese aus der Karte, die unten aus der Seite wächst */
.site-footer--garland { padding-bottom: 0 !important; }
.site-footer--garland::after {
	content: "";
	display: block;
	width: min(860px, 100%);
	aspect-ratio: 1073 / 345;
	margin: 1.8rem auto 0;
	background: url("assets/images/garland.webp") center bottom / contain no-repeat;
}

/* Alternative „zart“: feine Zweige links und rechts der Namen */
.site-footer--sprigs .wb-footer-names::before,
.site-footer--sprigs .wb-footer-names::after {
	content: "";
	flex: 0 0 auto;
	width: clamp(44px, 13vw, 140px);
	aspect-ratio: 198 / 113;
	background: url("assets/images/sprig-left.webp") center / contain no-repeat;
}
.site-footer--sprigs .wb-footer-names::after { background-image: url("assets/images/sprig-right.webp"); }

/* Alternative: Fuß mit großer Blumenwiese (Template-Teil „Fußbereich mit Wiese“) */
.site-footer.site-footer--meadow {
	--wb-meadow: min(1080px, 170vw);
	padding-top: clamp(2rem, 6vw, 4rem) !important;
	padding-bottom: calc(var(--wb-meadow) * 0.338 + 1rem) !important;
	background: url("assets/images/meadow.webp") center bottom / var(--wb-meadow) auto no-repeat;
}
.site-footer .wb-legal { font-size: var(--wp--preset--font-size--small); opacity: 0.8; }
.site-footer .wb-legal a { color: inherit; }
.wb-legal span + span::before { content: "·"; margin: 0 0.6em; }

/* ------------------------------------------------------------- wedding.planner */

.wedp {
	--wedp-accent: var(--wp--preset--color--navy);
	--wedp-line: var(--wp--preset--color--line);
	--wedp-soft: var(--wp--preset--color--mist);
	--wedp-radius: 2px;
	font-family: var(--wp--preset--font-family--body);
}
.wedp:first-child { margin-top: 0; }
.wedp .wedp-title {
	font-family: var(--wp--preset--font-family--script);
	line-height: 1.35 !important;
	font-weight: 400;
	font-size: var(--wp--preset--font-size--script);
	text-transform: none;
	letter-spacing: 0;
	text-align: center;
	line-height: 1.1;
}
.wedp .wedp-lead { text-align: center; font-size: var(--wp--preset--font-size--large); font-family: var(--wp--preset--font-family--display); }
.wedp-rsvp > .wedp-muted, .wedp-upload > .wedp-lead, .wedp-gallery > .wedp-lead { text-align: center; }

.wedp .wedp-card {
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--line);
	box-shadow: 0 1px 0 rgba(31, 63, 109, 0.04);
}
.wedp .wedp-card legend,
.wedp-location h4,
.wedp-timeline__body h4,
.wedp-day__title,
.wedp .wedp-subtitle {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 400;
}
.wedp .wedp-subtitle, .wedp-day__title {
	text-align: center;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	font-size: var(--wp--preset--font-size--small) !important;
}
.wedp .wedp-subtitle { font-size: var(--wedp-subtitle-size, var(--wp--preset--font-size--small)) !important; }
.wedp-day__title { margin-bottom: 1.6rem !important; }

.wedp .wedp-btn {
	font-family: var(--wp--preset--font-family--display);
	text-transform: uppercase;
	letter-spacing: 0.12em;
	font-weight: 400;
	font-size: 0.85rem;
}
.wedp .wedp-btn--small { font-size: 0.72rem; }
.wedp .wedp-btn--ghost { text-transform: none; letter-spacing: 0.02em; font-size: 0.85rem; }
.wedp .wedp-choice { font-family: var(--wp--preset--font-family--display); font-size: 0.95rem; }
.wedp input[type="text"], .wedp input[type="email"], .wedp select, .wedp textarea { border-radius: 2px; background: #fff; color: var(--wp--preset--color--navy); }
.wedp-form > .wedp-btn, .wedp-uploader > .wedp-btn { display: flex; margin-inline: auto; }

/* Ablauf: Punkte in Blütenfarben */
.wedp-timeline::before { background: var(--wp--preset--color--line); }
.wedp-timeline__item::before { background: var(--wp--preset--color--poppy); box-shadow: 0 0 0 4px #fff; }
.wedp-timeline__item:nth-child(4n+2)::before { background: var(--wp--preset--color--marigold); }
.wedp-timeline__item:nth-child(4n+3)::before { background: var(--wp--preset--color--cornflower); }
.wedp-timeline__item:nth-child(4n+4)::before { background: var(--wp--preset--color--blossom); }
.wedp-timeline__badge { border-color: var(--wp--preset--color--poppy); color: var(--wp--preset--color--navy); background: var(--wp--preset--color--base); box-shadow: 0 0 0 4px var(--wp--preset--color--base); }
.wedp-timeline__item:nth-child(4n+2) .wedp-timeline__badge { border-color: var(--wp--preset--color--marigold); }
.wedp-timeline__item:nth-child(4n+3) .wedp-timeline__badge { border-color: var(--wp--preset--color--cornflower); }
.wedp-timeline__item:nth-child(4n+4) .wedp-timeline__badge { border-color: var(--wp--preset--color--blossom); }
.wedp-timeline__time { font-family: var(--wp--preset--font-family--display); font-weight: 400; font-variant-numeric: lining-nums tabular-nums; }

/* Countdown: zarter Doppelrahmen mit Mohnblüte, gut lesbare Ziffern */
.wedp-countdown {
	position: relative;
	max-width: 34rem;
	margin: 2.2rem auto 0;
	padding: 2.4rem clamp(1rem, 5vw, 2.6rem) 1.6rem;
	border: 1px solid color-mix(in srgb, var(--wp--preset--color--navy) 55%, transparent);
	border-radius: 2px;
	outline: 1px solid color-mix(in srgb, var(--wp--preset--color--navy) 22%, transparent);
	outline-offset: -7px;
	background: var(--wp--preset--color--base);
	gap: 0.7rem;
}
.wedp-countdown::before {
	content: "";
	position: absolute;
	top: 0;
	left: 50%;
	width: 64px;
	height: 44px;
	transform: translate(-50%, -55%);
	background: url("assets/images/daisy.webp") center / auto 40px no-repeat var(--wp--preset--color--base);
}
.wedp-countdown__intro,
.wedp-countdown__label,
.wedp-countdown__date {
	font-family: var(--wp--preset--font-family--display);
	text-transform: uppercase;
	letter-spacing: 0.18em;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--navy);
}
.wedp-countdown__intro { opacity: 0.75; }
.wedp-countdown__label { font-size: 0.72rem; margin-top: 0.35rem; opacity: 0.8; }
.wedp-countdown__num {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 400;
	font-size: clamp(2.3rem, 9vw, 3.4rem);
	line-height: 1;
	color: var(--wp--preset--color--navy) !important;
}
.wedp-countdown__unit + .wedp-countdown__unit { border-left-color: var(--wp--preset--color--line); }
.wedp-countdown__text {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 400;
	font-size: clamp(1.4rem, 5vw, 1.9rem) !important;
	color: var(--wp--preset--color--navy) !important;
	line-height: 1.3;
}
.wedp-countdown__date { opacity: 0.7; padding-top: 0.9rem; border-top: 1px solid var(--wp--preset--color--line); width: min(100%, 18rem); }

/* Orte */
.wedp-grid { gap: 1.25rem; }
.wedp-locations .wedp-grid, .wedp-witnesses .wedp-grid { grid-template-columns: repeat(auto-fit, minmax(250px, 360px)); justify-content: center; }
.wedp-location { text-align: center; }
.wedp-location .wedp-links { justify-content: center; }
.wedp-facts { text-align: left; }
.wedp-location { border-top: 3px solid var(--wp--preset--color--poppy) !important; }
.wedp-loccat-1 .wedp-location { border-top-color: var(--wp--preset--color--cornflower) !important; }
.wedp-loccat-2 .wedp-location { border-top-color: var(--wp--preset--color--marigold) !important; }
.wedp-loccat-3 .wedp-location { border-top-color: var(--wp--preset--color--blossom) !important; }
.wedp-loccat-4 .wedp-location { border-top-color: var(--wp--preset--color--meadow) !important; }
.wedp-loccat-5 .wedp-location { border-top-color: var(--wp--preset--color--navy) !important; }
.wedp-locgroup + .wedp-locgroup { margin-top: 2.5rem; }
.wedp-witness { border-top: 3px solid var(--wp--preset--color--cornflower) !important; }
.wedp-witness:nth-child(even) { border-top-color: var(--wp--preset--color--blossom) !important; }
.wedp-witness.has-color { border-top-color: var(--wedp-witness-color) !important; }
.wedp-witness h3 { font-family: var(--wp--preset--font-family--display); font-weight: 400; }
.wedp-witness-hint { text-align: center; }
.wedp-alt { text-align: center; }

/* Galerie & Upload */
.wedp-tile, .wedp-photogrid img { border-radius: 2px; }
.wedp-dropzone { border-radius: 2px; }
.wedp-pager__current { background: var(--wp--preset--color--navy); }
@media (min-width: 561px) {
	.wedp-timeline { --wedp-tl-col: 7.6em; }
}

/* Galerie-Filter im Theme-Look */
.wedp-uploaders { justify-content: center; }
.wedp-uploaders a { font-family: var(--wp--preset--font-family--display); }
.wedp-gallery { scroll-margin-top: 1.5rem; }
.wedp-gallery > .wedp-muted { text-align: center; }

/* Liana: das ß ist breiter gezeichnet als seine Laufweite – Abstand ausgleichen (siehe functions.php) */
.wb-sz { display: inline; }
.wb-kicker .wb-sz, .is-style-wb-script .wb-sz, .wedp-title .wb-sz { margin-right: 0.17em; }

/* Handy: leichtere Bilder (muss am Ende stehen, damit es die Tablet-Regeln überschreibt) */
@media (max-width: 480px) {
	body:not(.editor-styles-wrapper) .wp-site-blocks::before { background-image: url("assets/images/header-m-780.webp"); }
}
