/* Whole listings on the portfolio (2026-10-30). Justin: "We will need to create what that looks like on the portfolio page.
   Many times, they just pop up the entire listing so someone can see everything and how we shoot."
   Cards in the page's one dark room, then the whole shoot in a centred window (a bottom sheet on a phone), then any photo
   full screen. Photos stay in full colour at rest: a lift and the gold ring say hover, never a filter (2026-10-28).
   Script: listings.js. Nothing here shows until /api/portfolio has a listing: with none, the page is as it was. */

/* the type links above land a section's heading below the fixed header, not under it */
main > section[id]{scroll-margin-top:55px;}

/* ---- the cards: one row that swipes (2026-11-06). Justin: "more like cards that we can swipe left/right ... the edges should
   be visible on the screen to swipe (on mobile) and on web, we can show like 3 side by side, and they can scroll through
   (horizontally)", and "they're kinda big here". Three across from 900px with arrows on the cards' edges (the Insider shoot
   row's, 2026-10-19), two and the next one's edge on a tablet, one and the next one's edge on a phone, where the row runs to
   the screen's edges. One or two listings fill the width and don't scroll. ---- */
.pl-rail{position:relative;--g:clamp(16px,2vw,28px);--bleed:24px;}
.pl-cards{list-style:none;display:flex;gap:var(--g);overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;scroll-snap-type:x mandatory;
  scrollbar-width:none;-webkit-overflow-scrolling:touch;
  /* room for the lift, the floating outline and the shadow, which the row would otherwise clip */
  margin:-16px calc(-1 * var(--bleed)) -24px;padding:16px var(--bleed) 24px;scroll-padding-inline:var(--bleed);}
.pl-cards::-webkit-scrollbar{display:none;}
.pl-cards > li{flex:0 0 calc((100% - 2 * var(--g)) / 3);min-width:0;scroll-snap-align:start;}
.pl-n1 > li{flex-basis:100%;}
.pl-n2 > li{flex-basis:calc((100% - var(--g)) / 2);}
.pl-card{display:flex;flex-direction:column;gap:15px;width:100%;height:100%;padding:0;border:0;background:none;color:inherit;font:inherit;text-align:left;cursor:pointer;}
.pl-card:focus-visible{outline:none;}
.pl-col{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr);grid-template-rows:minmax(0,1fr) minmax(0,1fr);gap:4px;aspect-ratio:3/2;border-radius:6px;overflow:hidden;
  outline:1px solid rgba(201,162,114,.45);outline-offset:6px;box-shadow:0 34px 60px -24px rgba(0,0,0,.85);
  transition:transform .45s cubic-bezier(.16,.6,.24,1),outline-color .3s,box-shadow .45s;}
.pl-col img{display:block;width:100%;height:100%;min-height:0;object-fit:cover;background:rgba(251,248,242,.07);}
.pl-col img:first-child{grid-row:1 / 3;}
.pl-col.solo{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr);}
.pl-col.solo img:first-child{grid-row:auto;}
@media(hover:hover){ .pl-card:hover .pl-col{transform:translateY(-6px);outline-color:var(--gold);box-shadow:0 44px 70px -24px rgba(0,0,0,.95);} }
.pl-card:focus-visible .pl-col{transform:translateY(-6px);outline-color:var(--gold);box-shadow:0 44px 70px -24px rgba(0,0,0,.95);}
.pl-card:focus-visible .pl-col{outline-width:2px;}
.pl-tx{display:grid;gap:3px;min-width:0;}
.pl-t{font-family:var(--fd);font-weight:800;font-size:clamp(18px,1.55vw,21px);letter-spacing:-.025em;line-height:1.15;color:var(--paper);}
.pl-a{font-size:14px;line-height:1.4;color:var(--paper);}
.pl-m{font-size:14px;line-height:1.45;color:rgba(251,248,242,.74);}
/* the arrows ride on the cards' edges, halfway down the pictures; each vanishes at its end, and under 700px the row is swiped */
.pl-nav{display:none;position:absolute;left:0;right:0;top:50%;height:0;pointer-events:none;z-index:3;}
.pl-nav button{position:absolute;top:0;transform:translateY(-50%);display:grid;place-items:center;width:48px;height:48px;padding:0;border:0;border-radius:50%;
  background:var(--paper);color:var(--ink);box-shadow:0 14px 30px -10px rgba(0,0,0,.75);cursor:pointer;pointer-events:auto;transition:background .15s ease,color .15s ease;}
