/* ── Homepage Universe Scene ─────────────────────────────── */

.biff-universe {
	position: fixed;
	inset: 0;
	width: 100vw;
	height: 100dvh;
	overflow: hidden;
	background: radial-gradient(ellipse at 50% 45%, var(--biff-cosmos) 0%, var(--biff-cosmos-deep) 70%);
	cursor: default;
	user-select: none;
}

/* ── Star field ── */
.biff-stars {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

.biff-star {
	position: absolute;
	border-radius: 50%;
	background: var(--biff-white);
}

/* ── Nebula SVG overlay ── */
.biff-nebula-svg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
}

/* ── Shooting stars (shooting-star.svg as <img>) ── */
.biff-meteor {
	position: absolute;
	pointer-events: none;
	width: 200px;
	height: auto;
	opacity: 0;
}

/* ── Solar system container ── */
.biff-solar-system {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	pointer-events: none;
}

/* ── Sun (Biff avatar) ── */
.biff-sun {
	position: absolute;
	width: 200px;
	height: 200px;
	border-radius: 50%;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	overflow: hidden;
	border: 4px solid var(--biff-sun);
	box-shadow:
		0 0 0 6px rgba(255, 210, 63, 0.2),
		0 0 40px 8px rgba(255, 210, 63, 0.15),
		0 0 0 10px rgba(44, 196, 255, 0.08);
	pointer-events: all;
	cursor: pointer;
	z-index: 10;
}

.biff-sun img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 50%;
}

.biff-sun-placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: radial-gradient(circle, var(--biff-cosmos) 30%, var(--biff-cosmos-deep) 100%);
	font-family: var(--biff-font-display);
	font-size: 48px;
	color: var(--biff-sun);
	text-shadow: 0 0 12px var(--biff-sky), 2px 2px 0 var(--biff-ink);
}

/* ── Planet orbits ── */
.biff-orbit-ring {
	position: absolute;
	top: 50%;
	left: 50%;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, 0.06);
	transform: translate(-50%, -50%);
	pointer-events: none;
}

/* Each orbit arm: parent rotates (creates orbit), child counter-rotates (keeps planet upright) */
.biff-orbit-arm {
	position: absolute;
	top: 50%;
	left: 50%;
	transform-origin: 0 0;
	pointer-events: none;
}

.biff-orbit-arm.is-orbiting {
	/* Animation applied via JS to allow pause/resume */
}

.biff-planet-wrap {
	position: absolute;
	pointer-events: all;
	cursor: grab;
	touch-action: none;
}

.biff-planet-wrap:active { cursor: grabbing; }

/* Counter-rotate to keep planet upright */
.biff-planet-counter {
	/* Animation applied via JS */
}

/* ── Planet stickers (now SVG images) ── */
.biff-planet {
	position: relative;
	overflow: visible;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 180ms ease-out, filter 180ms ease-out;
}

.biff-planet:hover {
	transform: scale(1.1);
}

