/**
 * Sfere di luce Ardesia — lucine oro / bianco / viola (sotto al contenuto).
 */

html.ardesia-ambient-ready body::before,
html.ardesia-ambient-ready body::after {
	display: none !important;
}

html.ardesia-ambient-ready body {
	position: relative;
	/* Lo sfondo resta sul body: outer-wrap trasparente lascia vedere luci + viola */
	background-color: #0a0512 !important;
	background-image: linear-gradient(180deg, #12081f 0%, #1a0a24 42%, #0a0512 100%) !important;
	background-attachment: fixed !important;
}

/*
 * Contenitori layout trasparenti → le lucine (z-index 0) restano visibili.
 * Testi, card e immagini con sfondo proprio stanno sopra e le coprono dove serve.
 */
html.ardesia-ambient-ready #outer-wrap,
html.ardesia-ambient-ready #wrap,
html.ardesia-ambient-ready #main,
html.ardesia-ambient-ready #content,
html.ardesia-ambient-ready .site-main,
html.ardesia-ambient-ready .content-area,
html.ardesia-ambient-ready #content-wrap {
	position: relative;
	z-index: 1;
	background: transparent !important;
	background-color: transparent !important;
	background-image: none !important;
}

html.ardesia-ambient-ready #site-header,
html.ardesia-ambient-ready header.site-header,
html.ardesia-ambient-ready #sidebar,
html.ardesia-ambient-ready .sidebar,
html.ardesia-ambient-ready #footer,
html.ardesia-ambient-ready footer.site-footer {
	position: relative;
	z-index: 1;
}

#ardesia-ambient-lights {
	position: fixed;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	overflow: hidden;
	opacity: 0.84;
	-webkit-mask-image: radial-gradient(
		ellipse 88% 82% at 50% 48%,
		rgba(0, 0, 0, 0.5) 0%,
		rgba(0, 0, 0, 0.72) 36%,
		rgba(0, 0, 0, 1) 78%
	);
	mask-image: radial-gradient(
		ellipse 88% 82% at 50% 48%,
		rgba(0, 0, 0, 0.5) 0%,
		rgba(0, 0, 0, 0.72) 36%,
		rgba(0, 0, 0, 1) 78%
	);
}

.ardesia-ambient-orb {
	position: absolute;
	top: 0;
	left: 0;
	border-radius: 50%;
	pointer-events: none;
	will-change: transform, opacity;
	mix-blend-mode: screen;
	-webkit-transform: translateZ(0);
	transform: translateZ(0);
}

.ardesia-ambient-orb--gold {
	background: radial-gradient(
		circle,
		#fff8dc 0 8%,
		rgba(255, 215, 120, 0.95) 18%,
		rgba(255, 180, 60, 0.45) 34%,
		transparent 62%
	);
	box-shadow: 0 0 10px rgba(255, 200, 90, 0.35);
}

.ardesia-ambient-orb--white {
	background: radial-gradient(
		circle,
		#ffffff 0 7%,
		rgba(255, 255, 255, 0.92) 16%,
		rgba(240, 230, 255, 0.35) 32%,
		transparent 58%
	);
	box-shadow: 0 0 8px rgba(255, 255, 255, 0.28);
}

.ardesia-ambient-orb--violet {
	background: radial-gradient(
		circle,
		rgba(250, 232, 255, 0.98) 0 8%,
		rgba(192, 132, 252, 0.88) 18%,
		rgba(124, 58, 237, 0.38) 36%,
		transparent 62%
	);
	box-shadow: 0 0 10px rgba(168, 85, 247, 0.32);
}

/* Mobile: stelline piccole, nucleo pieno + alone corto (Safari-safe) */
@media (max-width: 767px) {
	#ardesia-ambient-lights,
	.ardesia-ambient-lights--touch {
		opacity: 0.88 !important;
		-webkit-mask-image: none !important;
		mask-image: none !important;
		filter: none !important;
	}

	#ardesia-ambient-lights .ardesia-ambient-orb,
	html.ardesia-ambient-mobile .ardesia-ambient-orb {
		mix-blend-mode: normal !important;
		filter: none !important;
	}

	#ardesia-ambient-lights .ardesia-ambient-orb--gold,
	html.ardesia-ambient-mobile .ardesia-ambient-orb--gold {
		background: #ffdc73 !important;
		box-shadow:
			0 0 0 1px rgba(255, 255, 255, 0.82),
			0 0 3px 1px rgba(255, 236, 170, 0.88),
			0 0 6px 2px rgba(255, 190, 70, 0.52) !important;
	}

	#ardesia-ambient-lights .ardesia-ambient-orb--white,
	html.ardesia-ambient-mobile .ardesia-ambient-orb--white {
		background: #ffffff !important;
		box-shadow:
			0 0 0 1px rgba(255, 255, 255, 0.88),
			0 0 3px 1px rgba(255, 255, 255, 0.88),
			0 0 6px 2px rgba(255, 255, 255, 0.38) !important;
	}

	#ardesia-ambient-lights .ardesia-ambient-orb--violet,
	html.ardesia-ambient-mobile .ardesia-ambient-orb--violet {
		background: #f0dcff !important;
		box-shadow:
			0 0 0 1px rgba(255, 255, 255, 0.78),
			0 0 3px 1px rgba(233, 196, 255, 0.86),
			0 0 6px 2px rgba(168, 85, 247, 0.46) !important;
	}
}

@media (min-width: 768px) and (pointer: coarse) {
	html.ardesia-ambient-mobile .ardesia-ambient-orb {
		mix-blend-mode: normal !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	#ardesia-ambient-lights {
		display: none !important;
	}
}
