/* The journey that opens after "Begin the Journey". */

:root {
  --ink: #f3eee6;
  --ink-2: rgba(243, 238, 230, .68);
  --ink-3: rgba(243, 238, 230, .42);
  --line: rgba(243, 238, 230, .14);
  --gold: #e9b979;
  --gold-soft: rgba(233, 185, 121, .22);
  --serif: "Iowan Old Style", "Baskerville", "Times New Roman", "Songti SC", "Noto Serif SC", "STSong", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
  --mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  --gutter: max(24px, env(safe-area-inset-left));
  --tex-moon: none;
  --tex-mars: none;
  --tex-earth: none;
  --tex-clouds: none;
}

/* ---------- starfield and stage ---------- */

#starfield {
  position: fixed;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.6s ease;
}

.stars-live #starfield {
  opacity: 1;
  transition-delay: .5s;
}

#journey-mount {
  position: fixed;
  z-index: 4;
  inset: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  color: var(--ink);
  font-family: var(--sans);
  opacity: 0;
  visibility: hidden;
  transition: opacity 1.2s ease, visibility 0s linear 1.2s;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, .18) transparent;
}

.journey-live #journey-mount {
  opacity: 1;
  visibility: visible;
  transition: opacity 1.2s ease;
}

.journey-live #cosmos-shell {
  pointer-events: none;
}

.lang-zh #journey-mount {
  letter-spacing: .02em;
}

#journey-mount a {
  color: inherit;
}

#journey-mount :focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}

#journey-mount h1:focus {
  outline: none;
}

.journey-stage {
  transition: opacity .55s ease, transform .55s ease, filter .55s ease;
}

.journey-stage.is-leaving,
.journey-bar.is-leaving {
  opacity: 0;
  transform: scale(.985);
  filter: blur(6px);
}

.reveal-up {
  opacity: 0;
  animation: rise-in 1.2s cubic-bezier(.2, .7, .2, 1) forwards;
  animation-delay: calc(var(--i, 0) * 120ms + 150ms);
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.kicker {
  margin: 0;
  color: var(--gold);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
}

/* ---------- top bar ---------- */

.journey-bar {
  position: sticky;
  z-index: 3;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: max(18px, env(safe-area-inset-top)) var(--gutter) 18px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, .78), rgba(0, 0, 0, 0));
  transition: opacity .55s ease, transform .55s ease, filter .55s ease;
  animation: rise-in 1s ease both;
}

.jb-brand {
  font-family: var(--serif);
  font-size: 19px;
  text-decoration: none;
}

.jb-brand span {
  color: var(--ink-3);
}

.jb-nav {
  display: flex;
  gap: 4px;
}

.jb-nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--ink-2) !important;
  font-size: 12px;
  text-decoration: none;
  transition: color .3s ease, border-color .3s ease;
}

.jb-nav a:hover,
.jb-nav a[aria-current="page"] {
  border-color: var(--line);
  color: var(--ink) !important;
}

.jb-num {
  color: var(--gold);
  font-family: var(--mono);
  font-size: 10px;
}

/* ---------- planets ---------- */

.planet {
  --size: 180px;
  position: relative;
  display: block;
  width: var(--size);
  height: var(--size);
  overflow: hidden;
  border-radius: 50%;
  isolation: isolate;
}

.planet-surface,
.planet-clouds {
  position: absolute;
  top: 0;
  left: 0;
  width: 400%;
  height: 100%;
  background-repeat: repeat-x;
  background-size: 50% 100%;
  animation: planet-spin var(--spin, 70s) linear infinite;
}

.planet-clouds {
  background-image: var(--tex-clouds);
  animation-duration: calc(var(--spin, 70s) * .72);
  opacity: .9;
}

.planet-shade {
  position: absolute;
  z-index: 3;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 28%, rgba(255, 250, 240, .2), transparent 30%),
    radial-gradient(circle at 30% 30%, transparent 24%, rgba(0, 0, 0, .42) 48%, rgba(0, 0, 0, .88) 70%, rgba(0, 0, 0, .97) 86%);
  box-shadow: inset 0 0 calc(var(--size) * .06) rgba(0, 0, 0, .6);
}

