@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 200;
  font-display: swap;
  src: url("../assets/fonts/poppins-latin-ext-200-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 200;
  font-display: swap;
  src: url("../assets/fonts/poppins-latin-200-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("../assets/fonts/poppins-latin-ext-300-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("../assets/fonts/poppins-latin-300-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  background: #071631;
  color: #fff;
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
}

/* Background layers. The gradient is abstract, so it is stretched to the
   viewport rather than cropped: the whole composition survives on any screen.
   The shader samples the same image the same way, so the swap is invisible. */
.bg,
.scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
}

.bg {
  background: url("../assets/bg.jpg") center / 100% 100% no-repeat;
}

.scene {
  display: block;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.scene.is-live {
  opacity: 1;
}

/* Invitation */
.invite {
  position: relative;
  display: grid;
  grid-template-rows: 1fr auto 1fr;
  justify-items: center;
  height: 100vh;
  height: 100svh;
  padding: max(1.5rem, env(safe-area-inset-top)) 1.5rem max(1.5rem, env(safe-area-inset-bottom));
  text-shadow: 0 0 1.5em rgb(4 12 30 / 0.35);
  --title-size: clamp(4rem, 6vw + 6vh, 10rem);
  --edge: clamp(1.5rem, 4vw, 3rem);
}

/* Top-left, as wide as the word "bus" in the title (1.656em of visible ink). */
.invite__logo {
  position: absolute;
  top: max(var(--edge), env(safe-area-inset-top));
  left: max(var(--edge), env(safe-area-inset-left));
  width: calc(var(--title-size) * 1.656);
  height: auto;
  animation: rise 1.6s ease both;
}

.invite__title {
  grid-row: 2;
  margin: 0;
  font-size: var(--title-size);
  font-weight: 200;
  line-height: 0.98;
  letter-spacing: -0.01em;
  animation: rise 1.6s ease 0.2s both;
}

.invite__details {
  grid-row: 3;
  align-self: end;
  margin: 0 0 clamp(1rem, 6vh, 4.5rem);
  text-align: center;
  animation: rise 1.6s ease 0.8s both;
}

.invite__date,
.invite__venue {
  display: block;
}

.invite__date {
  font-size: clamp(1.25rem, 1rem + 1.2vw, 1.875rem);
  letter-spacing: 0.02em;
}

.invite__venue {
  margin-top: 0.35em;
  font-size: clamp(0.9375rem, 0.85rem + 0.5vw, 1.25rem);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(0.4rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .invite__logo,
  .invite__title,
  .invite__details {
    animation: none;
  }
}
