/* HIMART REUSE 03.2 — stacked 4:3 image-information galleries.
   Visual treatment and rolling motion deliberately mirror 03.3 production galleries.
   Media slides remain placeholders until final project photography is supplied. */

html body.reuse-current .reuse-image-display-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:0;
  width:100%;
}

html body.reuse-current .reuse-image-display-card{
  position:relative;
  width:100%;
  aspect-ratio:4/3;
  overflow:hidden;
  background:#080808;
  isolation:isolate;
  touch-action:pan-y;
}

html body.reuse-current .reuse-image-display-card__viewport,
html body.reuse-current .reuse-image-display-card__slide,
html body.reuse-current .reuse-image-display-card__media{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
}

html body.reuse-current .reuse-image-display-card__viewport{
  z-index:0;
  overflow:hidden;
  background:#080808;
}

/* Same resting stack as 03.3: next image waits 5% smaller and 5% to the right. */
html body.reuse-current .reuse-image-display-card__slide{
  z-index:0;
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transform:translate3d(5%,0,0) scale(.95);
  transform-origin:50% 50%;
  will-change:transform,opacity;
}

/* Same 20% black veil used on the waiting image in 03.3. */
html body.reuse-current .reuse-image-display-card__slide::after{
  content:"";
  position:absolute;
  z-index:2;
  inset:0;
  background:#000;
  opacity:.20;
  pointer-events:none;
  transition:opacity .72s cubic-bezier(.22,.76,.22,1);
}

html body.reuse-current .reuse-image-display-card__slide.is-active{
  z-index:2;
  opacity:1;
  visibility:visible;
  pointer-events:auto;
  transform:translate3d(0,0,0) scale(1);
}
html body.reuse-current .reuse-image-display-card__slide.is-active::after{opacity:0}

html body.reuse-current .reuse-image-display-card__slide.is-next{
  z-index:1;
  opacity:1;
  visibility:visible;
  pointer-events:none;
  transform:translate3d(5%,0,0) scale(.95);
  transition:transform .72s cubic-bezier(.22,.76,.22,1),opacity .72s ease;
}
html body.reuse-current .reuse-image-display-card__slide.is-next.is-entering{
  transform:translate3d(0,0,0) scale(1);
}
html body.reuse-current .reuse-image-display-card__slide.is-next.is-entering::after{opacity:0}

/* Current image exits right-to-left, matching 03.3. */
html body.reuse-current .reuse-image-display-card__slide.is-active.is-exiting{
  z-index:3;
  transform:translate3d(-100%,0,0) scale(1);
  transition:transform .72s cubic-bezier(.22,.76,.22,1),opacity .72s ease;
}

/* Previous / rightward flick mirrors the direction. */
html body.reuse-current .reuse-image-display-card.is-reverse .reuse-image-display-card__slide.is-next{
  transform:translate3d(-5%,0,0) scale(.95);
}
html body.reuse-current .reuse-image-display-card.is-reverse .reuse-image-display-card__slide.is-next.is-entering{
  transform:translate3d(0,0,0) scale(1);
}
html body.reuse-current .reuse-image-display-card.is-reverse .reuse-image-display-card__slide.is-active.is-exiting{
  transform:translate3d(100%,0,0) scale(1);
}

html body.reuse-current .reuse-image-display-card__media{
  z-index:1;
  background:#0a0a0a;
}

html body.reuse-current .reuse-image-display-card__media > :is(img,picture,video){
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
}

/* Exact 03.3 background treatment: lower 40%, black 60% -> 0%. */
html body.reuse-current .reuse-image-display-card::after{
  content:"";
  position:absolute;
  z-index:4;
  right:0;
  bottom:0;
  left:0;
  height:40%;
  pointer-events:none;
  background:linear-gradient(to top,rgba(0,0,0,.60) 0%,rgba(0,0,0,0) 100%);
}

/* Exact 03.3 caption geometry / typography. */
html body.reuse-current .reuse-image-display-card__copy{
  position:absolute;
  z-index:5;
  left:40px;
  bottom:40px;
  width:calc(100% - 80px);
  text-align:left;
  pointer-events:none;
}

html body.reuse-current .reuse-image-display-card__number{
  display:block;
  margin:0 0 10px;
  color:var(--hm-blue)!important;
  font-family:var(--hm-font-en)!important;
  font-size:var(--hm-type-note)!important;
  font-weight:300!important;
  line-height:1!important;
  letter-spacing:var(--hm-track-note)!important;
}

