/*
 * PureCSS.com
 * https://purecss.com/geometric-art/
 * An orbiting solar system drawn and animated entirely with CSS.
 */

.demo-geometric-art .art-center {
	display: flex;
	align-items: center;
	justify-content: center;
}

.demo-geometric-art .solar-system {
		position: relative;
		width: 280px;
		height: 280px;
	}

.demo-geometric-art .star {
		position: absolute;
		border-radius: 50%;
		top: 50%;
		left: 50%;
		transform: translate(-50%, -50%);
		width: 36px;
		height: 36px;
		background: radial-gradient(circle at 35% 35%, var(--yellow), #ff9040);
		box-shadow:
			0 0 12px 4px rgba(255, 212, 68, 0.5),
			0 0 40px 10px rgba(255, 212, 68, 0.15);
		animation: star-pulse 3s ease-in-out infinite;
	}

.demo-geometric-art .orbit {
		position: absolute;
		border-radius: 50%;
		top: 50%;
		left: 50%;
		transform: translate(-50%, -50%);
		border: 1px dashed rgba(255, 255, 255, .1);
		animation: orbit-spin linear infinite;
	}

:is(.demo-geometric-art .orbit) .planet {
			position: absolute;
			border-radius: 50%;
			top: 50%;
			left: 0;
		}

.demo-geometric-art .orbit-1 {
		width: 90px;
		height: 90px;
		animation-duration: 4s;
	}

:is(.demo-geometric-art .orbit-1) .planet {
			width: 10px;
			height: 10px;
			background: radial-gradient(circle at 35% 35%, var(--sky), #0055aa);
			margin-top: -5px;
			margin-left: -5px;
			box-shadow: 0 0 6px rgba(56, 189, 248, .6);
		}

.demo-geometric-art .orbit-2 {
		width: 156px;
		height: 156px;
		animation-duration: 8s;
	}

:is(.demo-geometric-art .orbit-2) .planet {
			width: 14px;
			height: 14px;
			background: radial-gradient(circle at 35% 35%, var(--coral), #991111);
			margin-top: -7px;
			margin-left: -7px;
			box-shadow: 0 0 8px rgba(255, 107, 107, .5);
		}

.demo-geometric-art .orbit-3 {
		width: 224px;
		height: 224px;
		animation-duration: 14s;
	}

:is(.demo-geometric-art .orbit-3) .planet {
			width: 11px;
			height: 11px;
			background: radial-gradient(circle at 35% 35%, var(--violet), #550099);
			margin-top: -5.5px;
			margin-left: -5.5px;
			box-shadow: 0 0 7px rgba(192, 132, 252, .5);
		}

.demo-geometric-art .orbit-4 {
		width: 272px;
		height: 272px;
		animation-duration: 22s;
	}

:is(.demo-geometric-art .orbit-4) .planet {
			width: 8px;
			height: 8px;
			background: radial-gradient(circle at 35% 35%, var(--teal), #006644);
			margin-top: -4px;
			margin-left: -4px;
			box-shadow: 0 0 6px rgba(87, 217, 163, .5);
		}

.demo-geometric-art .star-field {
		position: absolute;
		inset: 0;
		border-radius: 50%;
		pointer-events: none;
	}

:is(.demo-geometric-art .star-field)::before,:is(.demo-geometric-art .star-field)::after {
			content: "";
			position: absolute;
			border-radius: 50%;
			background: white;
		}

:is(.demo-geometric-art .star-field)::before {
			width: 2px;
			height: 2px;
			top: 20%;
			left: 15%;
			box-shadow:
				40px -10px 0 0 rgba(255,255,255,.4),
				80px 30px 0 0 rgba(255,255,255,.3),
				-20px 60px 0 0 rgba(255,255,255,.5),
				110px -20px 0 0 rgba(255,255,255,.3),
				-30px -10px 0 0 rgba(255,255,255,.4),
				120px 70px 0 0 rgba(255,255,255,.2);
		}

:is(.demo-geometric-art .star-field)::after {
			width: 1px;
			height: 1px;
			top: 60%;
			left: 70%;
			box-shadow:
				-40px 20px 0 0 rgba(255,255,255,.4),
				20px -30px 0 0 rgba(255,255,255,.3),
				-80px -10px 0 0 rgba(255,255,255,.5),
				30px 40px 0 0 rgba(255,255,255,.2);
		}

@keyframes orbit-spin {
	to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes star-pulse {
	0%, 100% {
		box-shadow:
			0 0 12px 4px rgba(255, 212, 68, 0.5),
			0 0 40px 10px rgba(255, 212, 68, 0.15);
	}
	50% {
		box-shadow:
			0 0 18px 8px rgba(255, 212, 68, 0.7),
			0 0 60px 20px rgba(255, 212, 68, 0.25);
	}
}

/* ── Variant: a moon on a nested orbit ── */

.demo-geometric-art .moon-system {
		position: relative;
		width: 200px;
		height: 200px;
	}

/* two independent durations; the compounding is done by the DOM, not by maths */
.demo-geometric-art .moon-orbit {
		width: 150px;
		height: 150px;
		animation-duration: 13s;
	}

.demo-geometric-art .moon-suborbit {
		width: 46px;
		height: 46px;
		animation-duration: 3.2s;
	}

/* half its own size in negative margin, so its center lands on the ring */
.demo-geometric-art .moon-planet {
		width: 26px;
		height: 26px;
		margin: -13px 0 0 -13px;
		background: radial-gradient(circle at 35% 35%, var(--sky), #0055aa);
		box-shadow: 0 0 10px rgba(56, 189, 248, .5);
	}

.demo-geometric-art .moon-moon {
		width: 8px;
		height: 8px;
		margin: -4px 0 0 -4px;
		background: var(--text);
	}

/* ── Variant: a whole scene from one element and four gradients ── */

/* earlier layers paint over later ones, so the hills are listed before the
   sun and the sky sits at the bottom of the stack */
.demo-geometric-art .art-scene {
		position: relative;
		width: 280px;
		height: 180px;
		border-radius: var(--radius-lg);
		overflow: hidden;
		background-image:
			radial-gradient(ellipse 160px 74px at 24% 112%, #120a24 99.5%, transparent 100%),
			radial-gradient(ellipse 180px 62px at 88% 108%, #2b1a4d 99.5%, transparent 100%),
			radial-gradient(circle 30px at 62% 64%, #ffb03a 99%, transparent 100%),
			linear-gradient(#160d33 0%, #6a2b6b 52%, #d9603f 78%, #ffb46b 100%);
	}

/* stars: one dot, then a list of hard copies of it */
:is(.demo-geometric-art .art-scene)::before {
			content: "";
			position: absolute;
			top: 22px;
			left: 30px;
			width: 2px;
			height: 2px;
			border-radius: 50%;
			background: #ffffff;
			box-shadow:
				38px 14px 0 0 rgba(255, 255, 255, .7),
				82px -8px 0 0 rgba(255, 255, 255, .5),
				126px 26px 0 0 rgba(255, 255, 255, .8),
				174px 4px 0 0 rgba(255, 255, 255, .45),
				212px 32px 0 0 rgba(255, 255, 255, .6),
				-14px 44px 0 0 rgba(255, 255, 255, .4);
		}

/* Four objects turning without stopping is exactly what this query exists
   for. Parked at their start angles the scene still reads as a solar system. */
@media (prefers-reduced-motion: reduce) {
	.demo-geometric-art .orbit,
	.demo-geometric-art .star {
		animation: none;
	}
}