.pl-nav button[data-go="-1"]{left:-14px;}
.pl-nav button[data-go="1"]{right:-14px;}
@media(hover:hover){ .pl-nav button:hover{background:var(--gold);color:var(--on-gold);} }
.pl-nav button:focus-visible{outline:2px solid var(--gold);outline-offset:3px;}
.pl-nav button:disabled{visibility:hidden;}
.pl-nav svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
@media(min-width:700px){ .pl-nav.on{display:block;} }
.pl-allrow{display:flex;justify-content:center;margin-top:clamp(28px,3vw,40px);}
.pl-allrow[hidden]{display:none;}
/* one listing: it takes the width */
@media(min-width:900px){ .pl-n1 .pl-col{aspect-ratio:21/9;} }
@media(max-width:899px){
  /* two, and the third one's edge */
  .pl-n3 > li{flex-basis:calc((88% - 2 * var(--g)) / 2);}
  .pl-n1 .pl-col{aspect-ratio:2/1;}
}
@media(max-width:640px){
  /* one, and the next one's edge; the row runs to the screen's edges (the page's gutter is 20px here) */
  .pl-rail{--g:14px;--bleed:20px;}
  .pl-n2 > li,.pl-n3 > li{flex-basis:84%;}
  .pl-n1 .pl-col{aspect-ratio:3/2;}
}
@media(prefers-reduced-motion:reduce){ .pl-col{transition:none;} .pl-card:hover .pl-col,.pl-card:focus-visible .pl-col{transform:none;} }

