.original-scene .os-projects {
  display: inline-flex; justify-self: start; align-items: center; gap: 16px;
  width: fit-content; min-height: 46px; text-decoration: none;
  border-bottom: 1px solid currentColor;
  font: 500 clamp(23px, 2.3vw, 36px)/1.1 var(--display); letter-spacing: -.03em;
}
.os-projects-arrow { font: 450 18px/1 var(--body); transition: transform .22s ease; }
.os-projects:hover .os-projects-arrow { transform: translate(3px,3px); }
.work-gallery {
  --gallery-ink: #f3f5f1;
  --gallery-edge: clamp(21px, 4.5vw, 90px);
  --gallery-track: #9babae;
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 100svh;
  min-height: 540px;
  overflow: hidden;
  scroll-margin: -30px 0 0;
  color: var(--gallery-ink);
  background: #101216;
}
.wg-stage, .wg-render, .wg-plates, .wg-frame, .wg-render canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.wg-stage { overflow: hidden; background: radial-gradient(ellipse at 50% 40%, #333c41, #14191d 56%, #0b0e11 86%); }
.wg-render { z-index: 1; pointer-events: none; }
.wg-render canvas { display: block; }
.wg-plates {
  overflow: hidden;
  perspective: 76vw;
  perspective-origin: 50% 45%;
  transition: opacity .22s;
}
.wg-plates::before {
  content: '';
  position: absolute;
  inset: 57% 0 0;
  background: linear-gradient(0deg, #101216, #20292b00);
}
.wg-ready .wg-plates { opacity: 0; }
.wg-plate {
  position: absolute;
  top: 47%; left: 50%;
  width: min(46vw, 75vh);
  aspect-ratio: 3/2;
  margin: 0;
  transform-style: preserve-3d;
  background: #1d2328;
  backface-visibility: hidden;
}
.wg-plate img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.wg-plate img + img {
  position: absolute; left: 0; top: 100%; transform: scaleY(-1);
  opacity: .23;
  mask-image: linear-gradient(0deg, #000a, transparent 76%);
  filter: blur(2px);
}
.wg-header, .wg-information, .wg-controls { position: absolute; left: var(--gallery-edge); right: var(--gallery-edge); z-index: 3; }
.wg-header {
  top: clamp(19px, 3.5vh, 43px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
}
.wg-brand { justify-self: start; font: 500 clamp(25px,2.1vw,39px)/1 var(--display); letter-spacing: -.047em; }
.wg-header h2, .wg-index, .wg-counter, .wg-gesture {
  font: 550 11px/1.45 var(--body);
  letter-spacing: .085em;
}
.wg-header h2 { text-transform: uppercase; letter-spacing: .14em; }
.wg-index { justify-self: end; display: inline-flex; align-items: center; gap: 10px; min-height: 43px; letter-spacing: .035em; }
.wg-index span:last-child { font-size: 20px; }
.wg-frame { z-index: 2; top: 14%; height: 56%; touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none; }
.work-gallery[data-drag] .wg-frame { cursor: grabbing; }
.work-gallery[data-exploring] .wg-frame { touch-action: none; }
.wg-cursor { display: none; }
@media(hover:hover) and (pointer:fine) {
  .wg-frame[data-hit="current"] { cursor: none; }
  .wg-frame[data-hit="current"] .wg-cursor {
    display: grid; place-items: center; position: absolute; top: 0; left: 0;
    border-radius: 50%; width: 53px; height: 53px;
    border: 1px solid #ffffff9c; background: #11181ad4;
    color: #fff; font-size: 24px; font-weight: 400; pointer-events: none;
    transform: translate(calc(var(--gx) - 50%), calc(var(--gy) - 50%));
  }
  .work-gallery[data-drag] .wg-cursor { visibility: hidden; }
}
.wg-information {
  bottom: clamp(86px, 13.5vh, 162px);
  display: flex; align-items: end; justify-content: space-between;
  gap: 18px; pointer-events: none;
}
.wg-selection { min-width: 0; }
.wg-counter {
  display: flex; align-items: center; gap: 8px; margin: 0 0 4px;
  color: #edf0f0; font-variant-numeric: tabular-nums; text-transform: uppercase;
}
.wg-rule { width: 26px; height: 1px; background: #92a1a3; margin-inline: 4px; }
.wg-total { color: #b7c0c2; }
.wg-title {
  font: 400 clamp(55px,7.6vw,132px)/.97 var(--display);
  color: #f8f8f4; letter-spacing: -.052em; margin: 0 0 -.08em -.025em;
}
.wg-enter {
  pointer-events: auto; display: inline-flex; align-items: center; gap: 14px;
  padding: 7px 0; min-height: 46px; font-size: 15px; font-weight: 550;
}
.wg-enter b, .wg-arrows button {
  display: inline-grid; place-items: center; width: 40px; height: 40px;
  border-radius: 50%; border: 1px solid #96a0a2; font: 400 21px/1 var(--body);
}
.wg-enter:hover b, .wg-arrows button:hover { color: #172124; border-color: #e7eded; background: #e7eded; }
.wg-controls {
  bottom: clamp(13px,2.5vh,34px);
  border-top: 1px solid #ffffff35; padding-top: 10px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
}
.wg-gesture { color: #c7cecf; letter-spacing: .04em; }
.wg-sequence { display: flex; align-items: center; }
.wg-sequence a {
  display: grid; place-items: center; position: relative; width: 34px; height: 44px;
  font-size: 0; color: #b9c2c4;
}
.wg-sequence a::before { content: ''; width: 18px; height: 8px; border: 1px solid #879295; transform: skew(-15deg); transition: background .25s, transform .25s; }
.wg-sequence a[aria-current="true"]::before { transform: skew(-15deg) scaleY(1.25); background: #d6eeee; border-color: #d6eeee; }
.wg-arrows { display: flex; gap: 8px; justify-content: end; }
.wg-arrows button { width: 42px; height: 42px; padding: 0; color: #fff; background: transparent; }
.wg-arrows .wg-loop { font-size: 14px; margin-right: 8px; }
.work-gallery :focus-visible { outline-color: #c9fcf5; }
.work-gallery .wg-frame:focus-visible { outline-offset: -5px; }
.work-gallery[data-entering] :is(.wg-header,.wg-information,.wg-controls) { opacity: 0; pointer-events: none; }
.work-gallery[data-entering] .wg-frame { pointer-events: none; }
.wg-header, .wg-information, .wg-controls { transition: opacity .23s; }
.wg-static { position: absolute; top: 50%; left: var(--gallery-edge); z-index: 5; }
@media(max-width:700px) {
  .work-gallery { min-height: 530px; }
  .wg-header { gap: 8px; top: 16px; }
  .wg-brand { font-size: 25px; }
  .wg-header h2 { text-align: right; font-size: 9px; letter-spacing: .07em; }
  .wg-index { font-size: 11px; }
  .wg-frame { top: 15%; height: 54%; }
  .wg-plates { perspective: 130vw; }
  .wg-plate { width: 72vw; }
  .wg-information { bottom: max(122px,17%); display: block; }
  .wg-title { font-size: clamp(44px,12.7vw,80px); }
  .wg-enter { position: absolute; top: calc(100% + 7px); left: 0; font-size: 13px; gap: 8px; }
  .wg-enter b { border: none; width: 20px; height: 28px; }
  .wg-controls { bottom: max(12px, env(safe-area-inset-bottom)); grid-template-columns: 1fr auto; gap: 5px; }
  .wg-gesture { display: none; }
  .wg-sequence a { width: clamp(27px,7.8vw,36px); }
  .wg-arrows { gap: 4px; }
  .wg-arrows .wg-loop { margin-right: 1px; width: 36px; height: 36px; align-self: center; }
  .wg-sequence a { width: clamp(23px,6.6vw,30px); }
}
@media(max-height:640px) and (min-width:701px) {
  .work-gallery { min-height: 420px; }
  .wg-title { font-size: 58px; }
  .wg-information { bottom: 82px; }
}
@media(prefers-reduced-motion:no-preference) {
  html[data-projects-arrival]::view-transition { background: #101216; }
  html[data-projects-arrival]::view-transition-old(root) {
    transform-origin: 16% 60%;
    animation: project-plane-away .69s cubic-bezier(.4,0,.23,1) both;
    mix-blend-mode: normal;
  }
  html[data-projects-arrival]::view-transition-new(root) {
    transform-origin: 100% 50%;
    animation: project-space-in .79s cubic-bezier(.2,.77,.16,1) both;
    mix-blend-mode: normal;
  }
}
@keyframes project-plane-away {
  0% { opacity: 1; transform: perspective(1300px) rotateY(0) translateX(0) scale(1); }
  75%,100% { opacity: 0; transform: perspective(1300px) rotateY(22deg) translateX(-12%) scale(.84); }
}
@keyframes project-space-in {
  0% { opacity: 0; transform: perspective(1300px) translateX(10%) rotateY(-9deg) scale(.95); }
  30% { opacity: .58; }
  100% { opacity: 1; transform: none; }
}