html body.reuse-current .reuse-image-display-card__copy h4{
  margin:0;
  color:#fff!important;
  font-family:var(--hm-font-ko)!important;
  font-size:22px!important;
  font-weight:400!important;
  font-variation-settings:"wght" 400!important;
  line-height:1.32!important;
  letter-spacing:var(--hm-track-group)!important;
  word-break:keep-all;
}

html body.reuse-current .reuse-image-display-card__copy p{
  margin:10px 0 0!important;
  max-width:62ch!important;
  color:rgba(255,255,255,.90)!important;
  font-family:var(--hm-font-ko)!important;
  font-size:16px!important;
  font-weight:100!important;
  font-variation-settings:"wght" 100!important;
  line-height:1.52!important;
  letter-spacing:var(--hm-track-body)!important;
  word-break:keep-all;
}

/* Same head-only navigation arrows as 03.3. */
html body.reuse-current .reuse-image-display-card__nav{
  position:absolute;
  z-index:7;
  top:50%;
  width:48px;
  height:80px;
  margin:0;
  padding:0;
  border:0;
  outline:0;
  background:transparent;
  transform:translateY(-50%);
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
}
html body.reuse-current .reuse-image-display-card__nav--prev{left:6px}
html body.reuse-current .reuse-image-display-card__nav--next{right:6px}
html body.reuse-current .reuse-image-display-card__nav::before{
  content:"";
  position:absolute;
  top:50%;
  left:50%;
  width:18px;
  height:18px;
  border-top:1px solid var(--hm-reuse-gallery-nav-color,rgba(255,255,255,.78));
  border-right:1px solid var(--hm-reuse-gallery-nav-color,rgba(255,255,255,.78));
}
html body.reuse-current .reuse-image-display-card__nav--prev::before{
  --hm-reuse-gallery-nav-color:var(--hm-gallery-nav-prev-color,rgba(255,255,255,.78));
  transform:translate(-35%,-50%) rotate(-135deg);
}
html body.reuse-current .reuse-image-display-card__nav--next::before{
  --hm-reuse-gallery-nav-color:var(--hm-gallery-nav-next-color,rgba(255,255,255,.78));
  transform:translate(-65%,-50%) rotate(45deg);
}
html body.reuse-current .reuse-image-display-card__nav:hover::before,
html body.reuse-current .reuse-image-display-card__nav:focus-visible::before{
  opacity:1;
}

html body.reuse-current .reuse-image-display-card__status{
  position:absolute;
  z-index:7;
  right:32px;
  bottom:32px;
  color:rgba(255,255,255,.62);
  font:300 11px/1 var(--hm-font-en);
  letter-spacing:var(--hm-track-note);
  pointer-events:none;
}

/* Gallery 03: shift every 360 frame upward by 10% within the 4:3 crop. */
html body.reuse-current .reuse-image-display-card.is-360-viewer .reuse-360-viewer__frame{
  object-position:50% 60%!important;
}

@media(max-width:780px){
  html body.reuse-current .reuse-image-display-card__copy{
    left:40px;
    bottom:40px;
    width:calc(100% - 80px);
  }
  html body.reuse-current .reuse-image-display-card__number{
    margin-bottom:7px;
    font-size:10px!important;
  }
  html body.reuse-current .reuse-image-display-card__copy h4{
    font-size:22px!important;
    font-weight:400!important;
    font-variation-settings:"wght" 400!important;
  }
  html body.reuse-current .reuse-image-display-card__copy p{
    margin-top:6px!important;
    font-size:16px!important;
    font-weight:100!important;
    font-variation-settings:"wght" 100!important;
    line-height:1.42!important;
  }
  html body.reuse-current .reuse-image-display-card__nav{
    width:38px;
    height:64px;
  }
  html body.reuse-current .reuse-image-display-card__nav--prev{left:0}
  html body.reuse-current .reuse-image-display-card__nav--next{right:0}
  html body.reuse-current .reuse-image-display-card__nav::before{
    width:14px;
    height:14px;
  }
  html body.reuse-current .reuse-image-display-card__status{
    right:18px;
    bottom:18px;
    font-size:10px;
  }
}

@media(prefers-reduced-motion:reduce){
  html body.reuse-current .reuse-image-display-card__slide,
  html body.reuse-current .reuse-image-display-card__slide::after{
    transition:none!important;
  }
}
