:root {
  color-scheme: dark;
  font-family: Arial, Helvetica, sans-serif;
  color: #f7f2e7;
  background: #211d18;
  --metal: #242622;
  --viewport-height: 100vh;
  --yellow: #ffe600;
}
@supports (height: 100dvh) {
  :root { --viewport-height: 100dvh; }
}
* { box-sizing: border-box; }
body { margin: 0; }
button { font: inherit; }
button[hidden] { display: none; }
button:focus-visible { outline: none; }
button:focus-visible .plate, button.plate:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 4px;
}
.experience {
  position: relative;
  isolation: isolate;
  width: 100%;
  min-height: var(--viewport-height);
  overflow: hidden;
  background: #302a20;
  touch-action: manipulation;
}
.street-wings, .street, .inside {
  position: absolute;
  inset: 0;
}
.street-wings {
  background: #302a20 url("assets/peckham.webp") center / cover no-repeat;
  filter: brightness(.67);
  pointer-events: none;
}
.street {
  transform-origin: 50% 63%;
  transition: transform .78s cubic-bezier(.42,.01,.25,.99);
}
.scene {
  position: absolute;
  --scene-width: min(max(100vw, var(--viewport-height) * 1.5), 198vw, var(--viewport-height) * 2.28);
  width: var(--scene-width);
  aspect-ratio: 3 / 2;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.facade, .inside picture, .inside img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sign {
  position: absolute;
  z-index: 1;
  width: 20.5%;
  height: auto;
  top: 26.4%;
  left: 50.1%;
  transform: translate(-50%, -50%);
  filter: brightness(.92) drop-shadow(1px 3px 1px #070605) drop-shadow(1px 6px 5px #07060588);
  pointer-events: none;
}
.opening {
  position: absolute;
  left: 25.8%;
  top: 36.75%;
  width: 48.65%;
  height: 41.3%;
  overflow: hidden;
  overflow: clip;
  isolation: isolate;
  background:
    linear-gradient(180deg, #17191d66, #242a3129 49%, #37363612),
    url("assets/white-marble-shop.webp") center bottom / cover no-repeat;
  background-color: #d3d2ce;
}
.shopfront {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 37.9% 25.4% 36.7%;
  background: transparent;
  box-shadow: inset 0 3px 10px #000c;
}
.shopfront::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 4px 10px #0009, inset 0 -2px 3px #0009;
  pointer-events: none;
}
.display {
  display: grid;
  grid-template-rows: 86.7% 1fr;
  padding: 2.7% 2.85% 0;
  background:
    linear-gradient(0deg, var(--metal) 0 13.8%, transparent 13.8%),
    linear-gradient(90deg, var(--metal) 0 2.9%, transparent 2.9% 97.1%, var(--metal) 97.1%),
    linear-gradient(180deg, var(--metal) 0 2.3%, transparent 2.3%);
}
.display::after {
  content: "";
  background: linear-gradient(168deg, #33342d 0%, #1c1d1a 70%, #33332a 100%);
  outline: 1px solid #151614;
  border-top: 1px solid #605c52;
}
.glass {
  background:
    linear-gradient(122deg, #bad1db30 7%, #d6e1e824 38%, transparent 46%, #c0d2df16 58%, transparent 86%),
    linear-gradient(180deg, #b4cedd43 0%, #a2b4be11 48%, #d1d8d410 76%, #93a7b022 100%);
  box-shadow: inset 0 0 0 1px #171918, inset 0 0 0 2px #b7b9ad38, inset 0 0 7px #1118;
}
.display-right .glass {
  background:
    linear-gradient(146deg, #b4c5cf29 3%, transparent 48%, #c2cbcf16 60%, transparent 79%),
    linear-gradient(180deg, #b4cedd43 0%, #a2b4be11 56%, #93a7b020);
}
.entry {
  position: relative;
  border-inline: 3px ridge #383a35;
  background: linear-gradient(180deg, var(--metal) 0 3%, transparent 3%);
  perspective: 650px;
}
.fanlight {
  position: absolute;
  inset: 2.3% 2px auto;
  height: 18.35%;
  border-bottom: 5px solid var(--metal);
}
.door {
  position: absolute;
  inset: 21% 1.5% 2% 1.5%;
  border: clamp(4px, .75vw, 11px) solid var(--metal);
  border-bottom-width: clamp(6px, 1.05vw, 15px);
  box-shadow: 0 0 0 1px #5b5b50, 0 0 0 2px #10110f, inset 1px 0 #72726855;
  transform-origin: right center;
  transition: transform .58s cubic-bezier(.19,.6,.22,1);
}
.door-pane { position: absolute; inset: 0; }
.handle {
  position: absolute;
  width: 6.5%;
  height: 13%;
  top: 46%;
  left: 0;
  border-radius: 0 2px 2px 0;
  background: linear-gradient(90deg, #262621, #8a8576 48%, #242524 83%);
  box-shadow: 1px 1px 3px #181918c2;
}
.shutter {
  position: absolute;
  z-index: 2;
  inset: 0;
  background: #a8abad url("assets/shutter-silver.webp") center / 100% 100%;
  box-shadow: inset 0 9px 11px #191a1a80, inset 5px 0 8px #191a1a66, inset -5px 0 8px #191a1a66;
  transition: transform 1.34s cubic-bezier(.45,.04,.35,1);
}
.shutter::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 2.8%;
  background: linear-gradient(180deg, #62666a, #b9b9b5 20%, #8f9394 44%, #565a5c 85%);
  box-shadow: 0 2px 5px #0a0806a0;
}
.shutter-head {
  position: absolute;
  z-index: 3;
  inset: 0 0 auto;
  height: 2.3%;
  background: linear-gradient(180deg, #100f0d, #26241f 65%, #12110f);
  box-shadow: 0 2px 5px #15120e9c;
  pointer-events: none;
}
.hotspot {
  position: absolute;
  z-index: 4;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  align-content: end;
  padding: 0 0 5.1%;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}
.lift { inset: 0; }
.enter { inset: 21% 36.7% 0 37.9%; padding: 0 0 12%; }
.plate {
  min-height: 44px;
  display: inline-flex;
  gap: .65rem;
  align-items: center;
  justify-content: center;
  padding: .55rem .9rem;
  border: 1px solid #aaa090a3;
  border-radius: 3px;
  color: #faf7ee;
  background: #20211e;
  background: linear-gradient(155deg, #343530, #171916 78%);
  box-shadow: 0 2px 5px #100c0980, inset 0 1px #ffffff20;
  font: 700 .78rem/1.15 ui-monospace, "Courier New", monospace;
  letter-spacing: .055em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: color .18s, border-color .18s, background-color .18s;
}
.hotspot:hover .plate, .plate:hover {
  color: var(--yellow);
  border-color: var(--yellow);
}
.shutter-icon, .door-icon {
  flex: 0 0 15px;
  width: 15px;
  height: 14px;
  border: 1px solid currentColor;
  color: var(--yellow);
}
.shutter-icon {
  background: repeating-linear-gradient(0deg, transparent 0 2px, currentColor 2px 3px);
}
.door-icon {
  position: relative;
  width: 11px;
  flex-basis: 11px;
  border-bottom: 0;
}
.door-icon::after {
  content: "";
  width: 2px;
  height: 2px;
  position: absolute;
  right: 2px;
  top: 6px;
  background: currentColor;
}
.inside {
  pointer-events: none;
  opacity: 0;
  transition: opacity .51s ease .23s;
  background: #f0eeea;
}
.inside img { object-position: center; }
.experience:is([data-state="opening"], [data-state="open"], [data-state="entering"], [data-state="inside"], [data-state="leaving"]) .shutter {
  transform: translateY(-97.6%);
}
.experience:is([data-state="entering"], [data-state="inside"]) .door { transform: rotateY(-77deg); }
.experience:is([data-state="entering"], [data-state="inside"]) .street {
  transform: scale(2.22);
  pointer-events: none;
}
.experience:is([data-state="entering"], [data-state="inside"]) .inside { opacity: 1; }
.experience[data-state="leaving"] .inside { transition-delay: 0s; }
.corner {
  position: absolute;
  z-index: 5;
  bottom: max(1.15rem, env(safe-area-inset-bottom));
}
.actions { right: max(1.2rem, env(safe-area-inset-right)); }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.no-script { position: absolute; inset: auto 1rem 5rem; text-align: center; }
.scooter-lane {
  position: absolute;
  z-index: 4;
  inset: auto 0 1.9%;
  height: clamp(148px, min(var(--viewport-height) * .49, 62vw), 485px);
  pointer-events: none;
}
.scooter-rider {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 100%;
  aspect-ratio: 652 / 900;
  isolation: isolate;
  transform: translateX(-110%);
}
.scooter-rider::before {
  content: "";
  position: absolute;
  inset: auto 0 -1.25%;
  height: 6%;
  background:
    radial-gradient(ellipse, #17161690 5%, transparent 70%) 0% bottom / 27% 63% no-repeat,
    radial-gradient(ellipse, #171616b0 5%, transparent 70%) 100% bottom / 27% 63% no-repeat,
    radial-gradient(ellipse, #1d1b195c 5%, transparent 70%) center bottom / 100% 100% no-repeat;
}
.scooter-rider img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  mix-blend-mode: plus-lighter;
  filter: brightness(.94) saturate(.92) contrast(.98);
  user-select: none;
}
.experience:is([data-state="entering"], [data-state="inside"], [data-state="leaving"]) .scooter-lane,
.experience:has(.capsule-dialog[open]) .scooter-lane { visibility: hidden; }

@media (min-aspect-ratio: 3/2) {
  .scene {
    top: auto;
    bottom: 0;
    /* Leave the upstairs window visible even on wide screens. */
    --wide-scene-height: min(var(--scene-width) * 2 / 3, (var(--viewport-height) - 40px) / .887);
    height: var(--wide-scene-height);
    transform: translateX(-50%);
  }
  .facade { object-fit: fill; }
  .sign { width: min(20.5%, var(--wide-scene-height) * .306); }
}
@media (max-aspect-ratio: 19/20) {
  .scene::before, .scene::after {
    content: "";
    position: absolute;
    z-index: 1;
    left: 0;
    right: 0;
    pointer-events: none;
    background-size: 100% 100%;
    background-repeat: no-repeat;
  }
  .scene::before {
    top: calc((100% - var(--viewport-height)) / 2);
    bottom: 100%;
    background-image: url("assets/upper-brick.webp");
  }
  .scene::after {
    top: 81.25%;
    bottom: calc((100% - var(--viewport-height)) / 2);
    background-image: url("assets/dry-street.webp");
  }
}
@media (max-width: 480px) {
  .plate { gap: .42rem; padding-inline: .63rem; font-size: .69rem; }
  .enter .plate { gap: .34rem; padding-inline: .46rem; }
  .back { font-size: .65rem; }
  .actions { bottom: max(.9rem, env(safe-area-inset-bottom)); }
  .actions { right: max(.7rem, env(safe-area-inset-right)); }
}
@media (prefers-reduced-motion: reduce) {
  .scooter-lane { display: none; }
  *, *::before, *::after { transition-duration: .01ms !important; transition-delay: 0s !important; }
  .experience:is([data-state="entering"], [data-state="inside"]) .street { transform: none; }
}
