/* Tour chrome and tokens, adapted from the RDS Paint Doorkijk scene system. */
html:has(body.page-home) { scroll-behavior: smooth; scroll-padding-top: 0; }
.tour {
  --cream: #fff5ec;
  --edge: var(--gutter);
  --title-weight: 835;
  --title-width: 88%;
  --pigment-light: #ffc0d7;
  --control-ink: #271223;
  --control-fill: #2a1726bb;
  --control-line: #f9c9de77;
  --action-radius: 6px 21px 21px 21px;
  --split: 57%;
  color: var(--cream);
}
.tour button { font: inherit; }
.tour img { display: block; width: 100%; max-width: none; object-fit: cover; }
.tour [hidden] { display: none !important; }
.mono { font: 850 .77rem/1.35 var(--body); letter-spacing: .105em; text-transform: uppercase; }
.type-round {
  font-family: var(--body);
  font-stretch: normal;
  font-weight: 850;
  letter-spacing: -.044em;
  color: var(--pigment-light);
}
.chapter { min-height: 100vh; min-height: 100svh; position: relative; }
.picture-link { display: inline-flex; width: fit-content; gap: 20px; align-items: center; padding-bottom: 5px; border-bottom: 1px solid currentColor; font-weight: 650; }
.picture-link:hover { padding-bottom: 4px; border-bottom-width: 2px; }


