/* The studio's project index. Artwork opens into the existing live demonstration. */
#works .gallery-picker,
#works .gallery-visit { min-width: 0; }
#works [hidden].gallery-picker, #works [hidden].gallery-visit,
#works #theater[hidden] { display: none !important; }
#works .gallery-heading {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(270px, .7fr);
  align-items: end; gap: clamp(24px,5vw,96px); margin: 0 0 clamp(52px,4.3vw,64px);
}
#works .gallery-heading #work-title { grid-area:auto; font-size: clamp(45px,5.3vw,88px); }
#works .gallery-heading p {
  max-width: 47ch; margin: 0 0 .12em; color: #c5c5c5; font: 400 clamp(15px,1.18vw,18px)/1.55 var(--sans);
}
#works .gallery-wall {
  display: grid; grid-template-columns: minmax(0,.89fr) repeat(2,minmax(0,1fr));
  grid-template-rows: repeat(4,minmax(83px,auto)); gap: clamp(9px,1vw,17px);
  padding: 0; margin: 0; list-style: none;
}
.gallery-wall > li { display: flex; min-width: 0; margin: 0; padding: 0; }
.gallery-wall > .gallery-feature { position: relative; grid-row: span 4; }
#works .gallery-option {
  position: relative; isolation: isolate; display: grid; width: 100%; min-width: 0;
  grid-template-columns: clamp(62px,6.6vw,108px) minmax(0,1fr) auto; align-items: center;
  gap: clamp(12px,1.18vw,22px); padding: clamp(7px,.72vw,12px) clamp(13px,1.2vw,24px) clamp(7px,.72vw,12px) clamp(7px,.72vw,12px);
  border: 1px solid #404040; border-radius: 999px; text-decoration: none; color: #f2f0ed;
  background: linear-gradient(122deg,#171717 0%,#0d0d0d 49%,#090909 100%);
  box-shadow: var(--studio-rim),var(--studio-panel-shadow);
  transition: transform .32s cubic-bezier(.2,.7,.1,1),background-color .3s,border-color .3s,box-shadow .3s;
}
#works .gallery-option:focus-visible, #works .gallery-return:focus-visible,
#works .ar-studies button:focus-visible { outline: 2px solid #eee; outline-offset: 3px; }
.gallery-thumb {
  position: relative; display: block; aspect-ratio: 1; overflow: hidden; border-radius: 50%;
  box-shadow: 0 0 0 1px #ffffff38,0 3px 9px #0009; background: #121212;
}
.gallery-thumb img, .gallery-feature-art > img, .ar-study-image {
  width: 100%; height: 100%; display: block; object-fit: cover; object-position: var(--subject,50% 50%);
}
.gallery-thumb img { transform: scale(1.025); transition: transform .52s cubic-bezier(.18,.62,.19,1),filter .4s; }
.gallery-thumb::after { content: ""; position:absolute; inset:0; border-radius:inherit; box-shadow:inset 0 0 5px 1px #0003; }
.gallery-caption { display: grid; align-content:center; gap: 6px; min-width: 0; }
.gallery-caption small,.gallery-feature-copy small,.gallery-caption-bar {
  font: 600 clamp(10px,.76vw,12px)/1.24 var(--sans); color:#b9b9b9; letter-spacing:.075em;
}
.gallery-caption strong {
  font: 400 clamp(19px,1.53vw,28px)/1.04 var(--serif,Georgia,serif); color:inherit; letter-spacing:-.037em;
  text-wrap:balance;
}
@media (hover:hover) {
  #works .gallery-option:hover {
    transform:translateY(-3px); border-color:#888; box-shadow:var(--studio-rim),5px 12px 20px -10px #000c;
  }
  .gallery-option:hover .gallery-thumb img { transform:scale(1.1); filter:brightness(1.1); }
}
#works .gallery-option:active { transform: scale(.987); }
#works .gallery-feature .gallery-option {
  min-height: 100%; display:flex; flex-direction:column; align-items:stretch; justify-content:flex-end; gap:0;
  padding:0; overflow:hidden; border-radius: clamp(24px,3vw,52px);
  background:linear-gradient(150deg,#24201a,#15120f 75%); border-color:#514b43;
}
.gallery-feature-art {
  position:absolute; inset:0; display:block; overflow:hidden;
  background:#090806;
}
.gallery-feature-art > img { position:absolute; inset:0; object-position:50% 32%; }
.gallery-feature-art::after {
  content:""; position:absolute; inset:0; pointer-events:none;
  background:linear-gradient(0deg,#110e094f,transparent 44%);
}
.gallery-feature-copy {
  position:relative; isolation:isolate; display:grid; gap:8px; padding:16px clamp(16px,1.8vw,34px) clamp(16px,1.7vw,28px);
  color:#fff9ef; text-shadow:0 1px 4px #100d09;
}
.gallery-feature-copy::before {
  content:""; position:absolute; z-index:-1; pointer-events:none; inset:-34% 0 0;
  background:linear-gradient(0deg,rgb(15 12 9 / .83),rgb(16 13 10 / .65) 47%,rgb(18 14 10 / .22) 79%,transparent),
    radial-gradient(ellipse at 12% 74%,rgb(11 9 7 / .58),transparent 72%);
}
.gallery-feature-copy small { display:flex; align-items:center; gap:8px; color:#e5d3bb; }
.gallery-feature-copy small img { width:23px; height:24px; object-fit:contain; }
.gallery-feature-copy strong { display:block;max-width:9ch;font:400 clamp(33px,3.1vw,53px)/.97 var(--serif,Georgia,serif);letter-spacing:-.055em; }
.gallery-feature-action { display:flex; align-items:center; gap:10px; margin-top:4px; color:#d9d3cb; font:500 13px/1.4 var(--sans); }
.gallery-feature-action .gallery-arrow { color:inherit; }
.gallery-guide {
  position: absolute; z-index: 2; left: 8px; bottom: calc(100% - 15px);
  display: flex; align-items: flex-start; width: max-content; pointer-events: none;
  opacity: 0; transition: opacity .34s ease-in;
}
.gallery-guide.is-visible { opacity: 1; transition: opacity .24s ease-out; }
.gallery-guide-stroke {
  position: relative; z-index: 1; display: block; width: 66px; height: 50px;
  margin: 5px -7px 0 0; overflow: visible; filter: drop-shadow(0 2px 2px #000a);
}
.gallery-guide-note {
  padding: 4px 13px 7px 10px; border-radius: 3px 10px 3px 7px;
  color: #f4e6ca; background: linear-gradient(100deg,#28241e,#181713);
  box-shadow: inset 0 1px #ddc59952, inset 0 -1px #a594743d, 0 5px 14px #0006;
  font: italic 400 clamp(15px,1.35vw,19px)/1.18 var(--serif,Georgia,serif);
  transform: translateY(3px); transition: transform .34s ease;
}
.gallery-guide.is-visible .gallery-guide-note { transform: translateY(0); }
.gallery-guide .touch-hint { display: none; }
.gallery-guide.is-visible .gallery-guide-flourish {
  transform-origin: 72px 8px;
  animation: gallery-ink-point 1.7s cubic-bezier(.24,.63,.23,1) .48s 2;
}
@media (prefers-reduced-motion: no-preference) {
  html:not([data-studio-motion=off]) .gallery-guide.is-visible .gallery-guide-trace {
    stroke-dasharray: 1; animation: gallery-ink-trace .52s ease-out both;
  }
  html:not([data-studio-motion=off]) .gallery-guide.is-visible .gallery-guide-tip {
    animation: gallery-tip-in .16s ease-out .36s backwards;
  }
}
@keyframes gallery-ink-trace { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes gallery-tip-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes gallery-ink-point {
  0%,100% { transform: none; }
  30% { transform: translate(0,-2px) rotate(4deg); }
  57% { transform: translate(1px,2px) rotate(-3deg); }
}
.gallery-visit { scroll-margin-top:80px; }
.gallery-toolbar { display:flex;align-items:center;justify-content:space-between;gap:20px;margin:0 0 13px; }
.gallery-toolbar .gallery-return { flex:none; }
.gallery-toolbar .gallery-cue {
  margin:0; max-width:58ch; color:#bfbfbf; text-align:end;
  font:400 clamp(13px,1vw,16px)/1.45 var(--sans); text-wrap:pretty;
}
#vesper-study .atelier-credit {
  margin:0; color:inherit; font:600 12px/1.4 var(--sans); letter-spacing:.08em;
}
@media(max-width:660px) {
  .gallery-toolbar { flex-wrap:wrap; gap:6px 16px; }
  .gallery-toolbar .gallery-cue { flex:1 1 30ch; text-align:start; }
}
#works .gallery-return {
  display:inline-flex;align-items:center;gap:7px; min-height:44px;padding:0 16px 0 11px; border:1px solid #666;
  border-radius:40px;color:#eee; text-decoration:none; background:linear-gradient(#242424,#161616);font:600 14px/1.3 var(--sans);
}
.gallery-caption-bar { color:#bfbfbf; font-size:12px; letter-spacing:.04em; }
.gallery-visit.gallery-arriving { animation:gallery-arrive .48s cubic-bezier(.16,.7,.2,1) backwards; }
@keyframes gallery-arrive { from{opacity:.05; transform:translateY(11px) scale(.988)} to{opacity:1;transform:none} }
.gallery-opening-lens {
  position:fixed; z-index:12; pointer-events:none; box-sizing:border-box; overflow:hidden; background-size:cover;
  border:1px solid #ffffff48; box-shadow:inset 0 0 35px #0003; contain:strict;
}
#works #theater[data-project="aletheia"] { --wash:#aa9473; }
#theater[data-project="aletheia"] .exhibit-meta {display:none;}
#theater[data-project="aletheia"] .world { display:none; }
#works #theater[data-project="aletheia"] :is(#stage,.exhibit-deck,#project-window) {min-height:0;height:auto;background:transparent;}
#works #theater[data-project="aletheia"] #stage {padding:0;}
#works #theater[data-project="aletheia"] #project-footer { background:linear-gradient(180deg,#171614,#101010); }
#works #theater[data-project="aletheia"] #project-footer button { background:linear-gradient(135deg,#33312e,#211f1d);color:#eee8dc;border-color:#5b5650;}
.ar-gallery-story {
  --ar-text:#f5efe4; display:grid;grid-template-columns:1.6fr minmax(0,1fr);align-items:stretch;
  isolation:isolate; overflow:hidden; border-radius:clamp(18px,2.4vw,38px); color:var(--ar-text);
  background:linear-gradient(105deg,#000 52%,#13100d 77%,#211a14);
}
.ar-story-plate {
  position:relative; container-type:size; width:100%; min-width:0; aspect-ratio:1.6; margin:0;
  display:grid; place-items:center; overflow:hidden;
}
.ar-story-plate .ar-study-image {
  position:static; width:min(100cqw,160cqh); height:auto; max-height:100%; object-fit:contain;
  mask-image:linear-gradient(90deg,transparent,#000 2%,#000 97%,transparent),
    linear-gradient(0deg,transparent,#000 5%,#000 98%,transparent);
  mask-composite:intersect;
}
.ar-story-desk {display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center; gap:clamp(11px,1vw,18px);padding:clamp(22px,2.6vw,46px);}
.ar-story-desk > small { font:600 11px/1.3 var(--sans);letter-spacing:.14em;text-transform:uppercase;color:#d3bea1; }
.ar-story-desk h3 {margin:0; font:400 clamp(38px,4vw,65px)/.97 var(--serif,Georgia,serif);letter-spacing:-.047em;color:inherit;}
.ar-page-notes { display:grid;place-items:center; }
.ar-page-notes > p { grid-area:1/1;max-width:37ch;text-wrap:balance;margin:0;font:400 clamp(14px,1.1vw,18px)/1.55 var(--sans);color:#d3cfc7;}
.ar-studies {
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;
  width:min(100%,24rem);margin:3px auto 0;
}
.ar-studies button {
  display:grid;grid-template-rows:auto auto;align-content:start;min-width:0;
  overflow:hidden;padding:0 0 7px;row-gap:6px;text-align:center;
  color:#e7dfd2;background:linear-gradient(165deg,#342e27,#201c18);
  border:1px solid #625749;border-radius:9px;font:600 14px/1.2 var(--sans);
}
.ar-studies button img {
  width:100%;height:clamp(48px,8vh,88px);display:block;object-fit:cover;object-position:50% 42%;
  border-bottom:1px solid #88745266;
}
.ar-studies button[aria-pressed=true] {
  background:#e2d4bc;color:#251f18;border-color:#e7cd9c;box-shadow:inset 0 -2px #ae8859;
}
.ar-studies button:hover {border-color:#d8bc8e}
.gallery-arrow, .gallery-return-icon {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: clamp(33px, 2.7vw, 44px);
  height: 25px;
}
.gallery-return-icon {width:17px;}
.gallery-arrow::before,.gallery-return-icon::before {
  content:"";width:17px;height:17px;background:currentColor;
  mask:var(--direction,url("nav-chevron.svg")) center / contain no-repeat;
}
.gallery-return-icon {--direction:url("nav-index.svg")}
.gallery-feature-action .gallery-arrow,.entry-direction {--direction:url("nav-enter.svg")}
#plate-open[target="_blank"] .entry-direction {--direction:url("nav-external.svg")}
@media (prefers-reduced-motion:no-preference) {
  html:not([data-studio-motion=off]) .gallery-arrow::before {transition:translate .16s ease-out;}
  html:not([data-studio-motion=off]) :is(.gallery-option,#plate-open):is(:hover,:focus-visible) .gallery-arrow::before {translate:2px 0;}
}
@media (forced-colors:active) {
  .gallery-arrow::before,.gallery-return-icon::before {background:LinkText;forced-color-adjust:none;}
}
@media(max-width:1000px) {
  #works .gallery-wall { grid-template-columns:minmax(0,.82fr) repeat(2,minmax(0,1fr));gap:9px;grid-template-rows:repeat(4,minmax(76px,auto)); }
  #works .gallery-option { grid-template-columns:56px minmax(0,1fr);gap:12px;padding:7px 12px 7px 7px; }
  .gallery-caption strong { font-size:19px; }
  .gallery-option > .gallery-arrow {
    position: absolute;
    left: 37px;
    bottom: calc(50% - 30px);
    width: 29px;
    height: 16px;
    padding: 0 2px;
    box-sizing: content-box;
    background: #171613;
    border: 1px solid #665d4d;
    border-radius: 20px;
  }
}
@media (min-width:721px) {
  #works .gallery-wall { grid-template-columns:minmax(0,1.15fr) repeat(2,minmax(0,1fr)); }
  .gallery-feature-art > img { object-position:center top; }
}
@media (min-width:721px) and (max-width:900px) {
  .ar-gallery-story {grid-template-columns:1fr}
}
@media (min-width:521px) and (max-width:900px) {
  .ar-studies {width:min(100%,42rem);grid-template-columns:repeat(4,minmax(0,1fr))}
}
@media(max-width:720px) {
  #works .gallery-heading { grid-template-columns:1fr;gap:10px;margin-bottom:50px; }
  #works .gallery-heading #work-title { font-size:clamp(39px,8vw,54px); }
  #works .gallery-heading p { font-size:15px; }
  #works .gallery-wall { grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:auto; }
  .gallery-wall > .gallery-feature { grid-column:1 / -1;grid-row:auto; }
  #works .gallery-feature .gallery-option { min-height:170px; border-radius:23px; justify-content:center; }
  .gallery-feature-art > img { object-position:center 79%; }
  .gallery-feature-copy::before { inset:-20% -18% -20% 0; background:linear-gradient(90deg,#100c09ed 5%,#100c09be 63%,transparent); }
  .gallery-feature-copy { align-self:flex-start; align-content:center; gap:6px; padding:14px 20px 14px 17px; }
  .gallery-feature-copy strong {font-size:clamp(30px,5.4vw,36px);max-width:9ch;}
  .gallery-feature-action {margin:0;gap:5px;font-size:12px;}
  #works .gallery-option { min-height:72px; }
  .ar-gallery-story {grid-template-columns:1fr;}
  .ar-gallery-story {background:linear-gradient(180deg,#000 38%,#14110e 85%,#1c1712);}
  .ar-story-desk {padding:20px;gap:10px;}
  .ar-studies button {min-height:44px;}
}
@media(max-width:520px) {
  .ar-studies button img {height:clamp(47px,14vw,65px)}
  .gallery-option > .gallery-arrow {
    inset: 9px 10px auto auto;
    z-index: 1;
    width: 27px;
    background: #141310ed;
  }
  #works .gallery-wall { gap:9px 8px; }
  #works .gallery-option { 
    display:flex;flex-direction:column;align-items:flex-start; justify-content:flex-end; gap:0; padding:0; overflow:hidden; 
    min-height:118px; border-radius:24px; background:#151515; 
  }
  .gallery-thumb {position:absolute;inset:0;width:100%;height:100%;border-radius:inherit;box-shadow:none;}
  .gallery-thumb img {object-position:var(--subject,50% 45%);}
  .gallery-thumb::after {box-shadow:none;background:linear-gradient(0deg,#0b0b0bf9,#101010d4 30%,#15151579 56%,#15151512 95%);}
  .gallery-caption {position:relative;z-index:1;gap:3px;padding:13px 12px; }
  .gallery-caption strong {font-size:clamp(17px,4.4vw,22px);color:#fff;text-wrap:initial;}
  .gallery-caption small {font-size:10px;letter-spacing:.035em;color:#d7d7d7;}
  #works .gallery-feature .gallery-option { min-height:clamp(215px,58vw,290px); justify-content:flex-end; }
  .gallery-feature-art > img { object-position:center 78%; }
  .gallery-feature-copy::before { inset:-48% -35% -5% 0; background:radial-gradient(ellipse at 18% 92%,#0e0b08f5 6%,#0e0b08c9 41%,#0e0b0870 64%,transparent 84%); }
  .gallery-feature-copy { padding:10px 16px 13px; gap:4px; }
  .gallery-feature-copy strong {display:block;max-width:none;font-size:30px;}
  .gallery-caption-bar {font-size:11px;}
}
@media(pointer:coarse) { .gallery-guide .mouse-hint { display:none; } .gallery-guide .touch-hint { display:inline; } }
@media(prefers-reduced-motion:reduce) {
  .gallery-guide, .gallery-guide.is-visible, .gallery-guide .gallery-guide-note { transition: none; transform: none; }
  .gallery-guide.is-visible .gallery-guide-flourish { animation: none; }
  #works .gallery-option,.gallery-thumb img,.gallery-arrow::before,.gallery-arrow::after,.gallery-feature-art > img {transition:none;}
  .gallery-visit.gallery-arriving {animation:none;}
}
html[data-studio-motion=off] :is(.gallery-visit.gallery-arriving,.gallery-guide.is-visible .gallery-guide-flourish) {animation:none;}
html[data-studio-motion=off] :is(.gallery-guide,.gallery-guide-note) {transform:none;transition:none;}
html[data-studio-motion=off] :is(.gallery-option,.gallery-thumb img,.gallery-arrow::before,.gallery-arrow::after) {transition:none;}

#gallery-switch {display:none}
@media (max-width:900px) {
  #works #gallery-visit .gallery-toolbar {
    display:grid; grid-template-columns:auto minmax(0,1fr); align-items:stretch; gap:10px;
    padding:12px; margin-bottom:12px; border:1px solid #423e35; border-radius:12px;
    background:linear-gradient(135deg,#211f1a,#121312 78%);
  }
  #works .gallery-toolbar .gallery-return,
  #works .gallery-toolbar #gallery-switch {
    display:flex; align-items:center; min-height:44px; min-width:0; width:100%; box-sizing:border-box;
    border:1px solid #686055; border-radius:6px; background-color:#22221e;
    padding:6px 9px; color:#f2ebde; font:600 14px/1.25 var(--sans,sans-serif);
  }
  #works .gallery-toolbar #gallery-switch {display:block;color-scheme:dark}
  #works .gallery-toolbar .gallery-cue {grid-column:1/-1; margin:0; font-size:14px; line-height:1.45; text-align:start}
  #works .gallery-toolbar #scene-entry {display:block; grid-column:1/-1; position:static; margin:0; padding:0; height:auto; min-width:0; background:none}
  #works .gallery-toolbar #scene-entry::before {content:none}
  #works .gallery-toolbar #plate-open {
    display:grid; grid-template-columns:32px minmax(0,1fr) 20px; align-items:center; gap:10px;
    width:100%; height:auto; min-height:48px; padding:7px 12px; box-sizing:border-box;
    color:#241e16; background:linear-gradient(110deg,#eadbc1,#cbb693); border:1px solid #dfceb0; border-radius:6px;
    text-decoration:none;
  }
  #works .gallery-toolbar .entry-mark {width:32px;height:32px;object-fit:contain}
  #works .gallery-toolbar .entry-copy {display:grid;text-align:start;min-width:0;gap:2px}
  #works .gallery-toolbar #plate-open .entry-copy small {color:#493b2c;opacity:1;font:700 10px/1.15 var(--sans,sans-serif);letter-spacing:.08em;text-transform:uppercase}
  #works .gallery-toolbar .entry-action {color:inherit;font:500 18px/1.15 var(--serif,Georgia,serif)}
  #works .gallery-toolbar .entry-direction {position:static; color:inherit; width:20px}
  #works .gallery-toolbar :is(a,select):focus-visible {outline:2px solid #f3d39c;outline-offset:2px}
}
@media(max-width:520px) {
  #works .gallery-feature-copy {max-width:100%; min-width:0; box-sizing:border-box}
  #works .gallery-feature-copy::before {right:0}
  #works .gallery-feature-copy strong {font-size:clamp(24px,7.6vw,32px);text-wrap:balance}
  #demo-room[data-project]>header #leave-demo:focus-visible {outline:2px solid currentColor;outline-offset:-3px;border-radius:6px}
}