.planet--lit-right .planet-shade {
  background:
    radial-gradient(circle at 74% 28%, rgba(255, 250, 240, .2), transparent 30%),
    radial-gradient(circle at 72% 30%, transparent 22%, rgba(0, 0, 0, .45) 46%, rgba(0, 0, 0, .9) 66%, rgba(0, 0, 0, .98) 82%);
}

.planet-canvas {
  position: absolute;
  z-index: 4;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

/* Once WebGL has the map, the CSS stand-in layers step aside. */
.planet.is-gl {
  background: transparent;
}

.planet.is-gl > .planet-surface,
.planet.is-gl > .planet-clouds,
.planet.is-gl > .planet-shade,
.planet.is-gl::after {
  display: none;
}

@keyframes planet-spin {
  from {
    transform: translateX(-50%);
  }
  to {
    transform: translateX(0);
  }
}

.planet--earth {
  --spin: 60s;
  background: #0b2a4e;
  box-shadow: 0 0 calc(var(--size) * .18) rgba(80, 150, 255, .28);
}

.planet--earth .planet-surface {
  background-color: #123f6e;
  background-image: var(--tex-earth);
}

.planet--earth::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: 50%;
  background: radial-gradient(circle closest-side, transparent 86%, rgba(120, 185, 255, .5) 97%, rgba(120, 185, 255, 0) 100%);
}

.planet--moon {
  --spin: 110s;
  background: #77746f;
  box-shadow: 0 0 calc(var(--size) * .14) rgba(255, 245, 225, .12);
}

.planet--moon .planet-surface {
  background-color: #8a8680;
  background-image: var(--tex-moon);
}

.planet--mars {
  --spin: 80s;
  background: #9a4f2c;
  box-shadow: 0 0 calc(var(--size) * .16) rgba(230, 120, 70, .2);
}

.planet--mars .planet-surface {
  background-color: #b4633a;
  background-image: var(--tex-mars);
}

.planet--mars::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: 50%;
  background: radial-gradient(circle closest-side, transparent 90%, rgba(255, 170, 120, .26) 98%, rgba(255, 170, 120, 0) 100%);
}

.planet-system {
  position: relative;
  display: grid;
  place-items: center;
  transform-style: preserve-3d;
  perspective: 900px;
}

.orbit-ring {
  position: absolute;
  inset: -22%;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 50%;
  transform: rotateX(76deg) rotateZ(0deg);
  animation: ring-spin var(--ring-spin, 14s) linear infinite;
  pointer-events: none;
}

.orbit-ring--phobos {
  --ring-spin: 9s;
  inset: -14%;
  border-color: rgba(255, 210, 180, .12);
}

.orbiter {
  position: absolute;
  top: 50%;
  left: -4px;
  width: 7px;
  height: 7px;
  margin-top: -3.5px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 10px 2px rgba(255, 240, 210, .75);
}

.orbit-ring--phobos .orbiter {
  width: 5px;
  height: 5px;
  margin-top: -2.5px;
  background: #d9c2b0;
  box-shadow: 0 0 6px rgba(255, 220, 190, .5);
}

@keyframes ring-spin {
  from {
    transform: rotateX(76deg) rotateZ(0deg);
  }
  to {
    transform: rotateX(76deg) rotateZ(360deg);
  }
}

/* ---------- manifest ---------- */

.view--manifest {
  width: min(1240px, calc(100% - 2 * var(--gutter)));
  margin: 0 auto;
  padding: clamp(24px, 6vh, 72px) 0 120px;
}

.manifest-head {
  max-width: 720px;
}

.manifest-title {
  text-wrap: balance;
  margin: 18px 0 16px;
  font-family: var(--serif);
  font-size: clamp(38px, 6vw, 72px);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -.01em;
}

.manifest-lede {
  max-width: 600px;
  margin: 0;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.7;
}

.dest-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: clamp(40px, 7vh, 72px) 0 0;
  padding: 0;
  list-style: none;
}

