/* Cerdan Orbit: the Orbit Hero widget. Every rule is scoped to .cs-orbit, so nothing here touches the rest of the site.
   The colors below are the daytime set; the script repaints them from the visitor's clock. */

.cs-orbit {
	--night-a: #071529; --night-b: #0B1F3A;
	--glow: rgba(217,232,239,0.25); --glow-half: rgba(217,232,239,0.125); --glow-band: rgba(217,232,239,0.14); --glow-0: rgba(217,232,239,0);
	--ink: #0B1F3A; --body: #4A5468; --em: #C8492B; --eyebrow: #296E85; --brick-text: #B03E22;
	--grid: rgba(11,31,58,0.05); --ghost: rgba(11,31,58,0.35);
	--n: 0; --node: #296E85; --node-mid: #296E85; --ringc: #0B1F3A; --linec: #0B1F3A; --pill: #0B1F3A;
	--cs-display: var(--e-global-typography-uicore_primary-font-family, 'Unbounded'), 'Arial Black', 'Helvetica Neue', sans-serif;
	--cs-text: var(--e-global-typography-uicore_text-font-family, 'Space Grotesk'), 'Helvetica Neue', Arial, sans-serif;
	--cs-serif: var(--e-global-typography-uicore_secondary-font-family, 'Instrument Serif'), Georgia, serif;
	position: relative;
	overflow: hidden;
	isolation: isolate;
	display: flex;
	align-items: center;
	box-sizing: border-box;
	background: linear-gradient(180deg, var(--night-a) 0%, var(--night-b) 100%);
	font-family: var(--cs-text);
	color: var(--ink);
	font-size: 16px;
	line-height: 1.5;
}
.cs-orbit *, .cs-orbit *::before, .cs-orbit *::after { box-sizing: border-box; }
/* The first paint lands on the right colors at once; fades are only for the switch at dusk and dawn. */
.cs-orbit.is-booting, .cs-orbit.is-booting * { transition: none !important; }

