/* Hero-only depth, with the existing art, copy and native links intact. */
.arrival[data-hero-atmosphere] {
  --hero-pointer-x: 0;
  --hero-pointer-y: 0;
  --hero-cold-light: #91eff2;
}

.arrival[data-hero-atmosphere] .arrival-world {
  transform: translate3d(calc(var(--hero-pointer-x) * -6px), calc(var(--hero-progress) * 100px + var(--hero-pointer-y) * -4px), 0) scale(calc(1.025 + var(--hero-progress) * .08));
  transition: transform .7s cubic-bezier(.2,.7,.3,1);
}

.arrival[data-hero-atmosphere] .arrival-crew {
  transform: translate3d(calc(var(--hero-pointer-x) * 10px), calc(var(--hero-progress) * 24px + var(--hero-pointer-y) * 6px), 0);
  transition: transform .7s cubic-bezier(.2,.7,.3,1);
}

.hero-atmosphere,
.hero-atmosphere > span,
.hero-foreground {
  position: absolute;
  pointer-events: none;
}

.hero-atmosphere {
  inset: 0;
  z-index: -1;
  overflow: hidden;
  transform: translate3d(calc(var(--hero-pointer-x) * -3px), calc(var(--hero-pointer-y) * -2px), 0);
  transition: transform .7s ease-out;
}

