/* The doorstep and the alley share one camera and lighting setup. */
.world {
  --scene-edge: clamp(24px, 5vw, 96px);
  --scene-ease: cubic-bezier(.2, .72, .23, 1);
  --camera-scale: 1.045;
  --camera-track: 0%;
  --camera-limit: 2%;
  --camera-vertical-limit: 2%;
}

.site-header {
  padding-inline: var(--scene-edge);
  background: linear-gradient(180deg, #080f19b8, #080f193d 70%, transparent);
}

.brand-word,
.hero-copy h1 em {
  animation: none;
  background-position: 50%;
}

.brand-glint,
.explore-glyph,
.night-stamp .moon-icon {
  animation: none;
}

.hero-copy {
  left: var(--scene-edge);
  top: 50%;
  max-width: min(50vw, 780px);
  transform: translateY(-56%);
}

.hero-copy h1 {
  font-size: clamp(4.15rem, 7.15vw, 8.25rem);
  letter-spacing: -.065em;
  line-height: .99;
  margin-bottom: 28px;
  text-shadow: 0 8px 38px #060b1490;
}

.hero-copy h1 em {
  letter-spacing: -.06em;
}

.title-line {
  display: block;
  padding: .04em .09em .13em .025em;
  margin: -.04em -.09em -.13em -.025em;
}

.hero-copy .hero-description {
  line-height: 1.7;
  color: #e0ded4;
  margin-bottom: 26px;
}

.primary-button {
  background: linear-gradient(135deg, #f0d9b1, #d4a96d);
  border-radius: 5px;
  color: #231a13;
}

.primary-button::after { animation: none; }
.primary-button:hover { background: #f2d9af; }
.primary-button:hover .explore-glyph { transform: rotate(45deg); }
.explore-glyph { transition: transform .45s var(--scene-ease); }
.text-button { color: #ede5d7; }

.is-loaded .hero-copy > h1 {
  animation: none;
}

.is-loaded .hero-copy .title-line:first-child {
  animation: title-reveal 1s .04s var(--scene-ease) backwards;
}

.is-loaded .hero-copy .title-line + .title-line {
  animation: title-reveal 1.12s .16s var(--scene-ease) backwards;
}

.is-loaded .hero-copy > .hero-description { animation-delay: .3s; }
.is-loaded .hero-copy > .hero-actions { animation-delay: .4s; }
.is-exploring .hero-copy { transform: translateY(-54%); }

.tonight-find { left: var(--scene-edge); }
.find-teaser { padding-top: 14px; }

.world .camera,
.is-exploring .world .camera {
  transform: translate3d(
    clamp(calc(-1 * var(--camera-limit)), calc(var(--camera-track) + var(--pan-x, 0px) + var(--drag-x, 0px)), var(--camera-limit)),
    clamp(calc(-1 * var(--camera-vertical-limit)), calc(var(--pan-y, 0px) + var(--drag-y, 0px)), var(--camera-vertical-limit)),
    0
  ) scale(var(--camera-scale));
}

.camera { transition: transform 1.45s var(--scene-ease); }
.is-loaded .camera { animation: establishing-shot 1.8s var(--scene-ease) backwards; }
.is-exploring .world { --camera-scale: 1.14; --camera-track: -4%; --camera-limit: 6%; --camera-vertical-limit: 3%; }

@media (min-width: 801px) {
  .alley-image, .actor-image { object-position: 72% 50%; }
}

.scene-shade,
.is-exploring .scene-shade {
  background: linear-gradient(180deg, #050c159c, transparent 24%, transparent 59%, #050c15d6);
}

.scene-shade::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #060d17b8, #060d1766 35%, transparent 62%);
  transition: opacity 1.1s var(--scene-ease);
}

.is-exploring .scene-shade::after { opacity: 0; }
.vignette { box-shadow: inset 0 0 130px 24px #01050a65; }

.alley-sweep {
  position: absolute;
  z-index: 0;
  inset: 0;
  background: linear-gradient(104deg, transparent 30%, #b6d9f323 44%, #ffe1a942 54%, transparent 69%);
  mix-blend-mode: screen;
  opacity: 0;
  pointer-events: none;
}

.is-exploring .alley-sweep { animation: lantern-sweep 1.25s .04s var(--scene-ease) both; }

.explore-message {
  top: clamp(105px, 12vh, 160px);
  padding-inline: 18px;
  text-shadow: 0 2px 18px #02060b, 0 0 32px #02060b;
}

.explore-message h2 {
  font: 400 clamp(1.9rem, 3.6vw, 3.55rem)/1.08 var(--serif);
  color: #f3e4c9;
  letter-spacing: -.035em;
  margin: 0 0 10px;
}

.explore-message h2:focus { outline: none; }
.explore-message p {
  color: #e0dcd0;
  font-size: .9375rem;
  letter-spacing: 0;
  margin: 0;
}

.is-exploring .explore-message { animation: frame-reveal .85s .22s var(--scene-ease) backwards; }

.hotspot.find-pin {
  display: grid;
  place-items: center;
  padding: 0;
  width: 48px;
  height: 48px;
}

.hotspot.find-pin[hidden] { display: none; }
.is-exploring .find-pin { animation: pin-appear .85s .28s var(--scene-ease) backwards; }
.is-exploring .find-pin:nth-child(2) { animation-delay: .38s; }
.is-exploring .find-pin:nth-child(3) { animation-delay: .48s; }
.is-exploring .find-pin:nth-child(4) { animation-delay: .58s; }
.hotspot .pin::before { content: none; }
.hotspot.discovered .pin > span { background: #acd1bb; }

.hotspot.find-pin .pin-label {
  position: absolute;
  top: calc(100% - 3px);
  margin: 0;
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition: opacity .2s ease, transform .25s var(--scene-ease);
}

.hotspot.find-pin:is(:hover, :focus-visible) { z-index: 2; }
.hotspot.find-pin:is(:hover, :focus-visible) .pin-label { opacity: 1; transform: translateY(0); }
.hotspot.find-pin[data-find="jar"] .pin-label { right: 0; }

.discovery-bar {
  bottom: 115px;
  left: var(--scene-edge);
  right: var(--scene-edge);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  column-gap: 14px;
}

.is-exploring .discovery-bar { pointer-events: none; }
.is-exploring .discovery-bar :is(.back-alley, .find-shelf) { pointer-events: auto; }
.back-alley {
  align-self: start;
  justify-self: start;
  min-height: 44px;
  background: #0a131ee8;
  border-color: #e6c28a49;
  color: #e5d3b3;
  white-space: nowrap;
}

.find-shelf {
  display: flex;
  grid-column: 2;
  border: 1px solid #dab67a55;
  border-radius: 12px;
  background: linear-gradient(145deg, #1a222df2, #09111bf2 78%);
  box-shadow: 0 14px 44px #03070db3, inset 0 1px #f8d9a019;
  backdrop-filter: blur(12px);
  padding: 6px;
}

.is-exploring .find-shelf { animation: frame-reveal .75s .4s var(--scene-ease) backwards; }
.find-shelf-items { display: grid; grid-template-columns: repeat(4, minmax(63px, 1fr)); gap: 4px; }

.shelf-find {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: center;
  min-width: 0;
  min-height: 55px;
  padding: 4px 5px;
  gap: 2px;
  font-size: .8125rem;
  color: #ddd0b9;
  border: 1px solid transparent;
  border-radius: 6px;
  transition: background .2s ease, border-color .2s ease;
}

.shelf-find svg {
  display: block;
  width: 27px;
  height: 27px;
  transition: transform .35s var(--scene-ease);
  filter: drop-shadow(0 3px 5px #05080dbb);
}

.shelf-find:is(:hover, :focus-visible) {
  color: #fff1d6;
  background: #dcaf6d14;
  border-color: #d8b47855;
}

.shelf-find:is(:hover, :focus-visible) svg { transform: translateY(-3px) rotate(-8deg); }
.shelf-find.discovered { color: #c5e2ce; }
.shelf-find.discovered::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 3px;
  top: 7px;
  right: 7px;
  border-radius: 4px;
  background: #a6d3b7;
}

.discovery-progress {
  display: grid;
  justify-items: start;
  align-content: center;
  gap: 3px;
  min-height: 44px;
  padding: 4px 13px;
  margin-left: 6px;
  border: 0;
  border-left: 1px solid #e5c98f39;
  border-radius: 0;
  background: transparent;
  color: #f0d8ae;
  font-size: .9375rem;
  white-space: nowrap;
}

.discovery-progress span + span { color: #d8d2c4; font-size: .8125rem; text-decoration: underline; text-underline-offset: 3px; }
.scene-controls { bottom: 208px; }
.world-footer { left: var(--scene-edge); right: var(--scene-edge); bottom: 53px; }
.motion-button { min-height: 40px; color: #c1c9c8; }
.motion-button:disabled { cursor: default; }

.drawer[open] { animation: drawer-in .58s var(--scene-ease, cubic-bezier(.2, .72, .23, 1)); }
.drawer::backdrop { background: #030912a8; }
.drawer-shell { background: radial-gradient(ellipse at 100% 0, #6d573130, transparent 44%), #101922; }
.drawer-header { box-shadow: 0 8px 24px #05080d19; }
.close-button { min-height: 44px; }
.drawer-content h2:focus { outline: none; }
.drawer-content[data-view="find"] .drawer-kicker { margin-top: 23px; }

.detail-art {
  height: clamp(206px, 34vh, 326px);
  overflow: hidden;
  isolation: isolate;
  border-radius: 8px;
  border-color: #dec59746;
  background: radial-gradient(ellipse at 50% 43%, #85623763, #26263381 48%, #0c141f 79%);
}

.detail-art::before {
  inset: auto 15% 11%;
  height: 20%;
  transform: none;
  animation: none;
  background: repeating-radial-gradient(ellipse, transparent 0 16%, #dfc0842e 17% 18%, transparent 19% 24%);
  mask-image: radial-gradient(ellipse, black 18%, transparent 70%);
  border: 0;
}

.detail-art::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: conic-gradient(from 64deg at 50% 55%, transparent 0 30%, #f2d39720 40%, transparent 53% 60%, #b0d8dc1c 66%, transparent 77%);
  opacity: .4;
  animation: artifact-light 1.1s var(--scene-ease, ease-out) backwards;
}

.detail-art svg {
  width: clamp(135px, 33%, 195px);
  height: auto;
  animation: artifact-reveal .85s var(--scene-ease, ease-out) backwards;
}

.artifact-card { border-radius: 8px; }
.artifact-card.found { border-color: #9bbca35e; }
.artifact-card .artifact-art { background: radial-gradient(ellipse, #d7ac6440, transparent 69%); }
.artifact-caption { color: #bcc8ca; font-size: .875rem; }

@keyframes establishing-shot {
  from { scale: 1.07; }
  to { scale: 1; }
}

@keyframes title-reveal {
  from { opacity: 0; clip-path: inset(0 0 100% 0); transform: translateY(.22em); }
  to { opacity: 1; clip-path: inset(0); transform: translateY(0); }
}

@keyframes frame-reveal {
  from { opacity: 0; translate: 0 12px; }
  to { opacity: 1; translate: 0 0; }
}

@keyframes pin-appear {
  from { opacity: 0; scale: .5; }
  to { opacity: 1; scale: 1; }
}

@keyframes lantern-sweep {
  0% { opacity: 0; transform: translateX(-50%); }
  35% { opacity: .73; }
  100% { opacity: 0; transform: translateX(52%); }
}

@keyframes artifact-reveal {
  from { opacity: 0; transform: translateY(24px) rotate(-13deg) scale(.76); }
  to { opacity: 1; transform: translateY(0) rotate(0) scale(1); }
}

@keyframes artifact-light {
  from { opacity: 0; scale: .7; }
  42% { opacity: 1; }
  to { opacity: .4; scale: 1; }
}

@media (max-width: 1100px) {
  .discovery-bar { grid-template-columns: 1fr auto; }
  .hero-copy h1 { font-size: clamp(3.65rem, 7.45vw, 5.7rem); }
}

@media (min-width: 801px) and (max-height: 800px) {
  .hero-copy { top: 46%; }
  .hero-copy h1 { font-size: clamp(3.65rem, min(7vw, 12vh), 7rem); margin-bottom: 19px; }
  .tonight-find { bottom: 99px; }
}

@media (max-width: 800px) {
  .hero-copy { max-width: 78vw; }
  .is-exploring .world { --camera-scale: 1.09; --camera-track: -2%; --camera-limit: 4%; }
  .discovery-bar { bottom: 126px; }
  .world-footer { bottom: 66px; }
  .scene-controls { display: none; }
}

@media (max-width: 600px) {
  .world { --scene-edge: clamp(18px, 6vw, 28px); min-height: 690px; }
  .hero-copy { top: max(105px, 15%); max-width: calc(100% - 2 * var(--scene-edge)); transform: none; }
  .is-exploring .hero-copy { transform: translateY(12px); }
  .hero-copy h1 { font-size: clamp(2.65rem, 11.4vw, 4.1rem); margin-bottom: 20px; }
  .hero-copy .hero-description { font-size: 1rem; line-height: 1.5; margin-bottom: 20px; }
  .hero-actions { gap: clamp(13px, 5vw, 27px); }
  .hero-actions .primary-button { padding-inline: 14px; gap: 7px; white-space: nowrap; }
  .hero-actions .text-button { text-align: left; margin: 0; }
  .scene-shade::after { background: linear-gradient(180deg, #060d1740 23%, #060d17a9 49%, #060d1700 72%); }
  .explore-message { top: 92px; }
  .is-exploring .explore-message { top: 92px; }
  .explore-message h2 { font-size: clamp(1.75rem, 7vw, 2.35rem); margin-bottom: 7px; }
  .is-exploring .explore-message p { font-size: .875rem; }
  .discovery-bar { grid-template-columns: minmax(0, 1fr); row-gap: 7px; bottom: 121px; }
  .find-shelf { grid-row: 1; grid-column: 1; padding: 4px; }
  .find-shelf-items { flex: 1; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
  .shelf-find { padding-inline: 2px; min-height: 49px; }
  .shelf-find svg { width: 22px; height: 22px; }
  .shelf-find.discovered::after { width: 6px; right: 3px; top: 4px; }
  .discovery-progress { padding-inline: 7px; margin-left: 4px; font-size: .8125rem; justify-items: center; }
  .discovery-progress span + span { font-size: .75rem; }
  .back-alley { grid-row: 2; justify-self: center; }
  .world-footer { bottom: 67px; }
  .stamp-place { display: none; }
  .stamp-divider { display: none; }
  .detail-art { margin-block: 19px; }
}

.motion-paused *,
.motion-paused *::before,
.motion-paused *::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}
