﻿.invitation-preloader {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  border: 0;
  padding: 38px 24px;
  color: var(--cream);
  background-color: #062d26;
  background-image:
    linear-gradient(180deg, #031b17a6 0%, #062d2680 40%, #031b17d9 100%),
    url("images/full-traditional.jpeg");
  background-size: cover;
  background-position: center, center 42%;
  background-repeat: no-repeat;
  overflow-y: auto;
  text-align: center;
}
.invitation-preloader[open] {
  display: grid;
  place-items: center;
}
.invitation-preloader::backdrop {
  background: transparent;
}
.invitation-preloader:before {
  content: "";
  position: fixed;
  inset: 18px;
  border: 1px solid #d5b27444;
  pointer-events: none;
}
.invitation-preloader:after {
  content: "";
  position: fixed;
  inset: 26px;
  border: 1px solid #d5b27416;
  pointer-events: none;
}
.preloader-content {
  width: min(100%, 560px);
  padding: 12px 0;
  position: relative;
}
.preloader-title {
  font:
    500 clamp(45px, 9vw, 76px)/0.95 "Cormorant Garamond",
    serif;
  margin: 22px 0 12px;
}
.preloader-title em {
  color: var(--gold);
  font-weight: 400;
}
.preloader-subtitle {
  font:
    italic 25px "Cormorant Garamond",
    serif;
  color: #d9c9a9;
  margin: 0;
}
.invitation-envelope {
  position: relative;
  width: min(360px, 78vw);
  aspect-ratio: 1.55;
  margin: 140px auto 38px;
  perspective: 1100px;
  isolation: isolate;
}
.envelope-back {
  position: absolute;
  inset: 0;
  background: #184b38;
  border: 1px solid #d4b77d;
  border-radius: 5px;
  box-shadow: 0 22px 45px #00150f80;
  z-index: 0;
}
.envelope-letter {
  position: absolute;
  inset: 10px 18px;
  background: linear-gradient(120deg, #fff9ed, #eae0ca);
  color: #254333;
  padding: 17px 10px;
  border: 1px solid #d0bb91;
  text-align: center;
  z-index: 1;
  box-shadow:
    0 0 0 5px #f2ead8,
    0 3px 12px #00150f22;
  outline: 1px solid #bba37466;
  outline-offset: -9px;
}
.envelope-letter small {
  display: block;
  font-size: 8px;
  letter-spacing: 0.18em;
  margin-bottom: 8px;
}
.letter-monogram {
  display: block;
  font:
    italic 34px "Cormorant Garamond",
    serif;
  color: #97743e;
  margin-bottom: 6px;
}
.envelope-letter strong {
  display: block;
  font:
    italic clamp(20px, 5vw, 29px) "Cormorant Garamond",
    serif;
}
.letter-detail {
  display: block;
  font-size: 8px;
  letter-spacing: 0.12em;
  margin-top: 12px;
}
.envelope-front {
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, #e6d6b3, #bea374);
  clip-path: polygon(0 0, 50% 54%, 100% 0, 100% 100%, 0 100%);
  z-index: 3;
  border-radius: 4px;
}
.envelope-front:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(15deg, #d5bd91, #f1e2c5);
  clip-path: polygon(0 100%, 50% 44%, 100% 100%);
}
.envelope-flap {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 58%;
  transform-origin: top center;
  transform-style: preserve-3d;
  z-index: 4;
}
.flap-face {
  position: absolute;
  inset: 0;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.flap-outside {
  background: linear-gradient(165deg, #f4e7cb, #cfb789);
}
.flap-inside {
  transform: rotateY(180deg);
  background: #246347;
}
.envelope-seal {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: 53%;
  transform: translate(-50%, -50%) rotate(-8deg);
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  border-radius: 48% 52% 46% 54%;
  background: radial-gradient(circle at 30% 25%, #f7e4af, #b28b4e 75%);
  border: 4px double #ecd096;
  box-shadow:
    0 4px 9px #49321666,
    inset 0 0 0 5px #b28b4e33;
  font:
    italic 38px "Cormorant Garamond",
    serif;
  color: #3b4128;
}
.preloader-note {
  font-size: 11px;
  line-height: 1.8;
  color: var(--muted);
  margin: 20px auto 0;
  max-width: 300px;
}
#openInvitation[aria-disabled="true"] {
  cursor: default;
  transform: none;
  opacity: 0.55;
}
.invitation-preloader.is-leaving {
  pointer-events: none;
}
/* The heading receives screen-reader focus after opening, but is not a control. */
.hero h1[tabindex="-1"]:focus {
  outline: none;
}
@media (max-width: 400px) {
  .envelope-letter {
    inset: 9px 14px;
    padding-top: 12px;
  }
  .letter-monogram {
    font-size: 28px;
    margin-bottom: 3px;
  }
  .letter-detail {
    font-size: 7px;
    margin-top: 8px;
  }
  .envelope-letter small {
    font-size: 7px;
  }
  .invitation-envelope {
    margin-top: 115px;
  }
  .preloader-title {
    font-size: 48px;
  }
}
@media (max-height: 700px) {
  .invitation-envelope {
    width: min(290px, 76vw);
    margin-top: 110px;
    margin-bottom: 25px;
  }
  .preloader-title {
    font-size: 46px;
    margin-top: 14px;
  }
  .preloader-content {
    padding: 0;
  }
  .invitation-preloader {
    padding: 32px 20px;
  }
  .letter-monogram {
    font-size: 28px;
  }
  .preloader-note {
    margin-top: 14px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .invitation-preloader,
  .invitation-preloader * {
    transition: none !important;
    animation: none !important;
  }
}
