* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  height: 100vh;
  max-width: 90vw;
  overflow-x: hidden;
  display: flex;
  margin-left: auto;
  margin-right: auto;
  justify-content: center;
  align-items: center;
  font-family: sans-serif;
  background-image: url("ecardImages/natural-paper.png");
  background-color: #f8ded7;
  
  
}

.wrapper{
  position: relative;
  display: flex;
  
  background-color: transparent;
  min-height: auto;
  max-width: 98%;
  aspect-ratio: 1/1;
  margin-left: auto;
  margin-right: auto;
  justify-content: center;
  align-items: center;
  z-index: 0;
  
}
@media (width >= 768px) {
  .wrapper {
    min-width: 40rem;
    
  }
}
/*Text above image*/
.instruction{
  position: absolute;
  align-self: start;
  width: 100%;
  background-color: transparent;
  font-size: 1.5rem;
  font-family: "Oregano";
  color: rgb(156, 140, 140); 
  text-align: center;
  transition: transform 0.10s ease-in-out; 
}

.move{
  animation: move-up 0.6s ease-in-out forwards;
}

@keyframes move-up {
  from {
    transform: translatey(0px);
  }
  to {
    transform: translatey(-150px); 
  }
}

/*EVERYTHING IN THE ENVELOPE*/
.envelope{
  position: relative;
  display: grid;
  grid-row: 1 / -1;
  background-color: transparent;
  box-shadow: 3px 3px 3px  #d6c0ba;
  align-self: end;
  min-width: 28rem;
  aspect-ratio: 1.4/1;
  justify-content: center;
  align-items: center;
  z-index: 1;
}
@media (width >= 768px) {
  .envelope {
    min-width: 40rem
    
  }
}

.lid-down {
  position: absolute;
  height: 50%;
  width: 100%;
  top: 0;
  left: 0;
  transform-origin: top;
  opacity: 1;
  transition: opacity .5s ease-in;
  /*transform: rotateX(0deg);*/
  /*align-self: start;*/
  clip-path: polygon(0% 0%, 100% 0%, 50% 100%);
 background-color: #D3AF37;
  /* Defines the three points of the triangle */
  z-index: 5;
  
}

.state-up {
animation: flipVertical 0.6s ease-in-out forwards;
}

/*Makes the lid flip smoothly*/
@keyframes flipVertical {
  from {
    transform: rotateX(0deg);
  }
  to {
    transform: rotateX(180deg);
  }
}
  
.bottom-env{
  position: absolute;
  opacity: 1;
  transition: opacity .5s ease-in;
  width: 100%;
  height: 50%;
  align-self: end;
  background-color: #D3AF37;
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  z-index: 4
}

.right-env {
  position: absolute;
  opacity: 1;
  transition: opacity .5s ease-in;
  width: 50%;
  height: 100%;
  place-self: end end;
  background-color: #d6b23c;
  clip-path: polygon(100% 0, 0 50%, 100% 100%);
  
  z-index: 2;
}

.left-env {
  position: absolute;
  opacity: 1;
  transition: opacity .5s ease-in;
  width: 50%;
  height: 100%;
  place-self: start start;
  background-color: #d6b23c;
  clip-path: polygon(0% 0%, 100% 50%, 0% 100%);
  z-index: 3;
}

/*Seal on envelope*/
.btn {
  position: absolute; /* Positions the button relative to the .wrapper */
  top: 50%;           /* Move down 50% from the top */
  left: 50%;          /* Move right 50% from the left */
   height: 100px;
   width: 100px;
   background: transparent;
   border: none;
   transform: translate(-50%, -50%); /* Perfectly centers the button */
   z-index:6;
   opacity: 1;
   transition: opacity 0.3s ease-in;
   /*transition-delay: 1s;*/
}
.seal{
  
  width: 100%;
  height: auto;
  
  opacity: 1;
  transition: opacity 0.6s ease-in;
  transition-delay: 4s;
  z-index: 6;
  
 
}

.dissolve {
  opacity: 0;
  transition: opacity 0.9s ease-in-out;
  pointer-events: none; /* Prevents clicks on the hidden element */
}

/*END OF ENVELOPE*/
/*BEGINNING OF IMAGE*/

.img-in{
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
opacity: 1;
  transition: opacity .3s ease-in;
  background-color: #d6b23c;
  transition: transform 0.5s ease-in-out;
   
}

.img-rise{
  transform: translateY(-170px);
   transition-delay: 0s;
   /*animation: riseAndFall 3s ease-in-out;*/
}

.grow {
  height: 630px;
  transition: height 0.9s ease-in-out;
}

/*This is the greeting*/
  .card {
    z-index:8;
    background-color: white; 
    display: flex;
    justify-content: center; /* Centers horizontally */
    align-items: center;
    background-image: url("ecardImages/natural-paper.png");
    background-color: #ffcedf;
    color: #64200e;
    font-family: "Baumans", system-ui;
    font-size: 2rem;
    font-style: normal;
    padding: 10%; 
    min-height: 300px;
    min-width: 90vw;
    box-shadow: 5px 5px 5px #d6c0ba;
    border-radius: 8px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease, visibility 0.5s ease;
    
  }

  .card.isVisible {
    opacity: 1;
    visibility: visible;
    transition: opacity .5s ease, visibility 0.5s ease;
  }


/*.grow2{
  transform: translateY(10px);
  transition: transform 0.9s ease-out;

}



.moveBack{
transform: translatey(500px); 
transition: transform 0.5s ease-in-out; 
}*/





