:root {
  --champagne-gold: #d6ad7b;
  color-scheme: light;
  background: #eeeae3;
}

@font-face {
  font-family: "Cinzel";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("./assets/fonts/cinzel-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("./assets/fonts/cormorant-garamond-italic-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Pinyon Script";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("./assets/fonts/pinyon-script-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Alex Brush";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("./assets/fonts/alex-brush-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Italianno";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("./assets/fonts/italianno-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Allura";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("./assets/fonts/allura-latin.woff2") format("woff2");
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  background: #eeeae3;
}

body,
.invitation-intro {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
}

.invitation-intro {
  display: grid;
  place-items: center;
  overflow: hidden;
}

.video-stage {
  position: relative;
  width: min(100vw, calc(100dvh * 9 / 16));
  height: min(100dvh, calc(100vw * 16 / 9));
  overflow: hidden;
  background: #eeeae3;
  touch-action: manipulation;
  container-type: inline-size;
}

.final-frame,
.intro-video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  border: 0;
}

.final-frame {
  z-index: 0;
}

.intro-video {
  z-index: 1;
  pointer-events: none;
  background: transparent;
}

.intro-video.is-finished {
  opacity: 0;
}

.cover-content {
  position: absolute;
  z-index: 2;
  top: 27.35%;
  left: 9.35%;
  width: 81.3%;
  height: 46.2%;
  overflow: hidden;
  color: var(--champagne-gold);
  text-align: center;
  visibility: hidden;
  opacity: 0;
  transition: none;
  pointer-events: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

.cover-content.is-visible {
  visibility: visible;
  opacity: 1;
}

.cover-content p {
  margin: 0;
  color: inherit;
}

.cover-message {
  position: absolute;
  top: 8.8%;
  left: 52%;
  width: 43%;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(8.5px, 2.9cqw, 11.3px);
  font-style: italic;
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: 0.02em;
}

.cover-message span {
  display: block;
  white-space: nowrap;
}

.message-divider {
  position: absolute;
  top: 23.5%;
  left: 66.5%;
  width: 11%;
  height: 1px;
  background: var(--champagne-gold);
  opacity: 0.72;
  transform: scaleY(0.5);
}

.guest-name {
  position: absolute;
  top: 28.9%;
  left: 49%;
  display: grid;
  width: 48%;
  min-height: 7%;
  place-items: center;
  font-family: "Cinzel", serif;
  font-size: clamp(7.7px, 2.55cqw, 10px);
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.celebration-block {
  position: absolute;
  top: 40.8%;
  left: 51%;
  width: 45%;
  text-align: center;
}

.wedding-announcement {
  font-family: "Cinzel", serif;
  font-size: clamp(11.5px, 3.55cqw, 14px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.1em;
  padding-left: 0.1em;
  text-transform: uppercase;
}

.celebration-invitation {
  margin-top: clamp(5px, 1.55cqw, 6px) !important;
  font-family: "Cinzel", serif;
  font-size: clamp(6.8px, 2.2cqw, 8.6px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.13em;
  padding-left: 0.13em;
  text-transform: uppercase;
}

.couple-names {
  position: absolute;
  top: 53%;
  left: 73%;
  display: flex;
  width: max-content;
  max-width: 48%;
  flex-direction: column;
  align-items: center;
  font-family: "Italianno", cursive;
  font-size: clamp(28px, 9.6cqw, 37.5px);
  font-weight: 400;
  line-height: 0.86;
  white-space: nowrap;
  transform: translateX(-50%);
}

.couple-names span,
.couple-names b {
  display: block;
  font: inherit;
  font-weight: 400;
}

.couple-names b {
  margin: 0.16em 0 0.3em;
  font-size: 0.5em;
  line-height: 0.9;
  transform: translateX(3px);
}

.origami-elephant {
  position: absolute;
  z-index: 2;
  top: 29.2%;
  left: 7.2%;
  display: block;
  width: 34.5%;
  height: auto;
}

.elephant-ground {
  position: absolute;
  z-index: 1;
  top: 74.8%;
  left: -8%;
  width: 116%;
  height: auto;
  aspect-ratio: 1794 / 110;
  display: block;
  opacity: 0.86;
}

.date-location {
  position: absolute;
  top: 85.6%;
  left: 21%;
  width: 58%;
}

.wedding-date {
  font-family: "Cinzel", serif;
  font-size: clamp(12.5px, 4.1cqw, 16px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.16em;
  padding-left: 0.16em;
}

.wedding-location {
  margin-top: clamp(4px, 1.2cqw, 5px) !important;
  font-family: "Cinzel", serif;
  font-size: clamp(7px, 2.05cqw, 8px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.18em;
  padding-left: 0.18em;
  text-transform: uppercase;
}

@media (max-width: 500px) {
  .wedding-announcement {
    font-size: 2.95cqw;
    letter-spacing: 0.08em;
    white-space: nowrap;
  }

  .celebration-invitation {
    margin-top: 1.25cqw !important;
    font-size: 1.65cqw;
    letter-spacing: 0.1em;
    white-space: nowrap;
  }

  .couple-names {
    font-size: 7.4cqw;
    line-height: 0.9;
  }

  .couple-names b {
    margin: 0.1em 0 0.26em;
  }
}

@media (min-aspect-ratio: 9 / 16) {
  .video-stage {
    width: calc(100dvh * 9 / 16);
    height: 100dvh;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cover-content {
    transition: none;
  }
}
