/* Expoline: project detail. Text panel and a horizontal row of photos on wide screens, a vertical stack on phones. */

body.is-reel { overflow: hidden; }

.stage {
  height: calc(100vh - var(--wpab));
  height: calc(100dvh - var(--wpab));
  padding-top: calc(var(--bar) + env(safe-area-inset-top, 0px));
  padding-bottom: max(var(--m), env(safe-area-inset-bottom, 0px));
}
.reel {
  display: flex;
  align-items: stretch;
  height: 100%;
  gap: var(--gap);
  padding-left: max(var(--m), env(safe-area-inset-left, 0px));
  padding-right: max(var(--m), env(safe-area-inset-right, 0px));
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}
.reel::-webkit-scrollbar { display: none; }
/* overflow: clip (Lenis' stopped state) would reset the row to its first photo */
.reel.lenis.lenis-stopped { overflow: hidden; }

.intro {
  flex: 0 0 min(440px, 72vw);
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: clamp(8px, 2vh, 20px) clamp(8px, 1vw, 16px) clamp(20px, 3vw, 40px) 0;
  overflow: auto;
  scrollbar-width: none;
}
.intro::-webkit-scrollbar { display: none; }
.intro h1 {
  margin: 0 0 44px;
  font-family: var(--font);
  font-weight: 300;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.15;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink);
}
.intro .entry { color: var(--ink); }
/* Firm credit, same type as the location and year, pinned to the bottom left of the panel */
.assign {
  margin: auto 0 0;
  padding-top: 16px;
  border-top: 1px solid rgba(18, 18, 17, .16);
  font-family: var(--font);
  font-weight: 300;
  font-size: clamp(11px, 1vw, 16px);
  line-height: 1.8;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--mute);
}

.shot {
  flex: 0 0 auto;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--ph);
  view-transition-name: none;
}
.shot img,
.shot video {
  display: block;
  height: 100%;
  width: auto;
  max-width: none;
}
#shot-1 { view-transition-name: project-hero; }
.shot .zoom { display: block; height: 100%; cursor: zoom-in; }
.shot .zoom:focus-visible { outline: 1px solid var(--ink); outline-offset: -1px; }

/* Full-screen viewer (PhotoSwipe) */
.pswp {
  --pswp-bg: #0f0f0e;
  --pswp-placeholder-bg: #1c1c1b;
  --pswp-icon-color: rgba(255, 255, 255, .9);
  --pswp-icon-color-secondary: #0f0f0e;
  --pswp-icon-stroke-color: #0f0f0e;
  --pswp-icon-stroke-width: 0;
  --pswp-transition-duration: 500ms;
  font-family: var(--font);
}
.pswp__counter {
  margin-inline-start: max(var(--m), env(safe-area-inset-left, 0px));
  font-weight: 300;
  font-size: 12px;
  line-height: 60px;
  letter-spacing: .24em;
  color: rgba(255, 255, 255, .72);
  opacity: 1;
  font-variant-numeric: tabular-nums;
}
.pswp__button { opacity: .72; transition: opacity .6s var(--ease); }
.pswp__button:hover, .pswp__button:focus-visible { opacity: 1; }
.pswp__button--close { margin-inline-end: max(calc(var(--m) - 10px), env(safe-area-inset-right, 0px)); }
.pswp__error-msg { font-size: 14px; letter-spacing: .08em; }

/* Slow reveal: the box keeps its full shape, fades in, and the photo settles from a slight zoom */
.js .intro[data-reveal], .js .shot[data-reveal] {
  opacity: 0;
  transition: opacity 1.8s var(--ease);
}
.js .intro[data-reveal].in, .js .shot[data-reveal].in { opacity: 1; }
.js .shot[data-reveal] img,
.js .shot[data-reveal] video { transform: scale(1.06); transition: transform 2.6s var(--ease); transition-delay: inherit; }
.js .shot[data-reveal].in img,
.js .shot[data-reveal].in video { transform: scale(1); }

/* Position in the gallery, shown in the top bar */
.count {
  position: absolute;
  left: 50%;
  top: calc(env(safe-area-inset-top, 0px) + var(--bar) / 2);
  transform: translate(-50%, -50%);
  margin: 0;
  font-family: var(--font);
  font-weight: 300;
  font-size: 12px;
  letter-spacing: .24em;
  color: var(--mute);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.count #count-now { color: var(--ink); }
.count-sep { margin: 0 .7em; }
.progress {
  position: absolute;
  left: max(var(--m), env(safe-area-inset-left, 0px));
  right: max(var(--m), env(safe-area-inset-right, 0px));
  bottom: 0;
  height: 1px;
  background: var(--line);
  overflow: hidden;
}
.progress span {
  display: block;
  height: 100%;
  background: var(--ink);
  transform-origin: 0 50%;
  transform: scaleX(0);
}
.no-shots .count, .no-shots .progress { display: none; }
/* Narrow screens: the two logos reach the middle of the bar, the progress line alone shows the position. */
@media (max-width: 700px) { .count { display: none; } }

@media (max-width: 560px) {
  body.is-reel { overflow-x: hidden; overflow-y: auto; }
  .stage { height: auto; padding-bottom: max(var(--m), env(safe-area-inset-bottom, 0px)); }
  .reel {
    display: block;
    height: auto;
    overflow: visible;
  }
  .intro {
    width: 100%;
    height: auto;
    padding: 8px 0 8px;
    overflow: visible;
  }
  .assign { margin-top: 40px; }
  .shot { height: auto; width: 100%; margin-bottom: var(--gap); }
  .shot img, .shot video { width: 100%; height: auto; }
  .shot .zoom { height: auto; }
}