/* ---- the window. Centred on a computer, a bottom sheet on a phone. Head and tabs stay; the shoot scrolls under them ---- */
html.pl-lock,html.pl-lock body{overflow:hidden;}
.pl-dlg{position:fixed;margin:0;padding:0;border:0;background:var(--paper);color:var(--ink);box-sizing:border-box;overflow:hidden;overscroll-behavior:contain;}
.pl-dlg[open]{display:flex;flex-direction:column;}
.pl-dlg::backdrop{background:rgba(20,15,10,.66);}
.pl-dlg:focus{outline:none;}
.pl-hd{position:relative;flex:none;padding:20px 26px 16px;background:#2A211A;color:#fff;}
.pl-grab{display:none;}
.pl-hdt{padding-right:52px;}
.pl-hd h2{margin:0;font-family:var(--fd);font-weight:800;font-size:clamp(22px,2.2vw,30px);letter-spacing:-.03em;line-height:1.1;color:#fff;text-wrap:balance;}
.pl-sub{margin:6px 0 0;font-size:14.5px;line-height:1.4;color:rgba(255,255,255,.74);}
.pl-sub:empty{display:none;}
.pl-sub-a + .pl-sub-m::before{content:" \00b7  ";}
.pl-x{position:absolute;top:14px;right:16px;width:40px;height:40px;padding:0;border:0;border-radius:50%;background:rgba(255,255,255,.12);color:#fff;font-size:24px;line-height:1;cursor:pointer;transition:background .15s ease;}
.pl-x:hover{background:rgba(255,255,255,.24);}
.pl-x:focus-visible,.pl-tabs button:focus-visible{outline:2px solid var(--gold);outline-offset:2px;}
/* one line that scrolls sideways when it runs out of room, so pills are right here (2026-10-21) */
.pl-tabs{display:flex;gap:8px;margin:14px -26px 0;padding:2px 26px;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch;}
.pl-tabs::-webkit-scrollbar{display:none;}
.pl-tabs[hidden]{display:none;}
.pl-tabs button{flex:none;min-height:38px;padding:0 15px;border:1px solid rgba(255,255,255,.26);border-radius:999px;background:transparent;color:#fff;font:600 14px/1 var(--ff);cursor:pointer;transition:background .15s ease,border-color .15s ease,color .15s ease;}
.pl-tabs button:hover{border-color:var(--gold);}
.pl-tabs button[aria-pressed="true"]{background:var(--gold);border-color:var(--gold);color:var(--on-gold);}
.pl-tabs i{font-style:normal;font-weight:500;opacity:.72;margin-left:3px;}
.pl-body{flex:1 1 auto;min-height:0;overflow:auto;overscroll-behavior:contain;padding:clamp(12px,1.5vw,20px);-webkit-overflow-scrolling:touch;}
.pl-wait{display:grid;place-items:center;align-content:center;gap:12px;min-height:46vh;color:var(--ink-soft);text-align:center;}
.pl-wait span{width:34px;height:34px;border-radius:50%;border:3px solid rgba(59,47,38,.2);border-top-color:var(--gold-deep);animation:plSpin .8s linear infinite;}
.pl-wait p{margin:0;font-size:15px;}
@keyframes plSpin{to{transform:rotate(360deg);}}
@keyframes plPop{from{opacity:0;transform:translateY(12px) scale(.985);}to{opacity:1;transform:none;}}
@keyframes plUp{from{transform:translateY(40px);opacity:.4;}to{transform:none;opacity:1;}}
@media(min-width:761px){
  .pl-dlg{inset:0;margin:auto;width:min(1320px,calc(100vw - 64px));max-width:none;height:fit-content;max-height:calc(100vh - 56px);max-height:calc(100dvh - 56px);border-radius:18px;box-shadow:0 40px 120px -30px rgba(0,0,0,.75);}
  .pl-dlg[open]{animation:plPop .2s ease-out;}
}
@media(max-width:760px){
  .pl-dlg{inset:auto 0 0 0;width:100%;max-width:100%;max-height:94vh;max-height:94dvh;border-radius:22px 22px 0 0;}
  .pl-dlg[open]{animation:plUp .24s ease-out;}
  .pl-hd{padding:10px 16px 12px;}
  .pl-grab{display:block;width:44px;height:5px;margin:0 auto 12px;border-radius:3px;background:rgba(255,255,255,.34);}
  .pl-grab,.pl-hdt{touch-action:none;}
  .pl-hd.tabs .pl-sub-m{display:none;}
  .pl-x{top:14px;right:12px;}
  .pl-tabs{margin:12px -16px 0;padding:2px 16px;}
  .pl-body{padding:10px 10px calc(14px + env(safe-area-inset-bottom));}
}

/* ---- every photo, in the order the gallery has them. Each keeps its own shape: rows of even height, edge to edge, and a short
   last row centres itself (the orphan-row rule). Tall photos don't get cropped to fit. ---- */
.pl-pics{--rh:clamp(170px,20vw,250px);list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:8px;justify-content:center;align-items:flex-start;}
.pl-pics > li{min-width:0;flex:var(--ar,1.5) 1 calc(var(--ar,1.5) * var(--rh));max-width:calc(var(--ar,1.5) * var(--rh) * 1.6);}
.pl-pics > li[hidden]{display:none;}
.pl-pics button{display:block;width:100%;aspect-ratio:var(--ar,1.5);padding:0;border:0;border-radius:6px;overflow:hidden;background:var(--paper-deep);cursor:zoom-in;
  transition:transform .28s cubic-bezier(.16,.6,.24,1),box-shadow .28s;}
@media(hover:hover){ .pl-pics button:hover{transform:translateY(-3px);box-shadow:0 18px 30px -18px rgba(40,28,18,.65),0 0 0 2px var(--gold);} }
.pl-pics button:focus-visible{outline:none;box-shadow:0 0 0 3px var(--gold-deep);}
.pl-pics img{display:block;width:100%;height:100%;object-fit:cover;}
/* on a phone: one big, two side by side, again and again (listings.js picks the big ones among whichever show) */
@media(max-width:640px){
  .pl-pics{--rh:108px;gap:6px;}
  .pl-pics > li.big{flex-basis:100%;max-width:100%;}
}
@media(prefers-reduced-motion:reduce){ .pl-pics button{transition:none;} .pl-pics button:hover{transform:none;} .pl-dlg[open]{animation:none;} .pl-wait span{animation:none;} }

/* ---- the rest of the shoot: plain section names ---- */
.pl-part{padding:0;}
.pl-part[hidden]{display:none;}
.pl-part + .pl-part{margin-top:26px;}
.pl-part h3{margin:0 0 10px;font-family:var(--fd);font-weight:800;font-size:clamp(19px,1.8vw,23px);letter-spacing:-.025em;line-height:1.15;color:var(--ink);}
.pl-vids{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,420px),1fr));gap:10px;}
.pl-vids video{display:block;width:100%;aspect-ratio:16/9;max-height:72vh;border-radius:8px;background:#1E1711;}
.pl-reels{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;}
.pl-reels video{display:block;flex:0 1 min(300px,calc(50% - 5px));width:min(300px,calc(50% - 5px));aspect-ratio:9/16;border-radius:8px;background:#1E1711;}
.pl-fps{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;}
.pl-fps a{display:block;}
.pl-fps img{display:block;max-width:100%;max-height:78vh;width:auto;height:auto;border-radius:8px;background:#fff;box-shadow:0 0 0 1px var(--line);}
.pl-tour{position:relative;aspect-ratio:16/9;max-height:72vh;width:100%;border-radius:10px;overflow:hidden;background:var(--room);}
.pl-tour iframe{position:absolute;inset:0;width:100%;height:100%;border:0;}
.pl-tour img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;}
.pl-play{position:absolute;inset:0;display:grid;place-items:center;align-content:center;gap:12px;width:100%;padding:0;border:0;background:rgba(30,23,17,.32);color:var(--paper);font:600 16px/1.2 var(--ff);cursor:pointer;text-shadow:0 1px 8px rgba(0,0,0,.6);}
.pl-play .disc{display:grid;place-items:center;width:76px;height:76px;border-radius:50%;background:var(--gold);color:var(--on-gold);transition:transform .2s ease;}
.pl-play .disc svg{width:28px;height:28px;margin-left:4px;}
.pl-play:hover .disc{transform:scale(1.06);}
.pl-play:focus-visible{outline:3px solid var(--gold);outline-offset:-5px;}
.pl-foot{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px 20px;margin-top:22px;padding:18px 22px;border-radius:12px;background:var(--room);color:var(--paper);}
.pl-foot b{font-family:var(--fd);font-weight:800;font-size:clamp(18px,1.7vw,22px);letter-spacing:-.02em;line-height:1.2;}
.pl-oops{display:grid;justify-items:center;gap:14px;padding:70px 20px;text-align:center;}
.pl-oops p{margin:0;font-size:16px;color:var(--ink);}
@media(max-width:640px){ .pl-foot{padding:16px;} .pl-foot .pill{width:100%;justify-content:center;} }

/* ---- every listing, once there are more than the page shows ---- */
.pl-searchrow{margin:12px 0 2px;}
.pl-search{box-sizing:border-box;width:100%;max-width:420px;min-height:44px;padding:0 14px;border:1px solid rgba(255,255,255,.28);border-radius:11px;background:rgba(255,255,255,.08);color:#fff;font:400 16px/1.2 var(--ff);}
.pl-search::placeholder{color:rgba(255,255,255,.62);}
.pl-search:focus{outline:2px solid var(--gold);outline-offset:1px;}
.pl-tiles{--cols:4;--gap:16px;list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;justify-content:center;gap:var(--gap);}
.pl-tiles > li{flex:0 1 calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols));min-width:0;}
.pl-tile{display:grid;gap:9px;width:100%;padding:0;border:0;background:none;color:var(--ink);font:inherit;text-align:left;cursor:pointer;}
.pl-tile img{display:block;width:100%;height:auto;aspect-ratio:3/2;object-fit:cover;border-radius:6px;background:var(--paper-deep);transition:transform .28s cubic-bezier(.16,.6,.24,1),box-shadow .28s;}
@media(hover:hover){ .pl-tile:hover img{transform:translateY(-3px);box-shadow:0 18px 30px -18px rgba(40,28,18,.65),0 0 0 2px var(--gold);} }
.pl-tile:focus-visible{outline:none;}
.pl-tile:focus-visible img{box-shadow:0 0 0 3px var(--gold-deep);}
.pl-tile b{display:block;font-family:var(--fd);font-weight:800;font-size:16px;letter-spacing:-.02em;line-height:1.2;}
.pl-tile small{display:block;margin-top:3px;font-size:13px;line-height:1.4;color:var(--ink-soft);}
.pl-none{margin:0;padding:40px 12px;text-align:center;color:var(--ink-soft);font-size:15px;}
@media(max-width:1100px){ .pl-tiles{--cols:3;} }
@media(max-width:760px){ .pl-tiles{--cols:2;--gap:12px;} .pl-tile b{font-size:15px;} }
@media(prefers-reduced-motion:reduce){ .pl-tile img{transition:none;} .pl-tile:hover img{transform:none;} }

/* ---- one photo, full screen. Arrow keys, a swipe, or the arrows. The site's lightbox look ---- */
.pl-view{position:fixed;inset:0;width:100vw;height:100vh;height:100dvh;max-width:none;max-height:none;margin:0;padding:0;border:0;background:rgba(24,18,13,.97);color:var(--paper);overflow:hidden;touch-action:pan-y pinch-zoom;}
.pl-view[open]{display:grid;place-items:center;}
.pl-view::backdrop{background:rgba(24,18,13,.97);}
.pl-view:focus{outline:none;}
.pl-view img{display:block;max-width:min(96vw,1600px);max-height:calc(100vh - 96px);max-height:calc(100dvh - 96px);object-fit:contain;border-radius:4px;box-shadow:0 40px 90px -30px rgba(0,0,0,.9);user-select:none;-webkit-user-select:none;-webkit-user-drag:none;}
.pl-view button{position:absolute;display:grid;place-items:center;width:46px;height:46px;padding:0;border:1px solid rgba(251,248,242,.28);border-radius:50%;background:rgba(251,248,242,.1);color:var(--paper);font-size:19px;line-height:1;cursor:pointer;transition:background .2s,border-color .2s,color .2s;}
.pl-view button:hover{background:var(--gold);border-color:var(--gold);color:var(--on-gold);}
.pl-view button:focus-visible{outline:2px solid var(--gold);outline-offset:2px;}
.pl-view button[hidden]{display:none;}
.pl-vx{top:clamp(12px,3vw,26px);right:clamp(12px,3vw,26px);}
.pl-vp{left:clamp(8px,2vw,26px);top:50%;transform:translateY(-50%);}
.pl-vn{right:clamp(8px,2vw,26px);top:50%;transform:translateY(-50%);}
.pl-vc{position:absolute;bottom:calc(clamp(12px,3vw,26px) + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);font-family:var(--fm);font-size:12px;letter-spacing:.12em;color:rgba(251,248,242,.72);}
@media(max-width:820px){ .pl-view button{width:40px;height:40px;} }
/* on a phone the arrows sit below the photo, so a sideways photo fills the width */
@media(max-width:640px){
  .pl-view img{max-width:100vw;border-radius:0;}
  .pl-vp,.pl-vn{top:auto;bottom:calc(10px + env(safe-area-inset-bottom));transform:none;}
  .pl-vp{left:16px;}
  .pl-vn{right:16px;}
  .pl-vc{bottom:calc(22px + env(safe-area-inset-bottom));}
}
