/**
 * Ultras World — efekty pirotechniczne w CSS (UW_Fx). Każdy efekt działa tylko z klasą
 * `uw-fx-<klucz>` na body (Dostosuj → „Ultras — efekty”); `prefers-reduced-motion` wyłącza wszystko.
 */

/* ------------------------------------------------------------ płótna JS (ultras-fx.js) */
.uw-hero__fx {
	position: absolute;
	inset: 0;
	z-index: 2;
	width: 100%;
	height: 100%;
	pointer-events: none;
}

.uw-fx-overlay {
	position: fixed;
	inset: 0;
	z-index: 1001;
	width: 100vw;
	height: 100vh;
	pointer-events: none;
}

/* ------------------------------------------------------------ hero: migotanie łuny rac */
.uw-fx-flicker .uw-hero__photo::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background:
		radial-gradient(45% 55% at 15% 15%, rgba(255, 170, 20,  0.35), transparent 70%),
		radial-gradient(40% 50% at 80% 25%, rgba(255, 170, 20,  0.3), transparent 70%);
	mix-blend-mode: screen;
	animation: uw-flicker 2.6s steps(1, end) infinite;
}

@keyframes uw-flicker {

	0% {
		opacity: 0.55;
	}

	7% {
		opacity: 0.9;
	}

	13% {
		opacity: 0.45;
	}

	21% {
		opacity: 1;
	}

	34% {
		opacity: 0.7;
	}

	47% {
		opacity: 0.95;
	}

	55% {
		opacity: 0.5;
	}

	68% {
		opacity: 0.85;
	}

	81% {
		opacity: 0.6;
	}

	90% {
		opacity: 1;
	}
}

/* ------------------------------------------------------------ karty produktów: płonąca ramka */
@property --uw-burn {
	syntax: "<angle>";
	initial-value: 0deg;
	inherits: false;
}

.uw-fx-burn :is(.uw-product, li.uw-sc) {
	position: relative;
}

.uw-fx-burn :is(.uw-product, li.uw-sc)::after {
	content: "";
	position: absolute;
	inset: -1px;
	z-index: 3;
	padding: 1px;
	border-radius: inherit;
	background: conic-gradient(from var(--uw-burn), transparent 0 62%, var(--uw-panel) 70%, var(--uw-accent) 82%, var(--uw-text) 88%, var(--uw-accent) 92%, transparent 100%);
	-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
	-webkit-mask-composite: xor;
	mask-composite: exclude;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.25s;
}

.uw-fx-burn :is(.uw-product, li.uw-sc):hover::after,
.uw-fx-burn :is(.uw-product, li.uw-sc):focus-within::after {
	opacity: 1;
	animation: uw-burn 1.6s linear infinite;
}

@keyframes uw-burn {

	to {
		--uw-burn: 360deg;
	}
}

.uw-fx-burn :is(.uw-product, li.uw-sc):hover img {
	filter: saturate(1.25) brightness(1.08);
}

/* ------------------------------------------------------------ koszyk: stan „Added ✓” (księga 2: jedyny zielony) */
:is(.uw-product__add, .uw-sc__add, .uw-pp__cart).is-added {
	background: var(--uw-ok) !important;
	border-color: var(--uw-ok) !important;
	box-shadow: none !important;
}

/* ------------------------------------------------------------ sekcje: wejście z dymu */
.uw-reveal .uw-reveal-item {
	opacity: 0;
	filter: blur(10px);
	transform: translateY(26px);
	transition: opacity 0.7s ease, filter 0.9s ease, transform 0.7s ease;
}

.uw-reveal .uw-reveal-item.is-in {
	opacity: 1;
	filter: none;
	transform: none;
}

@media (prefers-reduced-motion: reduce) {

	.uw-fx-flicker .uw-hero__photo::after,
	.uw-fx-burn :is(.uw-product, li.uw-sc):hover::after {
		animation: none;
	}

	.uw-reveal .uw-reveal-item {
		opacity: 1;
		filter: none;
		transform: none;
		transition: none;
	}

	.uw-hero__fx,
	.uw-fx-overlay {
		display: none;
	}
}
