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

body {
  background: #e6e2d8;
}

@font-face {
    font-family: "sloop-script-pro", sans-serif;
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: "minion-pro", serif;
    font-weight: 600;
    font-style: normal;
}

header{
    z-index: 15;
    position: fixed;
    width: 100%;
    height: 65px;
    background-color: #e6e6e0; 
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.3);
}

.logo-header{
    position: absolute;
    bottom: -45px;
    width: 140px;
    height: auto;
}

#landing-animation {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #5d5532;
  z-index: 20;
}

#landing-animation.hide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s;
}

.marriage-text {
  color: #baaf87;
  font-family: "minion-pro", serif;
  position: absolute;
  width: 100vw;
  left: 0;
  /* Initially centered vertically */
  top: 50%;
  transform: translateY(-50%);
  text-align: center;
  font-size: 3em;
  z-index: 10;
  transition: top 0.7s, transform 0.7s, opacity 0.5s;
}

.slide-up {
  display: inline-block;
  opacity: 0;
  transform: translateY(60px) scale(0.85);
  transition: opacity 0.5s, transform 0.6s;
}
.slide-up.active {
  opacity: 1;
  transform: none;
}

/* Move text to top when image1 comes in */
.marriage-text.to-top {
  top: 10%;
  transform: translateY(0);
  opacity: 1;
}

.marriage-text.hide {
  opacity: 0;
}

/* Landing images */
.landing-img {
  position: absolute;
  left: 50%;
  width: 100vw;
  max-width: 100%;
  min-width: 320px;
  height: 100%;
  object-fit: cover;
  /* below viewport initially */
  top: 110%;
  transform: translateX(-50%);
  opacity: 0;
  z-index: 11;
  transition: top 2s cubic-bezier(.74,.01,.42,.98), opacity 0.6s;
  visibility: hidden;
}
/* Slide image to top - keep in place */
.landing-img.show {
  opacity: 1;
  top: 0;
  visibility: visible;
}

/* Slide image out above viewport */
.landing-img.move-up {
  top: -60%;
  opacity: 0;
  visibility: hidden;
}


.hero-section {
  width: 100vw;
  opacity: 1;
  transition: none !important; 
  z-index: 1;
  background-color: #5d5532;
  height: 100vh;
  min-height: 700px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "sloop-script-pro";
  overflow: hidden;
}


.photo-frame{
    background-color: #e6e6e0;
    max-width: 1200px;
    margin: 0 auto;
    padding: 5px;
    text-align: center;
    width: 700px;
    height: auto;
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
}

.stamp-01{
    position: absolute;
    top: 338px;
    left: -99px;
    width: 200px;
    height: auto;
    z-index: 10;
    rotate: -6deg;
}

.stamp-02{
    position: absolute;
    top: -39px;
    right: -114px;
    width: 246px;
    height: auto;
    z-index: 10;
}

.image-container{
    z-index: 2; 
    display: flex;
    justify-content: center;
    align-items: center;
    object-fit: cover;
}

.image-proposal{
    padding-top: 3%;
    width: 93%;
    height: auto;
}

.photo-caption{
    font-family: "sloop-script-pro";
    font-size: 2.4em;
    line-height: 45px;
    margin-top: 20px;
    color: #501e26;
}

.photo-caption span{
    font-size: 0.5em;
    font-family: "minion-pro";
    color: #5d5532;
}

.image-stack {
  position: relative;
  margin: 0 auto;
  width: 500px;
  height: 400px;
  opacity: 0;
  transform: translateY(60px) scale(0.85);
  transition: opacity 0.6s cubic-bezier(0.4,0.25,0.62,1), transform 0.7s cubic-bezier(0.4,0.25,0.62,1);
}

/* When stack enters view: fade/slide/scale in as a unit */
.image-stack.revealed {
  opacity: 1;
  transform: none;
}

.img {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: auto;
  opacity: 0;
  pointer-events: none;
  transition: top 0.2s cubic-bezier(0.4,0.25,0.62,1), opacity 0.3s;
}

.envelope-section {
  overflow: hidden;
  position: relative;
  height: 700px;
  display: block;
  opacity: 0;
  transform: translateY(60px) scale(0.85);
  transition: opacity 0.6s cubic-bezier(0.4,0.25,0.62,1), 
              transform 0.7s cubic-bezier(0.4,0.25,0.62,1);
}

.envelope-section.revealed {
  opacity: 1;
  transform: none;
}

.envelope-closed {
  z-index: 4;
  opacity: 1;
  pointer-events: auto;
}

/* Background images */
.envelope-bg {
  height: auto;
  z-index: 1;
  pointer-events: none; 
}

.envelope-bg.bg1 {
position: absolute;
  top: 16%; 
  left: 17%;
  width: 17%;
  transform: rotate(-18deg);
}

.envelope-bg.bg2 {
  position: absolute;
  top: -15%; right: 2%;
  width: 40%;
  transform: rotate(-20deg);
}

