/* One document scroll, with the other direction always at the edge. */
:root[data-ws-direction] {
  --ws-rail: 68px;
  --ws-switch-ease: cubic-bezier(.76, 0, .24, 1);
  --content-inset: max(var(--gutter, var(--pad, 24px)), calc((100vw - var(--ws-rail) - 1740px) / 2));
}
html[data-ws-direction="arch"] body { margin-right: var(--ws-rail); }
html[data-ws-direction="digital"] body { margin-left: var(--ws-rail); }
.ws-direction-tab {
  position: fixed;
  inset-block: 0;
  width: var(--ws-rail);
  z-index: 120;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 28px 0;
  text-decoration: none;
  font-family: Onest, Arial, sans-serif;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  isolation: isolate;
}
html[data-ws-direction="arch"] .ws-direction-tab {
  right: 0;
  background: #111212;
  color: #f5f5f3;
  border-left: 1px solid #ffffff26;
}
html[data-ws-direction="digital"] .ws-direction-tab {
  left: 0;
  background: #f5f5f3;
  color: #111212;
  border-right: 1px solid #11111126;
}
.ws-direction-index { font-size: 10px; letter-spacing: .1em; opacity: .5; }
.ws-direction-label { writing-mode: vertical-rl; font-size: 18px; letter-spacing: .02em; }
.ws-direction-sign { font-size: 28px; font-weight: 300; transition: transform .45s ease; }
.ws-direction-tab::after {
  content: "";
  position: absolute;
  inset: 0;
  background: currentColor;
  opacity: 0;
  transition: opacity .3s ease;
  z-index: -1;
}
@media (hover: hover) {
  .ws-direction-tab:hover::after { opacity: .06; }
  .ws-direction-tab:hover .ws-direction-sign { transform: rotate(90deg); }
}
.ws-direction-tab:focus-visible { outline: 2px solid currentColor; outline-offset: -7px; }
html[data-ws-direction="arch"] #menu {
  right: var(--content-inset);
  width: min(520px, calc(100% - 2 * var(--content-inset)));
}
html[data-ws-direction="digital"] .menu {
  width: min(520px, calc(100% - var(--ws-rail) - 2 * var(--content-inset)));
}
html[data-ws-direction="digital"] .gallery-walking .hero-film.is-walking {
  left: var(--ws-rail);
  width: calc(100% - var(--ws-rail));
}
/* The gallery's initial loader must not cover the persistent direction tab. */
html[data-ws-direction="digital"] .assembly-loader { left: var(--ws-rail); }
html[data-ws-arrival] .assembly-loader { display: none; }
html[data-ws-restoring] { scroll-behavior: auto !important; }

/* Native page snapshots reveal the next panel without a second live WebGL page. */
@view-transition { navigation: auto; }
::view-transition-group(root) { animation-duration: .86s; }
::view-transition-old(root), ::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}
html[data-ws-transition="digital"]::view-transition-new(root) {
  animation: ws-open-right .86s var(--ws-switch-ease) both;
}
html[data-ws-transition="arch"]::view-transition-new(root) {
  animation: ws-open-left .86s var(--ws-switch-ease) both;
}
@keyframes ws-open-right {
  from { clip-path: inset(0 0 0 calc(100% - var(--ws-rail))); }
  to { clip-path: inset(0); }
}
@keyframes ws-open-left {
  from { clip-path: inset(0 calc(100% - var(--ws-rail)) 0 0); }
  to { clip-path: inset(0); }
}
/* Browsers without cross-document transitions keep a short, matching curtain. */
html[data-ws-exit]::before, html[data-ws-enter]::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100001;
  background: #f5f5f3;
  pointer-events: none;
}
html[data-ws-exit="digital"]::before {
  background: #111212;
  animation: ws-open-right .48s var(--ws-switch-ease) both;
}
html[data-ws-exit="arch"]::before { animation: ws-open-left .48s var(--ws-switch-ease) both; }
html[data-ws-direction="digital"][data-ws-enter]::before { background: #111212; }
html[data-ws-enter="done"]::before { animation: ws-curtain-away .28s ease both; }
@keyframes ws-curtain-away { to { opacity: 0; } }
@media (max-width: 700px) {
  :root[data-ws-direction] { --ws-rail: 44px; }
  .ws-direction-tab { padding-block: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-bottom)); }
  .ws-direction-label { font-size: 14px; }
  .ws-direction-index { font-size: 9px; }
  .ws-direction-sign { font-size: 24px; }
  html[data-ws-direction="digital"] .menu { left: var(--ws-rail); width: calc(100% - var(--ws-rail)); }
}
@media (max-width: 400px) {
  html[data-ws-direction] .header { padding-inline: 16px; }
  html[data-ws-direction] .header .brand { width: 88px; flex: none; }
  html[data-ws-direction] .header .brand img { width: 100%; height: auto; }
  html[data-ws-direction] .header-brick { width: 32px; height: 32px; margin-inline: 12px; }
  html[data-ws-direction] .header :is(.menu-toggle, #menu-toggle) { font-size: 13px; gap: 10px; }
}
html[data-motion="reduced"] .ws-direction-tab *,
html[data-motion="reduced"] .ws-direction-tab::after { transition: none; }
html[data-motion="reduced"]::view-transition-group(*),
html[data-motion="reduced"]::view-transition-new(*),
html[data-motion="reduced"]::view-transition-old(*) { animation: none !important; }
@media (prefers-reduced-motion: reduce) {
  html:where(:not([data-ws-motion-policy="full"])):not([data-motion="full"])::view-transition-group(*),
  html:where(:not([data-ws-motion-policy="full"])):not([data-motion="full"])::view-transition-new(*),
  html:where(:not([data-ws-motion-policy="full"])):not([data-motion="full"])::view-transition-old(*) { animation: none !important; }
  :where(html:not([data-ws-motion-policy="full"])) .ws-direction-sign, :where(html:not([data-ws-motion-policy="full"])) .ws-direction-tab::after { transition: none; }
}
