/* Adapted from the observed Ramp #fun photo globe, scoped to this one mount. */
#world {
  /* Preserve the reference's fitted visible scene while containing phantom
     scrollable overflow produced by nested CSS perspective in some engines. */
  overflow-x: clip;
  overflow-y: visible;
}

#work-explorer {
  width: min(100%, 1440px);
  min-height: 100svh;
  max-width: 1440px;
  margin-inline: auto;
  color: var(--explorer-ink, #171717);
  font-family: inherit;
  overflow: visible;
}

#work-explorer .we-stage {
  --we-safe-bottom: env(safe-area-inset-bottom, 0px);
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: var(--we-usable-height, calc(100svh - 80px));
  min-height: 0;
  isolation: isolate;
  cursor: grab;
  touch-action: pan-y pinch-zoom;
  background: transparent;
  overflow: visible;
}

#work-explorer .we-sphere {
  position: absolute;
  inset: 0;
  z-index: auto;
  perspective: 1100px;
  pointer-events: none;
}

#work-explorer .we-center {
  position: absolute;
  inset: 0;
  z-index: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: min(92vw, 70rem);
  margin: auto;
  text-align: center;
  pointer-events: none;
}

#work-explorer .we-title {
  margin: 0;
  color: inherit;
  font-family: inherit;
  font-size: var(--explorer-display-size, clamp(4.6rem, 10.5vw, 9.75rem));
  font-weight: 400;
  line-height: .78;
  letter-spacing: -.045em;
  text-wrap: balance;
}

#work-explorer .we-title span { display: block; }

#work-explorer .we-dek {
  width: min(90%, 31rem);
  margin: 24px 0 0;
  color: color-mix(in srgb, var(--explorer-ink, #171717) 66%, transparent);
  font-size: clamp(.94rem, 1.1vw, 1.08rem);
  font-weight: 400;
  line-height: 1.42;
  letter-spacing: -.012em;
  text-wrap: balance;
}

#work-explorer .we-photo {
  position: absolute;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  width: clamp(8rem, 15vw, 13.5rem);
  margin: 0;
  padding: 0;
  appearance: none;
  border: 0;
  border-radius: var(--explorer-card-radius, 40px);
  corner-shape: superellipse(1.6);
  outline: none;
  background: transparent;
  cursor: pointer;
  touch-action: pan-y pinch-zoom;
  perspective: 800px;
  transform-origin: 50%;
  transform-style: preserve-3d;
  -webkit-tap-highlight-color: transparent;
}

#work-explorer .we-push,
#work-explorer .we-card {
  position: absolute;
  inset: 0;
  display: block;
  border-radius: inherit;
  corner-shape: inherit;
  pointer-events: none;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  transform: translate3d(0, 0, 0);
}

#work-explorer .we-card {
  isolation: isolate;
  overflow: hidden;
  background: #ececeb;
  transform-origin: 50%;
}

#work-explorer .we-media {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  corner-shape: inherit;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

#work-explorer .we-photo:focus-visible .we-card {
  outline: 3px solid var(--explorer-accent, #e74732);
  outline-offset: 4px;
  overflow: visible;
}

#work-explorer .we-stage[data-orbit-dragging],
#work-explorer .we-stage[data-orbit-dragging] .we-photo {
  cursor: grabbing;
  user-select: none;
  -webkit-user-select: none;
}

#work-explorer .we-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

#work-explorer .we-fallback {
  padding: 80px 24px;
  text-align: center;
}

@media (min-width: 761px) and (max-width: 1199px) {
  #work-explorer .we-photo { width: clamp(8rem, 14.5vw, 9.25rem); }
}

@media (max-width: 760px), (max-height: 500px) and (orientation: landscape) {
  #work-explorer { width: 100%; max-width: 100%; }
  #work-explorer .we-center {
    isolation: isolate;
    width: min(92vw, 25rem);
  }
  #work-explorer .we-center::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: -1;
    width: min(92vw, 22rem);
    height: 15rem;
    transform: translate(-50%, -50%);
    background: radial-gradient(ellipse, var(--explorer-background, #fff) 0%, color-mix(in srgb, var(--explorer-background, #fff) 82%, transparent) 46%, transparent 76%);
    filter: blur(4px);
    pointer-events: none;
  }
  #work-explorer .we-title {
    font-size: clamp(3.05rem, 13.8vw, 4rem);
    line-height: .82;
  }
  #work-explorer .we-dek {
    width: min(82vw, 20rem);
    font-size: .83rem;
  }
  #work-explorer .we-photo {
    width: clamp(6.75rem, 28.5vw, 7.875rem);
    border-radius: 12px;
  }
}

@media (min-width: 360px) and (max-width: 760px) {
  #work-explorer .we-photo { width: clamp(6.75rem, 30vw, 7.875rem); }
}

@media (max-height: 500px) and (orientation: landscape) {
  #work-explorer .we-center { width: min(70vw, 28rem); }
  #work-explorer .we-center::before { width: min(70vw, 20rem); height: 10rem; }
  #work-explorer .we-title { font-size: clamp(2.25rem, 12vh, 3.25rem); }
  #work-explorer .we-dek { width: min(70vw, 22rem); font-size: .78rem; }
  #work-explorer .we-photo { width: clamp(4.25rem, 22vh, 5.75rem); }
}

@media (max-width: 390px) {
  #work-explorer .we-title { font-size: clamp(2.9rem, 13.5vw, 3.5rem); }
}

@media (prefers-reduced-motion: reduce) {
  #work-explorer .we-photo,
  #work-explorer .we-push,
  #work-explorer .we-card,
  #work-explorer .we-media { transition: none; will-change: auto; }
}
