/* The homepage wall. Ported from The Secret Cabinet's collection page (site.css: .cab, .field, .tile, .cab-list).
   Sizes, gaps, motion and cursors are the Cabinet's; fonts and colours are this site's.
   The wall fills the screen. The site menu, the control bar and the cart stay hidden until the menu button
   is pressed (body.menu-open), then sit over the wall. */
body.wall {
  --side: 300px;           /* the open menu panel's width */
  --pad: 24px;
  --c-bg: var(--bg); --c-bg2: var(--panel); --c-tile: var(--panel);
  --c-ink: var(--ink); --c-ink2: var(--ink); --c-mute: var(--ink-faint); --c-faint: var(--rule);
  --shadow: 0 24px 70px rgba(0,0,0,.12), 0 2px 8px rgba(0,0,0,.05);
}

/* ---------- menu button and the open menu ---------- */
body.wall .menu-toggle { display: block; position: fixed; z-index: 50; top: 14px; left: 14px; width: 44px; height: 44px; padding: 0 12px;
  border: 0; border-radius: 50%; cursor: pointer; background: color-mix(in srgb, var(--c-bg) 92%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 2px 12px rgba(0,0,0,.12); }
body.wall .menu-toggle span { display: block; height: 1.5px; margin: 5px 0; background: var(--c-ink); transition: transform .25s, opacity .2s; }
body.wall.menu-open .menu-toggle { box-shadow: none; }
body.wall.menu-open .menu-toggle span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
body.wall.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
body.wall.menu-open .menu-toggle span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
body.wall:not(.menu-open) .side .logo, body.wall:not(.menu-open) .side .menu,
body.wall:not(.menu-open) .cab-bar, body.wall:not(.menu-open) .cart-link { display: none; }
body.wall.menu-open .side { width: var(--side); padding-top: 47px; /* the logo sits where it does on every page */ background: var(--c-bg); pointer-events: auto; box-shadow: var(--shadow); z-index: 40; }
body.wall .cart-link { z-index: 45; }

/* ---------- control bar ---------- */
.cab-bar {
  position: fixed; z-index: 30; top: 30px; left: var(--side); right: 110px; height: 52px;
  display: flex; align-items: center; gap: 6px; padding: 0 var(--pad);
  background: var(--c-bg); font: 13px/1 var(--menu); letter-spacing: .03em; overflow-x: auto; scrollbar-width: none;
}
.cab-bar::-webkit-scrollbar { display: none; }
body.wall .cab-bar:before { content: ""; position: fixed; top: 0; left: var(--side); right: 0; height: 82px; background: var(--c-bg); z-index: -1; box-shadow: 0 8px 24px rgba(0,0,0,.06); }
.cab-views { display: flex; gap: 6px; margin-right: 22px; flex: none; }
.cab-views button { border: 0; background: none; color: var(--c-mute); font: inherit; padding: 9px 0; cursor: pointer; white-space: pre; transition: color .2s; }
.cab-views button:hover { color: var(--c-ink2); }
.cab-views button:before, .cab-views button:after { content: "\00a0\00a0"; } /* same width either way, so nothing shifts */
.cab-views button[aria-pressed="true"] { color: var(--c-ink); }
.cab-views button[aria-pressed="true"]:before { content: "[ "; }
.cab-views button[aria-pressed="true"]:after { content: " ]"; }
.cab-trig { flex: none; border: 0; background: none; color: var(--c-ink2); font: inherit; padding: 9px 12px; border-radius: 99px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px; transition: background .2s, color .2s; white-space: nowrap; }
.cab-trig:hover, .cab-trig[aria-expanded="true"] { background: var(--c-bg2); color: var(--c-ink); }
.cab-trig .v { color: var(--c-ink); }
.cab-trig .k { color: var(--c-mute); }
.cab-trig:after { content: ""; width: 9px; height: 9px; flex: none; opacity: .55; transition: transform .3s cubic-bezier(.2,.8,.2,1), opacity .2s;
  background: linear-gradient(currentColor,currentColor) center/9px 1.2px no-repeat, linear-gradient(currentColor,currentColor) center/1.2px 9px no-repeat; }
.cab-trig:hover:after { opacity: .9; }
.cab-trig[aria-expanded="true"]:after { transform: rotate(45deg); opacity: 1; } /* the plus turns into a close mark while its menu is open */
.cab-trig.on { color: var(--c-ink); }
.cab-trig .dot { min-width: 17px; height: 17px; border-radius: 9px; background: var(--c-ink); color: var(--c-bg); font-size: 10px;
  display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; }
.cab-clear { flex: none; border: 0; background: none; color: var(--c-ink); text-decoration: underline; text-underline-offset: 3px; font: inherit; padding: 9px 10px; cursor: pointer; white-space: nowrap; }
.cab-q { flex: 1 1 180px; min-width: 150px; display: flex; align-items: center; gap: 8px; margin: 0 0 0 10px; color: var(--c-mute); }
.cab-q svg { width: 15px; height: 15px; flex: none; }
.cab-q input { width: 100%; border: 0; background: none; color: var(--c-ink); font: inherit; padding: 9px 0; outline: none; }
.cab-q input::placeholder { color: var(--c-mute); }

/* ---------- filter and sort menus ---------- */
.cab-pop { position: fixed; z-index: 60; min-width: 240px; max-width: 340px; max-height: min(460px, 62vh); overflow: auto; background: var(--c-bg);
  border-radius: 14px; box-shadow: var(--shadow); padding: 8px; font: 13px/1.3 var(--menu); letter-spacing: .02em; animation: cabpop .18s cubic-bezier(.2,.8,.2,1); }
@keyframes cabpop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.cab-pop button { display: flex; width: 100%; align-items: center; gap: 10px; border: 0; background: none; color: var(--c-ink2); font: inherit;
  text-align: left; padding: 10px 12px; border-radius: 9px; cursor: pointer; }
.cab-pop button:hover { background: var(--c-bg2); color: var(--c-ink); }
.cab-pop button .c { margin-left: auto; color: var(--c-mute); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.cab-pop button .ck { width: 15px; height: 15px; border-radius: 50%; border: 1.2px solid var(--c-faint); flex: none; transition: all .15s; }
.cab-pop button[aria-checked="true"] { color: var(--c-ink); }
.cab-pop button[aria-checked="true"] .ck { background: var(--c-ink); border-color: var(--c-ink); box-shadow: inset 0 0 0 3px var(--c-bg); }
.cab-pop button.zero { opacity: .38; }
.cab-pop .foot { display: flex; justify-content: space-between; padding: 10px 12px 6px; color: var(--c-mute); font: 11.5px/1.3 var(--menu); height: auto; border: 0; } /* .foot is also the site footer's class */
.cab-pop .foot button { width: auto; padding: 0; color: var(--c-ink); text-decoration: underline; }
.cab-pop .foot button:hover { background: none; }
.cab-scrim { display: none; }

/* ---------- wall: an endless field you drag or scroll in any direction ---------- */
html.is-wall, html.is-wall body { overflow: hidden; height: 100%; overscroll-behavior: none; }
html.is-wall body.wall .foot { display: none; }
.field { position: fixed; z-index: 1; inset: 0; overflow: hidden; cursor: grab;
  touch-action: none; user-select: none; -webkit-user-select: none; background: var(--c-bg); }
.field.drag { cursor: grabbing; }
.field-world { position: absolute; left: 0; top: 0; will-change: transform; }
.tile { position: absolute; left: 0; top: 0; display: block; background: var(--c-tile); -webkit-user-drag: none; }
.tile img { display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; background: var(--c-tile); opacity: 0;
  transition: opacity .6s ease, filter .35s ease; -webkit-user-drag: none; pointer-events: none; }
.tile img.ok { opacity: 1; }
.tile .cap { position: absolute; left: 8px; bottom: 8px; max-width: calc(100% - 16px); padding: 6px 9px; border-radius: 7px;
  background: color-mix(in srgb, var(--c-bg) 90%, transparent); font: 12px/1.3 var(--menu); letter-spacing: .02em; color: var(--c-ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; transform: translateY(3px); transition: opacity .25s, transform .25s; }
.field:not(.drag) .tile:hover .cap, .tile:focus-visible .cap { opacity: 1; transform: none; }
.field.moving .tile { pointer-events: none; }
html:not(.is-wall) .field { display: none; }

/* ---------- list: columns that keep loading as you scroll ---------- */
.cab-list { padding: 76px var(--pad) 40px; }
body.wall.menu-open .cab-list { padding-top: 110px; }
html.is-wall .cab-list { display: none; }
.mas { display: flex; gap: var(--mg, 32px); align-items: flex-start; }
.mcol { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: calc(var(--mg, 32px) * 1.7); }
.mt { display: block; text-decoration: none; }
.mt .im { display: block; overflow: hidden; background: var(--c-tile); }
.mt img { display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .6s ease, transform .8s cubic-bezier(.2,.8,.2,1); }
.mt img.ok { opacity: 1; }
.mt:hover img { transform: scale(1.02); }
.mt .t { display: block; margin-top: 14px; font: 400 17px/1.32 var(--serif); color: var(--c-ink); }
.mt .m { display: block; margin-top: 5px; font: 12px/1.5 var(--menu); letter-spacing: .02em; color: var(--c-mute); }
.mt:hover .t { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.cab-more { height: 1px; }
.cab-empty { padding: 12vh 0; text-align: center; font: 400 34px/1.2 var(--serif); color: var(--c-ink2); }
.cab-empty .btn { margin-top: 18px; font: 13px/1 var(--menu); background: none; border: 0; color: var(--c-ink); text-decoration: underline; cursor: pointer; }
.nojs { padding: 120px var(--pad) 40px; columns: 3; font-family: var(--body); }

/* ---------- smaller screens ---------- */
@media (max-width: 1100px) {
  body.wall { --side: 240px; }
}
@media (max-width: 900px) {
  body.wall { --pad: 18px; }
  .cab-views { margin-right: 8px; gap: 2px; }
  .cab-q { min-width: 130px; margin-left: 4px; }
  .cab-pop { left: 0 !important; right: 0; bottom: 0; top: auto !important; max-width: none; width: 100%; border-radius: 20px 20px 0 0; max-height: 70vh;
    padding: 12px 10px calc(16px + env(safe-area-inset-bottom)); animation: cabsheet .25s cubic-bezier(.2,.8,.2,1); }
  @keyframes cabsheet { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
  .cab-scrim { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(0,0,0,.28); }
  .cab-scrim[hidden] { display: none; }
  .mt .t { font-size: 15px; margin-top: 10px; }
  .mt .m { font-size: 11px; }
}
/* phones: the open menu is a header with the site menu under it; the control bar sits along the bottom */
@media (max-width: 760px) {
  body.wall .menu-toggle { top: 20px; left: auto; right: 15px; } /* where the menu button is on every other page */
  body.wall.menu-open .side { position: fixed; top: 0; left: 0; right: 0; bottom: auto; width: auto; padding: 18px 20px; box-shadow: 0 1px 0 var(--rule); }
  body.wall.menu-open .menu { display: block; padding-left: 20px; max-height: calc(100vh - 190px); }
  /* two rows: views, sort and filters, then search (and Clear) */
  .cab-bar { top: auto; bottom: 0; left: 0; right: 0; height: auto; min-height: 92px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
    flex-wrap: wrap; align-content: center; row-gap: 2px; overflow: visible; font-size: 12px; box-shadow: 0 -1px 0 var(--rule); }
  .cab-views { margin-right: 4px; }
  .cab-trig { padding: 8px 7px; gap: 5px; }
  .cab-clear { order: 9; }
  .cab-q { order: 10; flex: 1 1 200px; margin: 0; }
  body.wall .cab-bar:before { display: none; }
  .cab-list { padding-top: 70px; }
  .nojs { columns: 1; }
}
