/* Separate the actual sidebar and composer from the screenshot while it assembles. */
@property --desktop-arrival {
  syntax: '<number>';
  inherits: false;
  initial-value: 0;
}
#desktop-apps {
  overflow: clip;
}
#desktop-apps .desktop-feature-media {
  position: relative;
  isolation: isolate;
  padding: clamp(20px, 3.3vw, 54px);
  background:
    radial-gradient(circle, #c8c1ff66 .65px, transparent .95px) 0 0 / 13px 13px,
    linear-gradient(130deg, #222254 3%, #302365 42%, #663b81 79%, #9a63a8);
}
.desktop-display { position: relative; }
#desktop-apps .desktop-display img {
  width: 100%;
  height: auto;
  display: block;
  transform: none;
  box-shadow: 0 12px 28px #130a30a0;
}
@media (prefers-reduced-motion: no-preference) {
  #desktop-apps .desktop-landing .desktop-display {
    --spread: var(--desktop-arrival);
    --separation: clamp(16px, 3.9vw, 60px);
    transform-origin: 55% 58%;
    transform: perspective(1000px) rotateY(calc(-13deg * var(--spread)))
               rotateX(calc(8deg * var(--spread))) scale(calc(1 - .09 * var(--spread)));
    animation: desktop-assembly 1.25s cubic-bezier(.22,.7,.24,1) both;
  }
  @supports (clip-path: polygon(evenodd, 0 0, 100% 0, 0 100%)) {
    #desktop-apps .desktop-landing .desktop-display img {
      clip-path: polygon(evenodd, 21.8% 0, 100% 0, 100% 100%, 21.8% 100%, 21.8% 0,
                         27% 46.2%, 27% 60.5%, 94.2% 60.5%, 94.2% 46.2%, 27% 46.2%, 21.8% 0);
    }
    #desktop-apps .desktop-landing .desktop-display::before,
    #desktop-apps .desktop-landing .desktop-display::after {
      content: "";
      position: absolute;
      inset: 0;
      z-index: 1;
      pointer-events: none;
      border-radius: 6px;
      background: var(--desktop-image) center / 100% 100% no-repeat;
    }
    .desktop-display::before {
      clip-path: inset(0 78.2% 0 0 round 4px);
      transform: translate(calc(-1 * var(--spread) * var(--separation)), calc(var(--spread) * 13px));
    }
    .desktop-display::after {
      clip-path: inset(46.2% 5.8% 39.5% 27% round 4px);
      transform-origin: 60% 53%;
      transform: translate(calc(var(--spread) * var(--separation) * .66), calc(var(--spread) * var(--separation)))
                 scale(calc(1 + .16 * var(--spread)));
    }
  }
  .desktop-feature.lower-in-view .desktop-feature-copy h2 {
    animation: desktop-title-rise .70s cubic-bezier(.17,.73,.2,1) both;
  }
  .showcase-hero-inner.lower-in-view h1 span {
    background-size: 180% 100%;
    animation: desktop-headline-ink 1.4s cubic-bezier(.2,.65,.25,1) both;
  }
  @keyframes desktop-assembly {
    0%, 12% { --desktop-arrival: 1; }
    100% { --desktop-arrival: 0; }
  }
  @keyframes desktop-title-rise {
    from { clip-path: inset(0 0 88% 0); transform: translateY(12px); }
    to { clip-path: inset(-10% 0 -10% 0); transform: none; }
  }
  @keyframes desktop-headline-ink {
    from { background-position: 100% center; }
    to { background-position: 20% center; }
  }
}
