.is-sent {
    animation: launch 1.5s ease-in-out forwards;
}

@keyframes launch {
    /* ... other keyframes ... */
    71% {
        opacity: 0;
        transform: translateX(100vw) scale(0.5);
    }

    100% {
        opacity: 0; /* Keep the envelope invisible */
        transform: translateX(100vw) scale(0.5);
    }
}

#envelope {
    position: relative;
    width: 280px;
    height: 180px;
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
    margin-left: auto;
    margin-right: auto;
    top: 150px;
    background-color: #0066CC;
    box-shadow: 0 4px 20px rgba(0,0,0,.2);
    display: none;
}

.front {
    position: absolute;
    width: 0;
    height: 0;
    z-index: 3;
}

.flap {
    border-left: calc(280px / 2) solid transparent;
    border-right: calc(280px / 2) solid transparent;
    border-bottom: calc( calc( 180px / 2) - 8px) solid transparent;
    border-top: calc( calc( 180px / 2) + 8px) solid #3F9FFF;
    transform-origin: top;
    pointer-events: none;
}

.pocket {
    border-left: calc(280px / 2) solid #0066CC;
    border-right: calc(280px / 2) solid #0066CC;
    border-bottom: calc(180px / 2) solid #3F9FFF;
    border-top: calc(180px / 2) solid transparent;
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
}

.letter {
    position: relative;
    background-color: #fff;
    width: 90%;
    margin-left: auto;
    margin-right: auto;
    height: 90%;
    top: 5%;
    border-radius: 6px;
    box-shadow: 0 2px 26px rgba(0,0,0,.12);
}

.letter:after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background-image: linear-gradient(180deg, rgba(255,255,255,0.00) 25%, rgba(215,227,239,0.70) 55%, rgba(215,227,239,1.00) 100%);
}

.words {
    position: absolute;
    left: 10%;
    width: 80%;
    height: 14%;
    background-color: #EEEFF0;
}

.words.line1 {
    top: 15%;
    width: 20%;
    height: 7%;
}

.words.line2 {
    top: 30%;
}

.words.line3 {
    top: 50%;
}

.words.line4 {
    top: 70%;
}

.open .flap {
    transform: rotateX(180deg);
    transition: transform .4s ease, z-index .6s;
    z-index: 1;
}

.close .flap {
    transform: rotateX(0deg);
    transition: transform .4s .6s ease, z-index 1s;
    z-index: 5;
}

.close .letter {
    transform: translateY(0px);
    transition: transform .4s ease, z-index 1s;
    z-index: 1;
}

.open .letter {
    transform: translateY(-60px);
    transition: transform .4s .6s ease, z-index .6s;
    z-index: 2;
}

.envlope-wrapper {
    position: fixed; /* o absolute, dependiendo de tus necesidades */
    top: 50%; /* Ajusta estas propiedades para posicionar donde quieras */
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000; /* Asegúrate de que este valor sea más alto que el de otros elementos */
}

.reset {
    text-align: center;
}

.reset button {
    font-weight: 800;
    transition: all .1s linear;
    -webkit-appearance: none;
    background-color: transparent;
    border: solid 2px #fff;
    border-radius: 4px;
    color: #fff;
    display: inline-block;
    font-size: 14px;
    text-transform: uppercase;
    margin-top: 20px;
    padding: 10px;
    line-height: 1em;
    text-decoration: none;
    min-width: 120px;
    cursor: pointer;
}

.reset button:hover {
    background-color: #39393f;
    color: #fff;
}