.control-button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 7px 15px; border: 1px solid var(--control-line);
  border-radius: var(--action-radius); background: var(--control-fill); color: var(--cream);
  font-weight: 800; line-height: 1.15; cursor: pointer;
  transition: background-color 200ms ease, color 200ms ease, border-color 200ms ease;
}
.control-button:hover { background: #5d304b; border-color: #ffbfda; }
.control-button[aria-pressed="true"] { color: var(--control-ink); background: var(--pigment-light); border-color: #ffdae7; }
.chapters { position: fixed; z-index: 19; top: 50%; right: clamp(5px, 1.25vw, 21px); transform: translateY(-50%); display: flex; flex-direction: column; background: #1b10216e; border: 1px solid #f4ebff40; }
.chapters a { display: grid; place-items: center; width: 28px; height: 32px; }
.chapters a::before { content: ""; width: 6px; height: 6px; border: 1px solid currentColor; border-radius: 50%; }
.chapters a[aria-current="location"]::before { background: currentColor; }
.chapters a:focus-visible { outline-offset: -1px; }

.hero { isolation: isolate; display: flex; flex-direction: column; justify-content: flex-end; padding: 100px var(--edge) 24px; background: #773c4c; color: var(--cream); overflow: clip; }
.comparison, .room { position: absolute; inset: 0; }
.comparison { z-index: -1; background: #673347; isolation: isolate; }
.room { overflow: hidden; animation: focus-room 1.2s cubic-bezier(.22,.72,.2,1) both; }
@keyframes focus-room { from { transform: scale(1.036); } to { transform: scale(1); } }
.room img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 48%; }
.comparison::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg,#140b16ad 0%, #170b184d 46%, transparent 71%), linear-gradient(0deg,#0e0912cb, transparent 36%); pointer-events: none; }
.split-line { position: absolute; z-index: 2; top: 0; bottom: 0; left: var(--split); width: 1px; background: #fff5e88f; pointer-events: none; transform: translateX(-.5px); }
.split-grip { position: absolute; top: 59%; left: 50%; transform: translate(-50%, -50%); display: grid; place-items: center; width: 52px; height: 52px; border: 1px solid var(--control-line); border-radius: 50%; background: var(--control-fill); backdrop-filter: blur(8px); color: #fff5e8; font-size: 1.55rem; cursor: ew-resize; pointer-events: auto; touch-action: none; }
.split-grip:hover { background: #55303e; }
.location { display: block; margin-bottom: 22px; }
.hero-bottom { display: flex; justify-content: space-between; align-items: end; gap: 20px; position: relative; z-index: 4; border-top: 1px solid #f9e3d870; padding-top: 12px; }
.down-link { display: inline-flex; align-items: center; gap: 18px; min-height: 44px; font-size: .93rem; font-weight: 650; }
.down-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.range-group { width: min(47vw, 500px); }
.compare-label { display: block; margin-bottom: 0; }
.range-controls { display: flex; align-items: center; gap: 11px; }
.colour-name { display: flex; align-items: center; gap: 7px; font-size: .84rem; font-weight: 610; white-space: nowrap; }
.dot { display: inline-block; flex: none; width: 9px; height: 9px; border: 1px solid #fff2e890; border-radius: 50%; }
.range-controls input { flex: 1 1 auto; min-width: 35px; width: 100%; height: 43px; accent-color: var(--pigment-light); cursor: ew-resize; }

.gallery-controls { display: flex; align-items: center; gap: 7px; }
.gallery-controls button { min-height: 46px; min-width: 48px; padding: 0 8px; }
.project-counter { align-self: stretch; display: grid; place-items: center; padding: 0 8px; white-space: nowrap; }
@media (max-width: 680px) {
  .chapters { display: none; }
  .hero { padding-top: 129px; padding-bottom: 17px; }
  .room img { object-position: 64% center; }
  .comparison::after { background: linear-gradient(0deg,#120a17e3 0%, #160b18a3 39%, #170b180a 72%), linear-gradient(90deg,#140b1640,transparent 64%); }
  .location { margin-bottom: 14px; font-size: .66rem; }
  .split-grip { top: 36%; width: 46px; height: 46px; }
  .hero-bottom { flex-direction: column-reverse; align-items: stretch; gap: 2px; padding-top: 7px; }
  .range-group { width: 100%; }
  .colour-name { font-size: .75rem; }
  .compare-label { font-size: .66rem; }
  .down-link { min-height: 34px; font-size: .85rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .room { animation: none; }
}

.tour { position: relative; }
.track { position: relative; }
.scene { isolation: isolate; }
.tour.motion .track:not(:last-child) { height: 200svh; margin-bottom: -100svh; }
.tour.motion .track:last-child { height: 100svh; }
.tour.motion .scene { position: sticky; top: 0; height: 100svh; overflow: clip; }
.track:nth-child(1) { z-index: 1; }
.track:nth-child(2) { z-index: 2; }
.track:nth-child(3) { z-index: 3; }
.track:nth-child(4) { z-index: 4; }
.track:nth-child(5) { z-index: 5; }
.tour.motion .track { pointer-events: none; }
.tour.motion .scene { pointer-events: auto; }
.track { scroll-margin-top: 0; }
.tour:not(.motion) .scene { clip-path: none !important; }
.tour.motion .hero .room { transform: scale(var(--room-scale, 1)); animation: none; }

.exhibition {
  --gallery: color-mix(in srgb, var(--section-accent) 14%, #201120);
  overflow: clip;
  background: var(--gallery) radial-gradient(ellipse at 48% 45%, #78577363, transparent 67%);
  color: var(--cream);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  padding: clamp(85px, 11.8svh, 125px) 0 clamp(20px, 4svh, 42px);
  transition: background-color 580ms ease;
}
.exhibition-title, .gallery-dock {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 14px 24px;
  padding-inline: var(--edge);
}
.exhibition-title h2 { font: var(--title-weight) clamp(3.1rem, 6.95vw, 7rem)/.88 var(--display); font-stretch: var(--title-width); letter-spacing: -.045em; word-spacing: .028em; }
.exhibition-title .picture-link { flex: none; margin-bottom: 4px; font-size: .94rem; }
.gallery-space { position: relative; min-height: clamp(330px, 61svh, 650px); overflow: clip; isolation: isolate; perspective: 1020px; }
.gallery-floor {
  position: absolute;
  z-index: -2;
  inset: 57% -20% 0;
  transform: perspective(265px) rotateX(39deg) scale(1.25);
  transform-origin: top center;
  background:
    repeating-linear-gradient(90deg, transparent 0 11.9%, #e2bcd125 12%, transparent 12.2%),
    repeating-linear-gradient(0deg, transparent 0 18%, #e2bcd127 18.3%, transparent 18.7%);
  mask-image: linear-gradient(0deg, transparent, black 68%);
  pointer-events: none;
}
.gallery-wall {
  position: absolute;
  top: 6%;
  left: 17%;
  width: 66%;
  height: 83%;
  padding: 0;
  border: 1px solid #f1ddf1a3;
  background: #241a21;
  transform-origin: 50% 60%;
  transition: transform 730ms cubic-bezier(.22,.7,.18,1), filter 730ms ease;
  box-shadow: 0 18px 38px #09060cb7;
}
.gallery-wall[data-project-position="front"] { z-index: 3; transform: translate3d(0,0,0); }
.gallery-wall[data-project-position="left"] { z-index: 1; transform: translate3d(-56%,3%,-270px) rotateY(32deg) scale(.86); filter: brightness(.53) saturate(.83); }
.gallery-wall[data-project-position="right"] { z-index: 2; transform: translate3d(56%,3%,-270px) rotateY(-32deg) scale(.86); filter: brightness(.53) saturate(.83); }
.gallery-wall[data-project-position]:hover { filter: brightness(.88); }
.gallery-wall[data-project-position="front"]:hover { filter: none; }
.gallery-wall img { height: 100%; object-position: center 59%; pointer-events: none; }
.gallery-wall:focus-visible { outline-offset: 0; }
.gallery-dock { align-items: center; }
.project-name { font-weight: 650; font-size: clamp(1.14rem, 2.2vw, 2.02rem); letter-spacing: -.03em; }
.project-category { margin-top: 2px; color: #efcbdc; }

@media (min-width: 801px) and (max-height: 755px) {
  .gallery-space { min-height: 345px; }
}
@media (max-width: 800px) {
  .exhibition { min-height: 100svh; padding-top: 98px; }
  .exhibition-title { gap: 10px; }
  .exhibition-title h2 { font-size: clamp(2.95rem, 9.6vw, 5.2rem); }
  .exhibition-title .picture-link { font-size: .78rem; gap: 6px; margin-bottom: 1px; }
  .gallery-space { min-height: clamp(325px, 54svh, 550px); }
  .gallery-wall { top: 8%; left: 12%; width: 76%; height: 80%; }
  .gallery-wall[data-project-position="left"] { transform: translate3d(-43%,4%,-130px) rotateY(24deg) scale(.85); }
  .gallery-wall[data-project-position="right"] { transform: translate3d(43%,4%,-130px) rotateY(-24deg) scale(.85); }
  .gallery-dock { flex-wrap: wrap; }
}
@media (max-width: 370px) {
  .exhibition-title { align-items: start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  .scene { clip-path: none !important; }
}

.chapter .split-line {
  left: clamp(27px, var(--split), calc(100% - 27px));
}
.project-detail-link { font-size: .88rem; margin-top: 8px; }
.tour.motion .scene[data-revealing="true"] .lab-copy,
.tour.motion .scene[data-revealing="true"] .exhibition-title,
.tour.motion .scene[data-revealing="true"] .gallery-dock,
.tour.motion .scene[data-revealing="true"] .signoff-lead,
.tour.motion .scene[data-revealing="true"] .signoff-tail,
.tour.motion .scene[data-revealing="true"] [data-scene-arrival] {
  opacity: var(--arrival, 1);
  translate: 0 calc((1 - var(--arrival, 1)) * 12px);
}

.comparison::after {
  background: linear-gradient(90deg, #1d1025ba 0%, #21112778 35%, transparent 66%),
              linear-gradient(0deg, #150c1ced, #21112510 52%, transparent 72%);
}
.split-grip { background: #241729bc; }
.split-grip:hover { background: #583647; }
.split-grip span {
  position: relative; display: block; width: 21px; height: 13px;
}
.split-grip span::before, .split-grip span::after {
  content: ""; position: absolute; top: 3px; width: 8px; height: 8px;
  border: solid var(--cream); border-width: 0 0 1.5px 1.5px;
}
.split-grip span::before { left: 0; rotate: 45deg; }
.split-grip span::after { right: 0; rotate: 225deg; }
.down-link span {
  width: 6px; height: 6px; border-radius: 2px; background: var(--pigment-light); rotate: 45deg;
}
.chapters { z-index: 40; border-radius: 18px; background: #201125ac; border-color: #fce1ed53; }
.chapters a { color: var(--cream, #fff5ec); position: relative; }
.chapters a[aria-current="location"] { color: #ffc0d7; }
.chapters a::after {
  content: attr(aria-label);
  position: absolute;
  right: calc(100% + 9px);
  padding: 5px 10px;
  border: 1px solid #e8c1d466;
  border-radius: 6px 12px 12px 12px;
  background: #281727;
  color: #fff5ec;
  font-size: .83rem;
  font-weight: 800;
  white-space: nowrap;
  visibility: hidden;
  pointer-events: none;
}
.chapters a:is(:hover, :focus-visible)::after { visibility: visible; }
.tour input:focus-visible, .tour :focus-visible { outline-color: #ffb9d5; }

.exhibition-title h2 { margin: 0; }
.gallery-links { display: flex; flex-wrap: wrap; justify-content: end; gap: 5px clamp(13px,3vw,44px); }
.gallery-wall img { object-position: center; }
.gallery-controls button { font-size: 1.65rem; line-height: 1; }
.gallery-meta { min-width: 0; }
.project-name { display: block; line-height: 1.14; }
.project-category:empty { display: none; }
.project-counter { text-transform: none; }
.gallery-controls button span { display: block; translate: 0 -2px; }

@media (max-width: 680px) {
  .room img { object-position: 70% center; }
  .comparison::after {
    background: linear-gradient(0deg,#1b0e1bee 0%,#201023b9 38%,#22122a16 68%), linear-gradient(90deg,#200d2d53,transparent 71%);
  }
  .hero { padding-top: clamp(86px, 17svh, 132px); }
  .tour .down-link { min-height: 38px; }
  .split-grip { background: #24152dba; }
  .gallery-links { justify-content: flex-start; }
  .gallery-space { min-height: clamp(325px, 54svh, 475px); }
}
@media (max-width: 370px) {
  .gallery-space { min-height: 300px; }
}
@media (prefers-reduced-motion: reduce) {
  html:has(body.page-home) { scroll-behavior: auto; }
}
.hero-links { display: flex; gap: 5px clamp(13px,3vw,40px); flex-wrap: wrap; align-items: center; }
@media (max-width: 680px) {
  .hero-links { justify-content: space-between; gap: 6px; }
}
.room img, .split-grip span { pointer-events: none; user-select: none; }
@media (min-width: 371px) and (max-width: 680px) {
  .exhibition-title h2 { white-space: nowrap; }
  .gallery-links { flex-direction: column; align-items: flex-start; }
}

.tour.motion .track:last-child { height: auto; min-height: 100svh; }
.tour.motion .signoff-scene { position: relative; height: auto; }
.tour.motion .signoff-scene[data-revealing="true"] { height: 100svh; }
