/* V9 voyage intro: a single seamless fog field that parts only when opening. */
.voyage-loader {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100000;
  isolation: isolate;
  overflow: hidden;
  color: #ffedc7;
  background: #091c27;
  font-family: Arial, Helvetica, sans-serif;
  text-align: center;
}

html[data-voyage="pending"] .voyage-loader,
html[data-voyage="opening"] .voyage-loader {
  display: grid !important;
  place-items: center;
}

html[data-voyage="pending"],
html[data-voyage="opening"] {
  overflow: hidden;
}

/* Both curtains use the same viewport-sized texture. Left displays its left
   half and right displays its right half, so there is no center join at rest. */
.voyage-curtain {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 0;
  width: 50.08%;
  background-color: #091c27;
  background-image:
    radial-gradient(ellipse 76% 62% at 50% 38%, #60777b75 0%, #2d485355 29%, transparent 68%),
    radial-gradient(ellipse 58% 52% at 18% 82%, #9cada32b 0%, transparent 66%),
    radial-gradient(ellipse 62% 48% at 84% 74%, #8ba09e24 0%, transparent 68%),
    linear-gradient(158deg, #0a202c 0%, #10242e 50%, #091720 100%);
  background-size: 100vw 100vh;
  background-repeat: no-repeat;
  transition: transform 1.15s cubic-bezier(.22, .8, .24, 1);
  will-change: transform;
}

.voyage-curtain-left {
  left: 0;
  background-position: left top;
}

.voyage-curtain-right {
  right: 0;
  background-position: right top;
}

/* One full-screen fog veil floats over both panels. Because it is one layer,
   it cannot reveal a vertical seam before the opening begins. */
.voyage-loader::before,
.voyage-loader::after {
  content: "";
  position: absolute;
  z-index: 1;
  pointer-events: none;
  opacity: .62;
  transition: opacity .18s linear;
}

.voyage-loader::before {
  inset: -14%;
  background:
    radial-gradient(ellipse 35% 30% at 22% 38%, #d6dfd22e 0%, transparent 72%),
    radial-gradient(ellipse 42% 34% at 72% 63%, #b2c4c438 0%, transparent 74%),
    radial-gradient(ellipse 30% 27% at 52% 20%, #90aaad20 0%, transparent 75%);
  animation: voyageFog 8s ease-in-out infinite alternate;
}

.voyage-loader::after {
  inset: 0;
  opacity: .5;
  background:
    radial-gradient(circle at 50% 47%, transparent 0%, #06131a18 43%, #020b12a6 100%),
    linear-gradient(90deg, #020b121c, transparent 24%, transparent 76%, #020b121c);
}

.voyage-loader-content {
  position: relative;
  z-index: 2;
  width: min(560px, calc(100% - 40px));
  padding: max(28px, env(safe-area-inset-top)) 0 max(28px, env(safe-area-inset-bottom));
  transition: opacity .4s, transform .7s;
  display: flex;
  align-items: center;
  flex-direction: column;
}

.voyage-loader-kicker {
  margin: 0 0 28px;
  font: 600 10px/1.6 Arial, Helvetica, sans-serif;
  letter-spacing: .25em;
  color: #e3ce9e;
}

.voyage-loader-emblem {
  position: relative;
  display: grid;
  place-items: center;
  width: 110px;
  height: 110px;
  margin-bottom: 28px;
  border: 1px solid #d3af6760;
  border-radius: 50%;
  background: radial-gradient(circle, #d9c5970d, transparent 67%);
  box-shadow: 0 0 48px #c69a2c0c;
}

.voyage-loader-emblem::before {
  content: "";
  position: absolute;
  inset: -8px;
  border: 1px solid #b6a48326;
  border-radius: 50%;
}

.voyage-loader-emblem::after {
  content: "✦";
  position: absolute;
  bottom: -12px;
  padding: 0 7px;
  color: #eac77e;
  background: #162832;
  font-size: 11px;
}

.voyage-loader-emblem img {
  width: 70px;
  height: 70px;
  object-fit: contain;
  border-radius: 50%;
}

.voyage-loader-name {
  margin: 0;
  color: #ffedc6;
  font: 500 clamp(37px, 6vw, 68px)/1.08 Georgia, 'Times New Roman', serif;
  letter-spacing: .07em;
  text-shadow: 0 2px 20px #0004;
}

.voyage-loader-tagline {
  margin: 18px 0 0;
  color: #abbab7;
  font: 10px/1.6 Arial, Helvetica, sans-serif;
  letter-spacing: .24em;
}

.voyage-loader-status {
  margin: 40px 0 0;
  color: #dbded0;
  font: italic 18px/1.5 Georgia, 'Times New Roman', serif;
}

.voyage-loader-course {
  width: 190px;
  height: 1px;
  margin-top: 21px;
  overflow: hidden;
  background: #bda87626;
}

.voyage-loader-course::after {
  content: "";
  display: block;
  width: 65%;
  height: 100%;
  background: linear-gradient(90deg, transparent, #f6d895, transparent);
  animation: voyageCourse 1.75s ease-in-out infinite;
  transform: translateX(-110%);
}

.voyage-loader-skip {
  min-width: 100px;
  min-height: 44px;
  margin-top: 27px;
  padding: 12px 18px;
  border: 1px solid #d2bc8538;
  border-radius: 5px;
  color: #c1c9bd;
  background: transparent;
  font: 11px/1 Arial, Helvetica, sans-serif;
  letter-spacing: .08em;
  cursor: pointer;
}

.voyage-loader-skip:hover {
  color: #ffedc6;
  border-color: #eac77e90;
  background: #fff3;
}

.voyage-loader-skip:focus-visible {
  outline: 2px solid #ffdf90;
  outline-offset: 5px;
}

html[data-voyage="opening"] .voyage-loader {
  background: transparent;
}

html[data-voyage="opening"] .voyage-loader::before,
html[data-voyage="opening"] .voyage-loader::after {
  opacity: 0;
}

html[data-voyage="opening"] .voyage-curtain-left {
  transform: translateX(-103%);
}

html[data-voyage="opening"] .voyage-curtain-right {
  transform: translateX(103%);
}

html[data-voyage="opening"] .voyage-loader-content {
  opacity: 0;
  transform: translateY(-12px);
  pointer-events: none;
}

@keyframes voyageFog {
  from { transform: translate3d(-3%, 1.5%, 0) scale(1.02); }
  to { transform: translate3d(3%, -2%, 0) scale(1.06); }
}

@keyframes voyageCourse {
  to { transform: translateX(170%); }
}

@media (max-width: 420px) {
  .voyage-loader-emblem { width: 92px; height: 92px; margin-bottom: 24px; }
  .voyage-loader-emblem img { width: 60px; height: 60px; }
  .voyage-loader-name { font-size: 38px; }
  .voyage-loader-kicker { font-size: 9px; letter-spacing: .2em; }
  .voyage-loader-status { margin-top: 30px; font-size: 17px; }
}

@media (max-height: 500px) {
  .voyage-loader-content { padding: 18px 0; }
  .voyage-loader-kicker { margin-bottom: 15px; }
  .voyage-loader-emblem { width: 64px; height: 64px; margin-bottom: 18px; }
  .voyage-loader-emblem img { width: 45px; height: 45px; }
  .voyage-loader-name { font-size: 36px; }
  .voyage-loader-tagline { margin-top: 10px; }
  .voyage-loader-status { margin-top: 15px; font-size: 16px; }
  .voyage-loader-course { margin-top: 12px; }
  .voyage-loader-skip { margin-top: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .voyage-loader::before,
  .voyage-loader-course::after { animation: none; }
  .voyage-loader-course::after { width: 100%; transform: none; }
  .voyage-curtain { transition: opacity .2s; }
  .voyage-loader-content { transition: opacity .2s; }
  .voyage-loader-content,
  .voyage-curtain { transform: none !important; }
  html[data-voyage="opening"] .voyage-curtain { opacity: 0; }
}

html[data-voyage-calm="true"] .voyage-loader::before,
html[data-voyage-calm="true"] .voyage-loader-course::after { animation: none; }
html[data-voyage-calm="true"] .voyage-curtain { transition: opacity .2s; transform: none !important; }
html[data-voyage-calm="true"][data-voyage="opening"] .voyage-curtain { opacity: 0; }
