/**
 * Seasoner – sezónne efekty v titulnom banneri (záhlaví).
 * Autor: Patrik Poruban (with Claude)
 */

.seasoner-banner-host { position: relative; }
.seasoner-banner-isolate { isolation: isolate; }

.seasoner-banner {
	position: absolute;
	inset: 0;
	overflow: hidden;
	pointer-events: none;
	z-index: 1;
}
.seasoner-banner--under { z-index: -1; }
.seasoner-banner * { pointer-events: none; }
.seasoner-banner.is-paused,
.seasoner-banner.is-paused * { animation-play-state: paused !important; }

/* ---------- Farebný nádych ---------- */
.seasoner-banner--tint::after { content: ""; position: absolute; inset: 0; }
.seasoner-banner--winter.seasoner-banner--tint::after { background: linear-gradient(to bottom, rgba(180, 220, 255, .2), transparent 55%, rgba(255, 255, 255, .12)); }
.seasoner-banner--spring.seasoner-banner--tint::after { background: linear-gradient(120deg, rgba(255, 182, 216, .16), transparent 50%, rgba(160, 230, 160, .14)); }
.seasoner-banner--summer.seasoner-banner--tint::after { background: radial-gradient(ellipse at 90% 0%, rgba(255, 205, 90, .28), transparent 60%); }
.seasoner-banner--autumn.seasoner-banner--tint::after { background: radial-gradient(ellipse at center, transparent 40%, rgba(70, 25, 0, .28)), linear-gradient(to bottom, rgba(255, 120, 30, .12), transparent); }

/* ---------- Častice ---------- */
.seasoner-banner-particle {
	position: absolute;
	top: 0;
	left: 0;
	width: var(--size, 12px);
	height: var(--size, 12px);
	will-change: transform;
	animation-timing-function: linear;
	animation-iteration-count: infinite;
}
.seasoner-banner-particle svg,
.seasoner-banner-creature svg { display: block; width: 100%; height: 100%; overflow: visible; }

.seasoner-banner-particle--fall { top: -24px; animation-name: seasoner-banner-fall; }
.seasoner-banner-particle--rise { top: auto; bottom: -16px; animation-name: seasoner-banner-rise; }
.seasoner-banner-particle--blow { left: -30px; animation-name: seasoner-banner-blow; }

.seasoner-banner--winter .seasoner-banner-particle { filter: drop-shadow(0 0 2px rgba(255, 255, 255, .7)); }
.seasoner-banner--spring .seasoner-banner-particle { filter: drop-shadow(0 1px 2px rgba(120, 40, 80, .3)); }
.seasoner-banner--summer .seasoner-banner-particle { filter: drop-shadow(0 0 5px rgba(255, 210, 80, .9)); }
.seasoner-banner--autumn .seasoner-banner-particle { filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .35)); }

@keyframes seasoner-banner-fall {
	0% { transform: translate3d(0, 0, 0) rotate(0deg); }
	50% { transform: translate3d(calc(var(--dx, 0px) * -0.5), calc(var(--bh, 200px) * .5 + 12px), 0) rotate(calc(var(--spin, 180deg) * .5)); }
	100% { transform: translate3d(var(--dx, 0px), calc(var(--bh, 200px) + 48px), 0) rotate(var(--spin, 180deg)); }
}
@keyframes seasoner-banner-rise {
	0% { transform: translate3d(0, 0, 0) scale(.6); opacity: 0; }
	20% { opacity: 1; }
	80% { opacity: .9; }
	100% { transform: translate3d(var(--dx, 0px), calc(var(--bh, 200px) * -1 - 20px), 0) scale(1.1); opacity: 0; }
}
@keyframes seasoner-banner-blow {
	0% { transform: translate3d(0, 0, 0) rotate(0deg); }
	50% { transform: translate3d(calc(var(--bw, 1200px) * .5), calc(var(--dy, 0px) + 18px), 0) rotate(calc(var(--spin, 180deg) * .5)); }
	100% { transform: translate3d(calc(var(--bw, 1200px) + 60px), var(--dy, 0px), 0) rotate(var(--spin, 180deg)); }
}

/* ---------- Tvory (motýle, vtáky, netopiere, trblietky) ---------- */
.seasoner-banner-creature {
	position: absolute;
	left: -50px;
	width: var(--size, 22px);
	height: var(--size, 22px);
	animation: seasoner-banner-fly linear forwards;
}
.seasoner-banner-creature.is-reverse { animation-direction: reverse; }
.seasoner-banner-creature.is-reverse svg { transform: scaleX(-1); }