.dest-list > li {
  opacity: 0;
  animation: rise-in 1.3s cubic-bezier(.2, .7, .2, 1) forwards;
  animation-delay: calc(var(--i) * 140ms + 520ms);
}

.dest-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 400px;
  padding: 22px 22px 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, .035), rgba(255, 255, 255, .01));
  color: inherit;
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  transition: border-color .5s ease, background-color .5s ease, transform .6s cubic-bezier(.2, .7, .2, 1);
}

.dest-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 32%, var(--gold-soft), transparent 58%);
  opacity: 0;
  transition: opacity .6s ease;
  pointer-events: none;
}

.dest-card:hover,
.dest-card:focus-visible {
  border-color: rgba(233, 185, 121, .55);
  transform: translateY(-4px);
}

.dest-card:hover::before,
.dest-card:focus-visible::before {
  opacity: 1;
}

.dest-visual {
  display: grid;
  flex: 1;
  place-items: center;
  min-height: 210px;
  margin-bottom: 20px;
}

.dest-visual .planet {
  --size: clamp(110px, 11vw, 150px);
  transition: transform .9s cubic-bezier(.2, .7, .2, 1);
}

.dest-card:hover .planet {
  transform: scale(1.08);
}

.dest-card:hover .orbit-ring {
  border-color: rgba(233, 185, 121, .5);
}

.dest-index {
  color: var(--gold);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.dest-name {
  margin: 10px 0 8px;
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 400;
  line-height: 1.1;
}

.dest-meta {
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.5;
}

.dest-cta {
  min-height: 20px;
  margin-top: 18px;
  color: var(--ink);
  font-size: 12px;
  letter-spacing: .06em;
}

.dest-cta span {
  display: inline-block;
  transition: transform .4s ease;
}

.dest-card:hover .dest-cta span {
  transform: translateX(5px);
}

.dest-card--locked {
  cursor: help;
}

.dest-card--locked .dest-name,
.dest-card--locked .dest-meta {
  opacity: .7;
}

.dest-card--locked .dest-cta {
  color: var(--ink-2);
  line-height: 1.5;
}

.dest-card--locked.is-pinged .wormhole {
  animation: wormhole-spin 7s linear infinite, wormhole-ping 1s ease;
}

.dest-card--locked .planet-system {
  width: 200px;
  height: 170px;
}

.saturn {
  position: absolute;
  bottom: 10px;
  left: 6px;
  display: block;
  width: 50px;
  height: 50px;
  transform: rotate(-14deg);
}

.saturn-body {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 34%, transparent 40%, rgba(0, 0, 0, .55) 64%, rgba(0, 0, 0, .95) 82%),
    repeating-linear-gradient(to bottom, #d8c29a 0 5px, #bfa276 5px 9px, #e2d0ab 9px 13px);
}

.saturn-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 170%;
  height: 34%;
  border: 3px solid rgba(226, 208, 171, .6);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 4px rgba(226, 208, 171, .14);
  clip-path: polygon(0 50%, 100% 50%, 100% 100%, 0 100%);
}

.wormhole {
  position: absolute;
  top: -14px;
  right: -6px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background:
    radial-gradient(circle, #000 0 30%, transparent 31%),
    conic-gradient(from 0deg, #1b2438, #8fa6d6, #0b1020, #e8dcc2, #1b2438, #6d7fb0, #0b1020, #cdd9f5, #1b2438);
  box-shadow: 0 0 22px rgba(170, 190, 255, .35), inset 0 0 18px rgba(0, 0, 0, .8);
  filter: blur(.4px);
  animation: wormhole-spin 18s linear infinite;
}

.wormhole::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, transparent 34%, rgba(0, 0, 0, .35) 60%, transparent 72%);
}

/* WebGL draws the lensed sphere, ring and halo itself. */
.wormhole.is-gl {
  background: none;
  box-shadow: none;
  filter: none;
  animation: none;
}

.dest-card--locked.is-pinged .wormhole.is-gl {
  animation: none;
}

.wormhole.is-gl::after {
  display: none;
}

