html{scroll-behavior:smooth;scroll-padding-top:110px}
.case-page{--case-title-size:clamp(30px,2.43vw,64px);--case-copy-size:var(--action-font-size);background:#fff}
.case-header{position:sticky;top:0;z-index:10;display:flex;align-items:center;justify-content:space-between;gap:24px;min-height:90px;padding:20px var(--top-gutter);background:#fff}
.case-brand{font-size:clamp(28px,calc(2.43vw - 2px),62px);font-weight:500;line-height:1.3;letter-spacing:-1px}
.case-brand img{width:.33em;height:.33em;vertical-align:top;margin:.19em 0 0 .1em}
.case-back{position:relative;display:inline-block;font-size:var(--case-copy-size);font-weight:400;line-height:1.3;letter-spacing:-.035em;white-space:nowrap;padding-bottom:5px}
.case-back:after{content:'';position:absolute;bottom:0;left:0;width:100%;height:1px;background:currentColor;transform:scaleX(0);transform-origin:right;transition:transform .4s}
.case-back:hover:after,.case-back:focus-visible:after{transform:scaleX(1);transform-origin:left}
.case-layout{display:grid;grid-template-columns:minmax(0,36fr) minmax(0,64fr);gap:clamp(30px,4vw,100px);padding:30px var(--top-gutter) 0;align-items:start}
.case-details{position:sticky;top:120px;min-height:calc(100svh - 150px);display:flex;flex-direction:column;justify-content:space-between;gap:32px;padding-bottom:26px}
.case-label,.case-note,.case-facts{font-size:13px;line-height:1.5;letter-spacing:0}
.case-label{color:var(--muted)}
.case-details h1{font-size:var(--case-title-size);font-weight:400;line-height:1.1;letter-spacing:-.035em;margin:25px 0}
.case-description{font-size:var(--case-copy-size);line-height:1.4;letter-spacing:-.035em;margin:0;max-width:31ch}
.case-facts{display:grid;grid-template-columns:1.5fr 1fr;gap:20px;margin:30px 0}
.case-facts div:last-child{grid-column:2;grid-row:2}.case-facts dt{color:var(--muted);margin-bottom:5px}.case-facts dd{margin:0}.case-note{color:var(--muted);max-width:38ch}
.case-gallery{min-width:0;display:flex;flex-direction:column;gap:12px}
.case-visual{position:relative;overflow:hidden;border-radius:var(--block-radius);margin:0;aspect-ratio:5/4;padding:24px;display:flex;align-items:center;justify-content:center}
.visual-caption{position:absolute;left:24px;top:24px;font-size:11px;letter-spacing:0;line-height:1.4}.visual-bottom{position:absolute;bottom:24px;left:24px;font-size:13px}
.visual-identity{background:#b7c9ed;color:#172847}.demo-wordmark{font-size:clamp(44px,7vw,130px);line-height:.9;letter-spacing:-.07em;position:relative}.demo-wordmark span{font-size:.2em;position:absolute;right:-1em;top:0}
.case-pair{display:grid;grid-template-columns:1fr 1fr;gap:12px}.case-pair .case-visual{aspect-ratio:3/4}.visual-symbol{background:#ecff80;color:#22391c}.demo-symbol{font-size:clamp(110px,20vw,350px);line-height:1}.visual-type{background:#272e26;color:#f4f4e9}.visual-type>div{font-size:clamp(60px,11vw,190px);line-height:.9;letter-spacing:-.07em}
.visual-packaging{background:#eeeae2;aspect-ratio:5/4}.demo-packages{display:flex;gap:16px;align-items:center;transform:rotate(-8deg);width:85%}.demo-box{position:relative;flex:1;aspect-ratio:1/1.85;background:#b7c9ed;padding:18% 6px 10%;font-size:clamp(12px,1.8vw,30px);line-height:.95;letter-spacing:-.06em;box-shadow:12px 15px 20px #0002}.demo-box:nth-child(2){background:#ecff80;transform:translateY(-18px)}.demo-box:nth-child(3){background:#272e26;color:#fff}.demo-box span{position:absolute;bottom:12px;left:8px;font-size:7px;letter-spacing:0}
.visual-poster{background:#ecff80;aspect-ratio:5/4}.visual-poster>div{font-size:clamp(36px,6vw,110px);line-height:1;letter-spacing:-.06em}.case-end{display:flex;justify-content:space-between;gap:20px;align-items:center;padding:30px 0 45px}.case-end>span{font-size:13px;color:var(--muted)}
@media(max-width:850px){.case-layout{grid-template-columns:minmax(0,42fr) minmax(0,58fr);gap:24px}.case-description{font-size:20px}.case-details{top:110px}.case-facts{grid-template-columns:1fr}.case-facts div:last-child{grid-column:auto;grid-row:auto}.visual-caption{font-size:9px;left:14px;top:14px}.case-visual{padding:14px}.case-brand{font-size:24px}}
@media(max-width:600px){.case-page{--case-title-size:32px}.case-header{min-height:80px;padding-block:16px}.case-brand{font-size:20px}.case-header .case-back{font-size:16px}.case-layout{display:block;padding-top:20px}.case-details{position:static;min-height:0;padding-bottom:35px;gap:20px}.case-description{font-size:var(--case-copy-size);max-width:none}.case-facts{grid-template-columns:1fr 1fr}.case-details h1{margin-top:18px}.case-details>.case-back{display:none}.case-gallery{gap:10px}.case-pair{gap:10px}.case-visual{aspect-ratio:1}.demo-wordmark{font-size:14vw}.demo-symbol{font-size:35vw}.visual-type>div{font-size:24vw}.demo-box{font-size:4vw}.visual-poster>div{font-size:10vw}.case-end{align-items:start;flex-direction:column}.demo-packages{gap:10px}}
@media(max-height:700px) and (min-width:601px){.case-details{position:static;min-height:0}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}.case-back:after{transition:none}}

/* Lower project narrative and match all project facts to its type scale. */
.case-description{margin-top:clamp(50px,10svh,140px)}
.case-facts{font-size:var(--case-copy-size);line-height:1.4;letter-spacing:-.035em}
.case-details{max-height:calc(100svh - 120px);overflow-y:auto;scrollbar-width:thin}
.case-details>.case-back{align-self:flex-start}
@media(max-width:850px){.case-description{font-size:var(--case-copy-size)}}
@media(max-width:600px){.case-description{margin-top:44px}.case-details{max-height:none;overflow:visible}.case-details>.case-back{display:inline-block}}
@media(max-height:700px) and (min-width:601px){.case-details{position:sticky;max-height:calc(100svh - 120px)}}

/* Shared site header and standard case media ratios. */
.case-page .case-site-header{height:104px;min-height:104px}
.case-page .case-site-header .logo{font-size:30px}
.case-page .case-site-header .brand-name{display:none}
.case-page .case-site-header .brand-mark{width:var(--header-circle-size);max-width:var(--header-circle-size);flex-basis:var(--header-circle-size);opacity:1;transform:none}
.case-gallery .case-visual{aspect-ratio:16 / 9}
.case-gallery .case-pair .case-visual{aspect-ratio:9 / 16}
.case-facts div:last-child{grid-column:auto;grid-row:auto}
.case-details-footer{margin-top:30px;flex-shrink:0}
.case-details-footer .case-note{margin:0 0 16px}
.case-details-footer .case-back{display:inline-block}
@media(max-width:600px){.case-page .case-site-header{height:90px;min-height:90px}.case-details-footer{margin-top:10px}}

/* Case narrative spacing follows the supplied layout reference. */
.case-details>div:first-child{padding-top:clamp(45px,6svh,90px)}
.case-details h1{margin-top:0;margin-bottom:0}
.case-description{margin-top:clamp(28px,4svh,60px)}
.case-facts{margin-top:clamp(44px,6svh,85px)}
.case-end{justify-content:flex-end}
@media(max-width:600px){.case-details>div:first-child{padding-top:20px}.case-description{margin-top:28px}.case-facts{margin-top:40px}}

/* Only the gallery scrolls on desktop; the narrative and header never move. */
.case-gallery>*,.case-pair>.case-visual{flex-shrink:0}
@media(min-width:601px){
 html:has(.case-page),body.case-page{height:100%;overflow:hidden}
 .case-page .case-site-header{position:relative;flex-shrink:0}
 .case-layout{height:calc(100svh - 104px);overflow:hidden;padding-top:0;padding-bottom:0}
 .case-details{position:relative;top:auto;height:100%;min-height:0;max-height:none;overflow:hidden;padding-top:30px;padding-bottom:26px}
 .case-gallery{height:100%;overflow-y:auto;overscroll-behavior-y:contain;scroll-behavior:auto;scrollbar-width:thin;padding-top:30px;padding-bottom:20px}
 .case-details>div:first-child{min-height:0;overflow-y:auto;scrollbar-width:thin}
 .case-details-footer{margin-top:20px}
}

/* Related cases use the homepage cards and hover treatment. */
#work.case-related{padding:35px 0 0;flex-shrink:0}
#work.case-related h2{font-size:var(--action-font-size);font-weight:400;line-height:1.2;letter-spacing:-.035em;margin:0 0 24px}
#work.case-related .featured-projects{grid-template-columns:repeat(2,minmax(0,1fr));margin-bottom:0}
.case-footer{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:36px 0 20px;border-top:1px solid var(--line);margin-top:30px;font-size:13px;background:#fff}
.case-footer-brand{font-weight:500}.case-footer .case-back{font-size:13px;letter-spacing:0}
@media(max-width:600px){#work.case-related .featured-projects{grid-template-columns:1fr}.case-footer{flex-wrap:wrap;gap:15px}}

/* Identical full-width site footer, outside the case columns. */
.case-footer-space{display:none}
@media(min-width:601px){
 .case-footer-space{display:block;min-height:var(--case-footer-height,100px)}
 .case-page>footer.section-wrap{position:fixed;bottom:0;left:0;width:100%;z-index:15;transform:translateY(100%);will-change:transform}
}

.case-gallery{scrollbar-width:none}
.case-gallery::-webkit-scrollbar{display:none}
.case-page>footer.section-wrap{border-top:0;background:#111;color:#fff}

.case-gallery .case-end{padding-top:24px;padding-bottom:64px}
.case-image{display:block;width:100%;height:auto;border-radius:var(--block-radius)}
.case-pair:has(.case-image){align-items:start}
.case-description p{margin:0}
.case-description p+p{margin-top:1em}

/* Keep the sole all-projects link clear of the full-width footer. */
@media(min-width:601px){.case-details{padding-bottom:calc(var(--case-footer-height,100px) + 28px)}}

/* Text reveals use the same easing and pace as the homepage. */
.case-copy-enter{animation:case-copy-enter 1.25s cubic-bezier(.16,1,.3,1) both;animation-delay:var(--case-copy-delay,0ms)}
@keyframes case-copy-enter{from{opacity:0;transform:translate3d(0,28px,0)}to{opacity:1;transform:translate3d(0,0,0)}}
@media(prefers-reduced-motion:reduce){.case-copy-enter{animation:none}}

/* Keep the copy hidden until the page fade has finished. */
@media(prefers-reduced-motion:no-preference){
 .case-details:not(.copy-ready) .case-description,.case-details:not(.copy-ready) .case-facts>div,.case-details:not(.copy-ready) .case-details-footer{opacity:0}
}

body[data-case="overrated"] .case-description{font-weight:200}
