* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  height: 100vh;
  width: 100%;
  justify-content: center;
  align-items: center;
  background-color: #3B4049;
}

.wrapper {
  height: 500px;
  width: 1000px;
  background-color: #a23e35;
  position: relative;
  display: flex;
  justify-content: center;
  z-index: 0;
}

.lid {
  position: absolute;
  height: 100%;
  width: 100%;
  top: 0;
  left: 0;
  clip-path: polygon(0 0, 100% 0, 50% 50%);
  transform-origin: top;
  transition: transform 0.25s linear;
}

.lid.one {
  background-color: #d3544a;
  transform: rotateX(0deg);
  z-index: 3;
  transition-delay: 0.75s;
}

.lid.two {
  background-color: #a23e35;
  transform: rotateX(90deg);
  z-index: 1;
  transition-delay: 0.5s;
}

.envelope {
  position: absolute;
  height: 100%;
  width: 100%;
  top: 0;
  left: 0;
  border-top: 75px solid transparent;
  border-right: 50px solid #ec6a5e;
  border-bottom: 75px solid #ec6a5e;
  border-left: 50px solid #e45f53;
  z-index: 3;
}

.letter {
  position: absolute;
  bottom: 0;
  width: 90%;
  height: 90%;
  padding-top: 10px;
  background-color: white;
  border-radius: 3px;
  z-index: 2;
  transition: 0.5s;
}

.letter::before {
  content: '';
  position: absolute;
  top: 0;
  width: 100%;
  height: 10px;
  background: repeating-linear-gradient(-45deg, #cb5a5e, #cb5a5e 8px, transparent 8px, transparent 16px);
}

.letter p {
  text-align: center;
  font-size: 30px;
  margin-top: 100px;
  color: #3B4049;
}

.wrapper:hover .lid.one {
    transform: rotateX(90deg);
    transition-delay: 0s;
}

.wrapper:hover .lid.two {
    transform: rotateX(180deg);
    transition-delay: 0.25s;
}

.wrapper:hover .letter {
  transform: translateY(-50px);
  transition-delay: 0.5s;
  height: 240px;
}