.biff-planet-svg-img {
	width: 100%;
	height: auto;
	display: block;
	filter: drop-shadow(3px 3px 0 #16172B);
	transition: filter 180ms ease-out;
}

.biff-planet:hover .biff-planet-svg-img {
	filter: drop-shadow(5px 5px 0 #16172B) drop-shadow(0 0 18px rgba(255,255,255,.35));
}

/* Planet label */
.biff-planet-label {
	position: absolute;
	bottom: -46px;
	left: 50%;
	transform: translateX(-50%);
	white-space: nowrap;
	font-family: var(--biff-font-accent);
	font-size: 22px;
	font-weight: 700;
	color: var(--biff-ink);
	background: var(--biff-cream);
	border: 2px solid var(--biff-ink);
	border-radius: 8px;
	padding: 2px 10px;
	box-shadow: 3px 3px 0 var(--biff-ink);
}

/* Planet tooltip */
.biff-planet-tooltip {
	position: absolute;
	bottom: calc(100% + 14px);
	left: 50%;
	transform: translateX(-50%);
	white-space: nowrap;
	font-family: var(--biff-font-accent);
	font-size: 18px;
	color: var(--biff-ink);
	background: var(--biff-sun);
	border: 2px solid var(--biff-ink);
	border-radius: 10px;
	padding: 4px 14px;
	box-shadow: 3px 3px 0 var(--biff-ink);
	opacity: 0;
	pointer-events: none;
	transition: opacity 150ms ease;
	z-index: 99;
}

.biff-planet-wrap:hover .biff-planet-tooltip { opacity: 1; }

/* ── Wordmark (top-left) ── */
.biff-wordmark {
	position: fixed;
	top: 28px;
	left: 32px;
	z-index: 100;
	text-decoration: none;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.biff-wordmark-title {
	font-family: var(--biff-font-display);
	font-size: clamp(40px, 6vw, 90px);
	line-height: 0.88;
	color: var(--biff-sun);
	-webkit-text-stroke: 2px var(--biff-ink);
	text-shadow: 0 0 20px rgba(44, 196, 255, 0.5), 3px 3px 0 var(--biff-ink);
	display: block;
	text-transform: uppercase;
}

.biff-wordmark-sub {
	font-family: var(--biff-font-accent);
	font-size: clamp(16px, 2vw, 26px);
	font-weight: 700;
	color: var(--biff-comet);
	display: block;
	margin-top: 4px;
}

/* ── Footer corner ── */
.biff-footer-corner {
	position: fixed;
	bottom: 24px;
	right: 28px;
	z-index: 100;
	text-align: right;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 6px;
}

.biff-footer-corner-credit {
	font-family: var(--biff-font-accent);
	font-size: 18px;
	color: rgba(255, 246, 226, 0.5);
}

.biff-footer-social {
	display: flex;
	gap: 10px;
}

.biff-footer-social a {
	font-family: var(--biff-font-accent);
	font-size: 16px;
	color: rgba(255, 246, 226, 0.5);
	text-decoration: none;
	transition: color 150ms;
}

.biff-footer-social a:hover { color: var(--biff-comet); }

/* ── Mobile: planet list ── */
@media (max-width: 700px) {
	.biff-solar-system  { display: none; }
	.biff-orbit-ring    { display: none; }
	.biff-planet-mobile-list {
		display: flex !important;
		flex-direction: column;
		gap: 16px;
		padding: 20px 16px;
		max-width: 480px;
		width: 100%;
		margin: 0 auto;
	}
	.biff-wordmark { top: 16px; left: 16px; }
	.biff-wordmark-title { font-size: 36px; }
	.biff-universe { overflow-y: auto; position: relative; min-height: 100dvh; }
}

@media (min-width: 701px) {
	.biff-planet-mobile-list { display: none; }
}

/* Mobile planet card */
.biff-planet-card {
	display: flex;
	align-items: center;
	gap: 16px;
	background: rgba(255,246,226,0.06);
	border: 2px solid rgba(255,246,226,0.15);
	border-radius: var(--biff-radius-card);
	padding: 14px 18px;
	text-decoration: none;
	transition: background 150ms, border-color 150ms;
}

.biff-planet-card:hover { background: rgba(255,246,226,0.12); border-color: rgba(255,246,226,0.4); }

.biff-planet-card-img {
	width: 64px;
	height: 64px;
	object-fit: contain;
	flex-shrink: 0;
	filter: drop-shadow(2px 2px 0 var(--biff-ink));
}

.biff-planet-card-text { display: flex; flex-direction: column; }

.biff-planet-card-name {
	font-family: var(--biff-font-display);
	font-size: 28px;
	color: var(--biff-sun);
}

.biff-planet-card-teaser {
	font-family: var(--biff-font-accent);
	font-size: 18px;
	color: var(--biff-cream);
	opacity: 0.75;
}

/* prefers-reduced-motion: static composition */
@media (prefers-reduced-motion: reduce) {
	.biff-orbit-arm,
	.biff-planet-counter,
	.biff-nebula-blob,
	.biff-star,
	.biff-meteor,
	.biff-sun {
		animation: none !important;
		transition: none !important;
	}
}