/* Soft grazing light follows the right edge of the painted planet. */
.hero-planet-rim {
  inset: -10% -8% 25% 8%;
  background: radial-gradient(ellipse at 69% 29%, #b1fcff30 0, #71efff18 10%, transparent 30%);
  mix-blend-mode: screen;
}

.hero-stars {
  inset: -3%;
  background-repeat: no-repeat;
  mask-image: linear-gradient(#000 8%, #000 38%, transparent 70%);
}

.hero-stars-far {
  opacity: .65;
  background-image:
    radial-gradient(1px 1px at 7% 19%, #e2fcff 70%, transparent),
    radial-gradient(1px 1px at 15% 29%, #d3f7ff 70%, transparent),
    radial-gradient(1px 1px at 21% 12%, #bceaf2 70%, transparent),
    radial-gradient(1px 1px at 29% 39%, #d1f8ff 70%, transparent),
    radial-gradient(1px 1px at 37% 8%, #e5faff 70%, transparent),
    radial-gradient(1px 1px at 43% 30%, #b4e3ec 70%, transparent),
    radial-gradient(1px 1px at 56% 16%, #d3f7ff 70%, transparent),
    radial-gradient(1px 1px at 68% 11%, #f1feff 70%, transparent),
    radial-gradient(1px 1px at 76% 28%, #bceaf2 70%, transparent),
    radial-gradient(1px 1px at 86% 12%, #e2fcff 70%, transparent),
    radial-gradient(1px 1px at 93% 34%, #d3f7ff 70%, transparent),
    radial-gradient(1px 1px at 97% 22%, #bceaf2 70%, transparent);
  animation: hero-star-drift 32s ease-in-out infinite alternate;
}

.hero-stars-near {
  opacity: .7;
  background-image:
    radial-gradient(2px 2px at 11% 37%, #d0fbff 0, #a4e8f080 30%, transparent 100%),
    radial-gradient(2px 2px at 31% 18%, #e5fdff 0, #a4e8f070 30%, transparent 100%),
    radial-gradient(2px 2px at 78% 16%, #ecffff 0, #a4e8f070 30%, transparent 100%),
    radial-gradient(2px 2px at 91% 41%, #c6f8ff 0, #a4e8f080 30%, transparent 100%);
  animation: hero-star-drift 21s ease-in-out infinite alternate-reverse;
}

.hero-horizon {
  inset: 32% -8% 11%;
  opacity: .72;
  background: radial-gradient(ellipse at 49% 69%, #77e5ef26, #74e2ef0a 30%, transparent 66%);
  mix-blend-mode: screen;
  animation: hero-haze-drift 18s ease-in-out infinite alternate;
}

.hero-foreground {
  inset: 35% 0 8%;
  z-index: 3;
  opacity: .55;
  background:
    radial-gradient(2px 2px at 18% 52%, #b8f2ff, transparent),
    radial-gradient(1px 1px at 28% 76%, #ffd49d, transparent),
    radial-gradient(1px 1px at 66% 45%, #cef8ff, transparent),
    radial-gradient(2px 2px at 82% 71%, #aee9efb3, transparent);
  animation: hero-dust-drift 16s ease-in-out infinite alternate;
}

/* A physical launch key: edge light, a single hover sweep and a pressed state. */
.arrival .launch-button {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  box-shadow: inset 0 1px #ffe0b2, inset 0 -4px #5e301c61;
  transition: background .2s, box-shadow .2s, transform .15s;
}

.arrival .launch-power {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  transition: color .2s, filter .2s;
}

.arrival .launch-button::before {
  content: "";
  position: absolute;
  inset: 5px;
  z-index: -1;
  border: 1px solid #693a272e;
  clip-path: polygon(0 0, calc(100% - 19px) 0, 100% 19px, 100% 100%, 0 100%);
}

.arrival .launch-button::after {
  content: "";
  position: absolute;
  inset: -80% -35%;
  z-index: -1;
  opacity: 0;
  transform: translateX(-90%) rotate(24deg);
  background: linear-gradient(90deg, transparent 43%, #d1ffff4d 50%, transparent 57%);
}

.arrival .launch-button:is(:hover, :focus-visible) {
  background: #ffb06d;
  box-shadow: inset 0 0 0 2px var(--hero-cold-light), inset 0 -4px #5e301c40;
}

.arrival .launch-button:is(:hover, :focus-visible) .launch-power {
  color: #073b43;
  filter: drop-shadow(0 0 5px #a1ffffb3);
}

.arrival .launch-button:is(:hover, :focus-visible)::after {
  animation: hero-key-sweep .8s ease-out both;
}

.arrival .launch-button:focus-visible {
  outline: 3px solid #d8feff;
  outline-offset: -7px;
}

.arrival .launch-button:active {
  transform: translateY(2px);
  background: #ed9754;
  box-shadow: inset 0 2px 9px #743b2470, inset 0 0 0 2px var(--hero-cold-light);
}

.hero-motion-paused .hero-stars,
.hero-motion-paused .hero-horizon,
.hero-motion-paused .hero-foreground {
  animation-play-state: paused;
}

@keyframes hero-star-drift {
  from { transform: translate3d(-3px, 5px, 0); }
  to { transform: translate3d(9px, -9px, 0); }
}

@keyframes hero-haze-drift {
  from { transform: translate3d(-12px, 3px, 0); opacity: .55; }
  to { transform: translate3d(12px, -3px, 0); opacity: .8; }
}

@keyframes hero-dust-drift {
  from { transform: translate3d(-6px, 8px, 0); opacity: .3; }
  to { transform: translate3d(5px, -12px, 0); opacity: .65; }
}

@keyframes hero-key-sweep {
  0% { opacity: 0; transform: translateX(-65%) rotate(24deg); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translateX(65%) rotate(24deg); }
}

@media (max-width: 760px) {
  .hero-planet-rim { inset: 0 -45% 25% -50%; opacity: .7; }
  .hero-stars-near { opacity: .5; }
  .hero-horizon { opacity: .5; }
  .hero-foreground { display: none; }
  .arrival .launch-power { width: 26px; height: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  .arrival[data-hero-atmosphere] .arrival-world { transform: none; }
  .arrival[data-hero-atmosphere] .arrival-crew { transform: none; }
  .arrival[data-hero-atmosphere] .arrival-heading { transform: none; }
  .hero-atmosphere { transform: none; }
  .hero-stars, .hero-horizon, .hero-foreground { animation: none; }
  .arrival .launch-button:is(:hover, :focus-visible)::after { animation: none; }
}
