/* Preserve the displayed crop when opening the larger image. */
.portrait-full-frame {
  display: contents;
}

.portrait-full-frame[data-cropped] {
  display: block;
  position: relative;
  width: min(100%, calc((100dvh - 150px) * var(--portrait-ratio)));
  aspect-ratio: var(--portrait-ratio);
  overflow: hidden;
  background: #101318;
}

.portrait-dialog-body .portrait-full-frame[data-cropped] img {
  position: absolute;
  inset: var(--portrait-shift) auto auto 0;
  width: 100%;
  height: auto;
  max-height: none;
}

/* Expand the recording frame so the top crop stays in place. */
.recording-expand {
  margin-left: auto;
  padding: 3px 6px;
  color: #e4c99c;
  background: #242018;
  border: 1px solid #c6a57460;
  font: inherit;
  white-space: nowrap;
  cursor: pointer;
}

.recording-expand:hover, .recording-expand:focus-visible {
  color: #fff1ce;
  border-color: #d3b47e;
}

.recording-screen {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  background: #080807;
  padding: 10px 12px;
  border: 0;
}

.recording-screen[open] {
  display: grid;
  place-items: center;
}

.recording-screen::backdrop {
  background: #080807;
}

.host-projects .recording-screen > .evidence-frame {
  --media-limit: calc(100dvh - 74px);
}

video[data-crop-header]::-webkit-media-controls-fullscreen-button {
  display: none;
}

.showroom-window::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(118deg, transparent 10%, #f8ddac21 48%, transparent 76%);
  transform: translateX(-110%);
  pointer-events: none;
}

.showroom-shot:is(:hover, :focus-visible) .showroom-window::after {
  animation: showroom-reflection .7s ease-out both;
}

@keyframes showroom-reflection {
  to { transform: translateX(110%); }
}

#about-view .about-ecosystem-visual::before {
  content: none;
}

.about-orbit-field {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.about-orbit {
  position: absolute;
  top: 44%;
  left: 50%;
  border: 1px solid #c8a56547;
  border-radius: 50%;
  transform: translate(-50%, -50%) rotate(var(--orbit-angle));
  animation-play-state: paused;
}

.about-orbit-wide {
  --orbit-angle: -14deg;
  width: min(63%, 660px);
  height: clamp(117px, 17vw, 194px);
  border-color: #c8a56558;
  animation: about-orbit-tilt 19s ease-in-out infinite alternate paused;
}

.about-orbit-middle {
  --orbit-angle: 18deg;
  width: min(48%, 510px);
  height: clamp(111px, 14vw, 160px);
  border-color: #c8a56532;
  animation: about-orbit-tilt 23s ease-in-out -8s infinite alternate-reverse paused;
}

.about-orbit-inner {
  --orbit-angle: -28deg;
  width: min(65%, 260px);
  height: 178px;
  border-color: #c8a56526;
  animation: about-orbit-turn 36s linear infinite paused;
}

.about-orbit i {
  position: absolute;
  top: 50%;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #f6d69b;
  box-shadow: 0 0 5px #fae1a9, 0 0 13px #d8aa5e9c;
  transform: translate(-50%, -50%);
}

.about-orbit-middle i {
  left: auto;
  right: 0;
  width: 3px;
  height: 3px;
  transform: translate(50%, -50%);
}

@supports (offset-path: ellipse(50% 50%)) {
  .about-orbit i {
    inset: 0 auto auto 0;
    transform: none;
    offset-path: ellipse(50% 50% at 50% 50%);
    offset-rotate: 0deg;
    animation: about-orbit-travel 20s linear -5s infinite paused;
  }

  .about-orbit-middle i {
    animation-duration: 27s;
    animation-delay: -15s;
    animation-direction: reverse;
  }
}

.about-ecosystem-visual.is-orbit-visible :is(.about-orbit, .about-orbit i) {
  animation-play-state: running;
}

@keyframes about-orbit-tilt {
  from { transform: translate(-50%, -50%) rotate(var(--orbit-angle)); }
  to { transform: translate(-50%, -50%) rotate(calc(var(--orbit-angle) + 18deg)); }
}

@keyframes about-orbit-turn {
  to { transform: translate(-50%, -50%) rotate(calc(var(--orbit-angle) + 360deg)); }
}

@keyframes about-orbit-travel {
  from { offset-distance: 0%; }
  to { offset-distance: 100%; }
}

#about-view .about-delivery-map.is-flow-visible li::after {
  content: "";
  position: absolute;
  inset: -1px 0 auto;
  height: 1px;
  background: linear-gradient(90deg, #f3d39b, #d7b57640);
  transform-origin: left center;
  animation: about-stage-line .48s var(--step-delay, 0s) cubic-bezier(.2,.7,.3,1) both;
}

#about-view .about-delivery-map.is-flow-visible li::before {
  animation: about-stage-dot .65s var(--step-delay, 0s) ease-out both;
}

#about-view .about-delivery-map.is-flow-visible li > span {
  animation: about-stage-number .65s var(--step-delay, 0s) ease-out both;
}

.about-delivery-map li:nth-child(2) { --step-delay: .23s; }
.about-delivery-map li:nth-child(3) { --step-delay: .46s; }
.about-delivery-map li:nth-child(4) { --step-delay: .69s; }

@keyframes about-stage-line {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@keyframes about-stage-dot {
  0% { opacity: .35; box-shadow: none; }
  45% { opacity: 1; box-shadow: 0 0 12px 3px #d6af6177; }
  100% { opacity: 1; box-shadow: 0 0 8px #d6af6177; }
}

@keyframes about-stage-number {
  from { color: #b9a17a; }
  to { color: #f2d39e; }
}

@media (max-width: 760px) {
  .about-orbit { top: 48%; }
  .about-orbit-wide { width: 87%; height: 156px; }
  .about-orbit-middle { width: 73%; height: 125px; }
  .about-orbit-inner { height: 139px; }
}

@media (prefers-reduced-motion: reduce) {
  .about-ecosystem-visual.is-orbit-visible :is(.about-orbit, .about-orbit i),
  #about-view .about-delivery-map.is-flow-visible li::after,
  #about-view .about-delivery-map.is-flow-visible li::before,
  #about-view .about-delivery-map.is-flow-visible li > span,
  .about-orbit, .about-orbit i,
  .showroom-shot:is(:hover, :focus-visible) .showroom-window::after {
    animation: none;
  }

  #about-view .about-delivery-map li > span { color: #f2d39e; }
}
