:root {
  color-scheme: light;
  --ink: #25282b;
  --subtle: #5b6165;
  --accent: #7f1416;
  --serif: "Iowan Old Style", Baskerville, "Times New Roman", serif;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; }
html { background: #f6f5f2; }
body { overflow: hidden; color: var(--ink); font-family: var(--sans); }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.skip-link { position: absolute; z-index: 40; top: -5rem; left: 1rem; background: #fff; padding: .75rem 1rem; color: var(--ink); }
.skip-link:focus { top: 1rem; }

.site-header {
  position: absolute; z-index: 10; inset: 0 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  min-height: 6.1rem; padding: 1.25rem clamp(1.5rem, 3.8vw, 5rem);
  background: linear-gradient(180deg,rgba(248,248,246,.9),rgba(248,248,246,.55) 68%,transparent);
}
.brand { display: block; flex: 0 0 auto; width: 8rem; height: 3.3rem; }
.brand svg { display: block; width: 100%; height: 100%; }
.header-center { position: absolute; left: 50%; transform: translateX(-50%); font-size: .67rem; letter-spacing: .27em; color: #5c6164; }
.agency { display: block; flex: 0 0 auto; width: 14rem; height: 3.2rem; text-decoration: none; transition: opacity .25s ease; }
.agency:hover { opacity: .75; }
.agency svg { display: block; width: 100%; height: 100%; }

.gallery { position: relative; width: 100%; height: 100svh; min-height: 610px; }
.scene { position: relative; width: 100%; height: 100%; overflow: hidden; isolation: isolate; background: #eeece9; --light-x: 50%; --light-y: 43%; --depth-x: 0px; --depth-y: 0px; }
.room-bg, .wall-vignette, .ambient-light { position: absolute; inset: 0; pointer-events: none; }
.room-bg {
  background-position: center; background-size: cover; opacity: 0;
  transform: scale(1.055) translate3d(var(--depth-x),var(--depth-y),0);
  transition: opacity .9s ease, transform 1.7s cubic-bezier(.18,.7,.25,1);
  will-change: transform, opacity;
}
.room-bg--active { opacity: 1; transform: scale(1.025) translate3d(var(--depth-x),var(--depth-y),0); }
.wall-vignette { background: linear-gradient(180deg,rgba(255,255,255,.05),transparent 45%,rgba(246,244,239,.04) 62%,rgba(255,255,255,.54)); }
.ambient-light {
  z-index: 2; opacity: 0;
  background: radial-gradient(circle min(31vw,450px) at var(--light-x) var(--light-y),rgba(255,250,228,.72),rgba(255,255,255,.26) 38%,transparent 78%);
  mix-blend-mode: screen; transition: opacity .4s ease;
}
.scene.pointer-awake .ambient-light { opacity: .85; }
.wall-copy {
  position: absolute; z-index: 3; top: 16.8%; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: .8rem; white-space: nowrap;
  font-size: .6rem; letter-spacing: .22em; color: #62696b;
}
.wall-copy-rule { display: block; width: 1.8rem; height: 1px; background: #a7aaab; }

.artworks { position: absolute; z-index: 4; inset: 0; transition: opacity .48s ease, transform .8s cubic-bezier(.19,.9,.3,1); }
.artworks.is-changing { opacity: 0; transform: scale(1.085); }
.work {
  position: absolute; top: 23%; left: var(--x); transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: flex-start;
  width: min(18.3vw,310px); min-width: 150px; padding: 0; border: 0; background: transparent;
  color: var(--ink); text-align: left; cursor: zoom-in;
}
.work--left { --x: 26%; }.work--center { --x: 50%; }.work--right { --x: 74%; }
.artworks[data-count="2"] .work--left { --x: 39%; }
.artworks[data-count="2"] .work--right { --x: 61%; }
.work::before {
  content: ""; position: absolute; z-index: -1; inset: -14% -22% -10%;
  background: radial-gradient(ellipse,rgba(255,246,215,.72),rgba(255,252,239,.25) 46%,transparent 75%);
  filter: blur(8px); opacity: 0; transform: scale(.8); transition: opacity .45s, transform .5s;
  pointer-events: none;
}
.work:hover::before, .work:focus-visible::before { opacity: 1; transform: scale(1.08); }
.frame {
  display: block; width: 100%; padding: clamp(5px,.55vw,8px);
  background: linear-gradient(135deg,#1e201f,#4d453c 45%,#1e2020 100%);
  box-shadow: 0 0 0 1px rgba(21,22,20,.4),0 8px 14px rgba(23,22,19,.18),0 19px 29px -13px rgba(23,22,19,.32);
  transition: box-shadow .4s, transform .45s, filter .4s;
}
.work:hover .frame, .work:focus-visible .frame {
  transform: translateY(-5px);
  filter: brightness(1.12);
  box-shadow: 0 0 0 1px rgba(20,20,19,.42),0 13px 21px rgba(23,22,19,.18),0 28px 42px -15px rgba(23,22,19,.4);
}
.mat {
  display: block; padding: clamp(13px,1.55vw,25px);
  background: #f3f1ec;
  box-shadow: inset 0 0 0 1px #e0ddd6, inset 2px 2px 6px rgba(255,255,255,.8);
}
.art-window {
  display: block; width: 100%; aspect-ratio: 4 / 5; overflow: hidden;
  background: #eeeae4; box-shadow: 0 0 0 1px #d6d1c7, inset 0 2px 6px rgba(45,42,37,.1);
}
.art-window img { display: block; width: 100%; height: 100%; object-fit: contain; }
.work-caption {
  display: flex; align-items: baseline; gap: .65rem; max-width: 100%;
  margin-top: .82rem; padding: .34rem .52rem .37rem;
  background: rgba(248,248,245,.92); box-shadow: 0 1px 4px rgba(22,22,21,.06);
  color: #35393a; font-size: .72rem; line-height: 1.1; white-space: nowrap;
}
.work-caption b { color: var(--accent); font-size: .62rem; font-weight: 600; letter-spacing: .1em; }
.work-caption span { overflow: hidden; text-overflow: ellipsis; }
.room-note {
  position: absolute; z-index: 6; bottom: clamp(7.5rem,13vh,10rem);
  left: clamp(1.5rem,3.8vw,5rem); display: flex; gap: 1rem; align-items: flex-start;
  pointer-events: none;
}
.room-note-index { padding-top: .2rem; color: var(--accent); font: 1rem var(--serif); }
.room-note-small { color: #5e6365; font-size: .62rem; letter-spacing: .16em; }
.room-note h1 { margin: .24rem 0 0; font: 400 clamp(2rem,3.55vw,4rem)/.96 var(--serif); letter-spacing: -.057em; }
.gallery-ui {
  position: absolute; z-index: 7; inset: auto 0 0;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 1rem;
  padding: 1.5rem clamp(1.5rem,3.8vw,5rem) clamp(1.25rem,3.5vh,2.6rem);
}
.wayfinding { display: flex; align-items: center; gap: .85rem; margin: 0 0 .75rem; color: #4c5355; font-size: .71rem; white-space: nowrap; }
.wayfinding-line { width: 1.4rem; height: 1px; background: var(--accent); }
.room-nav { display: flex; align-items: center; gap: .5rem; margin-bottom: .7rem; }
.room-dot { display: grid; place-items: center; width: 1.8rem; height: 1.2rem; padding: 0; border: 0; background: none; cursor: pointer; }
.room-dot::after { content: ""; width: 3px; height: 3px; border-radius: 50%; background: #8b9091; transition: width .3s, height .3s, border-radius .3s, background .3s; }
.room-dot[aria-current="true"]::after { width: 1.4rem; height: 2px; border-radius: 0; background: var(--accent); }
.step-controls { display: flex; align-items: center; justify-content: flex-end; gap: clamp(.7rem,1.6vw,1.6rem); }
.step-button {
  width: 2.8rem; height: 2.8rem; border: 1px solid rgba(40,43,43,.28); border-radius: 50%;
  background: rgba(255,255,255,.5); backdrop-filter: blur(10px); color: var(--ink);
  font-size: 1.2rem; font-weight: 300; cursor: pointer; transition: background .3s, transform .3s;
}
.step-button:hover { background: #fff; transform: translateY(-2px); }
.room-count { min-width: 3rem; font-size: .68rem; letter-spacing: .12em; text-align: center; white-space: nowrap; }
.mobile-works { display: none; }

.art-dialog { position: fixed; z-index: 30; inset: 0; width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; background: #f8f7f4; color: var(--ink); }
.art-dialog::backdrop { background: #f8f7f4; }
.dialog-close { position: absolute; z-index: 2; top: clamp(1.2rem,3vw,3rem); right: clamp(1.2rem,4vw,5rem); display: flex; align-items: center; gap: 1.2rem; padding: .5rem; border: 0; background: none; font-size: .68rem; font-weight: 600; letter-spacing: .17em; cursor: pointer; }
.dialog-close span { font-size: 1.7rem; font-weight: 200; line-height: .7; }
.dialog-content { display: grid; grid-template-columns: minmax(3.5rem,1fr) minmax(0,70rem) minmax(3.5rem,1fr); align-items: center; height: 100%; }
.dialog-content figure { display: grid; justify-items: center; gap: 1.3rem; min-width: 0; margin: 0; }
.dialog-content figure img { display: block; width: auto; height: auto; max-width: min(76vw,1000px); max-height: min(76dvh,850px); object-fit: contain; box-shadow: 0 14px 32px rgba(33,33,30,.13); }
.dialog-content figcaption { display: flex; align-items: baseline; gap: 1.2rem; width: min(76vw,1000px); padding-top: 1rem; border-top: 1px solid #d8d8d4; }
.dialog-content figcaption span { color: var(--subtle); font-size: .68rem; letter-spacing: .11em; }
.dialog-content figcaption span:first-child { color: var(--accent); }
.dialog-content figcaption strong { font: 400 1.5rem var(--serif); }
.dialog-content figcaption span:last-child { margin-left: auto; text-align: right; }
.dialog-step { justify-self: center; padding: 1rem; border: 0; background: none; color: var(--ink); font-size: 1.6rem; cursor: pointer; }
.dialog-step:hover { color: var(--accent); }
@media(max-width:900px) {
  .header-center, .wayfinding { display: none; }
  .gallery-ui { grid-template-columns: 1fr auto; }
  .room-nav { grid-column: 1; }
  .step-controls { grid-column: 2; }
  .work { width: min(19vw,220px); min-width: 0; }
}
@media(max-width:650px) {
  .site-header { min-height: 5rem; align-items: flex-start; padding: 1rem 1.05rem; }
  .brand { width: 6.8rem; height: 2.85rem; }
  .agency { width: 10.8rem; height: 2.56rem; }
  .gallery { min-height: 610px; }.room-bg { background-position: center; }
  .wall-copy { top: 16%; font-size: .5rem; gap: .55rem; }.wall-copy-rule { width: 1.2rem; }
  .ambient-light { display: none; }
  .work { display: none; }
  .work--feature { display: flex; top: 22%; left: 50%; width: min(68vw,310px); }
  .work-caption { max-width: 100%; font-size: .69rem; margin-top: .6rem; }
  .mat { padding: clamp(13px,3.6vw,21px); }
  .room-note { left: 1.25rem; bottom: 8.7rem; gap: .65rem; }
  .room-note-index { font-size: .83rem; }
  .room-note-small { font-size: .54rem; }
  .room-note h1 { font-size: clamp(2.05rem,9vw,3.1rem); }
  .gallery-ui { align-items: center; padding: 0 1.2rem max(1.2rem,env(safe-area-inset-bottom)); }
  .room-nav { gap: .18rem; margin: 0; }.room-dot { width: 1.4rem; }
  .step-controls { gap: .4rem; }.step-button { width: 2.4rem; height: 2.4rem; }.room-count { font-size: .58rem; }
  .mobile-works { position: absolute; z-index: 8; left: 1.25rem; right: 1.25rem; bottom: 4.55rem; display: flex; gap: .5rem; align-items: center; }
  .mobile-work { padding: .2rem .45rem .2rem 0; border: 0; border-right: 1px solid rgba(59,64,65,.3); background: none; color: #464b4d; font-size: .62rem; white-space: nowrap; cursor: pointer; }
  .mobile-work:last-child { border-right: 0; }.mobile-work b { margin-right: .3rem; color: var(--accent); }
  .dialog-content { grid-template-columns: 2.6rem minmax(0,1fr) 2.6rem; }
  .dialog-content figure img { max-width: 78vw; max-height: 66dvh; }
  .dialog-content figcaption { flex-wrap: wrap; gap: .4rem; width: 78vw; }
  .dialog-content figcaption strong { flex-basis: calc(100% - 2rem); font-size: 1.2rem; }
  .dialog-content figcaption span:last-child { margin-left: 0; }
  .dialog-step { padding: .2rem; font-size: 1.3rem; }
}
@media(max-width:390px) { .mobile-work { font-size: .55rem; }.room-count { display: none; } }
@media(max-width:650px) and (max-height:700px) { .work--feature { top: 19%; width: min(58vw,270px); }.room-note { bottom: 7.7rem; }.room-note h1 { font-size: 2rem; } }
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { transition-duration: .01ms!important; animation-duration: .01ms!important; scroll-behavior: auto!important; } }
