/*
 * Stil-Variante „Lagerfeuer“
 *
 * Wird nur geladen, wenn unter Design → Editor → Stile „Lagerfeuer“ gewählt ist
 * (siehe styles/lagerfeuer.json und functions.php). Ergänzt style.css.
 */

/* ---------- Grundton: Nacht mit leichtem Filmkorn ---------- */

body::after {
	content: "";
	position: fixed;
	inset: 0;
	z-index: 100;
	pointer-events: none;
	opacity: .07;
	mix-blend-mode: overlay;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.wj-kopf { background: var(--wp--preset--color--tanne-tief); }
.wj-kopf--ueber { background: transparent; }
.wj-anker .wp-block-navigation-item__content:hover { border-color: var(--wp--preset--color--glut); }

.is-style-wj-kicker { color: var(--wp--preset--color--glut); }

/* ---------- Waldkopf: Feuerschein hinter schwarzem Wald ---------- */

.is-style-wj-hero {
	display: grid;
	align-content: center;
	min-height: min(100vh, 60rem);
	padding-block: clamp(8rem, 14vw, 10rem) clamp(9rem, 17vw, 15rem);
	background:
		radial-gradient(90% 65% at 28% 108%, rgba(255, 106, 31, .6), rgba(223, 84, 24, .18) 45%, transparent 72%),
		radial-gradient(55% 45% at 88% 102%, rgba(223, 84, 24, .28), transparent 70%),
		var(--wp--preset--color--tanne-tief);
}
.is-style-wj-hero > * { width: 100%; }

/* Höhenlinien in Glutfarbe */
.is-style-wj-hero::before {
	opacity: .2;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 700'%3E%3Cg fill='none' stroke='%23ff8a4c' stroke-width='1.4'%3E%3Cpath d='M-50 520C150 470 260 560 420 510s260-170 430-150 280 140 400 110'/%3E%3Cpath d='M-50 470C140 420 280 510 430 460s250-170 420-160 290 120 400 90'/%3E%3Cpath d='M-50 420C130 370 290 450 440 410s240-160 410-160 300 100 400 70'/%3E%3Cpath d='M-50 360C120 320 300 390 450 350s230-150 400-150 300 80 400 50'/%3E%3Cpath d='M-50 300C110 260 300 330 460 290s220-130 390-140 300 60 400 30'/%3E%3Cpath d='M-50 240C100 200 300 270 470 230s210-110 380-120 300 40 400 10'/%3E%3Cpath d='M-50 180C90 140 300 210 480 170s200-90 370-100 300 20 400-10'/%3E%3Cpath d='M-50 120C80 80 300 150 490 110s190-70 360-80 300 0 400-30'/%3E%3C/g%3E%3C/svg%3E") center / cover no-repeat;
}

/* Waldsilhouette in Nachtfarbe, höher als in der Grundvariante */
.is-style-wj-hero::after {
	height: clamp(90px, 13vw, 190px);
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath fill='%230f1a0c' d='M0 120V92l18-10 14 6 10-30 12 30 16-8 20-40 20 40 14-4 10-22 12 24 22 6 16-12 18-50 18 50 20 8 22-2 12-30 14 30 30 4 16-18 14-44 16 44 18 16 26 0 14-20 12 18 28 6 18-26 20-58 22 58 16 20 24-4 12-24 14 26 30 2 14-16 16-40 18 40 14 14 28 2 16-30 16 30 24 6 18-22 22-52 22 52 16 18 26-2 14-22 12 20 26 4 18-18 16-36 16 36 20 14 22 0 14-26 16 26 28 8 14-14 18-46 20 46 14 12 24 2 14-20 12 22 20 0 18-8V120Z'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
}

.is-style-wj-hero .is-style-wj-kicker { color: var(--wp--preset--color--funke); }
.is-style-wj-hero h1 {
	max-width: none;
	font-size: clamp(3.2rem, 9vw, 8rem);
	line-height: .88;
	letter-spacing: -.01em;
	text-transform: uppercase;
}
.is-style-wj-hero h1 em {
	color: #ff6a1f;
	text-shadow: 0 0 .35em rgba(255, 106, 31, .45);
}
.is-style-wj-hero h1 + p { opacity: .85; }

/* Plakette: DWJ-Logo in einem drehenden Schriftring */
.is-style-wj-hero > .wp-block-group {
	--plakette: clamp(7rem, 17vw, 15rem);
	position: relative;
}
.is-style-wj-hero > .wp-block-group::before,
.is-style-wj-hero > .wp-block-group::after {
	content: "";
	position: absolute;
	top: calc(50% - var(--plakette) / 2);
	right: 0;
	width: var(--plakette);
	height: var(--plakette);
	pointer-events: none;
}
.is-style-wj-hero > .wp-block-group::before {
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 200 200'%3E%3Cdefs%3E%3Cpath id='r' d='M100 100m-78 0a78 78 0 1 1 156 0a78 78 0 1 1-156 0'/%3E%3C/defs%3E%3Ccircle cx='100' cy='100' r='97' fill='none' stroke='%23ff8a4c' stroke-width='1.2' stroke-dasharray='2 5'/%3E%3Ctext font-family='Arial Black,Arial,Helvetica,sans-serif' font-weight='900' font-size='14' fill='%23efe9d6'%3E%3CtextPath xlink:href='%23r' textLength='486' lengthAdjust='spacing'%3EDEUTSCHE WALDJUGEND %C2%B7 KOMM RAUS %C2%B7 MACH MIT %C2%B7%3C/textPath%3E%3C/text%3E%3C/svg%3E") center / contain no-repeat;
}
.is-style-wj-hero > .wp-block-group::after {
	background: url("../img/dwj-logo.svg") center / 38% auto no-repeat;
	filter: drop-shadow(0 0 1.2rem rgba(255, 106, 31, .35));
}
@media (prefers-reduced-motion: no-preference) {
	:where(body:not(.editor-styles-wrapper)) .is-style-wj-hero > .wp-block-group::before {
		animation: wj-drehen 40s linear infinite;
	}
	@keyframes wj-drehen { to { transform: rotate(360deg); } }
}
/* Auf schmalen Bildschirmen steht die Plakette über dem Text */
@media (max-width: 48rem) {
	.is-style-wj-hero > .wp-block-group { padding-top: calc(var(--plakette) + 1.5rem); }
	.is-style-wj-hero > .wp-block-group::before,
	.is-style-wj-hero > .wp-block-group::after { top: 0; left: 0; right: auto; }
}
@media (min-width: 48.01rem) {
	.is-style-wj-hero > .wp-block-group > * { max-width: calc(100% - var(--plakette) - 2rem); }
	.is-style-wj-hero > .wp-block-group > h1 + p { max-width: min(38rem, calc(100% - var(--plakette) - 2rem)); }
}

/* ---------- Karten als Aufnäher ---------- */

.wp-block-group[class*="is-style-wj-karte-"] {
	border: 0;
	background: #182612;
	outline: 2px dashed rgba(239, 233, 214, .28);
	outline-offset: -9px;
	box-shadow: 0 0 0 1px rgba(239, 233, 214, .08), 0 18px 40px -20px rgba(0, 0, 0, .7);
	transform: rotate(-.6deg);
	transition: transform .3s cubic-bezier(.2, .7, .2, 1);
}
.wp-block-group[class*="is-style-wj-karte-"]:nth-child(2n) { transform: rotate(.7deg); }
.wp-block-group[class*="is-style-wj-karte-"]:nth-child(3n) { transform: rotate(-.3deg); }
.wp-block-group[class*="is-style-wj-karte-"]:hover { transform: rotate(0) translateY(-3px); }
.wp-block-group[class*="is-style-wj-karte-"] > h3 { color: var(--wp--preset--color--moos); }
.wp-block-group[class*="is-style-wj-karte-"] > p { opacity: .82; }
.wp-block-group[class*="is-style-wj-karte-"]::before {
	border-radius: 50%;
	background-color: var(--wp--preset--color--glut);
}
.wp-block-group.is-style-wj-karte-feuer::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23160c06' stroke-width='1.8' stroke-linejoin='round' stroke-linecap='round' d='M12 3c1 3 5 5 5 9.5A5 5 0 0 1 7 12.5C7 10 8.5 9 9 7c1 1.5 1.5 2.5 1.5 3.5C12 9 12.5 6 12 3ZM5 21l14-3M5 18l14 3'/%3E%3C/svg%3E");
}
.wp-block-group.is-style-wj-karte-zelt::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23160c06' stroke-width='1.8' stroke-linejoin='round' stroke-linecap='round' d='M3 20 12 4l9 16H3Zm9-16v16m-3 0 3-5 3 5'/%3E%3C/svg%3E");
}
.wp-block-group.is-style-wj-karte-blatt::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23160c06' stroke-width='1.8' stroke-linejoin='round' stroke-linecap='round' d='M5 19C5 10 10 5 20 4c0 10-5 15-14 15Zm0 0 8-8'/%3E%3C/svg%3E");
}