@keyframes wormhole-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes wormhole-ping {
  0% {
    box-shadow: 0 0 22px rgba(170, 190, 255, .35);
  }
  40% {
    box-shadow: 0 0 60px 12px rgba(190, 210, 255, .6);
  }
  100% {
    box-shadow: 0 0 22px rgba(170, 190, 255, .35);
  }
}

.manifest-foot {
  margin: 44px 0 0;
}

.quiet-link {
  color: var(--ink-3) !important;
  font-size: 12px;
  text-decoration: none;
  transition: color .3s ease;
}

.quiet-link:hover {
  color: var(--ink) !important;
}

/* ---------- transit ---------- */

#journey-mount.is-veiled {
  opacity: 0 !important;
  pointer-events: none;
  transition: none;
}

.transit {
  --tint: 233, 185, 121;
  position: fixed;
  z-index: 6;
  inset: 0;
  overflow: hidden;
  color: var(--ink);
  font-family: var(--sans);
  opacity: 0;
  pointer-events: none;
  transition: opacity .6s ease;
}

.transit.is-live {
  opacity: 1;
}

.transit.is-done .t-tunnel,
.transit.is-done .t-map-card,
.transit.is-done .t-hud,
.transit.is-done .t-flash {
  opacity: 0 !important;
  transition: opacity .7s ease;
}

/* the light tunnel of the cruise */

.t-tunnel {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.t-tunnel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, transparent 30%, rgba(0, 0, 0, .75) 100%);
}

.t-tunnel i {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44vmax;
  height: 44vmax;
  margin: -22vmax 0 0 -22vmax;
  border: 1px solid rgba(var(--tint), .55);
  border-radius: 50%;
  box-shadow: 0 0 70px rgba(var(--tint), .22), inset 0 0 70px rgba(var(--tint), .16);
  opacity: 0;
  animation: tunnel-ring 1.7s cubic-bezier(.55, 0, 1, .6) infinite;
  animation-delay: calc(var(--k) * -.28s);
}

.t-tunnel b {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 34vmin;
  height: 34vmin;
  margin: -17vmin 0 0 -17vmin;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .95) 0 3%, rgba(var(--tint), .55) 12%, rgba(var(--tint), .14) 38%, transparent 68%);
  animation: tunnel-core 1.3s ease-in-out infinite alternate;
}

@keyframes tunnel-ring {
  0% {
    opacity: 0;
    transform: scale(.02);
  }
  30% {
    opacity: .9;
  }
  100% {
    opacity: 0;
    transform: scale(3.4);
  }
}

@keyframes tunnel-core {
  from {
    transform: scale(.85);
    opacity: .75;
  }
  to {
    transform: scale(1.12);
    opacity: 1;
  }
}

/* the planets that fly past */

.t-depart {
  position: absolute;
  top: 50%;
  left: 50%;
  will-change: transform, opacity;
}

.t-depart .planet {
  --size: 72vmin;
}

.t-arrive {
  position: absolute;
  transform-origin: 50% 50%;
  will-change: transform, opacity;
}

.t-arrive .planet {
  width: 100%;
  height: 100%;
}

.t-flash {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(var(--tint), .5), transparent 62%);
  opacity: 0;
}

/* the mission map, now a small instrument in the corner */