/* Words always sit on a ground that is clearly light or clearly dark. The day ground fades out once at dusk and back in at dawn. */
.cs-orbit__ground { position: absolute; inset: 0; z-index: 0; pointer-events: none; background: linear-gradient(180deg, #F2F5F7 0%, #DFE7EC 100%); transition: opacity 1.6s ease; }
.cs-orbit.is-night .cs-orbit__ground { opacity: 0; }
/* The moment's color lives in a glow behind the orbit and a thin horizon, never behind the words. */
.cs-orbit__glow { position: absolute; inset: 0; z-index: 0; pointer-events: none; background: radial-gradient(ellipse 26% 46% at 74% 54%, var(--glow) 0%, var(--glow-half) 45%, var(--glow-0) 100%), linear-gradient(0deg, var(--glow-band) 0%, var(--glow-0) 12%); }
.cs-orbit__grid { display: none; position: absolute; inset: 0; z-index: 1; pointer-events: none; background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 48px 48px; }
.cs-orbit.has-grid .cs-orbit__grid { display: block; }
.cs-orbit__stars { position: absolute; inset: 0; z-index: 1; opacity: var(--n); pointer-events: none; }
.cs-orbit__starcanvas,
.cs-orbit__starlayer { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.cs-orbit__sky { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }

/* Lines up with the UiCore header: the same box, the same 10px inside it. */
.cs-orbit__wrap { position: relative; z-index: auto; width: min(95%, var(--uicore-container-width, 1296px)); margin: 0 auto; padding-inline: 10px; }
.cs-orbit__stage { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr); align-items: center; gap: clamp(16px, 3vw, 48px); padding-block: calc(85px + clamp(24px, 5vw, 56px)) clamp(40px, 6vw, 80px); }
.cs-orbit.has-controls .cs-orbit__stage { padding-bottom: clamp(20px, 3.5vw, 44px); }
@media (max-width: 1025px) { .cs-orbit__stage { padding-top: calc(56px + 28px); } }
.cs-orbit__copy { display: flex; flex-direction: column; gap: 24px; min-width: 0; }

.cs-orbit .cs-orbit__eyebrow { font-family: var(--cs-text); font-size: 12px; font-weight: 700; line-height: 1.3; letter-spacing: 0.26em; text-transform: uppercase; color: var(--eyebrow); transition: color 900ms ease; }
.cs-orbit .cs-orbit__greet { min-height: 1.1em; margin-bottom: -8px; font-family: var(--cs-serif); font-style: italic; font-weight: 400; font-size: clamp(20px, 1.8vw, 26px); line-height: 1.1; color: var(--brick-text); }
.cs-orbit .cs-orbit__title { margin: 0; padding: 0; font-family: var(--cs-display); font-weight: 700; font-size: clamp(32px, 4.4vw, 58px); line-height: 1.08; letter-spacing: -0.02em; text-transform: none; color: var(--ink); text-wrap: balance; transition: color 900ms ease; }
.cs-orbit .cs-orbit__title em { font-family: var(--cs-serif); font-style: italic; font-weight: 400; font-size: 1.16em; letter-spacing: -0.01em; color: var(--em); transition: color 900ms ease; }
.cs-orbit .cs-orbit__sub { margin: 0; max-width: 34em; font-family: var(--cs-text); font-size: clamp(16px, 1.4vw, 19px); line-height: 1.5; color: var(--body); text-wrap: pretty; }

.cs-orbit__ctas { display: flex; gap: 14px; flex-wrap: wrap; }
.cs-orbit .cs-orbit__btn { display: inline-flex; align-items: center; min-height: 56px; padding: 0 28px; border-radius: 8px; font-family: var(--cs-text); font-weight: 700; font-size: 16px; line-height: 1; text-decoration: none; white-space: nowrap; transition: background-color 200ms ease, border-color 200ms ease, color 200ms ease, opacity 450ms ease, translate 200ms ease; }
.cs-orbit .cs-orbit__btn--primary { background: #C8492B; color: #FFFFFF; border: 0; box-shadow: 0 14px 40px rgba(200,73,43,0.32); }
.cs-orbit .cs-orbit__btn--primary:hover, .cs-orbit .cs-orbit__btn--primary:focus-visible { background: #B03E22; color: #FFFFFF; translate: 0 -1px; }
.cs-orbit .cs-orbit__btn--ghost { background: transparent; border: 1px solid var(--ghost); color: var(--ink); }
.cs-orbit .cs-orbit__btn--ghost:hover, .cs-orbit .cs-orbit__btn--ghost:focus-visible { border-color: #65ABC4; color: var(--eyebrow); }
.cs-orbit .cs-orbit__btn:focus-visible { outline: 2px solid #65ABC4; outline-offset: 3px; }

/* The scene: a stack of full-size layers. Sizes inside it are in container units (100cqw = 800 drawing units), so HTML labels scale with the drawing. */
.cs-orbit__scene { position: relative; width: 100%; max-width: 640px; justify-self: end; aspect-ratio: 1; container-type: inline-size; }
.cs-orbit__layer { position: absolute; inset: 0; width: 100%; height: 100%; display: block; overflow: visible; pointer-events: none; }
.cs-orbit__scene text { font-family: var(--cs-text); font-weight: 700; font-size: 12px; letter-spacing: 0.2em; }
.cs-orbit__scene .cs-orbit__time { font-size: 13px; letter-spacing: 0.08em; }
.cs-orbit__scene .cs-orbit__mission { font-size: 11px; }

/* Text that changes with the light fades out, swaps, and fades back in. */
.cs-orbit__swap { transition: opacity 450ms ease, color 900ms ease, border-color 900ms ease; }
.cs-orbit__swap.is-out { opacity: 0; }

/* At dusk and dawn everything switches once, with a short fade. */
.cs-orbit.is-switching, .cs-orbit.is-switching *:not(.cs-orbit__swap):not(.cs-orbit__ground) { transition-property: color, background-color, border-color, fill, stroke; transition-duration: 1.2s; transition-timing-function: ease; }

/* The scene. Each moving part is its own layer, turned by the compositor: nothing is redrawn while it moves. */
.cs-orbit__spin { animation: cs-orbit-spin 40s linear infinite; transform-origin: 50% 50%; will-change: transform; }
.cs-orbit__worldglow { position: absolute; left: 28.75%; top: 28.75%; width: 42.5%; height: 42.5%; border-radius: 50%; background: radial-gradient(closest-side, rgba(200,73,43,0.6), rgba(200,73,43,0)); opacity: 0; pointer-events: none; animation: cs-orbit-breathe 6s ease-in-out infinite; will-change: transform; }
/* The constellation (Oxford rings inside the mark by day, opening into aqua rings at night): each ring is one turning layer,
   and each label counter-turns around its dot to stay upright. It rests off screen and while a tool is hovered or focused. */
.cs-orbit .cs-ring { position: absolute; inset: 0; transform-origin: 50% 50%; animation: cs-orbit-spin var(--cs-dur, 100s) linear infinite var(--cs-dir, normal); will-change: transform; pointer-events: none; }
.cs-orbit .cs-ring__art { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.cs-orbit .cs-upright { position: absolute; left: 0; top: 0; width: 0; height: 0; transform-origin: 0 0; animation: cs-orbit-spin var(--cs-dur, 100s) linear infinite var(--cs-cdir, reverse); }
.cs-orbit .cs-ring.is-still, .cs-orbit .cs-ring.is-still .cs-upright { animation: none; }
.cs-orbit.is-offstage .cs-ring, .cs-orbit.is-offstage .cs-upright, .cs-orbit.is-offstage .cs-orbit__spin, .cs-orbit.is-offstage .cs-orbit__worldglow, .cs-orbit.is-offstage .cs-orbit__starlayer,
.cs-orbit:not(.has-sky) .cs-orbit__worldglow, .cs-orbit:not(.has-sky) .cs-orbit__starlayer,
.cs-orbit .cs-ring.is-held, .cs-orbit .cs-ring.is-held .cs-upright { animation-play-state: paused; }
@keyframes cs-orbit-spin { to { transform: rotate(360deg); } }
@keyframes cs-orbit-breathe { 0%, 100% { transform: scale(0.92); } 50% { transform: scale(1.12); } }
.cs-orbit .ring { stroke: var(--ringc); }
.cs-orbit .spoke { stroke: var(--linec); }
.cs-orbit .dot, .cs-orbit .halo { fill: var(--node); }
.cs-orbit .cs-node { position: absolute; width: 0; height: 0; pointer-events: none; }
.cs-orbit .cs-node__hit { position: absolute; left: -3.75cqw; top: -3.75cqw; width: 7.5cqw; height: 7.5cqw; border-radius: 50%; pointer-events: auto; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.cs-orbit .cs-node:focus { outline: none; }
.cs-orbit .cs-node:focus-visible .cs-node__hit { outline: 1.5px solid #F3E9DF; outline-offset: -1cqw; }
.cs-orbit .cs-pill { position: absolute; left: 2cqw; top: -1.5cqw; height: 3cqw; padding: 0 1.5cqw; border-radius: 1.5cqw; background: var(--pill); color: #F3E9DF; font-family: var(--cs-text); font-weight: 700; font-size: 1.5cqw; line-height: 3cqw; letter-spacing: 0.2em; white-space: nowrap; transition: opacity 250ms ease; }
.cs-orbit .cs-node.is-left .cs-pill { left: auto; right: 2cqw; }
.cs-orbit .labels-hover .cs-pill { opacity: 0; }
.cs-orbit .labels-hover .cs-node.is-on .cs-pill { opacity: 1; }
.cs-orbit .labels-hidden .cs-pill { display: none; }

.cs-orbit .cs-orbit__shoot { position: absolute; width: 140px; height: 1.5px; background: linear-gradient(90deg, rgba(243,233,223,0), #F3E9DF); border-radius: 2px; transform: rotate(var(--cs-angle, 24deg)); opacity: 0; pointer-events: none; animation: cs-orbit-shoot 1.4s ease-out forwards; }
@keyframes cs-orbit-shoot { 0% { opacity: 0; translate: 0 0; } 15% { opacity: calc(var(--n) * 0.9); } 100% { opacity: 0; translate: var(--cs-dx, 320px) var(--cs-dy, 142px); } }

/* Live satellite seconds readout and night dot sizing. */
.cs-orbit.is-night [data-cs="satc"] { r: 15px; }
.cs-orbit [data-cs="satt"] { font-variant-numeric: tabular-nums; }

/* Interactive time & nodes control dock (starts collapsed to a compact toggle pill). */
.cs-orbit { --cs-track-rest: rgba(11, 31, 58, 0.2); }
.cs-orbit.is-night { --cs-track-rest: rgba(243, 233, 223, 0.92); }
.cs-orbit.is-scrubbing, .cs-orbit.is-scrubbing * { transition-duration: 0s !important; }
.cs-orbit__dock { position: relative; z-index: 5; padding-bottom: clamp(20px, 3vw, 34px); }
.cs-orbit__dock [hidden] { display: none !important; }
.cs-orbit__dock-closed { display: flex; justify-content: flex-end; }
.cs-orbit .cs-orbit__ctrl-toggle {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 38px; margin: 0; padding: 0 14px;
	border-radius: 8px; border: 1px solid var(--ghost);
	background: rgba(255, 255, 255, 0.68); color: var(--ink);
	font-family: var(--cs-text); font-weight: 600; font-size: 13px; line-height: 1; letter-spacing: 0.01em;
	text-transform: none; white-space: nowrap; font-variant-numeric: tabular-nums;
	box-shadow: none; cursor: pointer; appearance: none; -webkit-appearance: none;
	backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
	transition: border-color 180ms ease, color 180ms ease, background-color 180ms ease;
}
.cs-orbit.is-night .cs-orbit__ctrl-toggle { background: rgba(7, 21, 41, 0.74); border-color: rgba(243, 233, 223, 0.28); color: #FFFFFF; }
.cs-orbit .cs-orbit__ctrl-toggle:hover, .cs-orbit .cs-orbit__ctrl-toggle:focus-visible { border-color: #65ABC4; color: var(--eyebrow); }
.cs-orbit.is-night .cs-orbit__ctrl-toggle:hover, .cs-orbit.is-night .cs-orbit__ctrl-toggle:focus-visible { color: #FFFFFF; border-color: #65ABC4; }
.cs-orbit .cs-orbit__ctrl-toggle:focus-visible { outline: 2px solid #65ABC4; outline-offset: 2px; }
.cs-orbit__ctrl-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; background: #296E85; }
.cs-orbit.is-night .cs-orbit__ctrl-dot { background: #65ABC4; }
.cs-orbit__dock.is-custom .cs-orbit__ctrl-dot { background: #C8492B; }
.cs-orbit__ctrl-sep { opacity: 0.5; }

.cs-orbit__bar {
	display: grid; grid-template-columns: auto minmax(220px, 1fr) auto; align-items: center;
	gap: clamp(18px, 2.6vw, 36px); padding: 14px 18px;
	border-radius: 12px; border: 1px solid rgba(11, 31, 58, 0.16);
	background: rgba(255, 255, 255, 0.76);
	backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.cs-orbit.is-night .cs-orbit__bar {
	border-color: rgba(243, 233, 223, 0.18);
	background: rgba(7, 21, 41, 0.8);
}
.cs-orbit__readout { min-width: 112px; }
.cs-orbit__readout-time {
	font-family: var(--cs-display); font-weight: 700; font-size: clamp(18px, 1.75vw, 24px);
	line-height: 1.12; letter-spacing: -0.02em; color: var(--ink);
	font-variant-numeric: tabular-nums; white-space: nowrap;
}
.cs-orbit__readout-phase {
	margin-top: 4px; font-family: var(--cs-text); font-weight: 700; font-size: 11px;
	line-height: 1.2; letter-spacing: 0.2em; text-transform: uppercase; color: var(--eyebrow);
	white-space: nowrap;
}
.cs-orbit__scrubber { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.cs-orbit .cs-orbit__range {
	display: block; width: 100%; height: 6px; min-height: 0; margin: 10px 0 4px; padding: 0;
	border: 0; border-radius: 999px; box-shadow: none; cursor: pointer;
	appearance: none; -webkit-appearance: none;
	background: linear-gradient(90deg, #C8492B 0%, #C8492B var(--cs-pct, 50%), var(--cs-track-rest) var(--cs-pct, 50%), var(--cs-track-rest) 100%);
}
.cs-orbit .cs-orbit__range:focus-visible { outline: 2px solid #65ABC4; outline-offset: 6px; }
.cs-orbit .cs-orbit__range::-webkit-slider-runnable-track { height: 6px; border: 0; border-radius: 999px; background: transparent; }
.cs-orbit .cs-orbit__range::-webkit-slider-thumb {
	-webkit-appearance: none; appearance: none;
	width: 16px; height: 16px; margin-top: -5px; border: 0; border-radius: 50%;
	background: #C8492B; box-shadow: 0 2px 8px rgba(7, 21, 41, 0.35);
	cursor: grab; transition: transform 140ms ease;
}
.cs-orbit .cs-orbit__range:active::-webkit-slider-thumb { cursor: grabbing; transform: scale(1.12); }
.cs-orbit .cs-orbit__range::-moz-range-track { height: 6px; border: 0; border-radius: 999px; background: transparent; }
.cs-orbit .cs-orbit__range::-moz-range-thumb {
	width: 16px; height: 16px; border: 0; border-radius: 50%;
	background: #C8492B; box-shadow: 0 2px 8px rgba(7, 21, 41, 0.35);
	cursor: grab; transition: transform 140ms ease;
}
.cs-orbit .cs-orbit__range:active::-moz-range-thumb { cursor: grabbing; transform: scale(1.12); }
.cs-orbit__ticks {
	display: flex; justify-content: space-between; align-items: center; gap: 6px;
	font-family: var(--cs-text); font-weight: 500; font-size: 11px; line-height: 1.2;
	letter-spacing: 0.08em; color: var(--body); user-select: none; white-space: nowrap;
}
.cs-orbit__actions { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; }
.cs-orbit .cs-orbit__cbtn {
	display: inline-flex; align-items: center; justify-content: center;
	min-height: 40px; margin: 0; padding: 0 16px;
	border-radius: 8px; border: 1px solid var(--ghost);
	background: rgba(255, 255, 255, 0.58); color: var(--ink);
	font-family: var(--cs-text); font-weight: 700; font-size: 13.5px; line-height: 1; letter-spacing: 0.01em;
	text-transform: none; white-space: nowrap; box-shadow: none;
	cursor: pointer; appearance: none; -webkit-appearance: none;
	transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}
.cs-orbit.is-night .cs-orbit__cbtn { background: rgba(7, 21, 41, 0.85); border-color: rgba(243, 233, 223, 0.28); color: #FFFFFF; }
.cs-orbit .cs-orbit__cbtn:hover, .cs-orbit .cs-orbit__cbtn:focus-visible { border-color: #65ABC4; color: var(--eyebrow); }
.cs-orbit.is-night .cs-orbit__cbtn:hover, .cs-orbit.is-night .cs-orbit__cbtn:focus-visible { border-color: #65ABC4; color: #FFFFFF; }
.cs-orbit .cs-orbit__cbtn:focus-visible { outline: 2px solid #65ABC4; outline-offset: 2px; }
.cs-orbit .cs-orbit__cbtn.is-active, .cs-orbit .cs-orbit__cbtn[aria-pressed="true"] {
	background: #C8492B; border-color: #C8492B; color: #FFFFFF;
	box-shadow: 0 8px 22px rgba(200, 73, 43, 0.3);
}
.cs-orbit .cs-orbit__cbtn.is-active:hover, .cs-orbit .cs-orbit__cbtn[aria-pressed="true"]:hover {
	background: #B03E22; border-color: #B03E22; color: #FFFFFF;
}
.cs-orbit .cs-orbit__cbtn--hide { width: 40px; padding: 0; flex: none; }

@media (max-width: 960px) {
	.cs-orbit__bar { grid-template-columns: minmax(0, 1fr) auto; gap: 12px 16px; }
	.cs-orbit__scrubber { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
	.cs-orbit__dock-closed { justify-content: center; }
	.cs-orbit__bar { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 14px; }
	.cs-orbit__readout { display: flex; align-items: baseline; justify-content: space-between; min-width: 0; }
	.cs-orbit__readout-phase { margin-top: 0; }
	.cs-orbit__actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) 40px; gap: 6px; width: 100%; }
	.cs-orbit .cs-orbit__cbtn { padding: 0 8px; font-size: 13px; }
	.cs-orbit .cs-orbit__cbtn--hide { width: 40px; padding: 0; }
	.cs-orbit__ticks { font-size: 10px; letter-spacing: 0.04em; }
}

/* Phones and small tablets: the words sit above the orbit. (On scroll, the copy waits until the hero is 40% scrolled, then dims gently; see the script.) */
@media (max-width: 860px) {
	.cs-orbit__glow { background: radial-gradient(ellipse 60% 17% at 50% 74%, var(--glow) 0%, var(--glow-half) 45%, var(--glow-0) 100%); }
	.cs-orbit__stage { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: calc(56px + 32px); }
	.cs-orbit.has-controls .cs-orbit__stage { padding-bottom: 44px; }
	.cs-orbit__scene { justify-self: center; max-width: 440px; }
}

/* The hero's scroll drift, as a native scroll-driven animation: from when the hero's top reaches the top of the screen
   until its bottom does, the orbit sinks 90px and the words lift and fade (on phones they wait until 40%, and only dim to 70%). */
@supports (animation-timeline: view()) {
	.cs-orbit { view-timeline-name: --cs-hero; view-timeline-axis: block; }
	.cs-orbit__copy { animation: cs-orbit-copy linear both; animation-timeline: --cs-hero; animation-range: exit-crossing 0% exit-crossing 100%; }
	.cs-orbit__scene { animation: cs-orbit-scene linear both; animation-timeline: --cs-hero; animation-range: exit-crossing 0% exit-crossing 100%; }
	@media (max-width: 860px) {
		.cs-orbit__copy { animation-name: cs-orbit-copy-phone; }
		.cs-orbit.has-controls .cs-orbit__scene { animation-name: cs-orbit-scene-phone; }
	}
}
@keyframes cs-orbit-copy { from { opacity: 1; transform: translateY(0); } to { opacity: 0.45; transform: translateY(-30px); } }
@keyframes cs-orbit-copy-phone { 0% { opacity: 1; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-5.6px); } 100% { opacity: 0.7; transform: translateY(-14px); } }
@keyframes cs-orbit-scene { from { transform: translateY(0); } to { transform: translateY(90px); } }
@keyframes cs-orbit-scene-phone { from { transform: translateY(0); } to { transform: translateY(20px); } }

@media (prefers-reduced-motion: reduce) {
	.cs-orbit__copy, .cs-orbit__scene { transform: none; opacity: 1; animation: none; }
	.cs-orbit .cs-orbit__spin, .cs-orbit .cs-orbit__worldglow, .cs-orbit .cs-ring, .cs-orbit .cs-upright, .cs-orbit .cs-orbit__starlayer { animation: none; }
	.cs-orbit .cs-orbit__swap, .cs-orbit .cs-orbit__title, .cs-orbit .cs-orbit__eyebrow, .cs-orbit .cs-orbit__ctrl-toggle, .cs-orbit .cs-orbit__cbtn { transition: none; }
	.cs-orbit .cs-orbit__shoot { display: none; }
}
