/* ============================================================
   Orrery — Earth, Sun & Moon 3D
   Instrument / observatory HUD styling, scoped to .orrery-root
   ============================================================ */

.orrery-root {
	--orr-text:    #c8d3e6;
	--orr-dim:     #7a879f;
	--orr-amber:   #ffce6b;   /* Sun        */
	--orr-blue:    #6ea8ff;   /* Earth      */
	--orr-moon:    #e9eef8;   /* Moon       */
	--orr-panel:   rgba(8, 12, 22, 0.62);
	--orr-border:  rgba(120, 160, 255, 0.16);
	--orr-glow:    rgba(120, 160, 255, 0.30);

	position: relative;
	display: block;
	min-height: 280px;
	overflow: hidden;
	border-radius: 14px;
	background: transparent !important;
	color: var(--orr-text);
	font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
	user-select: none;
}

.orrery-canvas-host {
	position: absolute;
	inset: 0;
	background: transparent !important;
}
.orrery-canvas-host canvas {
	display: block;
	width: 100% !important;
	height: 100% !important;
	background: transparent !important;
	cursor: grab;
}
.orrery-canvas-host canvas:active { cursor: grabbing; }

/* ---- HUD ---------------------------------------------------- */
.orrery-hud {
	position: absolute;
	top: 14px;
	left: 14px;
	z-index: 3;
	padding: 12px 14px;
	border-radius: 12px;
	background: var(--orr-panel);
	border: 1px solid var(--orr-border);
	backdrop-filter: blur(9px) saturate(120%);
	-webkit-backdrop-filter: blur(9px) saturate(120%);
	box-shadow: 0 8px 30px -12px rgba(0,0,0,0.7);
	max-width: 280px;
}
.orrery-hud-title {
	font-size: 11px;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--orr-dim);
	margin-bottom: 10px;
}
.orrery-hud-row {
	display: flex;
	align-items: center;
	gap: 12px;
}
.orrery-phase {
	width: 60px;
	height: 60px;
	flex: 0 0 auto;
	filter: drop-shadow(0 0 8px rgba(180, 200, 240, 0.18));
}
.orrery-hud-readout { line-height: 1.25; }

.orrery-day {
	font-family: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
	font-variant-numeric: tabular-nums;
	display: flex;
	align-items: baseline;
	gap: 5px;
}
.orrery-day-num {
	font-size: 30px;
	font-weight: 600;
	color: var(--orr-amber);
	text-shadow: 0 0 18px rgba(255, 206, 107, 0.35);
}
.orrery-day-tot { font-size: 13px; color: var(--orr-dim); }
.orrery-day-label {
	font-size: 10px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--orr-dim);
	margin-bottom: 4px;
}
.orrery-phase-name {
	font-size: 14px;
	font-weight: 600;
	color: var(--orr-moon);
}
.orrery-illum {
	font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
	font-size: 11px;
	color: var(--orr-dim);
}
.orrery-season { color: var(--orr-blue); }

/* ---- Labels ------------------------------------------------- */
.orrery-label {
	position: absolute;
	top: 0; left: 0;
	z-index: 2;
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 11px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--orr-text);
	pointer-events: none;
	white-space: nowrap;
	text-shadow: 0 1px 6px rgba(0,0,0,0.9);
	will-change: transform;
}
.orrery-label i {
	width: 6px; height: 6px;
	border-radius: 50%;
	background: currentColor;
	box-shadow: 0 0 8px currentColor;
}
.orrery-label-sun   { color: var(--orr-amber); }
.orrery-label-earth { color: var(--orr-blue); }
.orrery-label-moon  { color: var(--orr-moon); }

/* ---- Controls ----------------------------------------------- */
.orrery-controls {
	position: absolute;
	bottom: 14px;
	z-index: 3;
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 8px;
	padding: 8px;
	border-radius: 12px;
	background: var(--orr-panel);
	border: 1px solid var(--orr-border);
	backdrop-filter: blur(9px) saturate(120%);
	-webkit-backdrop-filter: blur(9px) saturate(120%);
	box-shadow: 0 8px 30px -12px rgba(0,0,0,0.7);
}
.orrery-controls--left  { left: 14px; }
.orrery-controls--right { right: 14px; }