.t-map-card {
  position: absolute;
  top: max(18px, env(safe-area-inset-top));
  right: var(--gutter);
  width: min(290px, 42vw);
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(0, 0, 0, .5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.t-map {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.t-path {
  fill: none;
  stroke: var(--gold);
  stroke-width: 4;
  stroke-linecap: round;
  filter: drop-shadow(0 0 6px rgba(233, 185, 121, .6));
}

.t-orbit {
  fill: none;
  stroke: rgba(255, 255, 255, .18);
  stroke-width: 2;
  stroke-dasharray: 6 12;
}

.t-body--earth {
  fill: #1d4f86;
  stroke: rgba(140, 200, 255, .55);
  stroke-width: 3;
}

.t-body--moon {
  fill: #a9a59e;
}

.t-body--mars {
  fill: #c0673a;
}

.t-sun {
  fill: #fff4dc;
  filter: drop-shadow(0 0 18px rgba(255, 210, 140, .9));
}

.t-ship {
  fill: #fff;
}

.t-label {
  fill: var(--ink-2);
  font-family: var(--mono);
  font-size: 34px;
  letter-spacing: .12em;
  text-anchor: middle;
  text-transform: uppercase;
}

/* readouts */

.t-hud {
  position: absolute;
  bottom: max(92px, calc(env(safe-area-inset-bottom) + 80px));
  left: 50%;
  width: min(720px, calc(100% - 2 * var(--gutter)));
  padding: 20px 28px 24px;
  border-radius: 999px;
  background: radial-gradient(closest-side, rgba(0, 0, 0, .8), rgba(0, 0, 0, .5) 70%, transparent);
  transform: translateX(-50%);
}

.t-phase {
  min-height: 1.4em;
  margin: 0 0 14px;
  color: var(--gold);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .24em;
  text-align: center;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .5s ease, transform .5s ease;
}

.t-phase.is-in {
  opacity: 1;
  transform: none;
}

.t-readouts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.t-readouts p {
  display: grid;
  gap: 6px;
  margin: 0;
  text-align: center;
}

.t-readouts span {
  color: var(--ink-3);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.t-readouts strong {
  font-family: var(--mono);
  font-size: clamp(20px, 3.2vw, 32px);
  white-space: nowrap;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

.t-bar {
  height: 1px;
  margin-top: 20px;
  overflow: hidden;
  background: var(--line);
}

.t-bar i {
  display: block;
  height: 100%;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

/* arriving by transit: the planet is already there, the words follow the landing */

.is-arrived .reveal-up {
  animation-delay: calc(var(--i, 0) * 120ms + var(--arrive-delay, 0ms));
}

.is-arrived .dest-hero-planet {
  animation: none;
}

.is-arrived .dest-hero-planet .orbit-ring {
  animation: ring-spin var(--ring-spin, 14s) linear infinite, fade-in 1.4s ease var(--arrive-delay, 0ms) both;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

/* ---------- destination ---------- */

.view--dest {
  --wrap: min(1180px, calc(100% - 2 * var(--gutter)));
  padding-bottom: 120px;
}

.dest-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  width: var(--wrap);
  min-height: calc(100vh - 80px);
  min-height: calc(100svh - 80px);
  margin: 0 auto;
}

.dest-hero-copy {
  position: relative;
  z-index: 2;
  max-width: 540px;
  padding: 24px 0 72px;
  opacity: calc(1 - var(--scroll, 0) / 700);
}

.dest-title {
  text-wrap: balance;
  margin: 18px 0 18px;
  font-family: var(--serif);
  font-size: clamp(48px, 8vw, 104px);
  font-weight: 400;
  line-height: .98;
  letter-spacing: -.015em;
}

.dest-tagline {
  text-wrap: balance;
  margin: 0 0 22px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(20px, 2.2vw, 26px);
  font-style: italic;
  line-height: 1.35;
}

.lang-zh .dest-tagline {
  font-style: normal;
}

.dest-lede {
  margin: 0;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.75;
}

.scroll-cue {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 40px 0 0;
  color: var(--ink-3);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.scroll-cue span {
  position: relative;
  width: 1px;
  height: 36px;
  overflow: hidden;
  background: var(--line);
}

.scroll-cue span::after {
  content: "";
  position: absolute;
  top: -50%;
  left: 0;
  width: 1px;
  height: 50%;
  background: var(--gold);
  animation: cue-drop 2.2s ease-in-out infinite;
}

@keyframes cue-drop {
  to {
    top: 100%;
  }
}

.dest-hero-planet {
  position: relative;
  display: grid;
  place-items: center;
  transform: translateY(calc(var(--scroll, 0) * .28px));
  animation: planet-arrive 2.4s cubic-bezier(.16, .8, .2, 1) both;
}

.dest-hero-planet .planet {
  --size: min(52vmin, 560px);
}

.dest-hero-planet .orbit-ring {
  inset: -16%;
}

@keyframes planet-arrive {
  from {
    opacity: 0;
    transform: scale(.55);
    filter: blur(10px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

/* stats */

.dest-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  width: var(--wrap);
  margin: 0 auto;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stat {
  padding: 26px 18px 26px 0;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .9s ease, transform .9s ease;
  transition-delay: calc(var(--i) * 90ms);
}

.stat.is-in {
  opacity: 1;
  transform: none;
}

.stat dt {
  margin-bottom: 10px;
  color: var(--ink-3);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.stat dd {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(22px, 2.4vw, 30px);
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

/* reveal for scrolling sections */

[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 1.1s cubic-bezier(.2, .7, .2, 1), transform 1.1s cubic-bezier(.2, .7, .2, 1);
  transition-delay: calc(var(--i, 0) * 110ms);
}

[data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* the cinematic moment */

.dest-moment {
  position: relative;
  width: var(--wrap);
  margin: clamp(72px, 12vh, 140px) auto 0;
}

.scene {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 21 / 9;
  min-height: 300px;
  overflow: hidden;
  border-radius: 4px;
  background: #000;
  box-shadow: 0 0 0 1px var(--line);
}

.scene * {
  animation-play-state: paused !important;
}

.scene.is-playing * {
  animation-play-state: running !important;
}

.moment-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 32px;
  align-items: start;
  margin-top: 28px;
}

.moment-copy h2 {
  text-wrap: balance;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 400;
  line-height: 1.08;
}

.moment-copy p {
  margin: 6px 0 0;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.75;
}

/* sunrise over the limb of the Earth */

.scene--sunrise {
  background: radial-gradient(ellipse at 50% 70%, #050b16, #000 70%);
}

.sr-sun,
.sr-earth,
.sr-rim,
.sr-flare {
  position: absolute;
  display: block;
}

.sr-sun {
  z-index: 1;
  top: 64%;
  left: 50%;
  width: 22%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0 7%, rgba(255, 240, 210, .95) 11%, rgba(255, 176, 90, .45) 26%, rgba(255, 140, 60, .12) 46%, transparent 66%);
  transform: translate(-50%, -20%);
  opacity: 0;
  animation: sr-sun 13s ease-in-out infinite;
}

.sr-earth {
  z-index: 2;
  top: 64%;
  left: 50%;
  width: 320%;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 0%, rgba(40, 90, 150, .8), rgba(8, 24, 48, .9) 3%, #01040a 12%),
    #01040a;
  transform: translateX(-50%);
}

.sr-rim {
  z-index: 3;
  top: 64%;
  left: 50%;
  width: 320%;
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translateX(-50%);
  box-shadow: 0 -1px 0 rgba(120, 180, 255, .25), 0 -6px 24px rgba(60, 120, 220, .1);
  animation: sr-rim 13s ease-in-out infinite;
}

.sr-flare {
  z-index: 4;
  top: 64%;
  left: 10%;
  width: 80%;
  height: 2px;
  margin-top: -1px;
  background: linear-gradient(to right, transparent, rgba(255, 226, 180, .9) 50%, transparent);
  opacity: 0;
  transform: scaleX(.2);
  filter: blur(.5px);
  animation: sr-flare 13s ease-in-out infinite;
}

@keyframes sr-sun {
  0%, 18% {
    opacity: 0;
    transform: translate(-50%, 10%);
  }
  34% {
    opacity: 1;
    transform: translate(-50%, -38%);
  }
  80% {
    opacity: 1;
    transform: translate(-50%, -78%);
  }
  96%, 100% {
    opacity: 0;
    transform: translate(-50%, -86%);
  }
}

@keyframes sr-rim {
  0%, 16% {
    box-shadow: 0 -1px 0 rgba(120, 180, 255, .2), 0 -6px 24px rgba(60, 120, 220, .08);
  }
  30% {
    box-shadow: 0 -2px 0 rgba(255, 170, 90, .95), 0 -10px 40px rgba(255, 120, 50, .55);
  }
  46% {
    box-shadow: 0 -2px 0 rgba(255, 220, 170, .95), 0 -14px 50px rgba(120, 170, 255, .45);
  }
  76% {
    box-shadow: 0 -2px 0 rgba(150, 205, 255, .95), 0 -14px 46px rgba(80, 150, 255, .5);
  }
  100% {
    box-shadow: 0 -1px 0 rgba(120, 180, 255, .2), 0 -6px 24px rgba(60, 120, 220, .08);
  }
}

@keyframes sr-flare {
  0%, 26% {
    opacity: 0;
    transform: scaleX(.2);
  }
  32% {
    opacity: 1;
    transform: scaleX(1);
  }
  48%, 100% {
    opacity: 0;
    transform: scaleX(1.2);
  }
}

/* Earthrise over the lunar horizon */

.scene--earthrise {
  background: #000;
}

.er-earth {
  position: absolute;
  z-index: 1;
  top: 62%;
  left: 60%;
  display: block;
  transform: translate(-50%, 60%);
  animation: er-rise 18s cubic-bezier(.3, .1, .3, 1) infinite;
}

.er-earth .planet {
  --size: clamp(64px, 11vw, 138px);
}

.er-moon {
  position: absolute;
  z-index: 2;
  top: 62%;
  left: 50%;
  display: block;
  width: 360%;
  aspect-ratio: 1;
  border-radius: 50%;
  background-color: #6d6a65;
  background-image:
    linear-gradient(to bottom, rgba(255, 250, 240, .1), rgba(0, 0, 0, .75) 4%),
    var(--tex-moon);
  background-size: 100% 100%, 12% 6%;
  transform: translateX(-50%);
  box-shadow: inset 0 2px 0 rgba(255, 248, 235, .28);
}

@keyframes er-rise {
  0% {
    opacity: 0;
    transform: translate(-50%, 70%);
  }
  8% {
    opacity: 1;
  }
  70% {
    opacity: 1;
    transform: translate(-50%, -150%);
  }
  92%, 100% {
    opacity: 0;
    transform: translate(-50%, -170%);
  }
}

/* blue sunset on Mars */

.bs-sky,
.bs-dusk,
.bs-sun,
.bs-phobos,
.bs-dunes {
  position: absolute;
  display: block;
}

.bs-sky {
  inset: 0;
  background: linear-gradient(to bottom, #5a3d2e 0%, #9c6c4c 40%, #c79b72 72%, #d7b38b 100%);
}

.bs-sun {
  z-index: 1;
  top: 18%;
  left: 50%;
  width: 46%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, #f6f9ff 0 3.5%, rgba(196, 220, 255, .95) 5.5%, rgba(128, 170, 235, .6) 12%, rgba(90, 130, 200, .28) 26%, rgba(70, 100, 170, .08) 44%, transparent 62%);
  transform: translate(-50%, -50%);
  animation: bs-set 16s ease-in-out infinite;
}

.bs-dusk {
  inset: 0;
  z-index: 2;
  background: linear-gradient(to bottom, #07070d 0%, #151322 55%, #2b2530 100%);
  opacity: 0;
  mix-blend-mode: multiply;
  animation: bs-dusk 16s ease-in-out infinite;
}

.bs-phobos {
  z-index: 3;
  top: 30%;
  left: 18%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #e6dccd;
  box-shadow: 0 0 6px rgba(255, 240, 220, .6);
  opacity: 0;
  animation: bs-phobos 16s linear infinite;
}

.bs-dunes {
  z-index: 4;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 46%;
}

.bs-far {
  fill: #3a2219;
}

.bs-near {
  fill: #160c09;
}

@keyframes bs-set {
  0% {
    top: 22%;
  }
  78% {
    top: 74%;
  }
  100% {
    top: 80%;
  }
}

@keyframes bs-dusk {
  0%, 20% {
    opacity: 0;
  }
  74% {
    opacity: .78;
  }
  100% {
    opacity: .9;
  }
}

@keyframes bs-phobos {
  0%, 55% {
    opacity: 0;
    transform: translate(0, 0);
  }
  70% {
    opacity: .9;
  }
  100% {
    opacity: .9;
    transform: translate(26vw, -8vw);
  }
}

/* flight plan */

.dest-section {
  width: var(--wrap);
  margin: clamp(80px, 12vh, 140px) auto 0;
}

.section-title {
  margin: 0 0 30px;
  color: var(--gold);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .22em;
  text-transform: uppercase;
}

.plan {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
}

.plan::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 151px;
  width: 1px;
  background: linear-gradient(to bottom, var(--gold), var(--line) 30%, var(--line));
}

.plan-step {
  position: relative;
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 48px;
  padding: 0 0 38px;
}

.plan-step::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 147px;
  width: 9px;
  height: 9px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  background: #000;
  box-shadow: 0 0 0 4px #000;
}

.plan-step.is-in::before {
  background: var(--gold);
  box-shadow: 0 0 0 4px #000, 0 0 14px rgba(233, 185, 121, .7);
  transition: background-color .6s ease .3s, box-shadow .6s ease .3s;
}

.plan-mark {
  padding-top: 2px;
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 12px;
  text-align: right;
}

.plan-body h3 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 400;
}

.plan-body p {
  max-width: 620px;
  margin: 0;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.75;
}

/* sights */

.sights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.sight {
  padding: 26px 24px 28px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, .02);
}

.sight-num {
  color: var(--gold);
  font-family: var(--mono);
  font-size: 11px;
}

.sight h3 {
  margin: 30px 0 10px;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 400;
}

.sight p {
  margin: 0;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.7;
}

.dest-reality p {
  max-width: 820px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(22px, 2.6vw, 32px);
  line-height: 1.45;
}

/* next / previous */

.dest-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 14px;
  align-items: stretch;
  width: var(--wrap);
  margin: clamp(80px, 12vh, 140px) auto 0;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.dest-nav-link {
  display: grid;
  gap: 6px;
  align-content: center;
  min-height: 72px;
  text-decoration: none;
}

.dest-nav-link span {
  color: var(--ink-3);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.dest-nav-link strong {
  font-family: var(--serif);
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 400;
  transition: color .3s ease;
}

.dest-nav-link:hover strong {
  color: var(--gold);
}

.dest-nav-link--all {
  place-items: center;
  padding: 0 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  min-height: 44px;
  align-self: center;
}

.dest-nav-link--all:hover {
  border-color: var(--gold);
}

.dest-nav-link--next {
  text-align: right;
}

/* ---------- small screens ---------- */

@media (max-width: 1080px) {
  .dest-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  :root {
    --gutter: 18px;
  }

  .jb-nav a {
    padding: 0 9px;
  }

  .jb-nav .jb-num {
    display: none;
  }

  .dest-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .dest-card {
    min-height: 0;
  }

  .dest-visual {
    min-height: 180px;
  }

  .dest-hero {
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    min-height: 0;
    padding-top: 12px;
  }

  .dest-hero-planet {
    grid-row: 1;
    padding: 24px 0 8px;
  }

  .dest-hero-planet .planet {
    --size: min(64vw, 300px);
  }

  .dest-hero-copy {
    padding-bottom: 40px;
    opacity: 1;
  }

  .scene {
    aspect-ratio: 4 / 3;
    min-height: 0;
  }

  .moment-copy,
  .sights {
    grid-template-columns: minmax(0, 1fr);
  }

  .moment-copy {
    gap: 12px;
  }

  .plan::before {
    left: 4px;
  }

  .plan-step {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    padding-left: 30px;
  }

  .plan-step::before {
    left: 0;
  }

  .plan-mark {
    text-align: left;
  }

  .dest-nav {
    grid-template-columns: 1fr 1fr;
  }

  .dest-nav-link--all {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: center;
  }

  .t-readouts strong {
    font-size: 16px;
  }

  .t-map-card {
    width: 46vw;
    padding: 6px 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #journey-mount *,
  #journey-mount *::before,
  #journey-mount *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: .2s !important;
    transition-delay: 0s !important;
  }

  .reveal-up,
  .dest-list > li,
  [data-reveal],
  .stat {
    opacity: 1;
    transform: none;
  }

  .dest-hero-planet,
  .dest-hero-copy {
    transform: none;
    opacity: 1;
  }

  .scene--sunrise .sr-sun {
    opacity: 1;
    transform: translate(-50%, -60%);
  }

  .scene--earthrise .er-earth {
    opacity: 1;
    transform: translate(-50%, -110%);
  }
}
