/* Captions have their own row BELOW the image, inside the slide's height budget. */
.project-browser[data-view="rotunda"] .rotunda-stage{touch-action:none}
body.page-project-detail .project-cover__image-caption{position:absolute;z-index:3;left:16px;bottom:max(7px,env(safe-area-inset-bottom));margin:0;max-width:calc(100% - 32px);font:300 10px/1.35 var(--font-support,sans-serif);letter-spacing:.035em;color:white;text-shadow:0 1px 8px #000;pointer-events:none;opacity:.8}
html body.page-project-detail #project-story .story-media__item:has(>.story-image-caption){position:relative;display:grid!important;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr) auto!important;gap:8px!important;align-content:stretch;box-sizing:border-box}
html body.page-project-detail #project-story .story-image-viewport{position:relative;min-width:0;min-height:0;width:100%;height:100%;overflow:hidden}
html body.page-project-detail #project-story .story-image-caption{position:relative;inset:auto;width:var(--caption-width,100%);margin:0 0 0 var(--caption-left,0px);translate:0 var(--caption-rise,0px);padding:0;max-height:none;font:300 clamp(9px,.65vw,11px)/1.35 var(--font-support,sans-serif);letter-spacing:.045em;color:inherit;mix-blend-mode:normal;opacity:.7;text-align:left;overflow-wrap:anywhere;pointer-events:none}
html body.page-project-detail #project-story :is(.story-slide--full_bleed,.story-slide--double_bleed,.story-slide--poster,.story-slide--reel){padding:0!important}
html body.page-project-detail #project-story .story-bleed-layout{position:relative;display:block;width:100%;height:100%;min-height:0;gap:0}
html body.page-project-detail #project-story .story-bleed-layout>.story-media{position:absolute;inset:0;display:flex;gap:0;width:100%;height:100%;max-height:none;min-height:0}
html body.page-project-detail #project-story .story-bleed-layout .story-media__item{flex:1;min-width:0;height:100%;margin:0}
html body.page-project-detail #project-story .story-bleed-layout :is(img,video){width:100%;height:100%;max-height:none;object-fit:var(--media-fit,cover)}
html body.page-project-detail #project-story .story-bleed-layout .story-image-caption{display:none!important}
html body.page-project-detail #project-story .story-bleed-copy{position:absolute;z-index:2;left:6%;right:6%;bottom:12%;width:auto;max-height:60%;overflow:auto;pointer-events:auto}
html body.page-project-detail #project-story .story-bleed-copy h2{font-size:clamp(40px,6vw,110px);max-width:18ch;font-weight:300;line-height:1.05}
html body.page-project-detail #project-story .story-bleed-copy .story-copy__body{max-width:48ch;font-size:clamp(13px,1.3vw,20px)}
html body.page-project-detail #project-story [data-motion-ink=white] .story-copy{color:white!important}
html body.page-project-detail #project-story [data-motion-ink=black] .story-copy{color:#111!important}
html body.page-project-detail #project-story [data-motion-ink=inverse] .story-copy{color:white!important;mix-blend-mode:difference}
html body.page-project-detail #project-story [data-motion-ink]:not([data-motion-ink=auto]) .story-copy :is(h2,h3,p){color:inherit!important}
html body.page-project-detail #project-story [data-motion-position=start] .story-bleed-copy{top:16%;bottom:auto}
html body.page-project-detail #project-story [data-motion-position=center] .story-bleed-copy{top:50%;bottom:auto;translate:0 -50%}
@media(max-width:700px){html body.page-project-detail #project-story .story-media--double_bleed{flex-direction:column}html body.page-project-detail #project-story .story-media--reel{flex-wrap:wrap}html body.page-project-detail #project-story .story-media--reel .story-media__item{flex-basis:50%;height:50%}}

/* A real native document scroll drives a fixed presentation canvas. Only the
   selected project opts in; the existing deck/native phone path stays intact. */
html.project-deck.project-cinema-scroll{height:auto;overflow-y:auto!important;overflow-x:clip;scroll-snap-type:none!important;overflow-anchor:none;scroll-behavior:auto!important}
html.project-cinema-scroll body.page-project-detail,html.project-cinema-scroll body.page-project-detail #main-content{height:auto;overflow:visible}
html.project-cinema-scroll body.page-project-detail #project-story{position:relative;height:var(--cinema-total-height)!important;min-height:0;overflow:visible;touch-action:pan-y pinch-zoom}
html.project-deck.project-cinema-scroll body.page-project-detail #project-story>.story-panel{position:fixed!important;inset:0!important;display:flex!important;height:var(--story-viewport-height,100dvh)!important;min-height:0!important;max-height:none!important;overflow:clip!important;scroll-snap-align:none}
html.project-cinema-scroll body.page-project-detail #project-story>.project-cover{padding:0!important}
html.project-cinema-scroll.project-dragging body.page-project-detail #project-story[style*="transform"]>.story-panel{top:var(--cinema-scroll-y,0px)!important;bottom:auto!important}
.cinema-word{display:inline-block;will-change:transform,opacity}

/* Each preset transforms frames, not saved image focal positions or typography. */
html body.page-project-detail #project-story [data-cinema-preset]:not([data-cinema-preset=default]){--cinema-p:1;--cinema-rest:0;--cinema-exit:0;--cinema-copy:1;--cinema-strength:.5}
html body.page-project-detail #project-story :is([data-cinema-preset=image_to_copy],[data-cinema-preset=text_to_image],[data-cinema-preset=reel],[data-cinema-preset=single_dual_single],[data-cinema-preset=split_open],[data-cinema-preset=anchored_title]){padding:0!important}
html body.page-project-detail #project-story :is([data-cinema-preset=image_to_copy],[data-cinema-preset=text_to_image],[data-cinema-preset=reel],[data-cinema-preset=single_dual_single],[data-cinema-preset=split_open],[data-cinema-preset=anchored_title]) .story-composition{position:relative;display:block;width:100%;height:100%;min-height:0!important;gap:0}
html body.page-project-detail #project-story [data-cinema-preset=image_to_copy] .story-media{position:absolute;left:calc(var(--cinema-p)*6%);top:calc(var(--cinema-p)*9%);width:calc(100% - var(--cinema-p)*12%);height:calc(100% - var(--cinema-p)*45%);max-height:none}
html body.page-project-detail #project-story [data-cinema-preset=image_to_copy] .story-copy{position:absolute;left:6%;right:6%;bottom:7%;height:30%;max-width:none;overflow:auto;opacity:var(--cinema-copy);transform:translateY(calc((1 - var(--cinema-copy))*30px))}
html body.page-project-detail #project-story [data-cinema-preset=text_to_image] .story-copy{position:absolute;left:6%;top:22%;width:calc(88% - var(--cinema-p)*49%);max-height:65%;overflow:auto}
html body.page-project-detail #project-story [data-cinema-preset=text_to_image] .story-copy h2{font-size:clamp(32px,4vw,80px);transform:scale(calc(1 + var(--cinema-rest)*.35));transform-origin:left top}
html body.page-project-detail #project-story [data-cinema-preset=text_to_image] .story-media{position:absolute;right:5%;top:12%;width:47%;height:76%;max-height:none;transform:translateX(calc(var(--cinema-rest)*120%))}
html body.page-project-detail #project-story [data-cinema-preset=text_to_image][data-cinema-direction=left] .story-media{transform:translateX(calc(var(--cinema-rest)*-220%))}
html body.page-project-detail #project-story [data-cinema-preset=text_to_image][data-cinema-direction=up] .story-media{transform:translateY(calc(var(--cinema-rest)*-125%))}
html body.page-project-detail #project-story [data-cinema-preset=text_to_image][data-cinema-direction=down] .story-media{transform:translateY(calc(var(--cinema-rest)*125%))}
html body.page-project-detail #project-story [data-cinema-preset=words] .story-copy{max-width:min(90vw,1200px);width:100%;overflow:hidden}
html body.page-project-detail #project-story [data-cinema-preset=words] .story-copy__body{opacity:var(--cinema-copy)}
html body.page-project-detail #project-story :is([data-cinema-preset=words],[data-cinema-preset=image_to_copy]) .story-copy-expand{opacity:var(--cinema-copy)}
html body.page-project-detail #project-story [data-cinema-preset=veil] .story-media{clip-path:inset(calc(var(--cinema-rest)*100%) 0 0)}
html body.page-project-detail #project-story [data-cinema-preset=zoom_out] .story-media{transform:scale(calc(1 + var(--cinema-rest)*var(--cinema-strength)*.5));transform-origin:center}
html body.page-project-detail #project-story [data-cinema-preset=stagger] .story-media__item{opacity:var(--cinema-reveal,1);transform:translateY(calc((1 - var(--cinema-reveal,1))*80px))}
html body.page-project-detail #project-story [data-cinema-preset=focus] .story-media{filter:blur(calc(var(--cinema-rest)*var(--cinema-strength)*16px));opacity:calc(.3 + var(--cinema-p)*.7)}
html body.page-project-detail #project-story [data-cinema-preset=pan] .story-media{transform:scale(1.08) translateX(calc((var(--cinema-p) - .5)*var(--cinema-strength)*6%))}
html body.page-project-detail #project-story [data-cinema-preset=anchored_title] .story-media{position:absolute;inset:0;width:100%;height:100%;max-height:none}
html body.page-project-detail #project-story [data-cinema-preset=anchored_title] .story-copy{position:absolute;inset:auto 6% 14%;max-height:60%;overflow:auto;transform:translateY(calc(var(--cinema-rest)*55vh));opacity:calc(.1 + var(--cinema-p)*.9)}
html body.page-project-detail #project-story [data-cinema-preset=reel] .story-media{position:absolute;inset:0;width:100%;height:100%;display:block;overflow:hidden}
html body.page-project-detail #project-story [data-cinema-preset=reel] .story-media__item{position:absolute;inset:0;width:100%;height:100%;transform:translateX(calc((var(--cinema-frame) - var(--cinema-reel))*100%))}
html body.page-project-detail #project-story [data-cinema-preset=reel] .story-copy{position:absolute;inset:auto 6% 10%;z-index:2;max-width:60ch}
html body.page-project-detail #project-story :is([data-cinema-preset=split_open],[data-cinema-preset=single_dual_single]) .story-media{position:absolute;inset:0;width:100%;height:100%;display:block;max-height:none}
html body.page-project-detail #project-story :is([data-cinema-preset=split_open],[data-cinema-preset=single_dual_single]) .story-media__item{position:absolute;top:0;height:100%;margin:0;overflow:hidden!important}
html body.page-project-detail #project-story [data-cinema-preset=split_open] .story-media__item{width:50%}
html body.page-project-detail #project-story [data-cinema-preset=split_open] .story-media__item:first-child{left:0;transform:translateX(calc(var(--cinema-exit)*-100%))}
html body.page-project-detail #project-story [data-cinema-preset=split_open] .story-media__item:nth-child(2){left:50%;transform:translateX(calc(var(--cinema-exit)*100%))}
html body.page-project-detail #project-story [data-cinema-preset=split_open] .story-copy{opacity:calc(1 - var(--cinema-exit))}
html body.page-project-detail #project-story [data-cinema-preset=split_open],html body.page-project-detail #project-story [data-cinema-preset=split_open]::before{background:transparent!important}
html body.page-project-detail #project-story [data-cinema-preset=single_dual_single] .story-media__item:first-child{left:calc(var(--cinema-second)*-50%);width:calc(100% - var(--cinema-first)*50%)}
html body.page-project-detail #project-story [data-cinema-preset=single_dual_single] .story-media__item:nth-child(2){left:calc((1 - var(--cinema-first)*.5 - var(--cinema-second)*.5)*100%);width:calc(50% + var(--cinema-second)*50%)}
html body.page-project-detail #project-story :is([data-cinema-preset=split_open],[data-cinema-preset=single_dual_single]) .story-copy{position:absolute;inset:auto 6% 12%;z-index:2}
html body.page-project-detail #project-story :is([data-cinema-preset=image_to_copy],[data-cinema-preset=anchored_title],[data-cinema-preset=single_dual_single],[data-cinema-preset=split_open],[data-cinema-preset=reel]) .story-media__item :is(img,video){height:100%;max-height:none;object-fit:var(--media-fit,cover)}
@media(max-width:700px){
 html body.page-project-detail #project-story [data-cinema-preset=text_to_image] .story-copy{left:7%;top:14%;width:86%;height:calc(70% - var(--cinema-p)*42%);max-height:none}
 html body.page-project-detail #project-story [data-cinema-preset=text_to_image] .story-media{right:7%;top:auto;bottom:7%;width:86%;height:52%;transform:translateY(calc(var(--cinema-rest)*125%))}
 html body.page-project-detail #project-story [data-cinema-preset=text_to_image][data-cinema-direction=left] .story-media{transform:translateY(calc(var(--cinema-rest)*125%))}
 html body.page-project-detail #project-story [data-cinema-preset=split_open] .story-media__item{width:100%;height:50%}
 html body.page-project-detail #project-story [data-cinema-preset=split_open] .story-media__item:first-child{transform:translateY(calc(var(--cinema-exit)*-100%))}
 html body.page-project-detail #project-story [data-cinema-preset=split_open] .story-media__item:nth-child(2){left:0;top:50%;transform:translateY(calc(var(--cinema-exit)*100%))}
 html body.page-project-detail #project-story [data-cinema-preset=single_dual_single] .story-media__item:first-child{left:0;top:calc(var(--cinema-second)*-50%);width:100%;height:calc(100% - var(--cinema-first)*50%)}
 html body.page-project-detail #project-story [data-cinema-preset=single_dual_single] .story-media__item:nth-child(2){left:0;top:calc((1 - var(--cinema-first)*.5 - var(--cinema-second)*.5)*100%);width:100%;height:calc(50% + var(--cinema-second)*50%)}
}
/* New scores share the same reversible progress; authored crop/zoom is untouched. */
html body.page-project-detail #project-story [data-cinema-preset=aperture] .story-media{clip-path:circle(calc(3% + var(--cinema-p)*147%) at 50% 50%)}
html body.page-project-detail #project-story [data-cinema-preset=rounded_reveal] .story-media{clip-path:inset(calc(var(--cinema-rest)*24%) calc(var(--cinema-rest)*28%) round calc(var(--cinema-rest)*12vmin))}
html body.page-project-detail #project-story [data-cinema-preset=directional_wipe] .story-media{clip-path:inset(0 0 0 calc(var(--cinema-rest)*100%))}
html body.page-project-detail #project-story [data-cinema-preset=directional_wipe][data-cinema-direction=left] .story-media{clip-path:inset(0 calc(var(--cinema-rest)*100%) 0 0)}
html body.page-project-detail #project-story [data-cinema-preset=directional_wipe][data-cinema-direction=up] .story-media{clip-path:inset(0 0 calc(var(--cinema-rest)*100%) 0)}
html body.page-project-detail #project-story [data-cinema-preset=directional_wipe][data-cinema-direction=down] .story-media{clip-path:inset(calc(var(--cinema-rest)*100%) 0 0)}
html body.page-project-detail #project-story [data-cinema-preset=depth_reveal] .story-media{transform:translateY(calc(var(--cinema-rest)*var(--cinema-strength)*14vh)) scale(calc(1 + var(--cinema-rest)*var(--cinema-strength)*.08));opacity:calc(.3 + var(--cinema-p)*.7)}
html body.page-project-detail #project-story [data-cinema-preset=depth_reveal] .story-copy{transform:translateY(calc((1 - var(--cinema-copy))*32px));opacity:var(--cinema-copy)}
@media(prefers-reduced-motion:reduce){.cinema-word{opacity:1!important;transform:none!important}}

/* Opted-in cinematic frames supersede only the old one-screen fit rules. */
html.project-deck body.page-project-detail #project-story > :is(.story-slide--full_bleed,.story-slide--double_bleed,.story-slide--poster,.story-slide--reel,[data-cinema-preset=image_to_copy],[data-cinema-preset=text_to_image],[data-cinema-preset=anchored_title],[data-cinema-preset=split_open],[data-cinema-preset=single_dual_single],[data-cinema-preset=reel]){padding:0!important}
html.project-deck body.page-project-detail #project-story .story-bleed-layout{gap:0!important}
html.project-deck body.page-project-detail #project-story .story-bleed-layout:has(.story-bleed-copy)::after{content:'';position:absolute;inset:0;z-index:1;pointer-events:none;background:linear-gradient(transparent 30%,rgb(0 0 0 / .48))}
html.project-deck body.page-project-detail #project-story [data-motion-ink=black] .story-bleed-layout::after{background:linear-gradient(transparent 30%,rgb(255 255 255 / .45))}
html.project-deck body.page-project-detail #project-story :is([data-motion-ink=inverse],[data-cinema-preset=image_to_copy],[data-cinema-preset=split_open]) .story-bleed-layout::after{display:none}
html.project-deck body.page-project-detail #project-story [data-cinema-preset=anchored_title][data-motion-position=start] .story-copy{top:16%;bottom:auto}
html.project-deck body.page-project-detail #project-story [data-cinema-preset=anchored_title][data-motion-position=center] .story-copy{top:50%;bottom:auto;translate:0 -50%}
html.project-deck body.page-project-detail #project-story :is(.story-bleed-layout,[data-cinema-preset=image_to_copy],[data-cinema-preset=text_to_image],[data-cinema-preset=anchored_title],[data-cinema-preset=single_dual_single],[data-cinema-preset=split_open],[data-cinema-preset=reel]) .story-media__item :is(img,video){object-fit:var(--framing-fit,cover)!important}
html.project-deck body.page-project-detail #project-story [data-cinema-preset=image_to_copy] .story-media{height:calc(100% - var(--cinema-p)*45%)!important}
html.project-deck body.page-project-detail #project-story [data-cinema-preset=image_to_copy] .story-copy{bottom:6%;height:28%}
html.project-deck body.page-project-detail #project-story [data-cinema-preset=image_to_copy] .story-copy h2{font-size:clamp(28px,3.4vw,60px);max-width:40ch;margin-bottom:12px}
html.project-deck body.page-project-detail #project-story [data-cinema-preset=text_to_image] .story-media{height:76%!important}
html.project-deck body.page-project-detail #project-story :is([data-cinema-preset=image_to_copy],[data-cinema-preset=text_to_image],[data-cinema-preset=anchored_title]) .story-copy{max-height:65%!important}
html.project-deck body.page-project-detail #project-story [data-cinema-preset=text_to_image] .story-copy h2{transform:scale(calc(1 + var(--cinema-rest)*.35));transform-origin:left top}
html.project-deck body.page-project-detail #project-story .story-bleed-copy :is(h2,.story-copy__body){text-shadow:0 1px 16px rgb(0 0 0 / .2)}
html.project-deck body.page-project-detail #project-story [data-motion-ink=inverse] .story-bleed-copy :is(h2,.story-copy__body){text-shadow:none}
@media(max-width:700px){
 html.project-deck body.page-project-detail #project-story [data-cinema-preset=text_to_image] .story-media{height:52%!important;transform:translateY(calc(var(--cinema-rest)*125%))}
 html.project-deck body.page-project-detail #project-story [data-cinema-preset=split_open] .story-media__item{height:50%!important}
 html.project-deck body.page-project-detail #project-story [data-cinema-preset=single_dual_single] .story-media__item:first-child{height:calc(100% - var(--cinema-first)*50%)!important}
 html.project-deck body.page-project-detail #project-story [data-cinema-preset=single_dual_single] .story-media__item:nth-child(2){height:calc(50% + var(--cinema-second)*50%)!important}
 html.project-deck body.page-project-detail #project-story .story-media--double_bleed>.story-media__item{height:50%!important}
 html.project-deck body.page-project-detail #project-story .story-media--reel>.story-media__item{height:50%!important}
 html.project-deck body.page-project-detail #project-story [data-cinema-preset=reel] .story-media--reel>.story-media__item{height:100%!important}
}
