/* The visible photograph keeps the full width and portrait/landscape art direction of the live gallery. */
.scroll-gallery-shell{--gallery-top:0px;--gallery-height:min(150vw,calc(100svh - var(--gallery-top)));position:relative;background:var(--surface)}
.scroll-gallery-shell::after{content:"";display:block;height:var(--gallery-travel,0px);pointer-events:none}
#gallery .scroll-gallery-stage,.hero .scroll-gallery-stage{position:sticky;top:var(--gallery-top);width:100%;max-width:none;margin:0;isolation:isolate}
#gallery .scroll-gallery-rail,#shop-photo-rail.scroll-gallery-rail{position:relative;display:block;width:100%;height:var(--gallery-height);overflow:clip;background:var(--surface);scroll-snap-type:none;touch-action:pan-y pinch-zoom;scroll-behavior:auto;isolation:isolate}
#gallery .gallery-page>.editorial-frame,#shop-photo-rail.scroll-gallery-rail>.shop-photo{position:absolute;inset:0;isolation:auto;width:100%;height:100%;min-height:0;max-height:none;aspect-ratio:auto;margin:0;background:transparent;overflow:visible;pointer-events:none;perspective:max(1350px,140vw);perspective-origin:50% 48%}
.scroll-gallery-rail .editorial-frame picture{display:block;position:absolute;inset:0;width:100%;height:100%;background:var(--surface);transform-origin:50% 55%;backface-visibility:hidden;box-shadow:0 2px 3px #23181136,0 5px 14px #23181112}
.scroll-gallery-stage .scroll-gallery-rail figure img{display:block;width:100%;height:100%}
#gallery .scroll-gallery-rail figcaption,#shop-photo-rail.scroll-gallery-rail figcaption{position:absolute;z-index:1;top:auto;bottom:0;left:0;right:0;width:100%;padding:clamp(56px,12vh,130px) max(7vw,26px) clamp(29px,6vh,66px);background:linear-gradient(0deg,rgba(13,10,9,.8),rgba(13,10,9,.48) 49%,transparent);text-align:left;pointer-events:none}
#gallery .scroll-gallery-rail figcaption :is(h3,p),#shop-photo-rail.scroll-gallery-rail figcaption :is(h3,p){color:#fff9ef;text-shadow:0 1px 3px #17131078}
.scroll-gallery-stage :is(.shop-photo-arrow,.arrival-controls){z-index:15}
.scroll-gallery-stage .shop-photo-progress,.scroll-gallery-stage .arrival-progress{position:absolute;z-index:14;bottom:8px;left:50%;width:min(24vw,140px);min-width:0;height:2px;margin:0;transform:translateX(-50%);background:#ffffff50;color:#fff;pointer-events:none}
.scroll-gallery-stage :is(.shop-photo-progress i,.arrival-progress span){transition:none}
@media(min-width:761px){
 .scroll-gallery-shell{--gallery-height:calc(100svh - var(--gallery-top))}
 #gallery .scroll-gallery-rail figcaption,#shop-photo-rail.scroll-gallery-rail figcaption{max-width:100%;padding-inline:clamp(62px,7vw,110px)}
 .scroll-gallery-rail figcaption :is(h3,p){max-width:min(49vw,690px)}
}

/* The original captions start at the top of each print and settle along the lower edge. */
#gallery .scroll-gallery-rail figcaption,
#shop-photo-rail.scroll-gallery-rail figcaption {
  top:0;
  bottom:auto;
  padding-block:clamp(24px,5svh,62px);
  background:none;
}
#gallery .scroll-gallery-rail .photo-caption-fallen figcaption,
#shop-photo-rail.scroll-gallery-rail .photo-caption-fallen figcaption {
  top:auto;
  bottom:0;
}
.scroll-gallery-rail picture::before,
.scroll-gallery-rail picture::after {
  content:"";
  position:absolute;
  inset:0;
  z-index:1;
  pointer-events:none;
  transition:opacity .8s ease;
}
.scroll-gallery-rail picture::before {
  background:linear-gradient(to bottom,#11100fd9,rgba(17,16,15,.30) 30%,transparent 52%);
}
.scroll-gallery-rail picture::after {
  opacity:0;
  background:linear-gradient(to top,#11100fd9,rgba(17,16,15,.30) 30%,transparent 52%);
}
.scroll-gallery-rail .photo-caption-fallen picture::before {opacity:0}
.scroll-gallery-rail .photo-caption-fallen picture::after {opacity:1}

/* The Lines print rotates with its neighbours, including its background. */
#gallery .scroll-gallery-rail #look-09 {background:transparent}
#gallery .scroll-gallery-rail #look-09 img {height:100%;transform:none}

/* The reviews cover the current photograph when the reader continues down the page. */
#gallery.has-review-overlay {padding-bottom:0}
#gallery.has-review-overlay .scroll-gallery-shell::after {
  height:calc(var(--gallery-travel,0px) + var(--review-overlap,0px));
}
#reviews.gallery-reviews-overlay {
  z-index:2;
  margin:calc(0px - var(--review-overlap,0px)) 0 0;
  padding-inline:5vw;
  background:var(--surface);
  isolation:isolate;
}
@media(max-width:650px){
  #reviews.gallery-reviews-overlay {padding-inline:6vw}
}
@media(prefers-reduced-motion:reduce){
  #gallery .scroll-gallery-rail figcaption,#shop-photo-rail.scroll-gallery-rail figcaption {top:auto;bottom:0}
  .scroll-gallery-rail picture::before {opacity:0;transition:none}
  .scroll-gallery-rail picture::after {opacity:1;transition:none}
}

