/* V4-only refinement layer. Earlier versions and homepage hero remain untouched. */
body[data-v4-page]:not([data-v4-page=home]){--v4-radius:clamp(18px,2.2vw,32px)}
body[data-v4-page]:not([data-v4-page=home]) main>section,
body[data-v4-page=creative] #about,
body[data-v4-page=services] .service-story{border-radius:var(--v4-radius)}
body[data-v4-page=creative] .v4-creative-stack{position:relative;background:#000}
body[data-v4-page=creative] .v4-creative-intro{position:sticky;top:min(0px,calc(100svh - var(--intro-height,100svh)));padding-top:clamp(180px,24svh,280px);min-height:100svh;align-content:center}
.v4-remembered{color:var(--sage);text-transform:uppercase}
body[data-v4-page=creative] #about{position:relative;background:#0b100d;z-index:2;overflow:hidden}
body[data-v4-page=creative] .vision-scroll-stage{position:relative;z-index:2;background:#0b100d;border-radius:var(--v4-radius)}
body[data-v4-page=creative] .vision-scroll-stage.is-scroll-linked #about{position:sticky;top:var(--vision-pin-top,0)}
body[data-v4-page=creative] #about .vision-image{width:auto;max-width:100%;height:auto;max-height:65svh;aspect-ratio:auto;object-fit:contain;transform:none;justify-self:center;border-radius:18px}
body[data-v4-page=creative] #founders-note{background:linear-gradient(#06120dc9,#06120db3),url('/assets/client-responsive/image_01-1600.webp') center 55%/cover;color:var(--paper);padding-block:clamp(90px,14vw,190px);position:relative;z-index:3}
body[data-v4-page=creative] .founders-postcard::before{display:none}
body[data-v4-page=creative] .founders-postcard{background:none;backdrop-filter:none;text-shadow:none}
.v4-services-link{position:relative;z-index:3;display:flex;justify-content:center;padding:54px 24px 80px;background:#0b100d}
.v4-services-link a{display:flex;gap:54px;align-items:center;border:1px solid var(--sage);border-radius:100px;padding:20px 32px;color:var(--paper)}
.v4-services-link a:is(:hover,:focus-visible){background:var(--sage);color:var(--ink);outline:2px solid var(--paper);outline-offset:4px}
body[data-v4-page=services] #services{padding-top:180px;background:var(--paper);color:var(--ink);overflow:visible}
body[data-v4-page=services] .section-heading{margin-bottom:65px}
body[data-v4-page=services] .section-heading h2{font-size:clamp(38px,6vw,82px)}
body[data-v4-page=services] .service-overview,body[data-v4-page=services] .service-editorial{display:block;overflow:visible}
body[data-v4-page=services] .service-story{position:sticky;top:calc(82px + var(--card-index)*18px);min-height:min(68svh,650px);margin-bottom:45px;padding:clamp(26px,4vw,60px);display:flex;align-items:stretch;background:#15231c;overflow:hidden;isolation:isolate;color:white;box-shadow:0 -10px 25px #0002}
.v4-service-image{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:-2}
body[data-v4-page=services] .service-story::after{content:'';position:absolute;inset:0;background:linear-gradient(100deg,#03100dc9,#03100d33);z-index:-1}
body[data-v4-page=services] .service-copy{display:flex;flex-direction:column;justify-content:space-between;gap:80px;max-width:620px}
body[data-v4-page=services] .service-copy h3{font-size:clamp(30px,3.8vw,54px);color:white}
body[data-v4-page=services] .service-copy p{font-size:clamp(20px,2vw,27px);color:white;opacity:1}
body[data-v4-page=services] .service-story:last-child{margin-bottom:15svh}
/* Match the existing All Films geometry/timing; preserve the independent roll spans. */
body[data-v4-page=home] .v4-all-work .v4-work-flow{position:relative;isolation:isolate;overflow:hidden;gap:0;padding:0 48px 0 26px;min-height:52px;border-radius:100px;transition:border-radius 600ms cubic-bezier(.23,1,.32,1),border-color 600ms,color 600ms,transform 200ms}
.v4-work-flow>.roll{z-index:1;transition:transform 800ms ease-out}
.v4-flow-fill{position:absolute;left:50%;top:50%;width:400px;height:400px;border-radius:50%;background:#CC2E10;transform:translate(-50%,-50%) scale(0);opacity:0;pointer-events:none;transition:transform 800ms cubic-bezier(.19,1,.22,1),opacity 600ms}
.v4-work-flow .v4-flow-arrow{position:absolute;top:calc(50% - 10px);z-index:1;fill:none;stroke:currentColor;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round;transition:transform 800ms cubic-bezier(.34,1.56,.64,1)}
.v4-flow-in{left:16px;transform:translateX(-60px)}.v4-flow-out{right:16px}
body[data-v4-page=home] .v4-all-work .v4-work-flow:is(:hover,:focus-visible,:active){border-radius:12px;background:#DD3414;border-color:transparent;color:white}
.v4-work-flow:is(:hover,:focus-visible,:active)>.v4-flow-fill{transform:translate(-50%,-50%) scale(1);opacity:1}
.v4-work-flow:is(:hover,:focus-visible,:active)>.roll{transform:translateX(22px)}
.v4-work-flow:is(:hover,:focus-visible,:active)>.v4-flow-in{transform:translateX(0)}
.v4-work-flow:is(:hover,:focus-visible,:active)>.v4-flow-out{transform:translateX(60px)}
.v4-work-flow:active{transform:scale(.97)}
.v3-view-toggle{flex-wrap:wrap}
#v4-photo-loop[hidden]{display:none}
.v4-loop-viewport{height:70svh;max-height:850px;overflow-y:auto;scroll-snap-type:y mandatory;scroll-behavior:smooth;border-radius:20px;background:#0b100d;scrollbar-width:thin;touch-action:pan-y;cursor:zoom-in}
.v4-loop-viewport:focus-visible{outline:3px solid var(--sage);outline-offset:5px}
.v4-loop-slide{height:100%;margin:0;scroll-snap-align:start;scroll-snap-stop:always;display:flex;align-items:center;justify-content:center;overflow:hidden;padding:30px}
.v4-loop-slide img{display:block;width:100%;height:100%;object-fit:contain}
.v4-loop-controls{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:20px 0}
.v4-loop-controls button{min-height:48px;flex-shrink:0;padding:8px 12px;border:1px solid currentColor;border-radius:30px}
.v4-loop-controls p{font-size:14px;text-align:center}
@media(max-width:650px){.v4-loop-controls{gap:8px;flex-wrap:wrap}.v4-loop-controls p{order:3;width:100%}.v4-loop-slide{padding:16px}.v4-loop-viewport{height:60svh}body[data-v4-page=services] #services{padding-top:140px}body[data-v4-page=services] .service-story{top:calc(72px + var(--card-index)*10px)}}
@media(prefers-reduced-motion:reduce){body[data-v4-page=creative] .v4-creative-intro,body[data-v4-page=services] .service-story{position:relative;top:auto}.v4-loop-viewport{scroll-behavior:auto}.v4-work-flow,.v4-work-flow>.roll,.v4-work-flow .v4-flow-arrow,.v4-flow-fill{transition:none!important}.v4-loop-slide img{transform:none!important}}
/* Keep controls and the Services heading legible on their actual surfaces. */
body[data-v4-page=services] .site-header{background:#151c18;color:var(--paper);backdrop-filter:none}
body[data-v4-page=services] .section-heading em{color:#52664b}
body:is([data-v4-page=photography],[data-v4-page=work]) .v3-view-toggle button[aria-pressed=false]{background:transparent;color:var(--paper)}
body:is([data-v4-page=photography],[data-v4-page=work]) .v3-view-toggle button[aria-pressed=true]{background:var(--paper);color:#151c18}
body:is([data-v4-page=photography],[data-v4-page=work]) .v3-view-toggle button:is(:hover,:focus-visible){outline:2px solid var(--sage);outline-offset:2px}
@media(max-width:650px){body[data-v4-page=creative] #about .vision-image{max-height:34svh}}

body[data-v4-page=work] .v4-loop-controls{color:var(--ink)}

/* Photography-only immersive presentation. Native scrolling chains at either end. */
body:is([data-v4-page=photography],[data-v4-page=work]) #gallery{padding:116px 0 36px;background:#151C18;color:#F3F0E8}
body:is([data-v4-page=photography],[data-v4-page=work]) .gallery-heading,
body:is([data-v4-page=photography],[data-v4-page=work]) .v3-photo-actions,
body:is([data-v4-page=photography],[data-v4-page=work]) #v3-gallery-help,
body:is([data-v4-page=photography],[data-v4-page=work]) .v4-loop-controls{margin-inline:5vw}
body:is([data-v4-page=photography],[data-v4-page=work]) .gallery-heading{margin-bottom:24px;align-items:end}
body:is([data-v4-page=photography],[data-v4-page=work]) .gallery-heading h2{font-size:clamp(30px,3.4vw,48px);line-height:1.05}
body:is([data-v4-page=photography],[data-v4-page=work]) .gallery-heading h2 br{display:none}
body:is([data-v4-page=photography],[data-v4-page=work]) .gallery-heading h2 em{margin-left:.2em}
body:is([data-v4-page=photography],[data-v4-page=work]) .gallery-heading .eyebrow{margin-bottom:12px}
body:is([data-v4-page=photography],[data-v4-page=work]) .v3-photo-actions{margin-bottom:20px}
.v4-immersive-viewport{height:78svh;min-height:500px;max-height:1100px;overflow-y:auto;scroll-snap-type:y mandatory;scroll-behavior:smooth;touch-action:pan-y;overscroll-behavior-y:auto;border-radius:clamp(18px,2.2vw,32px);background:#151C18;scrollbar-width:none}
.v4-immersive-viewport::-webkit-scrollbar{display:none}
.v4-immersive-viewport:focus-visible{outline:3px solid #F3F0E8;outline-offset:-5px}
.v4-immersive-slide{position:relative;isolation:isolate;height:100%;margin:0;overflow:hidden;scroll-snap-align:start;scroll-snap-stop:always;display:flex;align-items:center;justify-content:center}
.v4-immersive-slide>.v4-immersive-background{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:-1}
.v4-immersive-info{width:min(72%,1080px);padding:clamp(24px,3vw,48px);background:#F3F0E8;color:#151C18;display:grid;grid-template-columns:minmax(0,1fr) 35%;gap:clamp(24px,5vw,80px);border-radius:3px;box-shadow:0 12px 50px #151c1820;text-align:left}
.v4-immersive-copy{display:flex;flex-direction:column;align-items:start;gap:20px;min-width:0}
.v4-immersive-number{font-size:14px;letter-spacing:.1em;font-variant-numeric:tabular-nums}
.v4-immersive-copy h3{font-size:clamp(22px,2.5vw,36px)}
.v4-immersive-description{margin-top:auto;font-size:clamp(20px,2vw,30px);line-height:1.2;max-width:24ch}
.v4-immersive-open{display:block;width:100%;height:clamp(220px,32svh,380px);padding:0;border:0;background:transparent;cursor:zoom-in}
.v4-immersive-open img{display:block;width:100%;height:100%;object-fit:contain}
.v4-immersive-open:focus-visible{outline:2px solid #151C18;outline-offset:8px}
body:is([data-v4-page=photography],[data-v4-page=work]) #v3-carousel,body:is([data-v4-page=photography],[data-v4-page=work]) .v3-field-host{margin-inline:5vw}
@media(max-width:1000px){.v4-immersive-info{width:84%;grid-template-columns:minmax(0,1fr) 38%;gap:24px}}
@media(max-width:650px){body:is([data-v4-page=photography],[data-v4-page=work]) #gallery{padding-top:100px}body:is([data-v4-page=photography],[data-v4-page=work]) .gallery-heading{gap:12px}body:is([data-v4-page=photography],[data-v4-page=work]) .gallery-heading>p{display:none}.v4-immersive-viewport{height:65svh;min-height:440px}.v4-immersive-info{width:90%;padding:20px;gap:16px;grid-template-columns:minmax(0,1fr) 40%}.v4-immersive-open{height:210px}.v4-immersive-description{font-size:18px}.v4-immersive-number{font-size:12px}}
@media(prefers-reduced-motion:reduce){.v4-immersive-viewport{scroll-behavior:auto}}

/* Requested section boundaries: square Films and Vision exit; rounded Note entrance. */
body[data-v4-page=films] main>section#work{border-radius:0}
body[data-v4-page=creative] #about,
body[data-v4-page=creative] .vision-scroll-stage{border-bottom-left-radius:0;border-bottom-right-radius:0}
body[data-v4-page=creative]{background:#0b100d}
body[data-v4-page=creative] #founders-note{border-radius:var(--v4-radius) var(--v4-radius) 0 0;overflow:hidden;display:flex;flex-direction:column;justify-content:center;gap:56px;backdrop-filter:none;-webkit-backdrop-filter:none}
body[data-v4-page=creative] #founders-note .v4-services-link{background:transparent;padding:0;margin:0 auto;flex-shrink:0}

body[data-v4-page=services],body[data-v4-page=services] .site-header{background:#F3F0E8;color:#151C18}
body[data-v4-page=services] .site-header{backdrop-filter:none;-webkit-backdrop-filter:none}
body[data-v4-page=services] .site-header .wordmark img{content:url('/v5/idalia-weighted-green.svg');filter:none}
body[data-v4-page=services] .header-divider{border-color:#151c1844}

body:is([data-v4-page=photography],[data-v4-page=work]) #gallery>.gallery-heading{margin-left:5vw;margin-right:5vw}
body[data-v4-page=services] .section-heading .eyebrow{color:#52664b}
body[data-v4-page=services] .site-header .header-contact{background:#151C18;color:#F3F0E8;text-shadow:none}

/* Full-page Photography Loop; the controls float on the selected photograph. */
body:is([data-v4-page=photography],[data-v4-page=work]) #v3-gallery-help{display:none}
body:is([data-v4-page=photography],[data-v4-page=work]) #gallery.v4-immersive-active{position:relative;padding:0;min-height:100svh;border-radius:0}
body:is([data-v4-page=photography],[data-v4-page=work]) .v4-immersive-active>.gallery-heading{position:absolute;left:5vw;top:116px;z-index:2;margin:0!important;pointer-events:none}
body:is([data-v4-page=photography],[data-v4-page=work]) .v4-immersive-active>.gallery-heading>p{display:none}
body:is([data-v4-page=photography],[data-v4-page=work]) .v4-immersive-active>.gallery-heading h2{margin:8px 0 0;font-size:clamp(28px,2.8vw,40px)}
body:is([data-v4-page=photography],[data-v4-page=work]) .v4-immersive-active>.gallery-heading h2 em{color:#F3F0E8}
body:is([data-v4-page=photography],[data-v4-page=work]) .v4-immersive-active>.v3-photo-actions{position:absolute;right:5vw;top:132px;z-index:3;margin:0}
body:is([data-v4-page=photography],[data-v4-page=work]) .v4-immersive-active .v3-view-toggle{background:#151c18cc}
.v4-immersive-active .v4-immersive-viewport{height:100svh;max-height:none;min-height:680px;border-radius:0;cursor:pointer}
.v4-immersive-slide::after{content:'';position:absolute;inset:0;background:linear-gradient(#151c1880,transparent 36%,transparent 75%,#151c1866);z-index:-1;pointer-events:none}
.v4-immersive-active .v4-immersive-info{margin-top:100px}
body:is([data-v4-page=photography],[data-v4-page=work]) .v4-immersive-active .v4-loop-controls{position:absolute;bottom:24px;left:5vw;right:5vw;z-index:2;margin:0;padding:0;color:#F3F0E8;pointer-events:none}
.v4-immersive-active .v4-loop-controls button,.v4-immersive-active .v4-loop-controls p{background:#151c18cc;backdrop-filter:blur(8px);pointer-events:auto}
.v4-immersive-active .v4-loop-controls p{padding:8px 20px;border-radius:30px}
body:is([data-v4-page=photography],[data-v4-page=work]) #v3-photo-dialog{position:fixed;inset:0;width:100vw;max-width:none;height:100svh;max-height:none;margin:0;padding:60px 4vw 24px;background:#151C18;color:#F3F0E8;cursor:zoom-out}
body:is([data-v4-page=photography],[data-v4-page=work]) #v3-photo-dialog>img{height:calc(100svh - 140px);margin:0;object-fit:contain}
body:is([data-v4-page=photography],[data-v4-page=work]) #v3-photo-dialog>button{position:absolute;right:20px;top:12px;width:48px;height:48px;font-size:36px;line-height:1}
body:is([data-v4-page=photography],[data-v4-page=work]) #v3-photo-dialog>p{text-align:center;margin:16px auto 0}
@media(max-width:1000px){body:is([data-v4-page=photography],[data-v4-page=work]) .v4-immersive-active>.gallery-heading{top:108px}body:is([data-v4-page=photography],[data-v4-page=work]) .v4-immersive-active>.v3-photo-actions{left:5vw;right:auto;top:205px}.v4-immersive-active .v4-immersive-info{margin-top:160px}}
@media(max-width:650px){body:is([data-v4-page=photography],[data-v4-page=work]) .v4-immersive-active>.gallery-heading{top:100px;right:5vw}body:is([data-v4-page=photography],[data-v4-page=work]) .v4-immersive-active>.gallery-heading h2{line-height:1.2;font-size:28px}body:is([data-v4-page=photography],[data-v4-page=work]) .v4-immersive-active>.v3-photo-actions{top:200px}.v4-immersive-active .v4-immersive-info{margin-top:150px}.v4-immersive-active .v4-loop-controls{flex-wrap:nowrap;gap:8px}.v4-immersive-active .v4-loop-controls p{order:0;width:auto;white-space:nowrap;padding:8px 12px}.v4-immersive-active .v4-loop-controls button{font-size:14px}}

/* Keep remembered and its punctuation together. */
.v4-remembered{white-space:nowrap}

body[data-v4-page=photography] .site-header{background:transparent;backdrop-filter:none;-webkit-backdrop-filter:none}

/* Smaller editorial card exposes more of the photograph; thumbnail stays right. */
.v4-immersive-info{width:min(62%,900px);padding:clamp(22px,2.2vw,32px);gap:clamp(22px,3vw,44px)}
.v4-immersive-open{height:clamp(180px,25svh,280px)}
@media(max-width:1000px){.v4-immersive-info{width:76%;gap:24px}}
@media(max-width:650px){.v4-immersive-info{width:84%;padding:18px;gap:14px}.v4-immersive-open{height:170px}.v4-immersive-description{font-size:17px}}

/* Larger portrait beside Two Minds, retaining the complete photograph. */
body[data-v4-page=creative] #about .vision-image{max-height:82svh}
@media(max-width:650px){body[data-v4-page=creative] #about .vision-image{height:auto;max-height:60svh}}

/* Give the opening statement an equal editorial column and shared alignment. */
body[data-v4-page=creative] .v4-creative-intro{grid-template-columns:1fr 1fr;gap:6vw;align-items:start}
body[data-v4-page=creative] .v4-creative-statement h2{max-width:none}
body[data-v4-page=creative] .v4-creative-lead{max-width:none;margin-top:36px;line-height:1.5}
@media(max-width:800px){body[data-v4-page=creative] .v4-creative-intro{grid-template-columns:1fr;gap:48px}body[data-v4-page=creative] .v4-creative-lead{margin-top:28px}}

/* Services closing invitation, using the supplied editorial composition. */
body[data-v4-page=services] .service-story:last-child{margin-bottom:0}
body[data-v4-page=services] #services{padding-bottom:64px}
body[data-v4-page=services] .v4-services-closing{display:grid;grid-template-columns:1.1fr 1fr;gap:8vw;align-items:center;background:#F3F0E8;color:#151C18;padding-top:72px;padding-bottom:100px}
.v4-services-closing h2{font-size:clamp(34px,3.6vw,52px);line-height:1.2}
.v4-services-closing h2 em{color:#52664b}
.v4-services-closing .text-link{justify-self:start;font-size:15px}
.v4-services-closing .text-link:is(:hover,:focus-visible){color:#52664b}
@media(max-width:650px){body[data-v4-page=services] .v4-services-closing{grid-template-columns:1fr;gap:32px;padding-top:48px;padding-bottom:72px}}

/* Shared V4 header palette: black on ivory; ivory on dark or photographic surfaces. */
body[data-v4-page] .site-header{--v4-header-logo:url('/v5/idalia-header-ivory.svg');color:#F3F0E8}
body[data-v4-page] .site-header.is-light,
body[data-v4-page=home] .site-header.is-at-top,
body[data-v4-page=services] .site-header{--v4-header-logo:url('/v5/idalia-header-black.svg');color:#000000}
body[data-v4-page] .site-header.site-header .wordmark img{content:var(--v4-header-logo);filter:none}
body[data-v4-page=photography] .site-header{--v4-header-logo:url('/v5/idalia-header-ivory.svg');color:#F3F0E8;background:transparent}
body[data-v4-page=photography] .site-header.is-light{--v4-header-logo:url('/v5/idalia-header-ivory.svg');color:#F3F0E8}
body[data-v4-page=creative] .site-header.is-founders-note.is-light,
body[data-v4-page=featured] .site-header.is-founders-note.is-light{--v4-header-logo:url('/v5/idalia-header-ivory.svg');color:#F3F0E8;background:rgba(21,28,24,.9)}

/* All Work shares Photography presentation only inside its gallery. */
body[data-v4-page=work]:has(#gallery.v4-immersive-active) .site-header.is-light{--v4-header-logo:url('/v5/idalia-header-ivory.svg');color:#F3F0E8;background:transparent}

/* Approved gallery eyebrow colour, shared by Photography and All Work. */
body:is([data-v4-page=photography],[data-v4-page=work]) #gallery .gallery-heading .eyebrow{color:#b8d2ae}

#gallery .gallery-heading h2{transition:opacity 180ms ease-out,translate 180ms ease-out}
#gallery.v4-gallery-browsing .gallery-heading h2{opacity:0;translate:0 -6px;pointer-events:none}
@media(prefers-reduced-motion:reduce){#gallery .gallery-heading h2{transition:none}#gallery.v4-gallery-browsing .gallery-heading h2{translate:none}}

/* View-specific surfaces: Grid matches Home's Selected Works; Carousel is black. */
body:is([data-v4-page=photography],[data-v4-page=work]) #gallery[data-view=grid],
#gallery[data-view=grid] .v3-field-host.is-field{background:#151c18}
body:is([data-v4-page=photography],[data-v4-page=work]) #gallery[data-view=carousel],
#gallery[data-view=carousel] #v3-carousel,#gallery[data-view=carousel] .photo-stage{background:#000}

/* Each alternate view occupies one screen; All Work keeps its outer document scroll. */
body:is([data-v4-page=photography],[data-v4-page=work]) #gallery:is([data-view=grid],[data-view=carousel]){height:100svh;min-height:0;padding:112px 5vw 16px;display:flex;flex-direction:column;gap:12px;border-radius:0}
#gallery:is([data-view=grid],[data-view=carousel])>.gallery-heading{margin:0!important;flex-shrink:0}
#gallery:is([data-view=grid],[data-view=carousel])>.gallery-heading>p{display:none}
#gallery:is([data-view=grid],[data-view=carousel]) .gallery-heading .eyebrow{margin:0 0 8px}
#gallery:is([data-view=grid],[data-view=carousel]) .gallery-heading h2{font-size:clamp(24px,2.8vw,36px);line-height:1.15;margin:0}
#gallery:is([data-view=grid],[data-view=carousel])>.v3-photo-actions{margin:0!important;flex-shrink:0}
#gallery[data-view=grid]>.v3-field-host{flex:1;min-height:0;height:auto;max-height:none;margin:0!important;overflow:auto}
#gallery[data-view=grid]>.v3-field-host.is-field{overflow:clip}
#gallery[data-view=grid] #v3-photo-current{margin:0;flex-shrink:0}
#gallery[data-view=carousel] #v3-carousel:not([hidden]){display:flex;flex-direction:column;flex:1;min-height:0;margin:0!important}
#gallery[data-view=carousel] .photo-stage{display:flex;flex-direction:column;flex:1;min-height:0;padding:0}
#gallery[data-view=carousel] .photo-frame{flex:1;min-height:0;height:0;aspect-ratio:auto;transition:none}
#gallery[data-view=carousel] .photo-frame>img{width:100%;height:100%;max-height:none;object-fit:contain}
#gallery[data-view=carousel] .photo-stage figcaption{flex-shrink:0;min-height:0;padding-top:6px;color:#F3F0E8;line-height:1.3}
#gallery[data-view=carousel] .photo-controls{flex-shrink:0;margin:4px 0;color:#F3F0E8}
#gallery[data-view=carousel] .photo-index{flex-shrink:0;padding:4px 0;gap:8px}
#gallery[data-view=carousel] .photo-index a{flex-basis:66px;padding-bottom:3px}
#gallery[data-view=carousel] .photo-index img{width:66px;height:50px}
#gallery[data-view=carousel] .photo-index a[aria-current=true]{border-color:#b8d2ae}
#gallery[data-view=carousel] .photo-scroll-hint{display:none}
@media(max-width:650px){body:is([data-v4-page=photography],[data-v4-page=work]) #gallery:is([data-view=grid],[data-view=carousel]){padding:96px 5vw 12px;gap:10px}}
@media(max-height:600px){body:is([data-v4-page=photography],[data-v4-page=work]) #gallery:is([data-view=grid],[data-view=carousel]){padding-top:88px;gap:6px}#gallery:is([data-view=grid],[data-view=carousel]) .gallery-heading h2{display:none}#gallery[data-view=carousel] .photo-index img{height:36px}}
body:is([data-v4-page=photography],[data-v4-page=work]) #gallery[data-view=carousel] .photo-stage{background:#000}

/* One viewport-anchored Selected Works surface covers the whole collection page.
   Transparent children prevent texture restarts at gallery/tunnel boundaries. */
body[data-v4-page=photography]{background:#151c18;isolation:isolate}
body[data-v4-page=photography]::before,
body[data-v4-page=photography]::after{content:"";position:fixed;inset:0;pointer-events:none;z-index:-1}
body[data-v4-page=photography]::before{background:var(--v4-selected-light-desktop)}
body[data-v4-page=photography]::after{background-image:var(--v4-selected-grain);opacity:.7}
body[data-v4-page=photography] #main,
body[data-v4-page=photography] #gallery,
body[data-v4-page=photography] #gallery:is([data-view=grid],[data-view=carousel]),
body[data-v4-page=photography] #gallery .v3-field-host,
body[data-v4-page=photography] #gallery .v3-field-host.is-field,
body[data-v4-page=photography] #gallery #v3-carousel,
body[data-v4-page=photography] #gallery[data-view=carousel] .photo-stage,
body[data-v4-page=photography] #gallery .photo-frame,
body[data-v4-page=photography] #gallery .v4-immersive-viewport{background:transparent}
body[data-v4-page=photography] .site-header{background:transparent;backdrop-filter:none;-webkit-backdrop-filter:none}
body[data-v4-page=work] .site-header.is-light{--v4-header-logo:url('/v5/idalia-header-ivory.svg');color:#F3F0E8}
/* Retain the heading and current-photo announcement for assistive technology.
   Only Grid's redundant chrome is hidden; actual image captions are untouched. */
#gallery[data-view=grid]>.gallery-heading,
#gallery[data-view=grid] #v3-photo-current{position:absolute;width:1px;height:1px;padding:0;margin:-1px!important;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
/* Extend only the settled finale, without changing the tunnel animation travel. */
body[data-v4-page=work] #tunnel.is-depth{height:435svh}
@media(max-width:800px){
 body[data-v4-page=photography]::before{background:var(--v4-selected-light-mobile)}
 body[data-v4-page=work] #tunnel.is-depth{height:405svh}
}

/* Carousel owns a fully black page, including header space and outer margins. */
body[data-v4-page=photography]:has(#gallery[data-view=carousel]){background:#000}
body[data-v4-page=photography]:has(#gallery[data-view=carousel])::before,
body[data-v4-page=photography]:has(#gallery[data-view=carousel])::after{content:none}

#v3-carousel #photo-autoplay{display:inline-grid;place-items:center;width:44px;min-height:44px;padding:10px}
#v3-carousel #photo-autoplay:focus-visible{outline:2px solid currentColor;outline-offset:3px}

/* Alternate views share Loop's right-aligned mode controls. */
#gallery:is([data-view=grid],[data-view=carousel])>.v3-photo-actions{justify-content:flex-end}
body[data-v4-page=work] .site-header{background:transparent;backdrop-filter:none;-webkit-backdrop-filter:none}

/* All Work owns three independent surfaces. Gallery modes never style ancestors. */
body[data-v4-page=work] #tunnel,
body[data-v4-page=work] #tunnel .v3-depth-stage{background:#000}
body[data-v4-page=work] #work,
body[data-v4-page=work] #tunnel.is-depth+#work,
body[data-v4-page=work] #gallery{position:relative;background:#151c18;isolation:isolate}
body[data-v4-page=work] #work::before,
body[data-v4-page=work] #work::after,
body[data-v4-page=work] #gallery::before,
body[data-v4-page=work] #gallery::after{content:"";position:absolute;inset:0;pointer-events:none;z-index:-1}
body[data-v4-page=work] #work::before,
body[data-v4-page=work] #gallery::before{background-image:var(--v4-selected-light-desktop)}
body[data-v4-page=work] #work::after,
body[data-v4-page=work] #gallery::after{background-image:var(--v4-selected-grain);opacity:.7}
body[data-v4-page=work] #gallery[data-view=carousel]{background:#000}
body[data-v4-page=work] #gallery[data-view=carousel]::before,
body[data-v4-page=work] #gallery[data-view=carousel]::after{content:none}
body[data-v4-page=work] #gallery .v3-field-host,
body[data-v4-page=work] #gallery .v4-immersive-viewport{background:transparent;overscroll-behavior-y:auto}
/* Native finite Grid: scroll chaining works at both edges, including touch.
   Standalone Photography retains its unbounded interactive field. */
body[data-v4-page=work] #gallery[data-view=grid] .v3-photo-list{padding:16px 8px 24px;grid-template-columns:repeat(3,minmax(0,1fr));gap:clamp(24px,5vw,72px)}
body[data-v4-page=work] #gallery[data-view=grid] .v3-photo-card img{width:100%;max-height:260px;object-fit:contain}
body[data-v4-page=work] #gallery[data-view=grid] .v3-field-host{touch-action:pan-y;scrollbar-width:thin}
@media(max-width:800px){
 body[data-v4-page=work] #work::before,
 body[data-v4-page=work] #gallery::before{background-image:var(--v4-selected-light-mobile)}
 body[data-v4-page=work] #gallery[data-view=grid] .v3-photo-list{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(prefers-reduced-motion:reduce){
 body[data-v4-page=work] #tunnel:not(.is-depth) .v3-portfolio-finale{margin-top:0;padding:12svh 24px}
 body[data-v4-page=work] .v4-immersive-viewport{scroll-behavior:auto}
}

/* All Work: immersive photographs in native page flow, without a nested scroller. */
body[data-v4-page=work] #gallery .v4-immersive-viewport{
 height:auto;min-height:0;max-height:none;overflow:visible;scroll-snap-type:none;
 scroll-behavior:auto;cursor:auto;touch-action:pan-y pinch-zoom;
}
body[data-v4-page=work] #gallery .v4-immersive-slide{
 height:auto;min-height:max(680px,100svh);padding:80px 0;
 scroll-snap-align:none;scroll-snap-stop:normal;
}
body[data-v4-page=work] #gallery .v4-immersive-info{margin-top:0}
body[data-v4-page=work] #gallery .v4-immersive-slide:first-child .v4-immersive-info{margin-top:100px}
@media(max-width:650px){
 body[data-v4-page=work] #gallery .v4-immersive-slide{min-height:100svh}
 body[data-v4-page=work] #gallery .v4-immersive-slide:first-child .v4-immersive-info{margin-top:150px}
}

/* Photography keeps its mode selector anchored identically in every view. */
body[data-v4-page=photography] #gallery>.v3-photo-actions{
 position:fixed;top:132px;right:5vw;left:auto;z-index:3;margin:0!important;
}
@media(max-width:1000px){
 body[data-v4-page=photography] #gallery>.v3-photo-actions{top:205px}
 body[data-v4-page=photography] #gallery:is([data-view=grid],[data-view=carousel])>.gallery-heading{margin-bottom:78px!important}
}
@media(max-width:650px){
 body[data-v4-page=photography] #gallery>.v3-photo-actions{top:200px}
 body[data-v4-page=photography] #gallery:is([data-view=grid],[data-view=carousel])>.gallery-heading{margin-bottom:90px!important}
}
@media(max-height:600px){
 body[data-v4-page=photography] #gallery>.v3-photo-actions{top:88px}
 body[data-v4-page=photography] #gallery:is([data-view=grid],[data-view=carousel])>.gallery-heading{margin-bottom:44px!important}
}

/* Homepage only: release the reserved heading column and spread the existing
   moving film columns into an alternating editorial composition. */
body[data-v4-page=home] #featured{display:block}
body[data-v4-page=home] #featured .v3-featured-heading{top:auto;margin:0;padding-left:max(6px,calc(var(--edge) - 1.33vw))}
body[data-v4-page=home] #featured .v4-all-work{width:100%}
@media(min-width:801px){
 body[data-v4-page=home] #featured .v3-featured-heading{display:flex;align-items:center;justify-content:space-between;padding-right:max(6px,calc(var(--edge) - 1.33vw))}
 body[data-v4-page=home] #featured .v3-featured-heading h2{max-width:none;margin-bottom:0}
 body[data-v4-page=home] #featured .v3-featured-grid{gap:clamp(40px,7vw,112px);padding:72px max(6px,calc(var(--edge) - 1.33vw)) 64px}
 body[data-v4-page=home] #featured .v3-film-column{gap:clamp(36px,4vw,64px)}
 body[data-v4-page=home] #featured .v3-film-column:nth-child(2){padding-top:clamp(120px,13vw,208px)}
 body[data-v4-page=home] #featured .v3-film{width:90%;align-self:flex-start}
 body[data-v4-page=home] #featured .v3-film-column:first-child .v3-film:nth-child(even),
 body[data-v4-page=home] #featured .v3-film-column:nth-child(2) .v3-film:nth-child(odd){align-self:flex-end}
}
@media(min-width:601px) and (max-width:800px){
 body[data-v4-page=home] #featured .v3-featured-grid{gap:28px;padding-top:36px;padding-bottom:40px}
 body[data-v4-page=home] #featured .v3-film{aspect-ratio:4/5}
 body[data-v4-page=home] #featured .v3-film-column{gap:32px}
 body[data-v4-page=home] #featured .v3-film-column:nth-child(2){padding-top:96px}
}

/* All Work: Selected Stills matches the adjacent Selected Films heading. */
body[data-v4-page=work] #gallery .gallery-heading h2{font-size:52px;line-height:1.15}
body[data-v4-page=work] #gallery .gallery-heading h2 em{color:#b8d2ae;margin-left:0}
@media(max-width:650px){body[data-v4-page=work] #gallery .gallery-heading h2{font-size:42px}}
/* Keep All Work's section heading visible while the document gallery is browsed. */
body[data-v4-page=work] #gallery.v4-gallery-browsing .gallery-heading h2{opacity:1;translate:none}
