.carousel {
  --paddingBlock: 80px;

  position: relative;
  display: flex;
  flex-direction: row;
  width: 100%;
  gap: 1rem;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  perspective: 100px;
  padding: calc(var(--paddingBlock) * 2) 0;
  margin: calc(var(--paddingBlock) * -1) 0;
  background-color: #fff;

  --z: -50;
  transform: translate3d(var(--x, 0),var(--y, 0),calc(var(--z, 0) * 1px)) scale(calc(1 + var(--z, 0) * -1 / 100));
  transform-origin: center;
  z-index: 1;
}
.carousel::-webkit-scrollbar {
  display: none;
}

.carousel::before,
.carousel::after {
  content: '';
  margin-inline: -1rem;
  min-width: calc(50% - calc(var(--max-width, 600px) / 2));
}

.carousel .carousel__item {
  /* min-width: 360px; */
  /* height: 200px; */
  min-width: 180px;
  height: 360px;
  background-color: darkred;
  border-radius: 10px;
  padding: 0 4%;
  background-position: center;
  background-size: cover;

  transform-style: preserve-3d;
}
.carousel--landscape article {
  min-width: 360px;
  height: 180px;
}

.carousel h2 {
  --z: -2;

  position: relative;
  text-align: center;
  display: block;
  color: #fff;
  font-size: 1rem;
  font-family: "TheFont";
  font-size: 1.2rem;
  /* background-color: #fff; */
  transform: translate3d(var(--x, 0),var(--y, 0),calc(var(--z, 0) * 1px)) scale(calc(1 + var(--z, 0) * -1 / 100));
}
.carousel article:nth-child(1) h2 {
  --Z: -5;
}
.carousel article:nth-child(2) h2 {
  --Z: -25;
}
.carousel article:nth-child(3) h2 {
  --Z: -10;
}
.carousel article:nth-child(4) h2 {
  --Z: -5;
}
.carousel article:nth-child(5) h2 {
  --Z: -10;
}

.carousel article:hover {
  background-color: rgb(108, 2, 2);
}

.carousel p {
  --z: -5;

  font-size: .875rem;
  transform: translate3d(var(--x, 0),var(--y, 0),calc(var(--z, 0) * 1px)) scale(calc(1 + var(--z, 0) * -1 / 100));
  transform-origin: right;
}
