.masthead {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(12px, 1.5vw, 20px) var(--edge) 0;
  pointer-events: none;
}

.wordmark {
  position: relative;
  display: inline-block;
  pointer-events: auto;
  padding: 0;
  font-weight: 900;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
  text-shadow: var(--shadow);
}

.wordmark__text {
  position: relative;
  z-index: 1;
}

.wordmark__orbit {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 3.85em;
  height: 1.92em;
  transform: translate(-50%, -50%);
  overflow: visible;
  pointer-events: none;
}

.wordmark__orbit path {
  fill: none;
  stroke: var(--white-40);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  transition: stroke 300ms ease;
}

@property --beacon {
  syntax: "<color>";
  initial-value: #ff3b30;
  inherits: false;
}

.wordmark__sat {
  --beacon: #ff3b30;
  position: absolute;
  width: 0.26em;
  height: 0.26em;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--beacon);
  pointer-events: none;
  box-shadow:
    0 0 2px var(--beacon),
    0 0 5px var(--beacon),
    0 0 10px var(--beacon),
    0 0 18px color-mix(in srgb, var(--beacon) 55%, transparent);
  animation: beacon 5.5s ease-in-out infinite;
  transition: --beacon 1300ms var(--ease-out);
}

body[data-user] .wordmark__sat {
  --beacon: #3ddc84;
}

.wordmark__tip {
  --spark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 32'%3E%3Cpath d='M12 0C12.7 8.6 15.6 13.4 24 16 15.6 18.6 12.7 23.4 12 32 11.3 23.4 8.4 18.6 0 16 8.4 13.4 11.3 8.6 12 0Z' fill='%23fff'/%3E%3C/svg%3E");
  position: absolute;
  top: calc(100% + 10px);
  left: calc(100% - 10px);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px 6px 9px;
  border: 1px solid var(--white-16);
  border-radius: 9px;
  background: rgb(10 12 16 / 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 10px 28px rgb(0 0 0 / 0.55);
  color: var(--white);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(-4px, -4px);
  transition: opacity 200ms var(--ease-out), transform 260ms var(--ease-out);
}

.wordmark__tip::before {
  content: "";
  flex: 0 0 auto;
  width: 9px;
  height: 12px;
  background: var(--white);
  -webkit-mask: var(--spark) center / contain no-repeat;
  mask: var(--spark) center / contain no-repeat;
  filter: drop-shadow(0 0 3px rgb(255 255 255 / 0.55));
  transform: scale(0.4) rotate(-35deg);
  opacity: 0;
  transition: transform 420ms var(--ease-out) 60ms, opacity 260ms ease 60ms;
}

.wordmark:hover .wordmark__tip::before,
.wordmark:focus-visible .wordmark__tip::before {
  transform: scale(1) rotate(0deg);
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .wordmark__tip::before {
    transition: none;
    transform: none;
    opacity: 1;
  }
}

.wordmark:hover .wordmark__tip,
.wordmark:focus-visible .wordmark__tip {
  opacity: 1;
  transform: translate(0, 0);
}

@keyframes beacon {
  0%, 100% {
    box-shadow:
      0 0 2px var(--beacon),
      0 0 5px var(--beacon),
      0 0 10px var(--beacon),
      0 0 18px color-mix(in srgb, var(--beacon) 55%, transparent);
  }
  50% {
    box-shadow:
      0 0 2px var(--beacon),
      0 0 5.8px var(--beacon),
      0 0 11.8px var(--beacon),
      0 0 21px color-mix(in srgb, var(--beacon) 64%, transparent);
  }
}

@media (prefers-reduced-motion: reduce) {
  .wordmark__sat {
    animation: none;
  }
}

.wordmark:hover .wordmark__orbit path,
.wordmark:focus-visible .wordmark__orbit path {
  stroke: var(--white-80);
}

@media (prefers-reduced-motion: reduce) {
  .wordmark__sat animateMotion {
    display: none;
  }
}

.sections {
  display: flex;
  gap: clamp(16px, 2.4vw, 36px);
  pointer-events: auto;
}

.sections__link {
  position: relative;
  padding: 6px 0;
  color: var(--white-64);
  font-weight: 500;
  font-size: 0.875rem;
  text-shadow: var(--shadow);
  transition: color 200ms ease;
}

.sections__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 320ms var(--ease-out);
}