/* ---------- Aktuelles ---------- */

.wj-aktuell-karte {
	border: 0;
	background: #182612;
	box-shadow: 0 0 0 1px rgba(239, 233, 214, .08), 0 18px 40px -20px rgba(0, 0, 0, .7);
}
.wj-aktuell .wp-block-post-date { color: var(--wp--preset--color--funke); }
.wj-aktuell .wp-block-post-title a { color: var(--wp--preset--color--moos); }
.wj-aktuell .wp-block-post-excerpt { opacity: .82; }
.wj-aktuell .wp-block-post-excerpt__more-link { color: var(--wp--preset--color--funke); }

/* ---------- Beitragsseite ---------- */

.wj-beitrag-kopf {
	background:
		radial-gradient(70% 60% at 30% 110%, rgba(255, 106, 31, .35), transparent 70%),
		#182612;
}
.wj-beitrag-kopf .is-style-wj-kicker { color: var(--wp--preset--color--funke); }
.wj-beitrag-kopf .wp-block-post-title { text-transform: uppercase; }
.wj-beitrag .wp-block-button.is-style-outline .wp-block-button__link { border-color: var(--wp--preset--color--glut); color: var(--wp--preset--color--funke); }
.wj-beitrag .wp-block-button.is-style-outline .wp-block-button__link:hover { background: var(--wp--preset--color--glut); color: #160c06; }
.wj-weitere.wj-weitere { background: var(--wp--preset--color--nacht); border-top: 1px solid rgba(239, 233, 214, .12); }

/* ---------- Fotos: Seite aus dem Fahrtenbuch ---------- */

.wj-abschnitt.has-weiss-background-color { color: #1e2a18; }
.wj-abschnitt.has-weiss-background-color :is(h1, h2, h3) { color: #16240f; }

.wp-block-gallery.has-nested-images.is-style-wj-mosaik { gap: 1.1rem; }
@media (min-width: 48rem) {
	.wp-block-gallery.has-nested-images.is-style-wj-mosaik { gap: 1.6rem; }
}
.wp-block-gallery.has-nested-images.is-style-wj-mosaik figure.wp-block-image {
	overflow: visible;
	padding: .55rem .55rem 2.3rem;
	border-radius: 3px;
	background: #fffdf6;
	box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .45), 0 1px 2px rgba(0, 0, 0, .12);
	transition: transform .35s cubic-bezier(.2, .7, .2, 1), box-shadow .35s;
}
.is-style-wj-mosaik > figure:nth-child(6n + 1) { transform: rotate(-1.2deg); }
.is-style-wj-mosaik > figure:nth-child(6n + 2) { transform: rotate(1.5deg); }
.is-style-wj-mosaik > figure:nth-child(6n + 3) { transform: rotate(-2deg); }
.is-style-wj-mosaik > figure:nth-child(6n + 4) { transform: rotate(1deg); }
.is-style-wj-mosaik > figure:nth-child(6n + 5) { transform: rotate(.6deg); }
.is-style-wj-mosaik > figure:nth-child(6n + 6) { transform: rotate(-1deg); }
.wp-block-gallery.has-nested-images.is-style-wj-mosaik figure.wp-block-image:hover {
	z-index: 2;
	transform: rotate(0) scale(1.02);
	box-shadow: 0 24px 40px -14px rgba(0, 0, 0, .5);
}
.wp-block-gallery.has-nested-images.is-style-wj-mosaik figure.wp-block-image img { border-radius: 2px; }
.wp-block-gallery.has-nested-images.is-style-wj-mosaik figure.wp-block-image:hover img { transform: none; }

/* Klebestreifen */
.wp-block-gallery.has-nested-images.is-style-wj-mosaik figure.wp-block-image::before {
	content: "";
	display: block;
	position: absolute;
	z-index: 1;
	top: -.7rem;
	bottom: auto;
	left: 50%;
	width: 5.5rem;
	height: 1.6rem;
	max-height: none;
	background: rgba(255, 236, 190, .6);
	box-shadow: 0 1px 2px rgba(0, 0, 0, .1);
	transform: translateX(-50%) rotate(-3deg);
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
	-webkit-mask-image: none;
	mask-image: none;
}
.wp-block-gallery.has-nested-images.is-style-wj-mosaik figure.wp-block-image figcaption {
	left: .8rem;
	right: .8rem;
	bottom: .5rem;
	padding: 0;
	border-radius: 0;
	background: none;
	color: #1e2a18;
	font-family: var(--wp--preset--font-family--display);
	font-size: .95rem;
	font-weight: 700;
	backdrop-filter: none;
}

/* ---------- Mitmachen: Glut-Karte ---------- */

.is-style-wj-dunkel {
	background: linear-gradient(135deg, #ef6a22, #c9440f);
	color: #1a0e07;
	box-shadow: 0 30px 80px -30px rgba(255, 106, 31, .55);
}
.is-style-wj-dunkel::after { filter: brightness(0); }
.is-style-wj-dunkel :is(h1, h2, h3),
.is-style-wj-dunkel .is-style-wj-kicker,
.is-style-wj-dunkel a:not(.wp-element-button) { color: #1a0e07; }
.is-style-wj-dunkel .wp-element-button { background: #160c06; color: #ffb38a; }
.is-style-wj-dunkel .wp-element-button:hover { background: #2a170b; color: #ffd2b8; }
.is-style-wj-fakten li { border-bottom-color: rgba(26, 14, 7, .22); }
.is-style-wj-fakten li strong { color: #1a0e07; opacity: .75; }

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

.wj-fuss a:hover { color: var(--wp--preset--color--funke); }
.wj-sozial .wp-social-link:hover {
	border-color: var(--wp--preset--color--glut);
	background: var(--wp--preset--color--glut) !important;
	color: #160c06 !important;
}