/* Animation sequence after interaction */
.image-stack.animated .envelope-closed {
  opacity: 0;
  pointer-events: none;
}
.image-stack.animated .envelope-open {
  z-index: 1;
  opacity: 1;
}
.image-stack.animated .envelope-half {
  z-index: 3;
  opacity: 1;
}
/* savethedate delayed reveal */
.image-stack.savethedate .save-the-date {
  z-index: 2;
  opacity: 1;
}
/* Move save-the-date up */
.image-stack.bumped .save-the-date {
  top: -50px;
}

.invitation-section{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding-bottom: 40px;
}

.invitation-section p{
    font-family: "sloop-script-pro", sans-serif;
    font-size: 1.6em;
    color: #5d5532;
}

.invitation-text{
    max-width: 700px;
    text-align: center;
    font-size: 1.8em;
    color: #5d5532;
}

.confirm-button{
    margin-top: 25px;
    padding: 4px 70px;
    font-size: 1.2em;
    letter-spacing: 0.1em;
    font-family: "minion-pro", serif;
    color: #501e26;
    border: 2px solid #501e26;
    background-color: #e6e6e0;
    border-radius: 200px;
    cursor: pointer;
    text-decoration: none;
    transition: 0.6s;
}

.confirm-button:hover{
    color: #e6e6e0;
    background-color: #501e26;
}

.confirm-button:active{
    color: #e6e6e0;
    background-color: #501e26;
}

.footer{
    margin-top: 30px;
    font-family: "sloop-script-pro", sans-serif;
    font-size: 2.5em;
    color: #5d5532;
}


  /* Small screens (Mobile) */
@media (max-width: 576px) {

    .marriage-text {
        font-size: 1em;
    }

  .photo-frame {
    margin-top: 40px;
    width: 90vw;
    height: 60vh;
  }

.image-container{
    height: 85%;
}

  .image-proposal{
    padding-top: 3%;
    width: 93%;
    height: 100%;
    object-fit: cover;
}

  .photo-caption {
    font-size: 2.2em;
    line-height: 28px;
  }

  .image-stack {
    position: relative;
    margin: 0 auto;
    width: 400px;
    height: 400px;
    opacity: 0;
    transform: translateY(60px) scale(0.85);
    transition: opacity 0.6s cubic-bezier(0.4,0.25,0.62,1), transform 0.7s cubic-bezier(0.4,0.25,0.62,1);
}

.stamp-01{
    position: absolute;
    top: 480px;
    left: -19px;
    width: 130px;
    height: auto;
    z-index: 10;
    rotate: -8deg;
}

.stamp-02{
    position: absolute;
    top: -60px;
    right: -22px;
    width: 160px;
    height: auto;
    z-index: 10;
}

.envelope-section{
    height: 560px;
}

.invitation-text{
    font-size: 1.3em;
    padding: 0 12px;
}

.envelope-bg.bg1 {
position: absolute;
  top: 5%; 
  left: 4%;
  width: 39%;
  transform: rotate(-30deg);
}

.envelope-bg.bg2 {
  position: absolute;
  top: -8%; right: -36%;
  width: 89%;
  transform: rotate(-20deg);
}

}

/* Medium devices (tablets) */

@media (min-width: 769px) and (max-width: 992px) {
    .marriage-text {
        font-size: 2em;
    }

    .stamp-01{
        position: absolute;
        top: 428px;
        left: -31px;
        width: 180px;
        height: auto;
        z-index: 10;
        rotate: -8deg;
    }

    .stamp-02{
        position: absolute;
        top: -60px;
        right: -56px;
        width: 200px;
        height: auto;
        z-index: 10;
    }

    .hero-section{
        height: 85vh;
    }

    .envelope-bg.bg1 {
        position: absolute;
        top: 16%; 
        left: 5%;
        width: 25%;
        transform: rotate(-30deg);
    }

    .envelope-bg.bg2 {
        position: absolute;
        top: -12%; right: -21%;
        width: 63%;
        transform: rotate(-20deg);
    }
}

/* Large devices (desktops) */
@media (min-width: 1250px) and (max-width: 1300px) {
    .marriage-text {
        font-size: 3.5em;
    }
}

/* Large devices (desktops) */
@media (min-width: 1300px) and (max-width: 1500px)  {
    .marriage-text {
        font-size: 3.5em;
    }

    .envelope-section{
        height: 750px;
    }

    .envelope-bg.bg1 {
        position: absolute;
        top: 6%; 
        left: 18%;
        width: 21%;
        transform: rotate(-30deg);
    }

    .envelope-bg.bg2 {
        position: absolute;
        top: -21%; 
        right: -2%;
        width: 45%;
        transform: rotate(-20deg);
    }
}

/* Large devices (desktops) */
@media (min-width: 1300px) {
    .marriage-text {
        font-size: 4em;
    }

    .envelope-section{
        height: 760px;
    }

    .envelope-bg.bg1 {
        position: absolute;
        top: 12%; 
        left: 16%;
        width: 19%;
        transform: rotate(-30deg);
    }

    .envelope-bg.bg2 {
        position: absolute;
        top: -11%; 
        right: -1%;
        width: 45%;
        transform: rotate(-20deg);
    }
}