/*
 * Advent and Christmas decoration (seasonal, removable). Loaded only by inc/advent.php; every rule is scoped
 * to .va-advent, which advent.js puts on <html> while the season lasts.
 */

/* Shared drawing colours. */
.va-leaf { fill: #6f8a3c; }
.va-leaf--light { fill: #a2b862; }
.va-berry { fill: #d23f24; }
.va-bow { fill: #c3301c; }
.va-cap { fill: #a88d5f; }
.va-thread { stroke: #b8a17c; stroke-width: 1; }
.va-shine { fill: rgb(255 255 255 / 0.65); }
.va-star { filter: drop-shadow(0 0 4px rgb(255 214 120 / 0.8)); }

/* 1. Lights under the menu. */
.va-garland {
	position: absolute;
	left: 0;
	right: 0;
	top: 100%;
	height: 30px;
	margin-top: -1px;
	pointer-events: none;
	overflow: hidden;
}
.va-garland svg { display: block; }
.va-wire { fill: none; stroke: #5d4f45; stroke-opacity: 0.6; stroke-width: 1.1; }
.va-bulb { animation: va-twinkle 2.8s ease-in-out infinite; }
.va-b1 .va-glass { fill: #f6c654; filter: drop-shadow(0 0 4px rgb(246 198 84 / 0.95)); }
.va-b2 .va-glass { fill: #e0553a; filter: drop-shadow(0 0 4px rgb(224 85 58 / 0.9)); }
.va-b3 .va-glass { fill: #fff4d8; filter: drop-shadow(0 0 4px rgb(255 240 200 / 1)); }
.va-b4 .va-glass { fill: #93b24a; filter: drop-shadow(0 0 4px rgb(147 178 74 / 0.85)); }
@keyframes va-twinkle {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.35; }
}

/* 2. Advent wreath next to the logo, with a short caption under it. */
.va-advent .site-header .wordmark { margin-right: 0; }
.va-crown {
	display: grid;
	justify-items: center;
	gap: 0.05rem;
	margin-right: auto;
	margin-left: 0.5rem;
	flex: none;
	pointer-events: none;
}
.va-crown__art { width: 4.4rem; }
.va-crown__art svg { display: block; width: 100%; height: auto; overflow: visible; }
.va-crown__caption {
	font-family: var(--font-display, Georgia, serif);
	font-size: 0.86rem;
	font-style: italic;
	font-weight: 600;
	line-height: 1;
	white-space: nowrap;
	color: var(--terracotta, #a9472a);
}
.va-wax { fill: #fbf1dc; stroke: #d9c6a2; stroke-width: 0.8; }
.va-candle:not(.is-lit) .va-wax { fill: #efe3c8; }
.va-wick { stroke: #3a3027; stroke-width: 1.3; }
.va-halo { fill: rgb(255 196 90 / 0.28); }
.va-flame { fill: #ffbf47; filter: drop-shadow(0 0 3px rgb(255 170 60 / 0.95)); animation: va-flicker 2.2s ease-in-out infinite; }
@keyframes va-flicker {
	0%, 100% { transform: scale(1, 1) rotate(0deg); }
	30% { transform: scale(0.9, 1.08) rotate(-4deg); }
	60% { transform: scale(1.05, 0.94) rotate(3deg); }
}
@media (max-width: 639px) {
	.va-crown { margin-left: 0.2rem; }
	.va-crown__art { width: 3.3rem; }
	.va-crown__caption { font-size: 0.74rem; }
}

/* Merry Christmas / Happy New Year on the home photo, under the hanging baubles. */
.va-greet {
	position: absolute;
	top: 10.5rem;
	z-index: 2;
	font-family: var(--font-display, Georgia, serif);
	font-size: clamp(1.5rem, 1rem + 1.4vw, 2.4rem);
	font-style: italic;
	font-weight: 600;
	line-height: 1.1;
	color: #f8e2ad;
	text-shadow: 0 1px 2px rgb(0 0 0 / 0.45), 0 2px 18px rgb(0 0 0 / 0.45);
	pointer-events: none;
	white-space: nowrap;
}
.va-greet--left { left: 3%; transform: rotate(-4deg); }
.va-greet--right { right: 3%; transform: rotate(4deg); }
@media (max-width: 639px) {
	.va-greet { top: 2.5rem; font-size: 1.05rem; }
	.va-greet--left { left: 3.5%; transform: rotate(-3deg); }
	.va-greet--right { right: 3.5%; transform: rotate(3deg); }
}

/* 3. Hanging baubles and stars. */
.va-advent .page-header { position: relative; overflow: hidden; }
.va-hang { position: absolute; inset: 0 0 auto; z-index: 1; height: 0; pointer-events: none; }
.va-hang__item {
	position: absolute;
	top: 0;
	transform-origin: 50% 0;
	animation: va-sway 6s ease-in-out infinite;
}
.va-hang__item svg { display: block; overflow: visible; filter: drop-shadow(0 4px 6px rgb(0 0 0 / 0.18)); }
@keyframes va-sway {
	0%, 100% { transform: rotate(3deg); }
	50% { transform: rotate(-3deg); }
}
.va-advent .hero .va-hang { z-index: 2; }
.va-advent .page-header > .container { position: relative; z-index: 2; }

/* 4. Snow on the home photo (between the shade and the text). */
.va-snow { position: absolute; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; }
.va-snow i {
	position: absolute;
	top: -14px;
	border-radius: 50%;
	background: radial-gradient(circle, #fff 0%, rgb(255 255 255 / 0.9) 45%, rgb(255 255 255 / 0) 72%);
	animation-name: va-fall;
	animation-timing-function: linear;
	animation-iteration-count: infinite;
	will-change: transform;
}
.va-snow.is-paused i { animation-play-state: paused; }
@keyframes va-fall {
	from { transform: translate3d(0, 0, 0); }
	50% { transform: translate3d(var(--drift, 0px), 50vh, 0); }
	to { transform: translate3d(0, 100vh, 0); }
}

/* 5. Wreath around the WhatsApp button. */
.va-wa-wreath { position: absolute; inset: -11px; pointer-events: none; }
.va-wa-wreath svg { display: block; width: 100%; height: 100%; overflow: visible; }

/* 6. A little snow drift on the Book buttons: highest in the middle, with a few drips. */
.va-advent .header-book,
.va-advent .book-bar .btn--primary { position: relative; overflow: visible; }
.va-advent .header-book::before,
.va-advent .book-bar .btn--primary::before {
	content: '';
	position: absolute;
	left: -3px;
	right: -3px;
	top: -15px;
	height: 22px;
	pointer-events: none;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 20' preserveAspectRatio='none'%3E%3Cpath fill='white' d='M0 14 C3 12 6 12.5 10 11 C15 9 19 9.5 24 7 C30 4 36 1 44 0.6 C50 0.3 54 1 58 2.5 C63 4.5 67 4 71 6.5 C76 9.5 81 8.5 86 10.5 C91 12.5 96 12 100 14 L100 15.5 C97 15.5 95 15.5 93 15.5 C92.5 18.5 89.5 18.5 89 15.5 L64 15.5 C63.5 19.5 59.5 19.5 59 15.5 L22 15.5 C21.5 18 18.5 18 18 15.5 L0 15.5 Z'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
	filter: drop-shadow(0 0 1px rgb(90 60 30 / 0.45)) drop-shadow(0 1px 1.5px rgb(60 30 10 / 0.3));
}
.va-advent .book-bar .btn--primary::before { top: -19px; height: 26px; }

/* Calm version for visitors who ask for less motion: everything stays, nothing moves. */
@media (prefers-reduced-motion: reduce) {
	.va-bulb,
	.va-flame,
	.va-hang__item { animation: none; }
}