#gallery .scroll-gallery-rail {
  display:flex;
  overflow-x:auto;
  overflow-y:hidden;
  overflow-anchor:none;
  scroll-snap-type:x mandatory;
  overscroll-behavior-x:contain;
  touch-action:auto;
}
#gallery .gallery-page {
  position:relative;
  flex:0 0 100%;
  height:100%;
  min-width:0;
  scroll-snap-align:start;
  scroll-snap-stop:always;
  perspective:max(900px,120vw);
}
#gallery .gallery-page>.editorial-frame {scroll-snap-align:none}
#gallery .scroll-gallery-rail.is-dragging {scroll-snap-type:none;cursor:grabbing}
@media(pointer:fine) {
  #gallery .scroll-gallery-rail {cursor:grab;user-select:none}
}
#gallery .arrival-controls {display:none}
#gallery .scroll-gallery-stage .arrival-controls {
  display:block;
  inset:0 auto auto 0;
  width:1px;
  height:1px;
  overflow:hidden;
  clip-path:inset(50%);
}
#gallery .scroll-gallery-stage .arrival-controls svg {display:none}
@media(prefers-reduced-motion:no-preference) {
  #gallery .scroll-gallery-shell {
    --gallery-travel:335vh;
    --gallery-travel:calc(335 * var(--orijinz-svh,1svh));
  }
  #gallery .gallery-page>.editorial-frame {
    transform:translateX(var(--print-shift,0%)) rotateY(var(--print-turn,0deg)) scale(var(--print-scale,1));
  }
  #gallery .gallery-page>.editorial-frame::after {
    content:"";
    position:absolute;
    inset:0;
    z-index:1;
    background:black;
    opacity:var(--print-shade,0);
    pointer-events:none;
  }
  #gallery .gallery-page picture,
  #gallery .gallery-page>.editorial-frame::after {
    transform:scale(var(--photo-scale,1));
    transform-origin:center;
  }
  /* The original edge vignettes crossfade in place as the caption moves. */
  #gallery .gallery-page picture::before,
  #gallery .gallery-page picture::after {
    background:linear-gradient(var(--edge-direction,to bottom),
      rgb(17 16 15 / 68%),rgb(17 16 15 / 40%) 15%,rgb(17 16 15 / 19%) 32%,
      rgb(17 16 15 / 5%) 48%,transparent 63%);
    transition:none;
  }
  #gallery .gallery-page picture::before {opacity:var(--light-top,0)}
  #gallery .gallery-page picture::after {--edge-direction:to top;opacity:var(--light-bottom,0)}
  #gallery .scroll-gallery-stage .arrival-progress {bottom:calc(8px + var(--photo-inset,0%))}
  #gallery .gallery-page figcaption {
    z-index:2;
    top:var(--caption-top,0%);
    inset-inline:var(--photo-inset,0%);
    translate:0 var(--caption-translate,-106%);
    bottom:auto;
    width:auto;
    opacity:0;
  }
  #gallery .gallery-page .photo-falling-letter {
    transform:translateY(calc(var(--letter-order,0) * var(--letter-trail,0em)));
  }
  #gallery .scroll-gallery-rail figcaption p {
    text-shadow:0 1px 2px rgb(17 13 11 / 72%),0 0 5px rgb(17 13 11 / 32%);
  }
  #gallery .gallery-page .photo-falling-word {
    max-inline-size:100%;
    white-space:normal;
    overflow-wrap:anywhere;
  }
}

/* On pale portrait backgrounds, keep the contrast close to the lettering. */
@media (max-width:760px) {
  #gallery :is(#look-01,#look-02,#look-04,#look-06,#look-09,#look-10) figcaption h3 {
    -webkit-text-stroke:.55px rgb(27 22 19 / 76%);
    paint-order:stroke fill;
    text-shadow:0 1px 2px rgb(24 19 16 / 75%),0 0 4px rgb(24 19 16 / 38%);
  }
  #gallery :is(#look-01,#look-02,#look-04,#look-06,#look-09,#look-10) figcaption p {
    -webkit-text-stroke:.65px rgb(27 22 19 / 82%);
    paint-order:stroke fill;
    text-shadow:0 0 1.1px rgb(24 19 16 / 95%),0 1px 3px rgb(24 19 16 / 80%);
  }
}

@media (min-width:761px) and (prefers-reduced-motion:no-preference) {
  #gallery .gallery-page picture::before,
  #gallery .gallery-page picture::after {
    background:linear-gradient(var(--edge-direction,to bottom),var(--wide-caption-shadow) -35%,transparent 62%);
    -webkit-mask-image:linear-gradient(to right,black 34%,transparent 92%);
    mask-image:linear-gradient(to right,black 34%,transparent 92%);
  }
  #gallery .scroll-gallery-rail figcaption :is(h3,p) {
    color:var(--wide-caption-ink);
    text-shadow:0 1px 2px var(--wide-caption-shadow);
  }
}