/* Speed — top right. */
.orrery-speed {
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 3;
	padding: 8px 12px;
	border-radius: 12px;
	background: var(--orr-panel);
	border: 1px solid var(--orr-border);
	backdrop-filter: blur(9px) saturate(120%);
	-webkit-backdrop-filter: blur(9px) saturate(120%);
	box-shadow: 0 8px 30px -12px rgba(0,0,0,0.7);
}
.orrery-btn {
	appearance: none;
	border: 1px solid var(--orr-border);
	background: rgba(255,255,255,0.03);
	color: var(--orr-text);
	font: inherit;
	font-size: 12px;
	letter-spacing: 0.02em;
	padding: 7px 12px;
	border-radius: 8px;
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.orrery-btn:hover { background: rgba(120,160,255,0.10); border-color: var(--orr-glow); }
.orrery-btn:active { transform: translateY(1px); }
.orrery-btn.is-on {
	color: #04060d;
	background: var(--orr-blue);
	border-color: var(--orr-blue);
	box-shadow: 0 0 16px -2px rgba(110,168,255,0.55);
}
.orrery-btn-play.is-paused {
	color: #04060d;
	background: var(--orr-amber);
	border-color: var(--orr-amber);
	box-shadow: 0 0 16px -2px rgba(255,206,107,0.5);
}

.orrery-field {
	display: flex;
	align-items: center;
	gap: 7px;
	padding: 0 4px 0 8px;
}
.orrery-field-label {
	font-size: 11px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--orr-dim);
}
.orrery-field-val {
	font-family: ui-monospace, Menlo, Consolas, monospace;
	font-size: 12px;
	color: var(--orr-text);
	min-width: 30px;
	text-align: right;
}
.orrery-slider {
	-webkit-appearance: none;
	appearance: none;
	width: 96px;
	height: 4px;
	border-radius: 4px;
	background: linear-gradient(90deg, var(--orr-blue), rgba(120,160,255,0.18));
	outline: none;
	cursor: pointer;
}
.orrery-slider::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 14px; height: 14px;
	border-radius: 50%;
	background: #eaf1ff;
	border: 2px solid var(--orr-blue);
	box-shadow: 0 0 8px rgba(110,168,255,0.6);
}
.orrery-slider::-moz-range-thumb {
	width: 14px; height: 14px;
	border-radius: 50%;
	background: #eaf1ff;
	border: 2px solid var(--orr-blue);
}

/* ---- Focus / a11y ------------------------------------------- */
.orrery-btn:focus-visible,
.orrery-slider:focus-visible {
	outline: 2px solid var(--orr-amber);
	outline-offset: 2px;
}

/* ---- Fallback / noscript ------------------------------------ */
.orrery-fallback,
.orrery-noscript {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 24px;
	color: var(--orr-dim);
	font-size: 14px;
}

/* ---- Responsive --------------------------------------------- */
@media (max-width: 540px) {
	.orrery-hud { top: 10px; left: 10px; padding: 10px 11px; max-width: 220px; }
	.orrery-day-num { font-size: 24px; }
	.orrery-phase { width: 50px; height: 50px; }
	.orrery-controls { gap: 6px; padding: 7px 8px; bottom: 10px; }
	.orrery-btn { padding: 6px 9px; font-size: 11px; }
	.orrery-slider { width: 72px; }
}

@media (prefers-reduced-motion: reduce) {
	.orrery-btn { transition: none; }
}

/* ------------------------------------------------------------------ *
 *  Office markers: hover "bubble" matching the site design language
 *  (soft blurred light-gray fog cloud, Special Elite heading, Open Sans body)
 * ------------------------------------------------------------------ */
.orrery-root {
	--og-tw: 'Special Elite', 'Courier New', monospace;
	--og-body: 'Open Sans', Arial, sans-serif;
	--og-green: #30ce7c;
}

.orrery-root .orrery-olabel {
	position: absolute;
	top: 0;
	left: 0;
	pointer-events: none;
	white-space: nowrap;
	font-family: var(--og-tw);
	font-size: 14px;
	letter-spacing: 0.02em;
	color: #eaf1ff;
	text-shadow: 0 1px 4px rgba(0,0,0,0.92), 0 0 12px rgba(0,0,0,0.65);
	opacity: 0;
	z-index: 5;
	will-change: transform, opacity;
}

.orrery-root .orrery-card {
	position: absolute;
	z-index: 7;
	display: none;
	cursor: pointer;
	width: min(250px, 74vw);
	padding: 11px 14px 12px;
	background: transparent;
	border: 0;
	color: #222b3f;
	font-family: var(--og-body);
	pointer-events: none;
	opacity: 0;
	transform: translateY(4px) scale(0.92);
	transform-origin: left bottom;
	filter: blur(4px);
	transition: opacity 0.32s ease, transform 0.42s cubic-bezier(.3,1.12,.35,1), filter 0.32s ease;
}
.orrery-root .orrery-card.is-open {
	opacity: 1;
	pointer-events: auto;
	transform: translateY(0) scale(1);
	filter: blur(0);
	cursor: pointer;
}
/* the fuzzy gray cloud behind the text */
.orrery-root .orrery-card::before {
	content: '';
	position: absolute;
	inset: -8px;
	z-index: -1;
	background: rgba(228, 230, 234, 0.92);
	border-radius: 16px;
	filter: blur(11px);
}
.orrery-root .orrery-card-country {
	font-family: var(--og-tw);
	font-size: 19px;
	line-height: 1.25;
	color: #0d1530;
	margin-bottom: 2px;
}
.orrery-root .orrery-card-city {
	font-family: var(--og-body);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #1f8f55;
	margin-bottom: 7px;
}
.orrery-root .orrery-card-phone {
	display: inline-block;
	font-family: var(--og-body);
	font-size: 14px;
	color: #2a3550;
	text-decoration: none;
	border-bottom: 1px dashed rgba(42, 53, 80, 0.4);
	padding-bottom: 1px;
}
.orrery-root .orrery-card-phone:hover { color: #0c71c3; border-bottom-color: #0c71c3; }
.orrery-root .orrery-card-close {
	position: absolute;
	top: 2px;
	right: 4px;
	width: 20px;
	height: 20px;
	display: none;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: 0;
	color: #54607a;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	border-radius: 6px;
}
.orrery-root .orrery-card.is-pinned .orrery-card-close { display: flex; }
.orrery-root .orrery-card-close:hover { color: #0d1530; }
