* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  height: 100vh;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: sans-serif;
  background-color: #3B4049;
  font-size: 16px;
  color: #fff;
}

.wrapper {
  height: 400px;
  width: 600px;
  background-color: #3760C9;
  position: relative;
  display: flex;
  justify-content: center;
  z-index: 0;
}

.lid {
  position: absolute;
  height: 100%;
  width: 100%;
  top: 0;
  left: 0;
  border-right: 300px solid transparent;
  border-bottom: 200px solid transparent;
  border-left: 300px solid transparent;
  transform-origin: top;
  transition: transform 0.25s linear;
}

/* Lid when closed */
.lid.one {
  border-top: 200px solid #658ced;
  transform: rotateX(0deg);
  z-index: 3;
  transition-delay: 0.75s;
}

/* Lid when opened */
.lid.two {
  border-top: 200px solid #3760C9;
  transform: rotateX(90deg);
  z-index: 1;
  transition-delay: 0.5s;
}

.envelope {
  position: absolute;
  height: 100%;
  width: 100%;
  top: 0;
  left: 0;
  border-top: 200px solid transparent;
  border-right: 300px solid #C4DFF0;
  border-bottom: 200px solid #C4DFF0;
  border-left: 300px solid #a4d4f2;
  z-index: 3;
}

.letter {
  position: absolute;
  top: 0;
  width: 80%;
  height: 80%;
  background-color: white;
  border-radius: 15px;
  z-index: 2;
  transition: 0.5s;
}

.content {
  text-align: center;
  margin: 20px 20px 0 20px;
  color: #3B4049;
}

.content-link:hover {
  color: #ffb347;
}

.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;
}

a {
  text-decoration: underline;
  color: #7994d8;
  font-weight: bold;
  font-size: 24px;
  transition: color 0.3s ease;
}

p {
  font-size: 18px;
  margin: 10px 0;
}