@font-face {
  font-family: AaRuiYaTi;
  src: url('assets/aaruiyati-title.woff2') format('woff2');
  font-weight: 400;
  font-display: block;
}
.work-showcase{position:relative;display:grid;grid-template:minmax(0,1fr)/minmax(0,1fr);place-items:center;height:max(100svh,calc(1024px * var(--stage-scale,1)));overflow:hidden;background:#000;container-type:inline-size}
.work-stage{position:relative;width:1440px;height:1024px;flex:none;transform:scale(var(--stage-scale,1));transform-origin:center}
.work-copy {
  position: absolute;
  left: var(--portfolio-gutter);
  top: 50%;
  width: min(42cqw, 35rem);
  transform: translateY(-50%);
  z-index: 2;
}
.work-copy h2 { font: 600 clamp(26px, 3.4vw, 48px)/normal Inter, Arial, sans-serif; color: #fff; }
.work-copy p { margin-top: 16px; font: 500 16px/1.5 Inter, Arial, sans-serif; color: #b1b1b1; }
.work-art{position:absolute;inset:0;pointer-events:none}
.vr-trail{position:absolute;transform-origin:center}
.vr-trail img { display: block; width: 100%; height: 100%; object-fit: contain; }
/* Light flowing along each stroke. The stroke-shaped mask is static; the gradient inside it slides with
   transform (and the flow fades with opacity), so the whole effect runs on the compositor instead of
   repainting every frame. Same gradient, travel, timing and blend as the former background-position sweep:
   a 220%-tall gradient moving from bottom-aligned (−54.545% of its height) to top-aligned. */
.vr-trail .trail-flow {
  position: absolute;
  inset: 0;
  overflow: hidden;
  mask: var(--stroke-image) center / contain no-repeat;
  opacity: 0;
  mix-blend-mode: screen;
  pointer-events: none;
}
.vr-trail .trail-flow::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 220%;
  background: linear-gradient(180deg, transparent 25%, rgb(196 255 255 / 58%) 50%, transparent 75%);
  transform: translate3d(0, -54.545%, 0);
}
.trail-back-one,.trail-front-one { --stroke-image: url('assets/vr-trail-large.png'); }
.trail-back-two,.trail-front-two { --stroke-image: url('assets/vr-trail-small.png'); }
.trail-back-three,.trail-front-three { --stroke-image: url('assets/vr-trail-front.png'); }
.trail-back-one { --step-delay: -2.76s; }
.trail-front-one { --step-delay: -2.30s; }
.trail-back-three { --step-delay: -1.84s; }
.trail-front-three { --step-delay: -1.38s; }
.trail-back-two { --step-delay: -.92s; }
.trail-front-two { --step-delay: -.46s; }
.trail-back-one{left:801.651px;top:477.735px;width:396px;height:438px;transform:rotate(9.88deg)}
.trail-back-two{left:887px;top:287px;width:165.371px;height:259.159px;transform:rotate(-12.33deg)}
.trail-back-three{left:791px;top:375px;width:208.762px;height:327.159px}
.trail-front-one{left:968.86px;top:415.77px;width:341.675px;height:377.913px;transform:rotate(-10.22deg)}
.trail-front-two{left:1027.58px;top:287.82px;width:142.685px;height:223.606px;transform:rotate(-10.14deg)}
.trail-front-three{left:952.45px;top:346.66px;width:180.123px;height:282.278px;transform:rotate(-10.14deg)}
@media (prefers-reduced-motion: no-preference) {
  .work-showcase.is-visible .vr-trail { animation: grip-light 2.76s ease-in-out var(--step-delay) infinite; }
  .work-showcase.is-visible .vr-trail .trail-flow { animation: grip-flow-fade 2.76s ease-out var(--step-delay) infinite; }
  .work-showcase.is-visible .vr-trail .trail-flow::before { animation: grip-flow-move 2.76s ease-out var(--step-delay) infinite; }
}
@keyframes grip-light {
  0%, 52%, 100% { opacity: .12; }
  10% { opacity: 1; }
  18% { opacity: .95; }
}
@keyframes grip-flow-fade {
  0% { opacity: 0; }
  12% { opacity: .66; }
  40%, 100% { opacity: 0; }
}
@keyframes grip-flow-move {
  0% { transform: translate3d(0, -54.545%, 0); }
  40%, 100% { transform: translate3d(0, 0, 0); }
}
@media(max-width:700px){
  .work-showcase{display:flex;flex-direction:column;align-items:stretch;height:auto;min-height:100svh;padding:clamp(36px,7svh,92px) var(--portfolio-gutter) 48px;gap:26px}
  .work-stage{width:100%;height:auto;transform:none;display:flex;flex-direction:column}
  .work-copy{position:relative;left:auto;top:auto;width:100%;transform:none}
  .work-art{position:relative;inset:auto;width:575px;height:660px;flex:none;align-self:center;zoom:.6}
  .vr-trail{translate:-767px -260px}
}
@media(max-width:380px){.work-art{zoom:.52}}
@media(max-width:600px){.work-copy p{font-size:14px}}

.theatre-scene {
  position: absolute;
  left: 730px;
  top: 180px;
  width: 710px;
  height: 730px;
  isolation: isolate;
  pointer-events: auto;
  touch-action: pan-y;
}

.theatre-scene:focus-visible {
  outline: 2px solid #9bc7ff;
  outline-offset: -2px;
}

.theatre-stage {
  position: absolute;
  left: -203px;
  top: -10px;
  width: 1512px;
  height: 982px;
  transform: scale(.728);
  transform-origin: top left;
  pointer-events: none;
}

@media (max-width: 700px) {
  .theatre-scene { inset: 0; width: auto; height: auto; }
  .theatre-stage { left: -262.5px; top: -65px; }
}

.theatre-stage .light { position: absolute; left: 0; top: 0; width: 689px; height: 689px; transform-origin: 344.5px 344.5px; opacity: 0; isolation: isolate; mix-blend-mode: plus-lighter; will-change: transform, opacity; }
.theatre-stage .beam-surface { position: absolute; inset: -200px; mix-blend-mode: plus-lighter; }
.theatre-stage .beam-content { position: absolute; left: 200px; top: 200px; width: 689px; height: 689px; }
.theatre-stage .beam-art { display: block; position: absolute; left: 0; top: -13.5448px; width: 689px; height: 702.5448px; }
.theatre-stage .beam-clear { mask-image: linear-gradient(to bottom, #000 386px, transparent 772px); }
.theatre-stage .beam-soft { filter: blur(var(--beam-blur, 0px)); mask-image: linear-gradient(to bottom, transparent 386px, #000 772px); }
.theatre-stage .text-field { position: absolute; inset: 0; width: 1512px; height: 982px; overflow: visible; }
.theatre-stage .glyph-field { isolation: isolate; }
.theatre-stage .color-state { mix-blend-mode: plus-lighter; }
.theatre-stage .person { position: absolute; left: 389px; top: 533px; width: 602px; height: 903px; object-fit: cover; user-select: none; }
.theatre-stage .person-shadow { filter: blur(10px); opacity: .3; transform-origin: 301px 173px; will-change: transform, opacity, filter; }

/* Give the controller and VR tutorial more reading time without ever stopping: each section has extra
   scroll room (--room, the ::after spacer), and its content drifts down through that room while the
   section crosses the screen, so on screen it moves at a constant ~60% of the scroll speed — never
   pinned, never resting. Where supported this is a CSS scroll-driven animation (runs in step with
   scrolling on the compositor); otherwise portfolio-showcases.js sets --drift.
   Reduced motion: no extra room, no drift. */
#position-controller,
#vr-tutorial {
  --room: 133svh;
  view-timeline: --section-drift block;
  display: block;
  height: auto;
  min-height: 0;
  padding: 0;
  overflow: clip;
}
#position-controller::after,
#vr-tutorial::after {
  content: "";
  display: block;
  height: var(--room);
}
#position-controller .project-frame,
#vr-tutorial .work-hold {
  width: 100%;          /* the section's inherited place-items would otherwise shrink-wrap it */
  justify-self: stretch;
  transform: translate3d(0, var(--drift, 0px), 0);
  will-change: transform;
}
@supports (animation-timeline: view()) {
  #position-controller .project-frame,
  #vr-tutorial .work-hold {
    animation: section-drift linear both;
    animation-timeline: --section-drift;
    animation-range: cover 0% cover 100%;
  }
  @media (max-width: 700px) {
    #position-controller .project-frame,
    #vr-tutorial .work-hold { animation-name: section-drift-sm; }
  }
}
/* Plain values (no var()) so the browser can run the drift on the compositor, in step with scrolling.
   Keep in sync with --room (133svh; 100svh at ≤700px). */
@keyframes section-drift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(0, 133svh, 0); }
}
@keyframes section-drift-sm {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(0, 100svh, 0); }
}
#position-controller .project-frame {
  min-height: 100svh;
  padding-block: clamp(36px, 7svh, 92px) clamp(54px, 12svh, 140px);
}
#vr-tutorial .work-hold {
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  place-items: center;
  height: max(100svh, calc(1024px * var(--stage-scale, 1)));
  overflow: hidden;
  container-type: inline-size;
}
@media (max-width: 700px) {
  #position-controller,
  #vr-tutorial { --room: 100svh; }
  #vr-tutorial .work-hold {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    height: auto;
    min-height: 100svh;
    padding: clamp(36px, 7svh, 92px) var(--portfolio-gutter) 48px;
    gap: 26px;
  }
}
@media (prefers-reduced-motion: reduce) {
  #position-controller,
  #vr-tutorial { --room: 0px; }
  #position-controller .project-frame,
  #vr-tutorial .work-hold { animation: none; transform: none; will-change: auto; }
}