.sections__link:hover,
.sections__link[aria-current="true"] {
  color: var(--white);
}

.sections__link[aria-current="true"]::after {
  transform: scaleX(1);
}

.copy {
  position: fixed;
  left: var(--edge);
  bottom: max(var(--edge), env(safe-area-inset-bottom));
  z-index: 20;
  width: min(100% - var(--edge) * 2, 40rem);
  text-shadow: var(--shadow);
  transition: opacity 240ms ease;
}

.copy.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.copy__title {
  min-height: 0.86em;
  font-weight: 900;
  font-size: var(--size-title);
  line-height: 0.86;
  letter-spacing: -0.035em;
}

.copy__title:focus {
  outline: none;
}

.copy__title.is-typing::after {
  content: "";
  display: inline-block;
  width: 0.05em;
  height: 0.7em;
  margin-left: 0.05em;
  background: currentColor;
  animation: caret 640ms steps(1) infinite;
}

.copy.is-hero .copy__title {
  font-size: var(--size-hero);
  letter-spacing: -0.045em;
}

.copy__facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 4px 20px;
  margin-top: 22px;
  font-size: var(--size-label);
  line-height: 1.45;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 320ms ease, transform 420ms var(--ease-out);
}

.copy__facts:empty {
  display: none;
}

.copy__facts.is-shown {
  opacity: 1;
  transform: none;
}

.copy__facts dt {
  color: var(--white-64);
}

.copy__facts dd {
  font-weight: 500;
}

.copy__body {
  max-width: 34em;
  margin-top: 18px;
  color: var(--white-80);
  font-size: var(--size-lede);
  line-height: 1.55;
}

.copy__word {
  opacity: 0;
  filter: blur(6px);
  transition: opacity 380ms ease, filter 380ms ease;
  transition-delay: calc(var(--i) * 16ms);
}

.copy__body.is-revealed .copy__word {
  opacity: 1;
  filter: blur(0);
}

.copy__back,
.copy__etidex {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  padding: 10px 18px 10px 14px;
  border: 1px solid var(--white-40);
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.875rem;
  text-shadow: none;
  transition: border-color 200ms ease, background-color 200ms ease;
}

.copy__back::before {
  content: "";
  width: 14px;
  height: 1px;
  background: currentColor;
}

.copy__etidex {
  padding: 10px 14px 10px 18px;
}

.copy__etidex::after {
  content: "";
  width: 14px;
  height: 1px;
  background: currentColor;
}

.copy__back:hover,
.copy__etidex:hover {
  border-color: var(--white);
  background: var(--white-16);
}

.hotspots {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 360ms ease;
}

.hotspots.is-shown {
  opacity: 1;
}

.hotspot {
  position: absolute;
  left: calc(var(--x) * 1%);
  top: calc(var(--y) * 1%);
  width: 48px;
  height: 48px;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.hotspots.is-shown .hotspot {
  pointer-events: auto;
}

.hotspot {
  transition: opacity 180ms ease;
}

.hotspots.is-shown .hotspot.is-occluded {
  opacity: 0;
  pointer-events: none;
}

.hotspot__ring,
.hotspot__ping {
  position: absolute;
  inset: 13px;
  border-radius: 50%;
}

.hotspot__ring {
  border: 1.5px solid var(--white-80);
  box-shadow: 0 0 0 1px rgb(0 0 0 / 0.3), 0 0 18px rgb(255 255 255 / 0.2);
  transition: transform 280ms var(--ease-out), background-color 280ms ease, border-color 280ms ease;
}

.hotspot__ring::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: var(--white);
  transition: transform 280ms var(--ease-out);
}

.hotspot__ping {
  border: 1px solid var(--white-64);
  animation: ping 2.8s var(--ease-out) infinite;
}

.hotspot__label {
  position: absolute;
  left: calc(100% - 2px);
  top: 50%;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-weight: 500;
  font-size: var(--size-label);
  white-space: nowrap;
  opacity: 0;
  transform: translate(-6px, -50%);
  transition: opacity 220ms ease, transform 320ms var(--ease-out);
  pointer-events: none;
}

