/* Portfolio detail alignment, with project-specific artwork proportions preserved. */
:is(.project-case,.pogou-reference){--case-column-gap:40px}
:is(.project-case,.pogou-reference) :is(.cs-intro,.cs-facts,.cs-split,.cs-cta-in){column-gap:var(--case-column-gap)}
.project-case.case-standard .cs-split,
.project-case.campaign-case .campaign-story{column-gap:var(--case-column-gap)}

/* Plain captions follow the full artwork width instead of an empty second column. */
:is(.project-case,.pogou-reference) .cs-fig figcaption:not(:has(>*)){display:block}
.project-case .cs-copy>:is(ul,ol):first-child{margin-top:0}
/* Reserve the supplied hero's natural ratio before it finishes loading. */
.project-case.clyde-case .cs-hero+.cs-fig img{aspect-ratio:auto 1672/941}

/* Keep the whole artwork visible in the existing hero and paired-image frames. */
.project-case.bournvita-case .campaign-hero .cs-img img,
.project-case.noor-case .noor-hero .cs-img img,
.project-case.cambridge-case .cambridge-pair .cs-img img{object-fit:contain}
/* Keep paired galleries on a common top edge, including their image contents. */
.project-case :is(.campaign-gallery,.cambridge-pair,.clyde-grid,.studio-product-pair,.herbolina-pair,.hr-pair,.mini-nova-gallery,.noor-gallery,.nvr-pair,.orchid-pair,.suvarna-pair,.tea-pair){align-items:start}
.project-case :is(.campaign-gallery,.cambridge-pair,.clyde-grid,.studio-product-pair,.herbolina-pair,.hr-pair,.mini-nova-gallery,.noor-gallery,.nvr-pair,.orchid-pair,.suvarna-pair,.tea-pair) .cs-img{align-self:start}
.project-case.cambridge-case .cambridge-pair .cs-img img{object-position:center top}
/* Match the neighbouring 3:2 brochure by trimming 105px of spare sky only.
   Anchoring at the bottom preserves the entire printed hoarding and its support. */
.project-case.cambridge-case .cambridge-pair .cs-img img[src="/assets/cambridge/cambridge-city-hoarding.webp"]{object-fit:cover;object-position:center bottom}

/* Keep previous/next projects on equal rails, with the index centred. */
.project-case .cs-project-nav{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:start}
.project-case .cs-project-nav a{max-width:100%;min-width:0}
.project-case .cs-project-nav a[href="/portfolio/"]{grid-column:2;grid-row:1;justify-self:center;text-align:center}
.project-case .cs-project-nav a:last-child:not([href="/portfolio/"]){grid-column:3;grid-row:1;justify-self:end;text-align:right}

@media(min-width:761px){
 .project-case.case-standard .cs-split .cs-copy,
 .project-case.campaign-case .campaign-story .cs-copy{padding-top:53px}
 .project-case.campaign-case .campaign-outcome .cs-copy{padding-top:0;margin-top:53px}
 .pogou-reference .cs-split .cs-copy{padding-top:47px}
 :is(.project-case,.pogou-reference) .cs-facts:has(>div:nth-child(2):last-child){grid-template-columns:repeat(2,minmax(0,1fr))}
 :is(.project-case,.pogou-reference) .cs-facts:has(>div:nth-child(2):last-child)>div:last-child{grid-column:auto}
}
@media(min-width:761px) and (max-width:1000px){
 :is(.project-case,.pogou-reference){--case-column-gap:32px}
}
@media(max-width:760px){
 .project-case .cs-project-nav{grid-template-columns:repeat(2,minmax(0,1fr));gap:28px 24px}
 .project-case .cs-project-nav a[href="/portfolio/"]{grid-column:1/-1;grid-row:2}
 .project-case .cs-project-nav a:last-child:not([href="/portfolio/"]){grid-column:2;grid-row:1}
}
