/* On the wall: a CSS 3D gallery wall at true size. One inch is --u pixels, set by js/wall.js.
   Full width, on the site's red, with a glossy floor that mirrors the wall. */
html, body { overflow-x: clip; }
.wall { max-width: var(--max); }
.wall3d {
  --W: 240; --H: 96; --u: 3;
  --red: #ff3314;
  position: relative; overflow: hidden;
  width: 100vw; margin-left: calc(50% - 50vw);
  height: clamp(22rem, 78vh, 52rem);
  background: var(--red);
  perspective: calc(var(--u) * 260px);
  perspective-origin: 50% 40%;
  touch-action: pan-y;
  user-select: none; -webkit-user-select: none;
  cursor: grab;
}
.wall3d::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 26%;
  background: linear-gradient(to bottom, rgba(255, 51, 20, 0), var(--red) 92%);
  pointer-events: none; z-index: 2;
}
.wall3d.is-drag { cursor: grabbing; }
.wall3d:focus-visible { outline: none; }
.wall3d__room {
  position: absolute; left: 50%; top: calc(50% - var(--u) * 34px);
  width: calc(var(--W) * var(--u) * 1px);
  height: calc(var(--H) * var(--u) * 1px);
  margin-left: calc(var(--W) * var(--u) * -.5px);
  margin-top: calc(var(--H) * var(--u) * -.5px);
  transform-style: preserve-3d;
  transition: transform .9s var(--ease), transform-origin .9s var(--ease);
  will-change: transform;
}
.wall3d.is-drag .wall3d__room, .wall3d.is-sway .wall3d__room { transition: none; }
.wall3d__wall, .wall3d__mirror .wall3d__wall {
  position: absolute; inset: 0;
  transform-style: preserve-3d;
  background: linear-gradient(to bottom, #efebe1 0%, #e5e0d4 100%);
}
.wall3d__wall::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: calc(100% - 2px);
  height: calc(var(--u) * 500px); background: #efebe1;
}
.wall3d__wall::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: calc(var(--u) * 5px);
  background: #ddd7ca; border-top: 1px solid #b7b0a1;
}
.wall3d__mirror {
  position: absolute; inset: 0; pointer-events: none;
  transform-origin: 50% 100%; transform: scaleY(-1);
  transform-style: preserve-3d;
}
.wall3d__floor {
  position: absolute; left: 0; width: 100%; top: 100%;
  height: calc(var(--u) * 200px);
  transform-origin: top; transform: rotateX(90deg);
  background:
    linear-gradient(to bottom, rgba(255, 255, 255, .16) 0%, rgba(255, 255, 255, 0) 6%),
    linear-gradient(to bottom, rgba(14, 7, 6, .5) 0%, rgba(10, 5, 4, .7) 22%, rgba(8, 4, 3, .9) 55%, rgba(6, 3, 2, .98) 100%);
}

