body {
  height: 100vh;
}

.clicable-area {
  perspective: 800px;
  transform-style: preserve-3d;
  opacity: 1;
  filter: blur(0px) grayscale(0);
  transition: filter 0.4s;
}

.card-1,
.card-2,
.card-3 {
  transform-style: preserve-3d;
  position: relative;
}

.view-more {
  display: none;
}

.wrapper {
  width: 200px;
  height: 300px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-style: preserve-3d;
  transition: 0.6s ease-in-out;
}

.card {
  display: grid;
  place-items: center;
  height: 100%;
  width: 100%;
  position: absolute;
  border-radius: 20px;
  transition: 0.6s ease-in-out;
}

.backside {
  background-color: brown;
  box-shadow:
    0px 0px 1px 5px rgb(90, 89, 89) inset,
    0px 0px 25px 10px rgb(68, 14, 14) inset;
  font-family: Verdana, sans-serif;
  font-size: 50px;
  font-weight: 600;
  backface-visibility: hidden;
  transform: rotateX(0turn);
}

.backside p {
  color: rgb(68, 14, 14);
  border-radius: 50%;
  box-shadow: 0px 0px 20px 4px rgb(68, 14, 14);
  filter: drop-shadow(0px 0px 2px rgb(68, 14, 14));
  padding: 10px 15px;
  background-color: #fff;
}

/* --------------- Kendo -------------- */

.wrapper-kendo .front {
  background: url("../images/kendo-bg.png") no-repeat 100% 0%;
  background-size: cover;
  rotate: Y 0.5turn;
  filter: contrast(0.9) hue-rotate(500deg) grayscale(0.6);
  transform: rotateX(0turn);
}

.wrapper-kendo .caracter {
  background: url("../images/kendo.png") no-repeat center;
  filter: drop-shadow(0px 50px 20px rgba(0, 0, 0, 0.651));
  filter: drop-shadow(2px 2px 10px rgb(254, 255, 255));
  background-size: 90%;
  backface-visibility: hidden;
  rotate: Y 0.5turn;
  transform: rotateX(20deg) translateZ(0px);
  transform-origin: bottom;
}

/* --------------- Monozukuri -------------- */

.wrapper-monozukuri .front {
  background: url("../images/monozukuri-bg.png") no-repeat 100% 0%;
  background-size: cover;
  rotate: Y 0.5turn;
  filter: contrast(0.9) hue-rotate(500deg) grayscale(0.6);
  transform: rotateX(0turn);
}

.wrapper-monozukuri .caracter {
  background: url("../images/monozukuri.png") no-repeat center;
  filter: drop-shadow(0px 50px 20px rgba(0, 0, 0, 0.651));
  filter: drop-shadow(2px 2px 10px rgb(254, 255, 255));
  background-size: 100%;
  backface-visibility: hidden;
  rotate: Y 0.5turn;
  transform: rotateX(20deg) translateZ(0px);
  position: relative;
  right: 7px;
  transform-origin: bottom;
}

/* --------------- Bushidô -------------- */
.wrapper-bushido .front {
  background: url("../images/bushido-bg.png") no-repeat 100% 0%;
  background-size: cover;
  rotate: Y 0.5turn;
  filter: contrast(0.9) grayscale(0.2);
  transform: rotateX(0turn);
}

.wrapper-bushido .caracter {
  background: url("../images/bushido.png") no-repeat center;
  filter: drop-shadow(0px 50px 20px rgba(0, 0, 0, 0.651));
  filter: drop-shadow(2px 2px 10px rgb(254, 255, 255));
  background-size: 127%;
  backface-visibility: hidden;
  rotate: Y 0.5turn;
  transform: rotateX(20deg) translateZ(0px);
  transform-origin: bottom;
}

/* .priority-kendo{z-index: 3;}
  .priority-monozukuri{z-index:2;}
  .priority-bushido{ z-index:2;}
   */

@keyframes slow {
  from {
    filter: blur(1);
  }
  to {
    filter: blur(0);
  }
}

@keyframes fading {
  from {
    opacity: 0;
    filter: blur(5px);
  }
  to {
    opacity: 1;
    filter: blur(0px);
  }
}
@keyframes fading-out {
  from {
    filter: opacity(1) blur(0px);
  }
  to {
    filter: opacity(0) blur(25px);
  }
}

.textContainer {
  display: block;
  background-color: #b37a5f;
  position: absolute;
  box-sizing: border-box;
  box-shadow: 0px 0px 10px 2px black;
  width: 250px;
  height: 200px;
  right: 220px;
  border-radius: 0px;
  top: 60px;
  left: 220px;
  transform-origin: top left;
  rotate: Y 90deg;
  color: black;
  font-family: "Poppins", sans-serif;
  padding: 15px;
  filter: opacity(0);
  transition: 0.3s;
}

.card-1 .textContainer h2,
.card-2 .textContainer h2 {
  margin-bottom: 10px;
}

main .card-3 .card.textContainer {
  transform-origin: right;
  left: -270px;
  right: 0px;
}

.card-1:hover,
.card-2:hover,
.card-3:hover .textContainer {
  z-index: 1;
}

.clicable-area:hover ~ .textContainer {
  rotate: Y 0deg;
  animation: fading 1s forwards;
}

.clicable-area:not(:hover) ~ .textContainer {
  animation: fading-out 0.3s backwards;
}

.textContainer h2 {
  font-size: 20px;
  width: 100%;
  font-weight: 800;
  text-align: center;
  color: #fff;
  text-shadow: 3px 1px 5px black;
}
.textContainer p {
  font-size: 14px;
  color: #fff;
  text-shadow: 3px 1px 5px black;
}

.wrapper-bushido .textContainer {
  right: 0px;
  left: 220px;
}

.clicable-area:hover {
  cursor: pointer;
}

main:has(.clicable-area:hover) .clicable-area:not(:hover) {
  filter: blur(5px) grayscale(0.4);
}

.clicable-area:hover > .wrapper {
  transform: rotateY(0.5turn);
}

.clicable-area:hover .front {
  transform: rotateX(0.1turn);
}
.clicable-area:hover .backside {
  transform: rotateX(-0.1turn);
}

.clicable-area:hover .caracter {
  transform: rotateX(-1deg) translateZ(100px);
}
