/* Case pages: hero, article, duplex images, next project */
/* ================= CASE PAGES ================= */
/* page colours are set from the sky by JS: white by day, deep sky colour by night */
html.case-page{--page-bg:#ffffff;--page-ink:rgb(2,23,107);
  --page-muted:color-mix(in srgb,var(--page-ink) var(--muted-mix,60%),var(--page-bg));
  --page-line:color-mix(in srgb,var(--page-ink) 16%,var(--page-bg))}
html.case-page,html.case-page body{background:var(--page-bg)}
html.case-page.theme-light{color-scheme:light}
.case-page .nav::before{background:linear-gradient(var(--page-bg) 55%,transparent)}
.case-page .nav{transition:color .45s ease}
.case-page .nav.solid,.case-page .nav.ink{color:var(--page-ink);text-shadow:none}
.nav.cut::before{transition:none}   /* end of a case: the ground goes at once, the page's own ground carries on under it */
.case-page ::selection{background:var(--page-ink);color:var(--page-bg)}

/* hero over the sky */
.hero{position:relative;z-index:1;min-height:88vh;min-height:88svh;box-sizing:border-box;display:flex;flex-direction:column;justify-content:flex-start;
  padding-inline:var(--gutter);padding-block:calc(var(--lab-h) + 15vh) 6vh;color:#fff}
.hero-inner{will-change:transform,opacity}
/* "Scroll" bottom right as on the home page, in the page's ink: dark on the light page by day, light at night */
.hero-scroll{position:fixed;right:var(--gutter);bottom:calc(env(safe-area-inset-bottom,0px) + 22px);z-index:5;color:var(--page-ink);
  font-size:15px;letter-spacing:.01em;pointer-events:none}
.endless .hero-scroll{display:none}
.crumbs{display:flex;flex-wrap:wrap;align-items:baseline;gap:8px 22px;font-size:13px;letter-spacing:.14em;text-transform:uppercase;text-shadow:var(--shadow)}
.crumbs a{text-decoration:none;border-bottom:1px solid currentColor;padding-bottom:2px}
.crumbs a:hover{font-style:italic}
.crumbs .tags{opacity:.8}
.hero h1,.endless .title{font-weight:400;font-size:clamp(56px,10.4vw,210px);line-height:.93;letter-spacing:-.035em;margin:.28em 0 .16em;
  text-wrap:balance;max-width:11em}
.hero .sub{font-style:italic;font-size:clamp(21px,2.1vw,36px);line-height:1.2;margin:.4em 0 0;text-shadow:var(--shadow)}

/* article */
.case-article{position:relative;z-index:2;background:var(--page-bg);color:var(--page-ink);
  padding-inline:var(--gutter);padding-block:clamp(56px,7vw,120px) clamp(64px,8vw,140px);}
/* the fade reaches 2 px into the article and ends in a plain layer: Chrome drew a hairline at the gradient's edge */
.case-article::before{content:"";position:absolute;left:0;right:0;bottom:calc(100% - 2px);height:calc(60vh + 2px);pointer-events:none;
  /* eased (smootherstep in 12 steps), long: no visible start or end of the fade (Nils, 25.11.2026) */
  background:linear-gradient(var(--page-bg),var(--page-bg)) bottom/100% 4px no-repeat,linear-gradient(to bottom,color-mix(in srgb,var(--page-bg) 0.0%,transparent) 0.0%,color-mix(in srgb,var(--page-bg) 0.5%,transparent) 8.3%,color-mix(in srgb,var(--page-bg) 3.5%,transparent) 16.7%,color-mix(in srgb,var(--page-bg) 10.4%,transparent) 25.0%,color-mix(in srgb,var(--page-bg) 21.0%,transparent) 33.3%,color-mix(in srgb,var(--page-bg) 34.7%,transparent) 41.7%,color-mix(in srgb,var(--page-bg) 50.0%,transparent) 50.0%,color-mix(in srgb,var(--page-bg) 65.3%,transparent) 58.3%,color-mix(in srgb,var(--page-bg) 79.0%,transparent) 66.7%,color-mix(in srgb,var(--page-bg) 89.6%,transparent) 75.0%,color-mix(in srgb,var(--page-bg) 96.5%,transparent) 83.3%,color-mix(in srgb,var(--page-bg) 99.5%,transparent) 91.7%,color-mix(in srgb,var(--page-bg) 100.0%,transparent) 100.0%)}
.case-article a{color:inherit;text-decoration-thickness:1px;text-underline-offset:.18em}
.case-wrap{max-width:1440px;margin-inline:auto;display:grid;gap:clamp(72px,9vw,150px)}
.case-main{display:grid;grid-template-columns:minmax(0,1fr);gap:clamp(40px,5vw,64px)}
.flow{display:grid;gap:clamp(48px,5.5vw,88px);min-width:0}
@media (min-width:980px){
  .case-main{grid-template-columns:minmax(200px,4fr) minmax(0,8fr);column-gap:clamp(56px,6vw,128px)}
  /* sticky inside .case-main only, so it stops before "Next project" */
  .meta{position:sticky;top:calc(var(--lab-h) + 96px);align-self:start}
}
.label{font-size:13px;letter-spacing:.14em;text-transform:uppercase;color:var(--page-muted);margin:0}

.meta dl{display:grid;gap:22px;margin:0}
.meta dt{font-size:12px;letter-spacing:.14em;text-transform:uppercase;color:var(--page-muted)}
.meta dd{margin:5px 0 0;font-size:17px;line-height:1.4}
.meta .portrait{width:100%;max-width:440px;margin:0 0 30px}
.about-lists{display:grid;grid-template-columns:minmax(0,1fr);gap:40px clamp(32px,4vw,64px);max-width:38em}
@media (min-width:620px){ .about-lists{grid-template-columns:repeat(2,minmax(0,1fr))} }
.about-lists ul{list-style:none;margin:18px 0 0;padding:0;display:grid;gap:.34em;font-size:clamp(19px,1.38vw,24px);line-height:1.3}
.case-links{display:flex;flex-wrap:wrap;gap:24px}
/* logos on a light tile with a breath of the page ink (always light, so a white ground in a logo file
   disappears with multiply). site/logos.js lays a copy in the page duotone on top, which fades out once,
   smoothly, when the logo is half in view (Nils, 25.11.2026) */
.meta .logo{position:relative;width:100%;max-width:176px;aspect-ratio:1;margin:0 0 34px;display:grid;place-items:center;
  background:color-mix(in srgb,var(--page-ink) 4.5%,#fff);border-radius:8px;overflow:hidden}
.meta .logo img{display:block;width:68%;height:68%;object-fit:contain;mix-blend-mode:multiply;grid-area:1/1}
.meta .logo .d{display:none}
/* a crossfade: duotone out, colour in (both multiplied onto the tile, so neither shows through the other) */
.meta .logo.lg img{transition:opacity 1.4s cubic-bezier(.45,0,.25,1) .1s}
.meta .logo.lg .d{display:block;filter:url(#duo);opacity:1}
.meta .logo.lg > img:not(.d){opacity:0}
.meta .logo.lg.in-colour .d{opacity:0}
.meta .logo.lg.in-colour > img:not(.d){opacity:1}
@media (prefers-reduced-motion:reduce){ .meta .logo.lg img{transition:none} }
@media (max-width:979px){ .meta .logo{max-width:128px} }

.lead{font-size:clamp(28px,2.7vw,46px);line-height:1.2;letter-spacing:-.014em;margin:0;text-wrap:pretty}
.prose{max-width:41.5em}
.prose p{font-size:clamp(19px,1.38vw,24px);line-height:1.62;margin:0 0 1.1em;text-wrap:pretty}
.prose p:last-child{margin-bottom:0}
.ach{max-width:41.5em;display:grid;gap:26px}
.ach ul{list-style:none;margin:0;padding:0;display:grid;gap:.9em}
.ach li{font-size:clamp(19px,1.38vw,24px);line-height:1.52;text-wrap:pretty;
  --mk:calc(.78em + .8em);padding-left:var(--mk);text-indent:calc(-1*var(--mk))}
.ach li::before{content:"";display:inline-block;box-sizing:border-box;vertical-align:0;width:.78em;height:.78em;border-radius:50%;
  border:max(1px,.06em) solid currentColor;background:transparent;margin-right:.8em}
.ach li.on::before{background:currentColor}
@media (min-width:980px){ .ach li{padding-left:0} } /* hanging marker: text edge stays aligned with the paragraphs */

/* images: one colour in the page ink while they scroll in and out, full colour around the middle of the screen (duplex.js sets --mono) */
/* screens on the tablet in the sky (skypane.js draws sky, tablet and screen into the canvas);
   without JS or before the canvas is drawn the screen itself shows */
figure.skycv{position:relative;margin:0;border-radius:8px;overflow:hidden;aspect-ratio:2000/1493;background:var(--page-line)}
figure.skycv[data-orient="portrait"]{aspect-ratio:1493/2000;width:min(100%,calc(82vh * 1493 / 2000))}
figure.skycv .skycv-canvas{position:absolute;inset:0;width:100%;height:100%;display:block;z-index:1;opacity:0;transition:opacity .5s}
figure.skycv.drawn .skycv-canvas{opacity:1}   /* never an empty (black) canvas while the pictures load */
figure.skycv .fallback{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:top center}
/* with JS the flat screen never shows first: the quiet tile, then the tablet in the sky (Nils, 25.11.2026);
   display:none also keeps the lazy picture from loading at all. Only if the screen fails to load it shows */
.js figure.skycv:not(.sky-failed) .fallback{display:none}
figure.duo{position:relative;margin:0;overflow:hidden;cursor:pointer;background:var(--page-line);border-radius:8px}
.duo img{display:block;width:100%;height:auto}
.duo .d{position:absolute;inset:0;width:100%;height:100%;filter:url(#duo);opacity:var(--mono,1)}
.duo.live .d{opacity:0}
@media (hover:hover){ .duo:hover .d{opacity:0} }
.gallery{display:grid;gap:clamp(11px,1.35vw,22px)}   /* a third of the former gap */
.prose h2,.prose h3{font-weight:400;font-size:clamp(23px,1.9vw,32px);line-height:1.25;margin:1.4em 0 .5em}
.prose ul,.prose ol{font-size:clamp(19px,1.38vw,24px);line-height:1.52;padding-left:1.1em}
.prose img{height:auto}

.next{border-top:1px solid var(--page-line);padding-top:clamp(28px,3vw,48px);display:grid;gap:14px}
.next a{display:block;font-size:clamp(46px,7.6vw,146px);line-height:.96;letter-spacing:-.032em;text-decoration:none}
.next a:hover{font-style:italic}
.next .sub{font-style:italic;font-size:clamp(18px,1.6vw,26px);color:var(--page-muted);margin:0}
/* endless scroll: the page fades into the sky again (the head's gradient turned round), the next project's head stands on
   it as on its own page; the loading line takes the place of the rule */
.next.has-endless{display:none}
.endless{color:#fff}
/* more page below the contact, then a shorter way through the sky to the next head */
.endless-gap{position:relative;z-index:2;height:85vh;margin-top:-2px;pointer-events:none;   /* overlaps the page by 2 px: no hairline of sky at the seam */
  /* a plain layer over the top: Chrome drew a hairline at the top edge of the gradient alone */
  background:linear-gradient(var(--page-bg),var(--page-bg)) top/100% 4px no-repeat,
    linear-gradient(to bottom,color-mix(in srgb,var(--page-bg) 100.0%,transparent) 0.0%,color-mix(in srgb,var(--page-bg) 99.5%,transparent) 8.3%,color-mix(in srgb,var(--page-bg) 96.5%,transparent) 16.7%,color-mix(in srgb,var(--page-bg) 89.6%,transparent) 25.0%,color-mix(in srgb,var(--page-bg) 79.0%,transparent) 33.3%,color-mix(in srgb,var(--page-bg) 65.3%,transparent) 41.7%,color-mix(in srgb,var(--page-bg) 50.0%,transparent) 50.0%,color-mix(in srgb,var(--page-bg) 34.7%,transparent) 58.3%,color-mix(in srgb,var(--page-bg) 21.0%,transparent) 66.7%,color-mix(in srgb,var(--page-bg) 10.4%,transparent) 75.0%,color-mix(in srgb,var(--page-bg) 3.5%,transparent) 83.3%,color-mix(in srgb,var(--page-bg) 0.5%,transparent) 91.7%,color-mix(in srgb,var(--page-bg) 0.0%,transparent) 100.0%)}
.endless .title a{color:inherit;text-decoration:none}
.endless .hero-inner{position:relative}
/* the head stands still (sticky) while scrolling on runs the line: the run is the window plus the way of the line */
.endless-run{position:relative;z-index:1;height:calc(100vh + 90vh)}
.endless-run > .endless{position:sticky;top:0;height:100vh;height:100svh;min-height:0}
/* "Next project" and the loading line: outside the flow above the crumbs, so the head stands exactly
   where it stands on the next page; they come with the head and fade just before the handover */
.endless .next-lbl{display:inline-block;padding-bottom:3px}   /* in the place of "All work", same line height */
/* the loading line: under the next head, across the full width (outside the flow, the head stays put) */
.endless-line{position:absolute;left:0;right:0;top:calc(100% + clamp(28px,4vh,48px));display:block;height:3px;pointer-events:none}
.endless-line::before{content:"";position:absolute;left:0;right:0;top:1px;height:1px;background:currentColor;opacity:.35}
.endless-line i{position:absolute;left:0;top:0;height:3px;width:0;background:currentColor;border-radius:2px}
/* the page under the next head (as on the next page), with room below so the scroll never meets the end */
/* it starts where the article starts on the next page: after the head (88svh), not after the full window,
   so the fade stands exactly where it stands after the handover (it was 12 % lower and jumped, Nils 25.11.2026) */
.endless-tail{position:relative;z-index:2;height:calc(12svh + 80vh);margin-top:calc(88svh - 100svh);background:var(--page-bg)}
.endless-tail::before{content:"";position:absolute;left:0;right:0;bottom:calc(100% - 2px);height:calc(60vh + 2px);pointer-events:none;
  background:linear-gradient(var(--page-bg),var(--page-bg)) bottom/100% 4px no-repeat,linear-gradient(to bottom,color-mix(in srgb,var(--page-bg) 0.0%,transparent) 0.0%,color-mix(in srgb,var(--page-bg) 0.5%,transparent) 8.3%,color-mix(in srgb,var(--page-bg) 3.5%,transparent) 16.7%,color-mix(in srgb,var(--page-bg) 10.4%,transparent) 25.0%,color-mix(in srgb,var(--page-bg) 21.0%,transparent) 33.3%,color-mix(in srgb,var(--page-bg) 34.7%,transparent) 41.7%,color-mix(in srgb,var(--page-bg) 50.0%,transparent) 50.0%,color-mix(in srgb,var(--page-bg) 65.3%,transparent) 58.3%,color-mix(in srgb,var(--page-bg) 79.0%,transparent) 66.7%,color-mix(in srgb,var(--page-bg) 89.6%,transparent) 75.0%,color-mix(in srgb,var(--page-bg) 96.5%,transparent) 83.3%,color-mix(in srgb,var(--page-bg) 99.5%,transparent) 91.7%,color-mix(in srgb,var(--page-bg) 100.0%,transparent) 100.0%)}
/* contact at the end: in the text column, the address in the size of the body text (Nils, 21.11.2026) */
.case-contact{display:grid;grid-template-columns:minmax(0,1fr)}
.case-contact .cc{display:grid;gap:0;max-width:41.5em}
.case-contact .label{margin-bottom:.9em}
.case-contact .mail{margin:0;font-size:clamp(19px,1.38vw,24px);line-height:1.4;overflow-wrap:anywhere}
.case-contact .mail a{color:var(--page-ink);text-decoration:none;user-select:all}
.case-contact .mail a:hover{text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:.18em}
.case-contact .case-links{margin:1em 0 0;font-size:15px;color:var(--page-muted)}
@media (min-width:980px){
  .case-contact{grid-template-columns:minmax(200px,4fr) minmax(0,8fr);column-gap:clamp(56px,6vw,128px)}
  .case-contact .cc{grid-column:2}
}
.case-article :focus-visible,.hero :focus-visible{outline:1px solid currentColor;outline-offset:5px}
/* image effect (test, html[data-imagefx]): the canvas draws the image, the img keeps the layout */
figure.duo.fx{overflow:visible;background:none}
figure.duo.fx > img{visibility:hidden}
.fx-canvas{position:absolute;z-index:1;pointer-events:none;display:block}
