:root {
  color-scheme: dark;
  --paper: #f7eff8;
  --mist: #e0cce4;
  --mint: #c5f1e6;
  --editorial: 'Songti SC', 'Noto Serif SC', SimSun, Georgia, serif;
  --sans: 'Microsoft YaHei', 'PingFang SC', system-ui, sans-serif;
  background: #110e19;
  scrollbar-gutter: stable;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--paper); font: 16px/1.68 var(--sans); }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--mint); outline-offset: 5px; }
.study { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: #110e19; pointer-events: none; }
.study > * { position: absolute; inset: 0; width: 100%; height: 100%; }
.orbital-poster { background: url('assets/orbit-poster-25d-desktop.webp') center / cover no-repeat; }
.sky, .stars, .stellar-veil { display: none; }
.has-scene :is(.orbital-poster, .companions) { visibility: hidden; }
.has-scene :is(.sky, .stars, .stellar-veil) { display: block; }
.sky { background: radial-gradient(ellipse at 72% 36%, #20162c, transparent 65%), linear-gradient(170deg,#0e0b15,#15101e); }
.sky::after { position: absolute; inset: 0; content: ''; opacity: var(--atmosphere,0); background: radial-gradient(ellipse 78% 35% at 52% 56%, #bb8b9e 0%, #987591 33%, transparent 100%), linear-gradient(#161122, #342940 28%, #78617a 63%, #856578); }
.stars { opacity: calc(.72 - var(--atmosphere,0) * .62); background-image: radial-gradient(circle at 21% 11%, #eed8ff 0 1px, transparent 1.5px), radial-gradient(circle at 53% 15%, #d2bfdc 0 1px, transparent 1.65px), radial-gradient(circle at 76% 12%, #cfc3ea 0 1px, transparent 1.6px), radial-gradient(circle at 93% 32%, #d3bdf3 0 1px, transparent 1.5px), radial-gradient(circle at 10% 51%, #eddcfc 0 .65px, transparent 1.25px), radial-gradient(circle at 26% 67%, #d9c1e8 0 .65px, transparent 1.35px), radial-gradient(circle at 13% 78%, #c8b7de 0 .6px, transparent 1.2px), radial-gradient(circle at 64% 87%, #edd4fc 0 .7px, transparent 1.3px); }
.study .stellar-veil {
  inset: 0 0 auto auto;
  width: 100%; height: 56%;
  opacity: var(--galaxy-alpha, .34);
  mask-image: linear-gradient(91deg, transparent 12%, #0008 42%, #000 77%);
  transform: translate(calc(var(--look-x, 0) * 3px), calc(var(--look-y, 0) * 2px));
}
.stellar-veil::before, .stellar-veil::after, .stellar-current {
  content: ''; position: absolute; pointer-events: none;
}
.stellar-veil::before {
  inset: -2% -4%;
  background: url('assets/stellar-veil.webp') right top / max(100%, 620px) 100% no-repeat;
  opacity: .76;
}
.stellar-veil::after {
  inset: -8% -11% -6% -2%;
  background: url('assets/stellar-wisp.webp') right top / max(89%, 560px) 100% no-repeat;
  opacity: calc(var(--galaxy-depth, 0) * .94);
  filter: hue-rotate(calc(var(--galaxy-cool, 0) * 328deg)) saturate(.91);
  animation: galaxy-wisp 12.5s cubic-bezier(.43,.11,.57,.89) infinite alternate;
}
.stellar-current {
  inset: 0 -12% -15% 21%;
  opacity: calc(var(--galaxy-depth, 0) * .48);
  background: url('assets/dust.png') 50% 28% / 730px 490px repeat;
  mask-image: linear-gradient(155deg, transparent 22%, #0009 42%, #000 55%, transparent 74%);
  animation: galaxy-current 14s cubic-bezier(.39,.14,.61,.86) infinite alternate-reverse;
}
@keyframes galaxy-wisp { from { transform: translate3d(-6%, 5%, 0); } to { transform: translate3d(8%, -6%, 0); } }
@keyframes galaxy-current { from { transform: translate3d(-6%, 7%, 0); } to { transform: translate3d(7%, -8%, 0); } }
@media (prefers-reduced-motion: reduce) { .stellar-veil::after, .stellar-current { animation: none; } }
.study .stars { transform: translate(calc(var(--look-x, 0) * 3px), calc(var(--look-y, 0) * 2px)); }
.companion {
  position: absolute;
  display: block;
  height: auto;
  transform: translate(-50%, -50%);
}
.companion-ice { top: 25%; left: 32%; width: clamp(66px, 7.3svh, 96px); opacity: .85; }
.companion-amber { top: 80%; left: 91%; width: clamp(36px, 5.2svh, 54px); opacity: .76; }
.study canvas { display: block; }
.study canvas[hidden] { display: none; }
.flight-wrap { padding-inline: clamp(28px,6.4vw,115px); }
.flight-header { position: fixed; inset: 19px clamp(28px,6.4vw,115px) auto; z-index: 4; display: flex; justify-content: space-between; }
.has-scene .flight-header::before {
  content: ''; position: fixed; inset: 0 0 auto; height: 98px; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgb(11 8 18 / .92), rgb(11 8 18 / .76) 30%, transparent);
}
.flight-header a { display: inline-flex; min-height: 44px; align-items: center; gap: 9px; font-size: 15px; text-decoration: none; color: var(--mist); }
.flight-header a:hover { color: var(--paper); }
.signature span { width: 7px; height: 7px; border: 1px solid var(--mint); rotate: 45deg; }
.route-stage { position: relative; }
.hero { min-height: 100svh; display: grid; align-items: center; }
.hero-copy { width: fit-content; }
.has-scene .hero-copy { opacity: var(--copy-visible,1); }
.hero h1 { margin: 0; font: 400 clamp(68px,7.4vw,122px)/1.08 var(--editorial); }
.hero p { margin: 13px 0 27px; color: var(--mist); }
.depart { display: inline-flex; width: fit-content; align-items: center; gap: 14px; min-height: 46px; padding: 6px 8px 6px 14px; border: 1px solid #cbb2d76b; border-radius: 4px; background: #191322bf; font-size: 14px; text-decoration: none; transition: border-color 200ms, background 200ms; }
.depart span { min-width: 28px; min-height: 28px; display: grid; place-items: center; border-radius: 2px; background: #efe0f6; color: #2c1739; }
.depart:is(:hover,:focus-visible) { border-color: #dfd2ed; background: #322341; }
.landing { position: relative; display: grid; align-items: center; min-height: 89svh; background: linear-gradient(135deg,#211729,#110e19 70%); }
.has-scene .route-stage { min-height: 770svh; --pluto-stop: 280svh; }
.landing-position { position: absolute; inset: var(--pluto-stop, 0) auto auto 0; pointer-events: none; }
.has-scene .landing { position: absolute; inset: var(--pluto-stop) 0 auto; min-height: 100svh; background: transparent; }
.has-scene .landing::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  opacity: calc(var(--landing-alpha, 0) * var(--departure-copy, 1));
  background: radial-gradient(ellipse 70% 42% at 0% 54%, #100c1bb9, #100c1b4f 54%, transparent 100%);
}
.landing-copy { position: relative; max-width: min(39vw, 390px); padding-block: 28px; }
.has-scene .landing-copy { opacity: calc(var(--copy-visible,0) * var(--departure-copy,1)); }
.landing h2 { margin: 0; font: 400 clamp(76px,8.8vw,124px)/.94 Georgia,var(--editorial); }
.landing p { margin: 18px 0 0; font-size: 19px; }
.landing .contribution, .relay-stop .contribution { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 9px; margin-top: 16px; color: #f1e5f5; font-size: 13px; }
.contribution strong { padding: 2px 8px; border: 1px solid #d6bbeb63; border-radius: 3px; font-weight: 500; background: #20172ac9; }
.contribution span { letter-spacing: .045em; }
.landing .depart { margin-top: 24px; }
#enter-project { border-color: #dec3f18a; background: #49345ea8; backdrop-filter: blur(8px); box-shadow: inset 0 1px #ffffff17; transition: border-color 200ms, background 200ms, box-shadow 200ms; }
#enter-project span { transition: transform 200ms; }
#enter-project:is(:hover,:focus-visible) { border-color: #f0d7ff; background: #63497bc9; box-shadow: 0 0 20px #b88cf94a; }
#enter-project:is(:hover,:focus-visible) span { transform: translate(2px,-2px); }
.has-scene :is(.hero-copy, .landing-copy, .relay-copy, .trail-copy)[inert] { pointer-events: none; }
.crystal-trigger { position: fixed; inset: 0 auto auto 0; z-index: 3; background: transparent; border: 0; padding: 0; border-radius: 46%; cursor: pointer; touch-action: manipulation; }
.crystal-trigger[hidden] { display: none; }
@media (max-width: 700px) {
  .orbital-poster { background-image: url('assets/orbit-poster-25d-mobile.webp'); }
  .study .stellar-veil { height: 43%; mask-image: linear-gradient(90deg, #0005, #000 62%); }
  .companion-ice { top: 13%; left: 13%; width: clamp(42px, 14vw, 62px); }
  .companion-amber { top: 54%; left: 85%; width: clamp(26px, 8.5vw, 42px); }
  .flight-header { inset: 9px 19px auto; }
  .flight-wrap { padding-inline: 21px; }
  .hero { align-items: end; padding-bottom: 11svh; }
  .hero h1 { font-size: 61px; }
  .hero p { margin: 8px 0 18px; }
  .landing { align-items: end; }
  .landing-copy { max-width: 100%; padding-bottom: max(76px, 9svh); }
  .has-scene .landing::before { background: linear-gradient(0deg, #100c1beda 0%, #100c1bb0 18%, #100c1b50 36%, transparent 58%); }
  .landing h2 { font-size: 70px; }
  .landing p { margin-top: 11px; font-size: 16px; }
  .landing .contribution { font-size: 13px; }
  .landing .depart { margin-top: 16px; }
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
@media (prefers-reduced-motion: reduce) {
  .depart { transition: none; }
  #enter-project, #enter-project span { transition: none; }
  #enter-project:is(:hover,:focus-visible) span { transform: none; }
  .has-scene .route-stage { min-height: 300svh; --pluto-stop: 100svh; }
}
