/* Front page envelope screen */
.envelope-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background:
    radial-gradient(circle at top, #fff7ec, #ead7c0 55%, #caa77b);
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 1s ease, visibility 1s ease;
}

.envelope-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.envelope-wrapper {
  cursor: pointer;
  text-align: center;
}

.envelope {
  position: relative;
  width: 500px;
  height: 330px;
  animation: envelopeFloat 3s ease-in-out infinite;
}

.envelope-body {
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, #f8ead8, #e0bd91);
  border-radius: 12px;
  box-shadow: 0 25px 70px rgba(75, 45, 25, 0.28);
  border: 1px solid rgba(115, 78, 45, 0.18);
}

.envelope-body::before,
.envelope-body::after {
  content: "";
  position: absolute;
  bottom: 0;
  width: 50%;
  height: 100%;
  background: rgba(255, 248, 239, 0.35);
}

.envelope-body::before {
  left: 0;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.envelope-body::after {
  right: 0;
  clip-path: polygon(100% 0, 0 50%, 100% 100%);
}

.envelope-flap {
  position: absolute;
  top: 0;
  left: 0;
  width: 500px;
  height: 195px;
  background: linear-gradient(145deg, #e7c69d, #d1a977);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top;
  z-index: 3;
  border-radius: 12px 12px 0 0;
  transition: transform 0.9s ease;
}

.envelope-card {
  position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 310px;
    height: 200px;
    top: 80px;
    background: transparent;
    border-radius: 18px;
    z-index: 99;
    /* box-shadow: 0 12px 35px rgba(70, 45, 30, 0.18); */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #5a3b2b;
    transition: transform 1s ease, opacity 0.8s ease;
}



.emblem {
    width: 110px;
    height: 110px;
    font-size: 38px;
    border-radius: 50%;
    border: 1.5px solid #9b7045;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: #8a623d;
    margin-bottom: 12px;
    letter-spacing: 1px;
    background: #fffaf3;
}

.envelope-card p {
  font-size: 20px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #7a5235;
}

.envelope.open .envelope-flap {
  transform: rotateX(180deg);
}

.envelope.open .envelope-card {
  transform: translateX(-50%) translateY(-95px);
  opacity: 0;
}

.envelope-screen.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

@keyframes envelopeFloat {
  0%, 100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

/* Main site starts slightly hidden until envelope opens */
.main-site {
  opacity: 0;
  transition: opacity 1.2s ease;
}

.main-site.visible {
  opacity: 1;
}

/* Mobile envelope */
@media (max-width: 600px) {
  .envelope {
    width: 280px;
    height: 190px;
  }


  .envelope-flap {
    width: 280px;
    height: 112px;
  }

  .envelope-card {
    width: 185px;
    height: 120px;
    top: 55px;
  }

  .envelope-card p {
    font-size: 13px;
  }

  .emblem {
    width: 68px;
    height: 68px;
    font-size: 23px;
  }
}
/* Generel styling */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Georgia, "Times New Roman", serif;
  background-color: #f6efe6;
  color: #4a3426;
}

/* Forside */
.hero {
  position: relative;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  background-color: #ead7c0;
}

.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;

  /* Use this if you still see black bars */
  transform: scale(1.04);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(70, 45, 30, 0.28);
  z-index: 1;
}

.hero-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: #fff8ef;
  text-align: center;
  padding: 20px;
  text-shadow: 0 4px 18px rgba(40, 25, 15, 0.55);
}

.hero-content h1 {
  font-size: 64px;
  font-weight: 400;
  letter-spacing: 2px;
  margin: 15px 0;
}

.small-text {
  font-size: 22px;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.hero-date {
  font-size: 26px;
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 35px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff8ef;
  text-align: center;
  z-index: 3;
  font-size: 14px;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.95;
  text-shadow: 0 3px 12px rgba(40, 25, 15, 0.7);
}

.arrow {
  width: 18px;
  height: 18px;
  border-right: 2px solid #fff8ef;
  border-bottom: 2px solid #fff8ef;
  transform: rotate(45deg);
  margin: 10px auto 0;
  animation: bounce 1.5s infinite;
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0) rotate(45deg);
  }

  50% {
    transform: translateY(8px) rotate(45deg);
  }
}

/* Invitation section */
.invitation-section {
  padding: 95px 24px;
  background: linear-gradient(180deg, #ead7c0, #f6efe6);
}

.invitation-layout {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  gap: 42px;

  /* Makes the image slider match the card height */
  align-items: stretch;
}

/* Text box */
.content-box {
  background-color: #fffaf3;
  padding: 56px 42px;
  text-align: center;
  border-radius: 28px;
  box-shadow: 0 18px 45px rgba(90, 60, 40, 0.14);
  border: 1px solid #d6b88f;
}

.intro-text {
  font-size: 28px;
  line-height: 1.6;
  margin-bottom: 32px;
  color: #5a3b2b;
}

.content-box h2 {
  font-size: 32px;
  font-weight: 400;
  color: #8a623d;
  margin-bottom: 32px;
}

.details {
  margin-bottom: 32px;
  font-size: 20px;
  line-height: 1.8;
}

.location {
  margin: 32px 0;
  padding: 26px 20px;
  border-top: 1px solid #d8b98c;
  border-bottom: 1px solid #d8b98c;
}

.location h3 {
  font-size: 30px;
  color: #9b7045;
  margin-bottom: 12px;
  letter-spacing: 1px;
}

.location p {
  font-size: 20px;
  line-height: 1.6;
}

.closing-text {
  font-size: 22px;
  margin: 28px 0 20px;
}

.rsvp {
  font-size: 20px;
  color: #6b4630;
}

.rsvp strong {
  color: #9b7045;
}

/* Image slider beside invitation */
.image-slider {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: 30px;
  overflow: hidden;
  background-color: #ead7c0;
  box-shadow: 0 18px 45px rgba(90, 60, 40, 0.18);
  border: 1px solid rgba(214, 184, 143, 0.8);
}

.slider-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;

  /* Fills the whole image container */
  object-fit: cover;
  object-position: center center;

  background-color: #ead7c0;
  opacity: 0;
  transition: opacity 1.3s ease-in-out;
}

.slider-image.active {
  opacity: 1;
}

/* Footer */
.footer-section {
  padding: 78px 20px;
  text-align: center;
  background-color: #4a3426;
  color: #fff4e8;
}

.footer-section h2 {
  font-size: 34px;
  font-weight: 400;
  margin-bottom: 20px;
}

.footer-section p {
  font-size: 22px;
}

/* Tablet/mobile */
@media (max-width: 900px) {
  .invitation-layout {
    grid-template-columns: 1fr;
    gap: 28px;
    align-items: stretch;
  }

  .image-slider {
    height: 460px;
  }
}

@media (max-width: 600px) {
  .hero-content h1 {
    font-size: 44px;
  }

  .small-text {
    font-size: 16px;
  }

  .hero-date {
    font-size: 20px;
  }

  .scroll-indicator {
    bottom: 100px;
    font-size: 16px;
  }

  .invitation-section {
    padding: 75px 18px;
  }

  .content-box {
    padding: 42px 24px;
    border-radius: 22px;
  }

  .intro-text {
    font-size: 23px;
  }

  .content-box h2 {
    font-size: 27px;
  }

  .details,
  .location p,
  .rsvp {
    font-size: 18px;
  }

  .location h3 {
    font-size: 26px;
  }

  .image-slider {
    height: 390px;
    border-radius: 24px;
  }

  .footer-section h2 {
    font-size: 28px;
  }

  .footer-section p {
    font-size: 20px;
  }
}