.art {
  outline: none;
  position: absolute;
  width: calc(var(--w) * var(--u) * 1px);
  height: calc(var(--h) * var(--u) * 1px);
  left: calc((var(--W) / 2 + var(--cx) - var(--w) / 2) * var(--u) * 1px);
  top: calc((var(--H) - var(--cy) - var(--h) / 2) * var(--u) * 1px);
  transform-style: preserve-3d;
  cursor: pointer; outline: none;
}
.art::before {
  content: ""; position: absolute; inset: 0;
  background: rgba(0, 0, 0, .4);
  filter: blur(calc(var(--u) * 2.2px));
  transform: translate3d(calc(var(--u) * 1.4px), calc(var(--u) * 2.6px), .5px);
}
.art__front {
  position: absolute; inset: 0;
  transform: translateZ(calc(var(--d) * var(--u) * 1px));
  background: #222;
}
.art__front img { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-user-drag: none; }
.art__front::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, 0) 42%, rgba(0, 0, 0, .14));
}
.art:hover .art__front, .art:focus-visible .art__front { filter: brightness(1.06); }
.art.is-picked .art__front { filter: none; }
.art__s { position: absolute; background: #141414; }
.art__s--t { left: 0; top: 0; width: 100%; height: calc(var(--d) * var(--u) * 1px); transform-origin: top; transform: rotateX(90deg); }
.art__s--b { left: 0; bottom: 0; width: 100%; height: calc(var(--d) * var(--u) * 1px); transform-origin: bottom; transform: rotateX(-90deg); }
.art__s--l { left: 0; top: 0; height: 100%; width: calc(var(--d) * var(--u) * 1px); transform-origin: left; transform: rotateY(-90deg); }
.art__s--r { right: 0; top: 0; height: 100%; width: calc(var(--d) * var(--u) * 1px); transform-origin: right; transform: rotateY(90deg); }

.wall__help { margin: .75rem 0 0; font: 400 var(--step--1) / 1.4 var(--font-body); }
.wall__bar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .75rem; }
.wall__btn {
  min-width: 44px; height: 44px; padding: 0 .9rem;
  background: transparent; color: var(--black);
  border: 1px solid var(--black); border-radius: 0;
  font: 500 var(--step--1) / 1 var(--font-body);
  text-transform: uppercase; letter-spacing: var(--tracking-label);
  cursor: pointer;
}
.wall__btn:hover { background: var(--white); }
.wall__btn:focus-visible { outline: 2px solid var(--black); outline-offset: 2px; }
.wall__btn[hidden] { display: none; }
.wall__info { margin-top: .75rem; padding: 1rem 1.25rem; background: var(--black); color: #fff; }
.wall__title { margin: 0; font: 300 var(--step-1) / 1.2 var(--font-display); }
.wall__meta { margin: .4rem 0 0; font: 400 var(--step--1) / 1.5 var(--font-body); color: #e8e8e8; }
.wall__meta a { color: #fff; text-decoration: underline; text-underline-offset: .2em; }
.wall__list { list-style: none; margin: 1.25rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: .5rem; }
.wall__list button {
  width: 100%; text-align: left; padding: .7rem .8rem;
  background: transparent; color: var(--black);
  border: 1px solid var(--black); border-radius: 0;
  font: inherit; cursor: pointer;
}
.wall__list button:hover { background: var(--white); }
.wall__list button[aria-pressed="true"] { background: var(--black); color: #fff; }
.wall__lt { display: block; font: 400 var(--step--1) / 1.3 var(--font-body); }
.wall__ls { display: block; margin-top: .2rem; font: 500 .72rem / 1 var(--font-body); text-transform: uppercase; letter-spacing: var(--tracking-label); opacity: .75; }
html[data-motion="off"] .wall3d__room { transition-duration: .01s; }
@media (prefers-reduced-motion: reduce) { .wall3d__room { transition-duration: .01s; } }
@media (max-width: 52rem) { .wall3d { height: clamp(18rem, 56vh, 30rem); } }

/* Embedded in the Trading Post Humanism project page */
html.is-embed .skip, html.is-embed .masthead, html.is-embed .hero, html.is-embed .footer, html.is-embed .motion { display: none !important; }
html.is-embed .shell, html.is-embed main { min-height: 0; padding-top: 0; padding-bottom: 0; margin-top: 0; margin-bottom: 0; }
html.is-embed .wall { margin: 0; padding-bottom: 1rem; }
html.is-embed, html.is-embed body { background: transparent; }

/* Lightbox wall: a dim room, pieces glow */
.wall3d[data-set="lightboxes"] .wall3d__wall { background: linear-gradient(to bottom, #2a2725 0%, #1f1d1b 100%); }
.wall3d[data-set="lightboxes"] .wall3d__wall::before { background: #2a2725; }
.wall3d[data-set="lightboxes"] .wall3d__wall::after { background: #151413; border-top-color: #0d0c0b; }
.art--lit::before { background: rgba(255, 190, 120, .55); filter: blur(calc(var(--u) * 7px)); transform: translate3d(0, 0, .5px) scale(1.12); }
.art--lit .art__front { background: #fff; }
.art--lit .art__front::after { background: radial-gradient(ellipse at 50% 50%, rgba(255, 255, 255, .08), rgba(0, 0, 0, .16) 100%); }
.art--lit .art__s { background: #d9d4cc; }