.hotspot.is-flipped .hotspot__label {
  left: auto;
  right: calc(100% - 2px);
  transform: translate(6px, -50%);
}

.hotspot:focus-visible {
  outline: none;
}

.hotspot:focus-visible .hotspot__ring {
  outline: 2px solid var(--white);
  outline-offset: 8px;
}

.hotspot:hover .hotspot__ring,
.hotspot:focus-visible .hotspot__ring {
  transform: scale(1.3);
  border-color: var(--white);
  background: var(--white);
}

.hotspot:hover .hotspot__ring::after {
  transform: scale(0);
}

.hotspot:hover .hotspot__label,
.hotspot:focus-visible .hotspot__label {
  opacity: 1;
  transform: translate(0, -50%);
}

.rail {
  position: fixed;
  right: var(--edge);
  top: 50%;
  z-index: 20;
  transform: translateY(-50%);
}

.rail__list {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.rail__stop {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-height: 28px;
  color: var(--white-64);
  font-weight: 500;
  font-size: var(--size-label);
  text-shadow: var(--shadow);
}

.rail__label {
  opacity: 0;
  transform: translateX(6px);
  transition: opacity 220ms ease, transform 320ms var(--ease-out);
}

.rail__tick {
  width: 16px;
  height: 1px;
  background: var(--white-40);
  transition: width 320ms var(--ease-out), background-color 200ms ease;
}

.rail__stop:hover .rail__label,
.rail__stop:focus-visible .rail__label,
.rail__stop[aria-current="step"] .rail__label {
  opacity: 1;
  transform: none;
}

.rail__stop[aria-current="step"] {
  color: var(--white);
}

.rail__stop[aria-current="step"] .rail__tick {
  width: 36px;
  background: var(--white);
}

.hint {
  position: fixed;
  right: var(--edge);
  bottom: max(var(--edge), env(safe-area-inset-bottom));
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--white-80);
  font-weight: 500;
  font-size: var(--size-label);
  text-shadow: var(--shadow);
  transition: opacity 300ms ease;
}

.hint.is-hidden {
  opacity: 0;
}

.hint__line {
  width: 1px;
  height: 36px;
  background: linear-gradient(var(--white), rgb(255 255 255 / 0));
  animation: descend 2s var(--ease-in-out) infinite;
}

body.is-moving .hotspots {
  pointer-events: none;
}

@keyframes caret {
  50% {
    opacity: 0;
  }
}

@keyframes ping {
  0% {
    transform: scale(1);
    opacity: 0.9;
  }

  70%,
  100% {
    transform: scale(2.3);
    opacity: 0;
  }
}

@keyframes descend {
  0% {
    transform: scaleY(0);
    transform-origin: top;
  }

  45% {
    transform: scaleY(1);
    transform-origin: top;
  }

  55% {
    transform: scaleY(1);
    transform-origin: bottom;
  }

  100% {
    transform: scaleY(0);
    transform-origin: bottom;
  }
}

