/* The museum (3D) */
body.museum { background: #0b0b0b; color: #fff; overflow: hidden; height: 100vh; height: 100svh; overscroll-behavior: none; }
.m-canvas { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; outline: none; }
.m-fade { position: fixed; inset: 0; background: #000; opacity: 0; pointer-events: none; transition: opacity .35s ease; z-index: 5; }
.m-fade.on { opacity: 1; }

.m-loading { position: fixed; inset: 0; z-index: 30; display: grid; place-content: center; gap: 22px; background: #0b0b0b; text-align: center; transition: opacity .7s ease, visibility .7s; }
.m-loading.done { opacity: 0; visibility: hidden; }
.m-loading__text { font-size: clamp(2rem, 4vw, 3rem); margin: 0; font-style: italic; }
.m-loading__bar { width: min(320px, 70vw); height: 2px; background: rgba(255,255,255,.18); margin: 0 auto; }
.m-loading__bar span { display: block; height: 100%; width: 0; background: #fff; transition: width .3s ease; }

.m-welcome {
  position: fixed; left: 50%; bottom: clamp(28px, 7vh, 80px); z-index: 10; width: min(760px, calc(100vw - 2 * var(--gutter)));
  translate: -50% 0; text-align: center; display: grid; justify-items: center;
  text-shadow: 0 2px 24px rgba(0,0,0,.7);
  animation: m-in .9s cubic-bezier(.2,.7,.1,1) both;
}
.m-welcome__title { font-size: clamp(3.2rem, 7vw, 6.2rem); margin: 0 0 10px; font-style: italic; }
.m-welcome__lead { font-size: clamp(1.25rem, 2vw, 1.6rem); margin: 0 0 10px; line-height: 1.35; }
.m-welcome__how { margin: 0 0 26px; color: rgba(255,255,255,.86); }
.m-welcome__go { color: #000; background: #fff; border-color: #fff; min-height: 60px; padding: 14px 44px; font-size: 1.25rem; text-shadow: none; }
.m-welcome__go:hover { background: #e2bd55; border-color: #e2bd55; color: #000; }
@keyframes m-in { from { opacity: 0; transform: translateY(18px); } }

/* Wall label: sits like the card beside a painting */
.m-label {
  position: fixed; z-index: 10; left: var(--gutter); bottom: clamp(20px, 4vh, 44px);
  width: min(420px, calc(100vw - 2 * var(--gutter)));
  background: #fff; color: #111; padding: 22px 24px 20px;
  box-shadow: 0 24px 60px -20px rgba(0,0,0,.65);
  transition: opacity .35s ease, transform .45s cubic-bezier(.2,.7,.1,1);
}
.m-label[hidden] { display: block; opacity: 0; transform: translateY(16px); pointer-events: none; visibility: hidden; }
.m-label__artist { margin: 0 0 4px; font-weight: 600; font-size: 1.125rem; }
.m-label__title { margin: 0 0 6px; font-family: var(--display); font-style: italic; font-weight: 500; font-size: clamp(1.8rem, 2.6vw, 2.3rem); line-height: 1.05; }
.m-label__meta { margin: 0 0 12px; color: #444; font-size: 1.125rem; line-height: 1.45; }
.m-label__desc { margin: 0 0 14px; font-size: 1.125rem; line-height: 1.5; }
.m-label__links { margin: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.m-label__links a { font-weight: 600; text-underline-offset: 4px; }
.m-label__links a:hover { color: var(--teal); }
.m-label--door { background: rgba(10,10,10,.82); color: #fff; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.m-label--door .m-label__meta { color: rgba(255,255,255,.75); }

/* Walk controls */
.m-hud {
  position: fixed; z-index: 10; right: var(--gutter); bottom: clamp(20px, 4vh, 44px);
  display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
}
.m-hud[hidden] { display: none; }
.m-hud__room { margin: 0; font-family: var(--display); font-size: 1.6rem; font-style: italic; text-shadow: 0 2px 18px rgba(0,0,0,.6); text-align: right; }
.m-hud__count { display: block; font-family: var(--text); font-style: normal; font-size: 1.125rem; color: rgba(255,255,255,.82); }
.m-hud__btns { display: flex; gap: 8px; }
.m-btn {
  min-width: 52px; height: 52px; border-radius: 999px; border: 1.5px solid rgba(255,255,255,.55);
  background: rgba(12,12,12,.55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  color: #fff; cursor: pointer; display: inline-grid; place-items: center; padding: 0 18px;
  transition: background .2s, border-color .2s;
}
.m-btn:hover { background: #fff; color: #000; border-color: #fff; }
.m-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.m-btn--text { font-weight: 600; }

/* All works index */
.m-index {
  position: fixed; inset: 0; z-index: 40; overflow: auto; overscroll-behavior: contain;
  background: #f3f2ee; color: #111; padding: 0 var(--gutter) 100px;
}
.m-index[hidden] { display: none; }
.m-index__bar {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 14px 28px; flex-wrap: wrap;
  margin: 0 calc(-1 * var(--gutter)); padding: 84px var(--gutter) 14px; background: rgba(243,242,238,.94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid #d9d6d0;
}
.m-index__bar h2 { font-size: clamp(2.2rem, 4.4vw, 3.6rem); margin: 0; font-style: italic; }
.m-index h2:focus { outline: none; }
.m-index__rooms { display: flex; gap: 4px 22px; flex-wrap: wrap; flex: 1; }
.m-index__rooms a { color: #111; text-decoration: none; font-weight: 600; padding: 10px 0; border-bottom: 2px solid transparent; }
.m-index__rooms a:hover, .m-index__rooms a[aria-current="true"] { border-bottom-color: #111; }
.m-index__rooms a span { color: #777; font-weight: 500; }
.m-index__find input { font: inherit; font-size: 1.125rem; min-height: 48px; width: min(240px, 60vw); padding: 0 18px; border-radius: 999px; border: 1.5px solid #111; background: #fff; color: #111; }
.m-index__find input::placeholder { color: #666; }
.m-index__find input:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.m-index__none { margin: 40px 0 0; font-family: var(--display); font-style: italic; font-size: 1.6rem; }
.m-show[hidden], .m-hang li[hidden] { display: none; }
.m-index__close { min-height: 48px; padding: 0 22px; border-radius: 999px; border: 0; background: #111; color: #fff; font-weight: 600; cursor: pointer; }
.m-index__close:hover { background: var(--teal); }
.m-index__note { margin: 26px 0 0; max-width: 56ch; color: #444; }

.m-show { padding-top: clamp(56px, 8vw, 110px); scroll-margin-top: 150px; }
.m-show__head { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 18px 60px; align-items: end; margin-bottom: clamp(30px, 4vw, 56px); }
.m-show__name { font-size: clamp(3.6rem, 12vw, 11rem); font-style: italic; line-height: .86; margin: 0; letter-spacing: -.03em; }
.m-show__about p { margin: 0 0 8px; max-width: 46ch; }
.m-show__count { font-weight: 800; font-variation-settings: "wdth" 70; font-size: 1.4rem; }
.m-show__go { margin-top: 10px; min-height: 48px; padding: 0 22px; border-radius: 999px; border: 2px solid #111; background: none; color: #111; font-weight: 600; cursor: pointer; }
.m-show__go:hover { background: #111; color: #fff; }
.no-webgl .m-show__go { display: none; }

/* the wall: works stand on one line, each at its size against the others in the room */
.m-hang { --u: 1; list-style: none; margin: 0; padding: 0 0 6px; display: flex; flex-wrap: wrap; align-items: flex-end; gap: clamp(34px, 4vw, 60px) clamp(22px, 3.2vw, 52px); }
.m-hang li { flex: 0 0 auto; }
.m-hang button { all: unset; cursor: pointer; display: block; }
.m-hang button:focus-visible { outline: 3px solid var(--teal); outline-offset: 6px; }
.m-hang__art { display: block; width: calc(var(--w) * var(--u) * 1px); min-width: 64px; max-width: 78vw; box-shadow: 0 2px 2px rgba(0,0,0,.25), 0 18px 26px -10px rgba(0,0,0,.42); transition: transform .45s cubic-bezier(.2,.7,.1,1), box-shadow .45s; }
.m-hang__art img { display: block; width: 100%; height: auto; }
.m-hang button:hover .m-hang__art, .m-hang button:focus-visible .m-hang__art { transform: translateY(-8px) scale(1.025); box-shadow: 0 3px 3px rgba(0,0,0,.25), 0 34px 40px -14px rgba(0,0,0,.5); }
.m-hang__name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.3em; margin-top: 14px; font-family: var(--display); font-style: italic; font-size: 1.35rem; line-height: 1.15; max-width: max(calc(var(--w, 160) * 1px), 150px); }
.m-hang__size { display: block; color: #555; }
@media (max-width: 760px) {
  .m-index__bar { position: static; padding-top: 70px; } .m-index__rooms { order: 3; flex-basis: 100%; gap: 0 18px; flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
  .m-show__head { grid-template-columns: 1fr; }
  .m-hang { --u: .52; }
}

/* rooms: always one tap away once you're in the hall */
.m-rooms {
  position: fixed; z-index: 11; top: 70px; left: 50%; transform: translateX(-50%); max-width: calc(100vw - 2 * var(--gutter));
  display: flex; gap: 2px; padding: 5px; border-radius: 999px; background: rgba(12,12,12,.72); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  overflow-x: auto; scrollbar-width: none; opacity: 0; visibility: hidden; transition: opacity .6s ease, visibility .6s;
}
.m-rooms::-webkit-scrollbar { display: none; }
.in-hall .m-rooms { opacity: 1; visibility: visible; }
.m-rooms__btn { all: unset; box-sizing: border-box; cursor: pointer; white-space: nowrap; min-height: 44px; padding: 0 18px; border-radius: 999px; color: rgba(255,255,255,.82); font-weight: 600; display: inline-flex; align-items: center; transition: background .2s, color .2s; }
.m-rooms__btn:hover { color: #fff; background: rgba(255,255,255,.14); }
.m-rooms__btn[aria-current="true"] { background: #fff; color: #000; }
.m-rooms__btn:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
@media (max-width: 760px) { .m-rooms { top: 64px; } .m-rooms__btn { padding: 0 14px; } }

.no-webgl .m-canvas, .no-webgl .m-hud, .no-webgl .m-welcome { display: none; }

@media (max-width: 760px) {
  .m-label { left: 12px; right: 12px; width: auto; bottom: 86px; padding: 16px 18px; max-height: 44vh; overflow-y: auto; }
  .m-label__title { font-size: 1.7rem; }
  .m-hud { left: 12px; right: 12px; bottom: 16px; flex-direction: row; justify-content: space-between; align-items: center; }
  .m-hud__room { font-size: 1.25rem; text-align: left; }
  .m-welcome { bottom: 110px; }
}
.m-hud__room, .m-hud__count { mix-blend-mode: difference; text-shadow: none; color: #fff; }

/* widescreen bars close in for the ride up and open again as you arrive */
.m-bars::before, .m-bars::after { content: ""; position: fixed; left: 0; right: 0; height: 11vh; background: #000; z-index: 6; pointer-events: none; transform: scaleY(0); transition: transform 1.1s cubic-bezier(.65,0,.2,1); }
.m-bars::before { top: 0; transform-origin: top; } .m-bars::after { bottom: 0; transform-origin: bottom; }
.is-riding .m-bars::before, .is-riding .m-bars::after { transform: scaleY(1); }
.is-riding .m-hud, .is-riding .nav { opacity: 0; transition: opacity .5s; } .m-hud, body.museum .nav { transition: opacity .8s .4s; }
@media (max-width: 760px) {
  .m-hud .m-btn { min-width: 46px; height: 46px; padding: 0 14px; white-space: nowrap; }
  .m-hud__count { white-space: nowrap; }
  .m-hud #sound { font-size: 0; min-width: 46px; padding: 0; }
  .m-hud #sound::before { content: "♪"; font-size: 1.5rem; line-height: 1; }
  .m-hud #sound[aria-pressed="false"]::before { opacity: .45; text-decoration: line-through; }
}

.m-btn--solid { background: #fff; color: #000; border-color: #fff; }
.m-btn--solid:hover { background: #e2bd55; border-color: #e2bd55; }
.m-btn[hidden] { display: none; }
@media (max-width: 760px) {
  .m-hud__room { display: none; }
  .m-hud #open-index { min-width: 46px; padding: 0; }
  .m-hud #open-index span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .m-hud #open-index::before { content: ""; width: 18px; height: 18px; background: linear-gradient(currentColor 0 0) 0 0 / 7px 7px no-repeat, linear-gradient(currentColor 0 0) 100% 0 / 7px 7px no-repeat, linear-gradient(currentColor 0 0) 0 100% / 7px 7px no-repeat, linear-gradient(currentColor 0 0) 100% 100% / 7px 7px no-repeat; }
}

.m-tip { position: fixed; left: 0; top: 0; z-index: 12; margin: 0; pointer-events: none; padding: 6px 14px; background: #fff; color: #111; font-family: var(--display); font-style: italic; font-size: 1.25rem; box-shadow: 0 10px 24px -8px rgba(0,0,0,.5); white-space: nowrap; }
.m-tip[hidden] { display: none; }
.m-label__links button { all: unset; cursor: pointer; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.m-label__links button:hover { color: var(--teal); } .m-label__links button:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
.is-close .m-label .m-label__desc, .is-close .m-rooms { display: none; }
@media (max-width: 760px) { .m-hud #next-room span { display: none; } }

.m-btn--text { white-space: nowrap; }

.m-hud #walk { gap: 8px; display: inline-flex; align-items: center; }
.is-walking .m-hud #walk { background: #fff; color: #000; border-color: #fff; }
@media (max-width: 760px) {
  .m-hud__btns { gap: 6px; } .m-hud .m-btn { min-width: 42px; height: 44px; padding: 0 12px; }
  .m-hud #walk { padding: 0; justify-content: center; } .m-hud #walk span { display: none; }
  .m-hud #sound, .m-hud #open-index { min-width: 42px; }
}

.m-hud #next-room { display: inline-flex; align-items: center; justify-content: center; }

.m-welcome__back { margin: 16px 0 0; } .m-welcome__back a { color: #fff; font-weight: 600; text-underline-offset: 5px; }

.m-hint { position: fixed; z-index: 11; left: 50%; top: 132px; translate: -50% 0; margin: 0; padding: 8px 18px; border-radius: 999px; background: rgba(12,12,12,.72); color: #fff; font-weight: 600; pointer-events: none; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); transition: opacity .9s ease, translate .9s ease; max-width: calc(100vw - 2 * var(--gutter)); text-align: center; }
.m-hint[hidden] { display: none; } .m-hint.is-gone, .is-riding .m-hint { opacity: 0; translate: -50% -10px; }
@media (hover: none) { .m-hint { display: none; } }

.m-fade { transition: opacity .5s ease; }

/* the two plain ways out of where you are: off the work to the middle of the room, and down the escalator */
.m-hud__way .sm { display: none; }
.is-close .m-hud__way #exit { display: none; }
@media (max-width: 760px) {
  .m-hud { flex-direction: column; align-items: flex-end; gap: 8px; }
  .m-hud__way .lg { display: none; } .m-hud__way .sm { display: inline; }
  .m-label { bottom: 138px; }
}

/* the how-to line speaks to the hand you have: a mouse and keys, or a finger */
.m-welcome__how .by-touch { display: none; }
@media (hover: none) { .m-welcome__how .by-mouse { display: none; } .m-welcome__how .by-touch { display: inline; } }

/* ---------- the wall label: a head (title) and a body (the rest) ---------- */
.m-label__more { display: none; }
.m-label__more svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: rotate .35s cubic-bezier(.2,.7,.1,1); }
/* room cards are glass, not slabs */
.m-label--door { background: rgba(16,16,16,.58); -webkit-backdrop-filter: blur(18px) saturate(1.6); backdrop-filter: blur(18px) saturate(1.6); border: 1px solid rgba(255,255,255,.26); border-radius: 22px; box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 18px 44px -22px rgba(0,0,0,.6); }

/* Phone: the art comes first. The label is one line of glass with the title; raise it to read the rest. */
@media (max-width: 760px) {
  .m-label, .m-label--door {
    left: 10px; right: 10px; width: auto; bottom: 132px; padding: 0; max-height: none; overflow: visible; color: #fff;
    background: rgba(16,16,16,.58); -webkit-backdrop-filter: blur(18px) saturate(1.6); backdrop-filter: blur(18px) saturate(1.6);
    border: 1px solid rgba(255,255,255,.26); border-radius: 24px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 12px 30px -16px rgba(0,0,0,.6);
  }
  .m-label__artist { display: none; }
  .m-label__head { display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 3px 4px 3px 18px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .m-label__title { flex: 1; min-width: 0; margin: 0; font-size: 1.4rem; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .m-label.is-raised .m-label__title { white-space: normal; padding: 8px 0 2px; }
  .m-label__more { display: grid; place-items: center; flex: none; width: 44px; height: 44px; padding: 0; border-radius: 50%; border: 1px solid rgba(255,255,255,.34); background: rgba(255,255,255,.12); color: #fff; cursor: pointer; }
  .m-label.is-raised .m-label__more svg { rotate: 180deg; }
  .m-label__body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s cubic-bezier(.2,.7,.1,1); }
  .m-label.is-raised .m-label__body { grid-template-rows: 1fr; }
  .m-label__in { min-height: 0; overflow: hidden; padding: 0 18px; }
  .m-label.is-raised .m-label__in { max-height: 46svh; overflow-y: auto; }
  .m-label__in > :last-child { margin-bottom: 16px; }
  .m-label__meta, .m-label--door .m-label__meta { color: rgba(255,255,255,.82); margin-bottom: 8px; }
  .m-label__links a, .m-label__links button { color: #fff; }
  .is-close .m-label { display: none; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .m-label--door { background: rgba(16,16,16,.86); } @media (max-width: 760px) { .m-label { background: rgba(16,16,16,.86); } } }

/* on the ride (up or down) nothing sits on the screen but the ride */
.is-riding .m-hud, .is-riding .m-rooms, .is-riding .m-label { opacity: 0; pointer-events: none; }
.m-rooms { transition: opacity .5s; }