/* Homepage text reveals (home-reveals.js). Text only: titles, descriptions, buttons and the wordmark.
   Hidden from the first paint (html.reveal-on is set in <head>), so nothing shows early and then
   vanishes. The reveal is a soft rise and fade on opacity and transform only — both run on the
   compositor, so a reveal never repaints text while the page is scrolling. (Uses transform, not
   `translate`: the wordmark positions its words with `translate`.) The hidden state has no
   transition, so the off-screen reset is instant and invisible. */
@media (prefers-reduced-motion: no-preference) {
  html.reveal-on :is(.intro-kicker, .intro h1 span, .intro-links .glass-pill, .xr-title, .xr-description, .case-study-button,
    .controller-title, .controller-description, .controller-video-button, .work-copy h2, .work-copy p) {
    opacity: 0;
    transform: translate3d(0, 28px, 0);
  }
  html.reveal-on :is(.intro-kicker, .intro h1 span, .intro-links .glass-pill, .xr-title, .xr-description, .case-study-button,
    .controller-title, .controller-description, .controller-video-button, .work-copy h2, .work-copy p).is-in {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    transition:
      opacity 1.1s cubic-bezier(.33, 1, .68, 1) var(--reveal-delay, 0s),
      transform 1.5s cubic-bezier(.16, 1, .3, 1) var(--reveal-delay, 0s);
  }
}
