JSFiddle - React, Tailwind, and code Playground

HTML

<div class="stage">
  <div class="trapezoid"></div>
</div>
<div class="stage2">
  <div class="trapezoid2"></div>
</div>

CSS

.stage {
  perspective: 600px;
}

.trapezoid {
  width: 300px;
  height: 300px;
  background: black;
  transform: rotateX(-20deg) skew(-20deg) translateZ(-10px);
  border-radius: 15px;
  background: white;
  border: 1px solid;
}

.stage2 {
  perspective: 600px;
  position: absolute;
  left: 350px;
  top: 0;
}

.trapezoid2 {
  width: 300px;
  height: 300px;
  background: black;
  transform: rotateX(-46deg) skew(-18deg) translateZ(20px);
  border-radius: 15px;
  background: white;
  border: 1px solid;
}