@font-face {
  font-family: "Barlow Semi Condensed";
  src: url("/fonts/barlow-semi-condensed-600-latin.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

.scene { container-type: inline-size; }

.scene-room-glass,
.scene-room-perspective {
  position: absolute;
  inset: 0;
}
.scene-room-glass {
  overflow: hidden;
  clip-path: var(--window-clip);
  background-color: #b27843;
}
.scene-room-perspective { inset: -5% 0; }
.scene-room-interior {
  position: absolute;
  height: 100%;
  aspect-ratio: 4 / 3;
  left: 40%;
  transform: translateX(-40%);
  background: url('/scene-art/room-01-interior.webp') center / 100% 100% no-repeat;
  filter: brightness(1.3);
}
.scene-room-worker {
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: 27% 82%;
  animation: straighten-at-desk 23s ease-in-out infinite;
}
.scene-room-interior::after {
  content: "";
  position: absolute;
  inset: 0;
  /* The front of the desk starts at y=449 in the 720 × 540 plates. */
  clip-path: inset(83.2% 0 0);
  background: inherit;
}

/* The first stretch is visible after a few seconds. The seated working
   posture fills most of the loop, with a pause at the top of the stretch. */
@keyframes straighten-at-desk {
  0%, 19%, 40%, 100% { transform: none; }
  26%, 32% { transform: skewX(5deg) scaleY(1.13); }
}
@media (prefers-reduced-motion: reduce) {
  .scene-room-worker { animation: none; }
}

.scene-caption-anchor {
  position: absolute;
  width: 0;
  height: 0;
  transform-origin: 0 0;
}

.scene-room-label {
  display: block;
  box-sizing: border-box;
  width: max-content;
  max-width: calc((var(--caption-right) - var(--caption-left)) / var(--caption-scale, 1));
  transform-origin: top left;
  transform: scaleX(var(--caption-scale, 1)) translateX(clamp(
    calc(var(--caption-left) / var(--caption-scale, 1)), -50%,
    calc(var(--caption-right) / var(--caption-scale, 1) - 100%)
  )) translateY(var(--caption-shift-y, 0%));
  margin: 0;
  padding: 0 var(--caption-padding);
  border: 0;
  box-shadow: inset 0 0 0 .07cqw rgb(215 182 137 / .70);
  border-radius: .27em;
  background: #241e19;
  color: #fff1da;
  text-align: center;
  /* Size on the scene so the 1080p broadcast retains the same type at half size. */
  font: 600 var(--caption-size)/var(--caption-leading) "Barlow Semi Condensed", "Arial Narrow", sans-serif;
  white-space: nowrap;
}
.scene-room-label[hidden], .scene-room-label [hidden] { display: none; }
.scene-room-label[data-packed] {
  height: var(--caption-height);
  line-height: var(--packed-leading);
}
.scene-room-label[data-packed] > span {
  position: relative;
  top: var(--packed-offset);
}
.scene-room-clock {
  color: #e6d1b3;
  font-size: .73em;
  line-height: 0;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
