:root {
  --cream: #efe3b9;
  --wine: #610513;
  --wine-deep: #30040b;
  --gold: #d2ae66;
  --ink: #160c0b;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--wine-deep);
  color: var(--ink);
  font-family: "Cormorant Garamond", Georgia, serif;
}

body {
  overflow-x: hidden;
}

.desktop-gate {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #160207 url("assets/img/entry_point_bg.jpg") center / cover no-repeat;
}

.desktop-gate__inner {
  width: min(360px, 100%);
  text-align: center;
}

.desktop-gate__seal {
  display: block;
  width: min(220px, 70vw);
  margin: 0 auto 18px;
}

.desktop-gate p {
  margin: 0;
  color: var(--gold);
  font-family: "Forum", Georgia, serif;
  font-size: 34px;
  line-height: 1.05;
  text-transform: uppercase;
}

.app {
  display: none;
}

.entry {
  position: fixed;
  inset: 0;
  z-index: 10;
  cursor: pointer;
  background: var(--wine);
  overflow: hidden;
  transition: opacity 900ms ease, transform 900ms cubic-bezier(0.2, 0.78, 0.18, 1), visibility 900ms ease;
}

.entry.is-hidden {
  opacity: 0;
  transform: scale(1.025);
  visibility: hidden;
}

.entry__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.invitation {
  overflow: visible;
  background: var(--cream);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 900ms ease 120ms, transform 900ms cubic-bezier(0.2, 0.78, 0.18, 1) 120ms;
}

.invitation.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.screen {
  position: relative;
  width: 100%;
  min-height: calc(100vw * 932 / 430);
  overflow: hidden;
  isolation: isolate;
}

.edge {
  position: absolute;
  display: block;
  pointer-events: none;
  user-select: none;
}

.edge--fill {
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.copy {
  position: relative;
  z-index: 2;
  text-align: center;
}

h1,
h2,
p {
  margin: 0;
  font-weight: 500;
}

h1,
h2,
.route-link {
  font-family: "Forum", Georgia, serif;
  text-transform: uppercase;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(34px, 9.2vw, 44px);
  line-height: 0.92;
  margin-bottom: 22px;
}

h2 {
  font-size: clamp(31px, 8.4vw, 40px);
  line-height: 0.95;
}

p {
  font-size: clamp(18px, 5.2vw, 24px);
  line-height: 1.02;
  letter-spacing: 0.13em;
}

.screen--intro {
  display: flex;
  min-height: auto;
  flex-direction: column;
  background: var(--wine);
}

.copy--intro {
  padding: 74px 34px 0;
}

.copy--intro p:first-of-type {
  max-width: 330px;
  margin: 0 auto;
}

.copy--intro p:last-of-type {
  margin-top: 54px;
}

.envelope {
  position: relative;
  left: auto;
  bottom: auto;
  width: 100%;
  margin: 26px auto 0;
  transform: none;
}

.screen--program {
  margin-top: -1px;
}

.curtain {
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.screen--program {
  color: var(--cream);
  background: var(--wine);
}

.copy--place {
  padding: 55px 18px 0;
}

.copy--place h2 {
  margin-bottom: 44px;
  color: var(--gold);
}

.copy--place p {
  max-width: 390px;
  margin: 0 auto;
  color: var(--cream);
  font-size: clamp(13px, 3.55vw, 17px);
  line-height: 1.02;
  letter-spacing: 0.18em;
}

.route-link {
  display: block;
  width: min(268px, 62vw);
  margin: 28px auto 42px;
  padding: 4px 14px 6px;
  border-radius: 7px;
  background: rgba(221, 203, 160, 0.78);
  color: #7b1b23;
  font-size: clamp(30px, 7.8vw, 38px);
  line-height: 1;
  text-decoration: none;
}

.copy--place .hint {
  max-width: 260px;
  font-size: clamp(13px, 3.6vw, 17px);
  letter-spacing: 0.12em;
}

.copy--program {
  position: absolute;
  left: 0;
  right: 42px;
  top: 51%;
  bottom: auto;
  color: var(--wine);
}

.copy--program h2 {
  margin: 0 0 16px;
  font-size: clamp(27px, 7.3vw, 34px);
}

.copy--program img {
  display: block;
  width: min(74vw, 318px);
  margin: 0 auto;
}

.copy--dress {
  padding: 72px 24px 0;
}

.copy--dress h2 {
  margin-bottom: 20px;
}

.copy--dress p {
  max-width: 390px;
  margin: 0 auto 24px;
  font-size: clamp(20px, 5.9vw, 27px);
}

.star {
  left: 50%;
  top: 55%;
  width: min(64vw, 300px);
  transform: translate(-50%, -50%);
}

.dress-note {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 78px;
  z-index: 2;
  text-align: center;
  font-size: clamp(20px, 5.7vw, 26px);
}

.final-curtain {
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.screen--final {
  color: var(--cream);
}

.copy--gift {
  padding: 26px 32px 0 92px;
  color: var(--ink);
}

.copy--gift p {
  font-size: clamp(18px, 5.2vw, 24px);
}

.bottles {
  top: 165px;
  right: -6px;
  width: min(86vw, 390px);
  z-index: 1;
}

.copy--photo {
  position: absolute;
  left: 28px;
  right: 28px;
  top: 57%;
  z-index: 2;
}

.copy--photo p,
.final-note {
  color: var(--cream);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.14);
  font-size: clamp(18px, 5.2vw, 24px);
}

.final-note {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 86px;
  z-index: 2;
  text-align: center;
}

@supports (height: 100svh) {
  .entry {
    min-height: 100svh;
  }
}

@media (max-width: 540px) {
  body {
    overflow-y: auto;
  }

  .desktop-gate {
    display: none;
  }

  .app {
    display: block;
  }
}

@media (max-width: 374px) {
  p {
    letter-spacing: 0.1em;
  }

  .copy--intro {
    padding-left: 22px;
    padding-right: 22px;
  }

  .copy--intro p:last-of-type {
    margin-top: 40px;
  }

  .copy--place {
    padding-top: 44px;
  }

  .copy--place h2 {
    margin-bottom: 28px;
  }

  .route-link {
    margin-bottom: 28px;
  }

  .copy--program {
    bottom: 8px;
  }

  .copy--dress {
    padding-top: 52px;
  }

  .dress-note,
  .final-note {
    bottom: 54px;
  }
}
