/* R04 Scroll V4: immediate full-stage scrolling; reversible & deterministic.
   This addon applies ONLY to the private local reference gallery when JS is active.
   Off / reduced-motion: source static document remains unchanged.
*/
body.scroll-v4-ready[data-obys-mode="vertical"] .portfolio-intro,
body.scroll-v4-ready[data-obys-mode="vertical"] .obys-stage{
 display:none!important
}
/* Desktop gallery modes remain selectable; they are not part of the animated background. */
body.scroll-v4-ready[data-obys-mode="vertical"] .portfolio-tools{display:flex!important}
@media(max-width:768px){body.scroll-v4-ready[data-obys-mode="vertical"] .portfolio-tools{display:none!important}}
body.scroll-v4-ready[data-obys-mode="vertical"] .scroll-story{
 display:block;height:240svh;min-height:0;contain:layout style
}
body.scroll-v4-ready[data-obys-mode="vertical"] .portfolio-gallery{
 display:none!important
}
body.scroll-v4-ready[data-obys-mode="vertical"] .scroll-story-sticky{
 position:sticky;top:0;height:100svh;min-height:0;
 padding:clamp(18px,3.5vw,54px);
 grid-template-rows:auto minmax(0,1fr) auto
}
body.scroll-v4-ready .scroll-story-head{display:grid;grid-template-columns:minmax(0,1fr) auto auto;column-gap:clamp(16px,3vw,55px);min-height:52px}
.scroll-story-back{display:inline-flex;align-items:center;min-height:44px;width:max-content;gap:12px;color:#585853!important;text-decoration:none;font-size:11px;letter-spacing:.08em}
.scroll-story-back span{font-size:20px;font-weight:260;color:var(--red)}
.scroll-story-back:hover,.scroll-story-back:focus-visible{color:#171717!important}
.scroll-story-page-title{font-size:clamp(11px,1.2vw,18px)!important;font-weight:260!important;letter-spacing:-.03em!important;margin:0!important;line-height:1.2!important;text-transform:uppercase!important}
body.scroll-v4-ready .scroll-story-copy{overflow:visible}
body.scroll-v4-ready .scroll-story-title{
 transition:opacity .11s ease-out;
 transform:translate3d(0,var(--story-offset,0px),0)
}
body.scroll-v4-ready .scroll-story-frames{
 transform:translate3d(0,var(--scroll-image-float,0px),0);
 will-change:transform;
}
body.scroll-v4-ready .scroll-scene-image{
 clip-path:inset(0 0 0 var(--story-clip,0%));
 transition:none!important;
 will-change:transform,clip-path,opacity;
}
body.scroll-v4-ready .scroll-story-visual::before{
 transform:translate3d(calc(var(--story-progress,0) * -18px),calc(var(--story-progress,0) * -21px),0);
}
body.scroll-v4-ready .scroll-story-bottom{
 min-height:47px
}
body.scroll-v4-ready .scroll-story-visual-hint{
 opacity:var(--scroll-hint-opacity,1);
 transition:opacity .1s
}
body.scroll-v4-ready .scroll-story-sticky::after{
 content:"";position:absolute;right:6%;top:20%;z-index:-1;
 width:clamp(25px,8vw,130px);height:clamp(25px,8vw,130px);
 border:1px solid rgba(50,50,46,.13);border-radius:50%;
 transform:translate3d(calc(var(--story-progress,0) * -75px),calc(var(--story-progress,0) * 75px),0)
}
@media(max-width:768px){
 body.scroll-v4-ready[data-obys-mode="vertical"] .scroll-story{height:220svh;min-height:0}
 body.scroll-v4-ready[data-obys-mode="vertical"] .scroll-story-sticky{
  height:100svh;min-height:0;padding:12px clamp(18px,5vw,30px);
  grid-template-rows:auto minmax(0,1fr) auto
 }
 body.scroll-v4-ready .scroll-story-head{
  min-height:48px;padding:0 0 6px;
  grid-template-columns:minmax(0,1fr) auto;gap:12px
 }
 .scroll-story-back{min-height:44px;font-size:10px;gap:8px}
 .scroll-story-page-title{font-size:14px!important;grid-column:1/2;grid-row:2;margin-top:-6px!important}
 body.scroll-v4-ready .scroll-story-head .scroll-story-count{grid-column:2;grid-row:1}
 body.scroll-v4-ready .scroll-story-body{
  display:grid;grid-template-columns:1fr;
  grid-template-rows:minmax(0,.76fr) minmax(0,1.04fr);
  gap:clamp(9px,1.5vh,18px);
  min-height:0;align-content:center
 }
 body.scroll-v4-ready .scroll-story-copy{display:flex;flex-direction:column;padding:0;min-height:0}
 body.scroll-v4-ready .scroll-story-kicker{margin:0 0 7px}
 body.scroll-v4-ready .scroll-story-titles{height:clamp(118px,22svh,238px)}
 body.scroll-v4-ready .scroll-story-title strong{
  font-size:clamp(39px,8.65vw,70px);
  line-height:.98
 }
 body.scroll-v4-ready .scroll-story-title-role{margin-top:8px}
 body.scroll-v4-ready .scroll-story-index{margin-top:auto}
 body.scroll-v4-ready .scroll-story-frames{max-height:35svh}
 body.scroll-v4-ready .scroll-story-visual-hint{font-size:10px}
 body.scroll-v4-ready .scroll-story-bottom{padding:8px 0;min-height:34px}
 body.scroll-v4-ready .scroll-story-sticky::after{display:none}
}
@media(max-width:365px){
 body.scroll-v4-ready .scroll-story-titles{height:clamp(115px,20svh,195px)}
 body.scroll-v4-ready .scroll-story-title strong{font-size:clamp(33px,9.15vw,42px)}
 body.scroll-v4-ready .scroll-story-body{grid-template-rows:minmax(0,1fr) minmax(0,.8fr);gap:7px}
}
@media(orientation:landscape) and (max-height:520px){
 body.scroll-v4-ready .scroll-story-body{grid-template-columns:38% 62%;grid-template-rows:1fr}
 body.scroll-v4-ready .scroll-story-titles{height:150px}
 body.scroll-v4-ready .scroll-story-frames{max-height:52svh}
}
@media(prefers-reduced-motion:reduce){
 body.scroll-v4-ready[data-obys-mode="vertical"] .scroll-story{display:none!important}
 body.scroll-v4-ready[data-obys-mode="vertical"] .portfolio-gallery{display:block!important}
}
