* { box-sizing: border-box; }
:root {
  --inset: clamp(16px,3vw,54px);
  --text: #292431;
  color: var(--text);
  font-family: Arial, sans-serif;
  background: #efedf1;
}
body { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible, a:focus-visible { outline: 2px solid #67539b; outline-offset: 4px; }
header {
  height: 76px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--inset); background: #f7f6f5; border-bottom: 1px solid #d2cfd6;
}
header img { width: 164px; height: auto; }
.gallery {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 550px; height: calc(100svh - 76px);
  background: radial-gradient(ellipse at 49% 8%,#fffeff 0%,#f3f0f7 35%,#ddd8e4 73%,#cbc6d3 100%);
}
.gallery-label { position: absolute; z-index: 2; left: var(--inset); top: 28px; display: flex; align-items: center; gap: 12px; }
.gallery-label span { width: 26px; height: 5px; background: #81729d; transform: skewX(-32deg); }
.gallery-label h1, .collection,.counter { margin: 0; font: 500 .77rem/1.3 ui-monospace, monospace; letter-spacing: .12em; text-transform: uppercase; }
.exhibition { position: absolute; inset: 0 0 64px; overflow: hidden; touch-action: pan-y; }
.floor {
  position:absolute; inset: 61% -10% 0;
  background: linear-gradient(to bottom,#d4cfdb00,#d3cedb 20%,#e2dde6 92%);
}
.orbit { position: absolute; inset: 0; isolation: isolate; }
.panel {
  position: absolute; left: 50%; top: 43%;
  width: min(31%, 520px, 56vh); aspect-ratio: 4 / 3;
  border: 0; padding: 0; background: #332e3e;
  border-radius: 5px; overflow: hidden;
  box-shadow: 0 2px 1px #fff9 inset, 1px 2px 0 #958b9c, 3px 4px 0 #655e70, 5px 14px 25px #30223c2b;
  will-change: transform; backface-visibility: hidden;
}
.panel img { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.stage {

  position: absolute; width: min(54%, 960px); height: clamp(96px,19%,200px);
  left: 50%; top: 75%; transform: translate(-50%, -50%);
  pointer-events: none;
}
.stage > div { position: absolute; }
.stage-shadow { left: -11%; right: -11%; top: 66%; height: 68%; border-radius: 50%; background: radial-gradient(ellipse,#44384f66 0%,#55455e38 42%,transparent 71%); filter: blur(7px); }
.stage-base { inset: 25% 2.5% 0; border-radius: 50% / 38%; background: linear-gradient(90deg,#322f39,#918d97 16%,#47424d 40%,#5b5662 74%,#27242f); box-shadow: 0 3px 3px #423b4e44; }
.stage-wall { inset: 5% 0 9%; border-radius: 50% / 36%;
  background: repeating-linear-gradient(90deg,#fff1 0px,transparent 1px 4px,#16121c18 5px),
    linear-gradient(90deg,#5b5563 0%,#aca7b3 8%,#89848e 22%,#625d69 50%,#908998 71%,#aca4b4 90%,#554e60 100%);
  box-shadow: inset 0 -2px 2px #37303f80;
}
.stage-top { left: 0; right: 0; top: 0; height: 65%; border-radius: 50%;
  background: radial-gradient(ellipse at 53% 72%,#eeebf2 0%,#e3dfe8 56%,#c8c1d0 88%);
  border: 1px solid #f6f2f9; box-shadow: 0 2px 0 #c7bfce,0 4px 2px #61586855;
}
.playback {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 2;
  min-height: 94px; padding: 18px var(--inset); display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border-top: 1px solid #bbb4c1; background: #efedf2e8;
}
.caption { display:flex; align-items:center; }
.caption { gap: clamp(14px, 2vw, 32px); }
.counter { font-size: .875rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.collection { font-size:.72rem; color:#5a5264; letter-spacing:.09em; }
.current-title { margin: 3px 0 0; font-size: clamp(1.15rem,2vw,1.8rem); letter-spacing:-.04em; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
@media (max-width: 720px) {
  header { height: 62px; } header img { width: 130px; }
  .gallery { height: calc(100svh - 62px); min-height: 450px; }
  .gallery-label { top: 20px; } .exhibition { bottom:65px; }
  .panel { width:min(61%,38vh); top:45%; }
  .stage { width: 83%; top: 73%; height: 16%; }
  .playback { min-height: 84px; }
  .caption { gap: 8px; } .counter { font-size:.72rem; }
}

.exhibition { container-type: size; }
.orbit { transition: opacity 320ms ease; }
.gallery.inspecting:not(.returning) .orbit { opacity: 0; }
.panel.on-stage { visibility: hidden; }
.stage-view {
  position: absolute; z-index: 1; left: 50%; bottom: 28%;
  width: min(90%, 83cqh, 960px); aspect-ratio: 4 / 3;
  transform: translateX(-50%); transform-origin: center; margin: 0;
  background: #322e38; border-radius: 5px;
  box-shadow: 0 1px 0 #aaa4b1, 0 3px 0 #716a7a, 0 13px 28px #31283c36;
}
.stage-view img { display: block; width: 100%; height: 100%; object-fit: contain; border-radius: inherit; }
@font-face {
  font-family: "Zalando Sans Expanded";
  src: url("fonts/zalando-sans-expanded.woff2") format("woff2");
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
}
.gallery::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(ellipse at 71% 54%, #574d76 0%, #312a45 26%, #201c2c 50%, transparent 76%),
    linear-gradient(116deg, #141219, #1c1925);
  transition: opacity 440ms ease;
}
.gallery:is(.inspecting, .viewing-member):not(.returning)::before { opacity: 1; }
:root:has(.gallery.inspecting:not(.returning)) { background: #19161f; scrollbar-color: #6a6077 #19161f; }
.floor, .gallery-label { transition: opacity 280ms; }
.gallery:is(.inspecting, .viewing-member):not(.returning) :is(.floor, .gallery-label) { opacity: 0; }
.gallery.inspecting .stage-view {
  width: min(45cqw, 80cqh, 848px);
  left: 70%;
  bottom: 28%;
  border-radius: 3px;
  box-shadow: 0 1px 0 #e5dfed88, 0 3px 0 #51485d, 0 12px 28px #17121f42;
}
.stage-metal {
  transform-origin: 50% 75%;
  transition: translate 560ms cubic-bezier(.2,.75,.22,1), scale 560ms ease, filter 420ms;
}
.gallery.inspecting:not(.returning) .stage-metal {
  translate: 20% 0;
  scale: .91;
  filter: brightness(.76) contrast(1.06);
}
.gallery.inspecting .stage:not(.stage-rendered) { left: 70%; }
.case-study {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: clamp(26px, 6cqw, 152px);
  transform: translateY(-50%);
  width: min(35cqw, 650px);
  max-height: 82cqh;
  overflow-y: auto;
  padding: 4px 10px 8px 0;
  color: #f8f5fc;
  scrollbar-width: thin;
  scrollbar-color: #746987 transparent;
  transition: opacity 220ms ease, translate 360ms ease;
}
.case-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 clamp(12px, 2.5cqh, 24px);
  font: 600 .8125rem/1.2 ui-monospace, monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #cebfeb;
}
.case-kicker::before {
  content: "";
  width: 22px;
  height: 4px;
  transform: skewX(-30deg);
  background: #b79cde;
}
.case-kicker[hidden] { display: none; }
#case-title {
  margin: 0;
  font: 690 clamp(2.5rem, 4.6cqw, 5.8rem)/1 "Zalando Sans Expanded", Arial, sans-serif;
  letter-spacing: -.055em;
  overflow-wrap: anywhere;
  text-wrap: balance;
}
.case-study dl { margin: 0; }
.case-study dl > div:not([hidden]) { margin-top: clamp(18px, 3cqh, 32px); }
.case-study dl > div:first-child:not([hidden]) {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  align-items: baseline;
}
.case-study dl > div:first-child:not([hidden]) + div:not([hidden]),
.case-study dl > div:first-child:not([hidden]) + [hidden] + div:not([hidden]) {
  padding-top: clamp(16px, 2.7cqh, 30px);
  border-top: 1px solid #ffffff2b;
}
.case-study dt {
  margin-bottom: .4em;
  font: 600 .9375rem/1.3 Arial, sans-serif;
  color: #d3c6e9;
}
.case-study dd {
  margin: 0;
  font-size: clamp(1rem, 1.1cqw, 1.2rem);
  line-height: 1.48;
  overflow-wrap: anywhere;
  white-space: pre-line;
  color: #e8e4ed;
}
.case-study dl > div:first-child dt { margin: 0; }
.case-study [data-case-field="client"] { min-width: 0; max-width: 100%; font-size: 1rem; }
.case-study:focus-visible { outline: 2px solid #c8acef; outline-offset: -2px; }
.gallery.returning .case-study { opacity: 0; translate: 0 8px; pointer-events: none; }
@starting-style {
  .case-study:not([hidden]) { opacity: 0; translate: 0 12px; }
}
.stage-viewport header, .playback { transition: background-color 320ms, border-color 320ms; }
.stage-viewport:has(:is(.inspecting, .viewing-member):not(.returning)) header {
  background-color: #17141e;
  border-color: #342e3e;
}
.stage-viewport:has(:is(.inspecting, .viewing-member):not(.returning)) header img { filter: brightness(0) invert(.96); }
.stage-viewport:has(:is(.inspecting, .viewing-member):not(.returning)) #manage-projects {
  background: transparent;
  color: #eae5f0;
  border-color: #655a73;
}
.gallery:is(.inspecting, .viewing-member):not(.returning) .playback {
  min-height: 64px;
  padding-block: 10px;
  background-color: #1b1722;
  border-color: #44394c;
  color: #dbd3e4;
}
.gallery.inspecting:not(.returning) .caption > div { display: none; }
.gallery.inspecting #return-to-orbit {
  background: #e9e2f1;
  color: #211b2a;
  border-color: transparent;
  font-weight: 600;
}
.gallery.inspecting #return-to-orbit:hover { background: white; }
@media (max-width: 820px) and (orientation: portrait) {
  .gallery::before { background: radial-gradient(ellipse at 52% 24%, #514660, #282233 37%, #1a1721 65%); }
  .gallery.inspecting .stage-view {
    width: min(76cqw, 42cqh);
    left: 50%;
    bottom: 60%;
  }
  .stage-metal { transform-origin: 50% 73%; }
  .gallery.inspecting:not(.returning) .stage-metal { translate: 0 -31%; scale: .94; }
  .gallery.inspecting .stage:not(.stage-rendered) { left: 50%; top: 42%; }
  .case-study {
    top: 50%;
    left: 6cqw;
    width: 88cqw;
    max-height: 48cqh;
    transform: none;
    padding: 2px 4px 6px;
  }
  .case-kicker { margin-bottom: 9px; font-size: .75rem; }
  #case-title { font-size: clamp(2.1rem, 8cqw, 3.4rem); }
  .case-study dl > div:not([hidden]) { margin-top: 12px; }
  .case-study dl > div:first-child:not([hidden]) + div:not([hidden]),
  .case-study dl > div:first-child:not([hidden]) + [hidden] + div:not([hidden]) { padding-top: 12px; }
  .case-study dt { margin-bottom: 3px; }
  .case-study dd { line-height: 1.4; }
}
@media (max-height: 480px) and (orientation: landscape) {
  .gallery.inspecting:not(.returning) .stage-metal { scale: .64; }
  .case-study { max-height: 90cqh; }
  #case-title { font-size: 2rem; }
  .case-study dl > div:not([hidden]) { margin-top: 10px; }
  .case-kicker { margin-bottom: 8px; }
}
@media (max-width: 720px) and (orientation: landscape) {
  .gallery.inspecting:not(.returning) .stage-metal { scale: .5; }
}
@media (prefers-reduced-motion: reduce) {
  .gallery::before, .gallery .case-study, .gallery .stage-metal, .floor, .gallery-label,
  .stage-viewport header, .playback { transition: none; }
}
#return-to-orbit {
  border: 1px solid #aaa1b2; border-radius: 24px;
  background: #f7f5f8; padding: 10px 16px; font-size: .875rem;
}
.stage-view[hidden], #return-to-orbit[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .orbit { transition: none; } }

/* Reveal the original thumbnail underneath the stage image as it lands. */
.gallery.returning .panel.on-stage {
  visibility: visible;
  animation: thumbnail-landing var(--return-time) linear both;
}
@keyframes thumbnail-landing {
  0%, 82% { opacity: 0; }
  100% { opacity: 1; }
}
/* The extra scroll distance keeps the whole gallery in view during the turn. */
:root { scrollbar-gutter: stable; }
@media (prefers-reduced-motion: no-preference) {
  :root.stage-navigation { scroll-behavior: smooth; }
}
:root:has(.gallery.inspecting):has(dialog[open]) {
  overflow-y: hidden;
  overscroll-behavior-y: none;
}
.stage-scroll.enabled .stage-viewport {
  position: sticky;
  top: 0;
}
.stage-scroll.enabled::after {
  content: "";
  display: block;
  height: calc(var(--stage-legs, 1) * clamp(1280px, 280svh, 3300px));
}
.stage-scroll.enabled .gallery { min-height: 0; height: calc(100dvh - 76px); }
@media (max-width: 720px) {
  .stage-scroll.enabled .gallery { height: calc(100dvh - 62px); }
}
.scroll-cue {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #60576b;
  font-size: .875rem;
}
.scroll-cue i {
  width: 42px;
  height: 2px;
  background: #d4cddc;
}
.scroll-cue i::before {
  content: "";
  display: block;
  height: 100%;
  background: #79668c;
  transform: scaleX(var(--turn-progress, 0));
  transform-origin: left;
}
.scroll-cue[hidden], .inspecting:not(.returning) .scroll-cue { display: none; }
@media (max-width: 540px) {
  .scroll-cue { max-width: 7rem; text-align: right; font-size: .8rem; }
  .scroll-cue i { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .stage-scroll.enabled::after { height: calc(var(--stage-legs, 1) * 42svh); }
}
@media print {
  .stage-scroll.enabled::after, .scroll-cue { display: none; }
  .stage-scroll.enabled .stage-viewport { position: relative; }
}

.studio-about {
  position: absolute;
  z-index: 1;
  left: var(--inset);
  top: 46%;
  width: min(42%, 640px);
  transform: translateY(-50%);
}
[data-stage-stop] {
  opacity: var(--scene-opacity, 0);
  visibility: hidden;
}
.stage-scroll.enabled [data-stage-stop][aria-hidden="false"] { visibility: visible; }
.gallery.inspecting .studio-about { display: none; }
.studio-about h2 { margin: 0; }
.studio-about h2 > span:first-child {
  display: block;
  margin-bottom: clamp(12px, 2vh, 24px);
  font: 500 .875rem/1.25 ui-monospace, monospace;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: #62576f;
}
.about-wordmark { display: block; width: 100%; overflow: hidden; }
.about-wordmark img {
  display: block;
  width: 129%;
  height: auto;
  max-width: none;
  margin-left: -29%;
  mix-blend-mode: multiply;
}
.studio-about p {
  max-width: 36ch;
  margin: clamp(14px, 2.8vh, 28px) 0 0;
  font-size: clamp(1rem, 1.65vw, 1.65rem);
  line-height: 1.48;
  letter-spacing: -.016em;
}
.stage-scroll.enabled .gallery:not(.inspecting) :is(.orbit, .gallery-label, .caption) {
  opacity: var(--work-opacity, 1);
}
.stage-scroll.enabled .gallery:not(.inspecting) .orbit { transition: none; }
.stage-scroll.about-shown .gallery:not(.inspecting) :is(.orbit, .gallery-label, .caption) { visibility: hidden; }
@media (max-width: 720px) and (orientation: portrait) {
  .studio-about { top: 7%; width: min(72%, 360px); transform: none; }
  .studio-about p { max-width: 31ch; }
}
@media (max-height: 540px) {
  .studio-about h2 > span:first-child { margin-bottom: 7px; }
  .about-wordmark { max-width: 280px; }
  .studio-about p { margin-top: 9px; font-size: 1rem; line-height: 1.35; }
}

.stage-scroll.enabled .playback { opacity: var(--footer-opacity, 1); }
/* Extend only the drawing surface. Keep the carousel and inspection geometry stable. */
.stage-scroll.enabled .exhibition { overflow: visible; }
.stage-scroll.enabled .stage.stage-rendered { height: calc(100% + 64px); }
@media (max-width: 720px) {
  .stage-scroll.enabled .stage.stage-rendered { height: calc(100% + 65px); }
}
.gallery.viewing-member .stage-metal { filter: brightness(.43) saturate(.78); }