@keyframes seasoner-banner-fly {
	0% { transform: translate3d(0, 0, 0); }
	25% { transform: translate3d(calc(var(--bw, 1200px) * .25), calc(var(--dy, 0px) * -1), 0); }
	50% { transform: translate3d(calc(var(--bw, 1200px) * .5), var(--dy, 0px), 0); }
	75% { transform: translate3d(calc(var(--bw, 1200px) * .75), calc(var(--dy, 0px) * -.5), 0); }
	100% { transform: translate3d(calc(var(--bw, 1200px) + 100px), 0, 0); }
}

.seasoner-banner-wing { transform-box: fill-box; animation: seasoner-banner-wing .28s ease-in-out infinite alternate; }
.seasoner-banner-wing--l { transform-origin: right center; }
.seasoner-banner-wing--r { transform-origin: left center; }
@keyframes seasoner-banner-wing { to { transform: scaleX(.25); } }

.seasoner-banner-flap { transform-box: fill-box; transform-origin: center; animation: seasoner-banner-flap .22s ease-in-out infinite alternate; }
@keyframes seasoner-banner-flap { to { transform: scaleY(.45); } }

.seasoner-banner-creature--sparkle {
	left: auto;
	animation: seasoner-banner-twinkle ease-in-out forwards;
	filter: drop-shadow(0 0 4px #fff);
}
@keyframes seasoner-banner-twinkle {
	0%, 100% { transform: scale(0) rotate(0deg); opacity: 0; }
	50% { transform: scale(1) rotate(45deg); opacity: 1; }
}

/* ---------- Zima ---------- */
.seasoner-banner-frost {
	position: absolute;
	inset: 0;
	background:
		radial-gradient(circle at 0 0, rgba(255, 255, 255, .45), transparent 22%),
		radial-gradient(circle at 100% 0, rgba(255, 255, 255, .45), transparent 22%);
}
.seasoner-banner-drift {
	position: absolute;
	left: 0;
	right: 0;
	bottom: -2px;
	height: 18px;
	filter: drop-shadow(0 -1px 3px rgba(150, 200, 255, .5));
}
.seasoner-banner-drift svg,
.seasoner-banner-lights svg { display: block; width: 100%; height: 100%; }

.seasoner-banner-lights { position: absolute; top: 0; left: 0; right: 0; height: 30px; }
.seasoner-banner-bulb {
	position: absolute;
	top: 12px;
	width: 7px;
	height: 11px;
	margin-left: -3.5px;
	border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
	background: var(--bulb, #ffd23f);
	box-shadow: 0 0 6px 2px var(--bulb, #ffd23f);
	animation: seasoner-banner-blink 2.4s ease-in-out infinite;
}
.seasoner-banner-bulb::before {
	content: "";
	position: absolute;
	top: -3px;
	left: 1.5px;
	width: 4px;
	height: 4px;
	border-radius: 1px;
	background: #2a3a2a;
}
@keyframes seasoner-banner-blink {
	0%, 100% { opacity: 1; box-shadow: 0 0 8px 3px var(--bulb, #ffd23f); }
	50% { opacity: .45; box-shadow: 0 0 2px 0 var(--bulb, #ffd23f); }
}

/* ---------- Jar ---------- */
.seasoner-banner-vine {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 24px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='24' viewBox='0 0 120 24'%3E%3Cpath d='M0 17Q30 7 60 17T120 17' fill='none' stroke='%235aa65a' stroke-width='2'/%3E%3Cellipse cx='18' cy='12' rx='5' ry='2.5' fill='%2379c779' transform='rotate(-30 18 12)'/%3E%3Cellipse cx='78' cy='21' rx='5' ry='2.5' fill='%2379c779' transform='rotate(25 78 21)'/%3E%3Cg fill='%23f492c0'%3E%3Ccircle cx='38' cy='8' r='3'/%3E%3Ccircle cx='44' cy='8' r='3'/%3E%3Ccircle cx='41' cy='4' r='3'/%3E%3Ccircle cx='41' cy='11' r='3'/%3E%3C/g%3E%3Ccircle cx='41' cy='8' r='1.8' fill='%23ffd76b'/%3E%3Cg fill='%23ffffff'%3E%3Ccircle cx='98' cy='16' r='2.6'/%3E%3Ccircle cx='103' cy='16' r='2.6'/%3E%3Ccircle cx='100.5' cy='12.5' r='2.6'/%3E%3Ccircle cx='100.5' cy='19' r='2.6'/%3E%3C/g%3E%3Ccircle cx='100.5' cy='16' r='1.5' fill='%23ffd76b'/%3E%3C/svg%3E") repeat-x left bottom / 120px 24px;
	animation: seasoner-banner-sway 6s ease-in-out infinite alternate;
}
@keyframes seasoner-banner-sway { to { background-position: 14px bottom; } }
.seasoner-banner-bloom {
	position: absolute;
	inset: 0;
	background:
		radial-gradient(circle at 8% 100%, rgba(255, 170, 210, .35), transparent 25%),
		radial-gradient(circle at 92% 100%, rgba(170, 235, 170, .35), transparent 25%);
}

/* ---------- Leto ---------- */
.seasoner-banner-sun {
	position: absolute;
	top: -60px;
	right: 4%;
	width: 160px;
	height: 160px;
	mix-blend-mode: screen;
}
.seasoner-banner-sun-core {
	position: absolute;
	inset: 45px;
	border-radius: 50%;
	background: radial-gradient(circle, #fffbe0 0%, #ffd84a 45%, rgba(255, 170, 40, 0) 72%);
	animation: seasoner-banner-pulse 3.2s ease-in-out infinite alternate;
}
.seasoner-banner-sun-rays {
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background: repeating-conic-gradient(rgba(255, 220, 110, .55) 0deg 6deg, transparent 6deg 22deg);
	-webkit-mask: radial-gradient(circle, #000 25%, transparent 70%);
	mask: radial-gradient(circle, #000 25%, transparent 70%);
	animation: seasoner-banner-spin 40s linear infinite;
}
@keyframes seasoner-banner-spin { to { transform: rotate(360deg); } }
@keyframes seasoner-banner-pulse { to { transform: scale(1.12); filter: brightness(1.1); } }

.seasoner-banner-sweep {
	position: absolute;
	top: 0;
	bottom: 0;
	left: -40%;
	width: 30%;
	background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .22), transparent);
	animation: seasoner-banner-sweep 9s ease-in-out infinite;
}
@keyframes seasoner-banner-sweep {
	0%, 60% { transform: translateX(0); }
	100% { transform: translateX(calc(var(--bw, 1200px) * 1.2 + 100%)); }
}

/* ---------- Jeseň ---------- */
.seasoner-banner-fog {
	position: absolute;
	left: -50%;
	width: 200%;
	bottom: -10px;
	height: 60%;
	background:
		radial-gradient(ellipse at 20% 80%, rgba(230, 225, 235, .35), transparent 50%),
		radial-gradient(ellipse at 60% 90%, rgba(230, 225, 235, .3), transparent 45%),
		radial-gradient(ellipse at 90% 80%, rgba(230, 225, 235, .3), transparent 50%);
	filter: blur(6px);
	animation: seasoner-banner-fog 28s ease-in-out infinite alternate;
}
.seasoner-banner-fog--b { height: 45%; opacity: .7; animation-duration: 19s; animation-direction: alternate-reverse; }
@keyframes seasoner-banner-fog { to { transform: translateX(25%); } }

.seasoner-banner-web { position: absolute; top: 0; left: 0; width: 90px; height: 90px; }
.seasoner-banner-web svg { display: block; width: 100%; height: 100%; }

.seasoner-banner-spider {
	position: absolute;
	top: 0;
	left: 58px;
	width: 16px;
	animation: seasoner-banner-dangle 5s ease-in-out infinite alternate;
	transform-origin: top center;
}
.seasoner-banner-spider-thread { display: block; width: 1px; height: 34px; margin: 0 auto; background: rgba(255, 255, 255, .6); }
.seasoner-banner-spider svg { display: block; width: 16px; height: 14px; }
@keyframes seasoner-banner-dangle {
	0% { transform: translateY(-14px) rotate(-4deg); }
	100% { transform: translateY(10px) rotate(4deg); }
}

/* ---------- Mobil a obmedzený pohyb ---------- */
@media (max-width: 600px) {
	.seasoner-banner-sun { width: 110px; height: 110px; top: -40px; }
	.seasoner-banner-sun-core { inset: 30px; }
	.seasoner-banner-web { width: 60px; height: 60px; }
	.seasoner-banner-spider { left: 38px; }
}

@media (prefers-reduced-motion: reduce) {
	.seasoner-banner,
	.seasoner-banner * { animation: none !important; }
}