@media (max-width: 720px) {
  .sections,
  .hint,
  .rail__label {
    display: none;
  }

  .rail {
    right: 10px;
  }

  .copy {
    width: calc(100% - var(--edge) * 2 - 28px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hotspot__ping,
  .hint__line,
  .copy__title.is-typing::after {
    animation: none;
  }

  .copy__word {
    filter: none;
    transition: none;
  }
}

.copy__body:not(.is-revealed) .copy__word {
  transition-delay: 0ms;
}

.hotspot.is-standing .hotspot__label {
  opacity: 1;
  transform: translate(0, -50%);
  border: 1px solid var(--white-16);
  padding: 8px 15px;
  font-weight: 600;
}

.hotspot.is-standing.is-flipped .hotspot__label {
  transform: translate(0, -50%);
}

.hotspot.is-standing .hotspot__ping {
  animation-duration: 2.2s;
}

.hotspot.is-standing:hover .hotspot__label {
  background: var(--white);
  border-color: var(--white);
  color: var(--black);
}

.hotspots.is-shown .hotspot.is-standing .hotspot__label {
  pointer-events: auto;
  cursor: pointer;
}

.hotspot.is-bare .hotspot__label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  transform: translate(-50%, 6px);
}

.hotspot.is-bare:hover .hotspot__label,
.hotspot.is-bare:focus-visible .hotspot__label {
  left: 50%;
  right: auto;
  top: auto;
  bottom: calc(100% + 1px);
  width: auto;
  height: auto;
  margin: 0;
  padding: 6px 12px;
  overflow: visible;
  clip-path: none;
  border: 1px solid var(--white-16);
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (prefers-reduced-motion: reduce) {
  .hotspot.is-bare .hotspot__label,
  .hotspot.is-bare:hover .hotspot__label {
    transition: opacity 160ms ease;
  }
}

.hotspot.is-pending .hotspot__ring {
  border-style: dashed;
}

.hotspot.is-pending .hotspot__label {
  color: var(--white-64);
}

.hotspot.is-pending:hover .hotspot__label {
  background: var(--glass);
  border-color: var(--white-40);
  color: var(--white);
}

.updates {
  --tint: var(--white);
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(26rem, 46vw);
  margin-top: 7px;
  padding: 7px 13px 7px 9px;
  border: 1px solid var(--white-16);
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  position: relative;
  pointer-events: auto;
  cursor: pointer;
  transition: border-color 280ms var(--ease-out), opacity 620ms ease, transform 680ms var(--ease-out);
}

body.is-moving .updates,
body[data-hold]:not([data-hold="approach"]) .updates {
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
}

.updates:hover {
  border-color: rgb(255 255 255 / 0.28);
}

.updates::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(
    from var(--sweep),
    transparent 0deg,
    transparent 276deg,
    rgb(255 255 255 / 0.55) 320deg,
    #ffffff 348deg,
    rgb(255 255 255 / 0.55) 356deg,
    transparent 360deg
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 180ms ease-in;
  pointer-events: none;
  animation: sweep 1.9s linear infinite;
  animation-play-state: paused;
}

.updates:hover::after,
.updates:focus-visible::after {
  opacity: 1;
  transition: opacity 900ms var(--ease-out);
  animation-play-state: running;
}

@media (prefers-reduced-motion: reduce) {
  .updates::after,
  .updates:hover::after {
    animation: none;
    opacity: 0;
  }

  .updates:hover::after {
    opacity: 0.7;
  }
}

.updates__glyph {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: color-mix(in srgb, var(--tint) 24%, transparent);
  color: var(--tint);
  font-size: 0.75rem;
}

.updates__body {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.updates__label {
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--white-40);
}

.updates__text {
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.updates__age {
  flex: 0 0 auto;
  font-size: 0.6875rem;
  color: var(--white-40);
  font-variant-numeric: tabular-nums;
}

.updates.is-fresh .updates__text,
.updates.is-fresh .updates__glyph {
  animation: updatein 420ms var(--ease-out) both;
}

@keyframes updatein {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

.rail__stop.is-pending .rail__label {
  opacity: 0.4;
}

.rail__stop:disabled {
  cursor: default;
}

.hotspot.is-standing .hotspot__ring,
.hotspot.is-standing .hotspot__ping {
  display: none;
}

.hotspot.is-standing .hotspot__label {
  left: 50%;
  right: auto;
  top: 50%;
  transform: translate(-50%, -50%);
  overflow: hidden;
  isolation: isolate;
  transition: color 320ms var(--ease-out), border-color 320ms var(--ease-out);
}

.hotspot.is-standing.is-flipped .hotspot__label {
  left: 50%;
  right: auto;
  transform: translate(-50%, -50%);
}

.hotspot.is-standing .hotspot__label::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--white);
  transform: scale(0.2);
  opacity: 0;
  transition: transform 420ms var(--ease-out), opacity 300ms var(--ease-out);
}

.hotspot.is-standing:hover .hotspot__label::before,
.hotspot.is-standing:focus-visible .hotspot__label::before {
  transform: scale(1);
  opacity: 1;
}

.hotspot.is-standing:hover .hotspot__label,
.hotspot.is-standing:focus-visible .hotspot__label {
  color: var(--black);
  border-color: var(--white);
  background: var(--glass);
}

.hotspot.is-bare .hotspot__ring {
  border-color: var(--white);
}

.hotspot.is-bare .hotspot__ping {
  animation-duration: 2.4s;
}
