/* One continuous blue field; the opening teaser alone has a silver frame. */
.case-page { isolation:isolate; background:#c9ddec; color:#183149; }
.case-page::before { content:''; position:fixed; inset:0; z-index:-1; pointer-events:none; background:radial-gradient(ellipse at 49% 42%,#f4f8fcdd,transparent 63%),radial-gradient(ellipse at 8% 10%,#91b4d3aa,transparent 70%),linear-gradient(140deg,#b3cee4,#d4e4f1 60%,#a9c9e3); }
.case-topbar { position:absolute; inset:25px 5vw auto; z-index:5; display:flex; justify-content:space-between; pointer-events:none; }
.case-topbar a,.back-projects { display:grid; place-items:center; width:42px; height:42px; color:#42637e; pointer-events:auto; transition:transform .25s,color .25s; }
.case-topbar svg,.back-projects svg { width:24px; height:24px; }
.case-topbar a:hover { transform:translateY(-2px); color:#132d45; }
.case-hero { padding:125px 0 70px; }
.case-heading { width:min(1200px,90%); margin:auto; text-align:center; }
.case-heading h1 { font-family:var(--serif); font-size:clamp(64px,7.9vw,116px); line-height:1.05; letter-spacing:-2.8px; font-weight:400; text-wrap:balance; }
.desktop-stage { display:grid; grid-template-columns:1fr 2.25fr 1fr; align-items:center; gap:32px; width:min(1330px,90%); margin:75px auto 25px; }
.desktop-stage .project-media:nth-child(1) { transform:translateY(25px); }
.desktop-stage .project-media:nth-child(2) { z-index:2; transform:none; }
.desktop-stage .project-media:nth-child(3) { transform:translateY(-20px); }
.desktop-stage figcaption { display:none; }
.desktop-stage img,.desktop-stage video { max-height:430px; }
.desktop-stage .project-media:not(.teaser-window) img { max-height:290px; filter:drop-shadow(0 12px 13px #284c6b22); }
.desktop-stage.stage-1 { display:block; width:min(730px,86%); }
.desktop-stage.stage-1 .project-media { transform:none; }
.desktop-stage.stage-2 { grid-template-columns:1fr 1fr; width:min(850px,86%); gap:44px; }
.case-theme-photo .desktop-stage { grid-template-columns:1fr 1.4fr 1fr; width:min(1060px,88%); }
.case-theme-photo .desktop-stage img { max-height:440px; }
.case-theme-spatial .desktop-stage .project-media:nth-child(3) { transform:translateY(40px); }
.project-media { min-width:0; margin:0; padding:0; }
.media-surface { display:block; }
a.media-surface { cursor:zoom-in; }
.media-surface img,.media-surface video { display:block; width:100%; height:auto; object-fit:contain; }
.media-surface img { width:auto; max-width:100%; margin-inline:auto; }
.media-surface video { background:#152332; border-radius:12px; }
.project-media figcaption { font-size:13px; line-height:1.7; margin-top:13px; color:#4a667e; }
.project-media figcaption a { margin-left:8px; }
.teaser-window { overflow:hidden; border:1px solid #a6b4c0; border-radius:7px; background:#e4eaf0; box-shadow:0 22px 45px -20px #24496866,0 3px 5px #24496816; }
.media-titlebar { display:flex; align-items:center; gap:10px; min-height:30px; padding:6px 10px; background:linear-gradient(#fafbfd,#e6eaee 55%,#d4dbe2); border-bottom:1px solid #aeb9c3; font:11px/1.3 var(--sans); color:#3b4c5b; }
.media-dots { display:inline-flex; gap:4px; }
.media-dots i { width:6px; height:6px; border-radius:50%; background:#b8c4ce; }
.media-filename { flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; text-align:center; }
.case-shell { max-width:1160px; width:calc(100% - 110px); margin:auto; }
.case-section { padding:60px 0; }
.case-section h2 { font-family:var(--serif); font-size:clamp(40px,4vw,58px); font-weight:400; letter-spacing:-.6px; line-height:1.1; margin:0 0 30px; text-wrap:balance; }
.case-section h3 { font-family:var(--serif); font-size:32px; font-weight:400; line-height:1.2; margin-bottom:18px; }
.case-prose { color:#344e65; font-size:16px; line-height:1.9; }
.case-prose p+p { margin-top:20px; }
.overview-section { display:grid; grid-template-columns:.85fr 1.15fr; gap:80px; align-items:start; padding-top:35px; }
.overview-section .case-prose { font-size:18px; line-height:1.85; }
.case-section-top { display:grid; grid-template-columns:.85fr 1.15fr; gap:80px; align-items:start; margin-bottom:42px; }
.process-gallery { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:32px; align-items:start; margin-top:45px; }
.process-gallery:has(> :only-child) { grid-template-columns:minmax(0,720px); justify-content:center; }
.process-gallery:has(> :nth-child(2):last-child) { grid-template-columns:repeat(2,minmax(0,1fr)); }
.process-gallery .media-surface img { max-height:480px; }
.process-gallery .project-media:nth-child(3n+2) { margin-top:40px; }
.process-steps { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:45px 65px; }
.process-step { min-width:0; }
.final-stage { display:grid; grid-template-columns:1.25fr 1fr; gap:55px; align-items:center; }
.final-stage .media-surface img,.final-stage .media-surface video { max-height:600px; }
.case-reflection { max-width:790px; margin:65px auto 0; }
.archive-gallery { columns:3; column-gap:30px; margin-top:36px; }
.archive-gallery .project-media { break-inside:avoid; margin-bottom:32px; }
.archive-gallery:has(> :only-child) { columns:1; max-width:720px; margin-inline:auto; }
.code-excerpt { margin:55px 0 0; }
.code-excerpt figcaption { color:#2c4b65; font-size:18px; margin-bottom:20px; }
.code-excerpt pre { margin:0; padding:0 0 12px; max-width:100%; overflow:auto; white-space:pre-wrap; overflow-wrap:anywhere; background:transparent; border:0; color:#244962; font:13px/1.85 ui-monospace,SFMono-Regular,Menlo,monospace; tab-size:2; }
.case-credits { max-width:850px; }
.case-credits h2 { font-size:36px; }
.case-sources { display:flex; flex-wrap:wrap; gap:15px 28px; margin-top:30px; font-size:14px; color:#46647c; }
.case-sources a:hover { text-decoration:underline; text-underline-offset:4px; }
.case-footer { display:flex; justify-content:space-between; align-items:center; gap:40px; padding:65px 0 85px; }
.case-footer>a:last-child { font-family:var(--serif); font-size:clamp(25px,3.2vw,39px); text-align:right; line-height:1.15; max-width:70%; }
.media-dialog { padding:0; border:0; background:#dbe9f3; color:#183149; max-width:min(1200px,94vw); width:max-content; max-height:94svh; }
.media-dialog::backdrop { background:#102d49bf; backdrop-filter:blur(10px); }
.dialog-bar { display:flex; align-items:center; justify-content:space-between; gap:25px; padding:10px 16px; font-size:13px; }
.dialog-bar button { border:0; background:none; padding:0 8px; cursor:pointer; font-size:30px; color:#25445f; }
.media-dialog img { width:auto; height:auto; max-width:92vw; max-height:77svh; object-fit:contain; margin:auto; }
.dialog-caption { padding:12px 18px; font-size:14px; max-width:800px; }
@media(max-width:900px) {
  .desktop-stage { gap:20px; grid-template-columns:.85fr 2.4fr .85fr; }
  .case-shell { width:calc(100% - 64px); }
  .overview-section,.case-section-top { gap:40px; }
  .final-stage { gap:30px; }
  .archive-gallery { columns:2; }
}
@media(max-width:600px) {
  .case-topbar { top:15px; }
  .case-hero { padding:100px 0 45px; }
  .case-heading h1 { font-size:clamp(51px,12.5vw,74px); letter-spacing:-1.6px; }
  .desktop-stage,.case-theme-photo .desktop-stage { grid-template-columns:1fr 1fr; gap:24px; width:86%; margin:45px auto 20px; }
  .desktop-stage .project-media:nth-child(2) { grid-column:1/-1; grid-row:1; transform:none; }
  .desktop-stage .project-media:nth-child(1) { transform:translateY(12px); }
  .desktop-stage .project-media:nth-child(3) { transform:translateY(-4px); }
  .case-theme-spatial .desktop-stage .project-media:nth-child(3) { transform:translateY(12px); }
  .desktop-stage .project-media:not(.teaser-window) img { max-height:165px; }
  .desktop-stage img,.desktop-stage video,.case-theme-photo .desktop-stage img { max-height:350px; }
  .desktop-stage.stage-2 .project-media:nth-child(2) { grid-column:auto; grid-row:auto; }
  .desktop-stage.stage-1 { display:block; }
  .desktop-stage.stage-1 .project-media { transform:none; }
  .media-titlebar { font-size:10px; min-height:26px; padding:5px 8px; }
  .media-dots { display:none; }
  .case-shell { width:86%; }
  .case-section { padding:42px 0; }
  .case-section h2 { font-size:40px; }
  .case-prose,.overview-section .case-prose { font-size:16px; }
  .overview-section,.case-section-top,.final-stage,.process-steps { grid-template-columns:1fr; gap:25px; }
  .case-section-top h2 { margin:0; }
  .process-gallery,.process-gallery:has(> :nth-child(2):last-child) { grid-template-columns:1fr; gap:30px; }
  .process-gallery .project-media:nth-child(3n+2) { margin-top:0; }
  .archive-gallery { columns:1; }
  .archive-gallery img { max-height:520px; }
  .case-footer { padding:35px 0 50px; }
  .code-excerpt pre { font-size:11px; }
}
@media(prefers-reduced-motion:reduce) { html { scroll-behavior:auto; } .case-topbar a { transition:none; } }
