/**
 * OGC NewFinity — Three.js space background shell.
 * Canvas is driven by assets/js/space-background.js.
 * Nebula is a subtle atmospheric texture under the WebGL scene.
 */

.ogc-bg-layer {
	position: fixed;
	inset: 0;
	z-index: 0;
	overflow: hidden;
	pointer-events: none;
	background-color: var(--ogc-bg);
}

.ogc-bg-layer__fallback {
	position: absolute;
	inset: 0;
	z-index: 0;
	background:
		radial-gradient(
			ellipse 70% 55% at 50% 40%,
			color-mix(in srgb, #1a1208 40%, transparent) 0%,
			transparent 60%
		),
		var(--ogc-bg);
}

/* Subtle nebula depth — under asteroids/particles, does not compete with UI */
.ogc-bg-layer__nebula {
	position: absolute;
	inset: 0;
	z-index: 1;
	background-image: url('../images/backgrounds/space-nebula-depth.webp');
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	opacity: 0.1;
	pointer-events: none;
}

.ogc-bg-layer__canvas {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: block;
	width: 100%;
	height: 100%;
}

/* Hide CSS fallback once WebGL has painted (nebula stays) */
.ogc-bg-layer.is-ready .ogc-bg-layer__fallback {
	opacity: 0;
}
