:root {
  --cream: #f0e7d5;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  background: #3a2140;
  color: var(--cream);
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- scene ---------- */

.scene {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}

.scene__plate {
  position: absolute;
  inset: 0;
  background: url("/plate.jpg") center / cover no-repeat;
}

.scene__scrim {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(52% 40% at 50% 46%, rgba(26, 13, 29, 0.42) 0%, rgba(26, 13, 29, 0) 78%),
    linear-gradient(to bottom, rgba(26, 13, 29, 0.32) 0%, rgba(26, 13, 29, 0) 34%),
    linear-gradient(to top, rgba(26, 13, 29, 0.4) 0%, rgba(26, 13, 29, 0) 38%);
}

/* ---------- animated props ---------- */

.prop {
  position: absolute;
  will-change: transform;
}

.prop__enter {
  opacity: 0;
  animation: settle 1.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.prop__art {
  display: block;
  width: 100%;
  height: auto;
}

.prop--stack {
  left: -8vw;
  bottom: -3vw;
  width: 52vw;
  --from-x: -7%;
  --from-y: 24%;
  --from-rotate: -3.5deg;
}

.prop--stack .prop__enter {
  animation-delay: 0.25s;
}

.prop--stack .prop__art {
  animation: drift 13s ease-in-out 2s infinite alternate;
}

.prop--sleeve {
  right: -7vw;
  bottom: -9vw;
  width: 38vw;
  --from-x: 12%;
  --from-y: 28%;
  --from-rotate: 4.5deg;
}

.prop--sleeve .prop__enter {
  animation-delay: 0.45s;
}

.prop--sleeve .prop__art {
  animation: drift-tall 16s ease-in-out 2.4s infinite alternate;
}

/* ---------- content ---------- */

.stage {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(1.2rem, 2.8vmin, 2.2rem);
  padding: 2rem 1.5rem;
  text-align: center;
}

.mark,
.headline,
.join {
  opacity: 0;
  animation: rise 1.1s cubic-bezier(0.22, 1, 0.3, 1) forwards;
}

.mark {
  margin: 0;
  font-family: "Golos Text", Inter, "Helvetica Neue", Arial, sans-serif;
  font-weight: 700;
  font-size: clamp(0.95rem, 2vmin, 1.15rem);
  letter-spacing: -0.04em;
  color: rgba(240, 231, 213, 0.82);
  animation-delay: 0.9s;
}

.headline {
  margin: 0;
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  font-size: clamp(1.7rem, 6.6vmin, 3.4rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 34px rgba(22, 11, 25, 0.5);
  animation-delay: 1.1s;
}

.headline__line {
  display: block;
  font-style: italic;
  color: rgba(240, 231, 213, 0.82);
}

.join {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  animation-delay: 1.35s;
}

.join__field {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: min(400px, 66vmin, 86vw);
  padding: 0.4rem 0.4rem 0.4rem 1.3rem;
  border: 1px solid rgba(240, 231, 213, 0.26);
  border-radius: 999px;
  background: rgba(24, 12, 27, 0.4);
  -webkit-backdrop-filter: blur(16px) saturate(130%);
  backdrop-filter: blur(16px) saturate(130%);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, opacity 0.5s ease,
    transform 0.5s ease;
}

.join__field:focus-within {
  border-color: rgba(240, 231, 213, 0.5);
  box-shadow: 0 0 0 4px rgba(240, 231, 213, 0.06);
}

.join__field input {
  flex: 1;
  min-width: 0;
  padding: 0.72rem 0;
  border: 0;
  background: none;
  color: var(--cream);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 300;
  letter-spacing: 0.01em;
}

.join__field input:focus {
  outline: none;
}

.join__field input::placeholder {
  color: rgba(240, 231, 213, 0.42);
}

.join__submit {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.65rem;
  height: 2.65rem;
  border: 0;
  border-radius: 50%;
  background: var(--cream);
  color: #1d1020;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease, opacity 0.25s ease;
}

.join__submit svg {
  width: 1.15rem;
  height: 1.15rem;
}

.join__submit:hover {
  background: #fffaf0;
  transform: translateX(3px);
}

.join__submit:focus-visible {
  outline: 2px solid var(--cream);
  outline-offset: 3px;
}

.join.is-busy .join__submit {
  opacity: 0.5;
  pointer-events: none;
}

.join__note {
  margin: 0;
  min-height: 1.2em;
  font-size: 0.82rem;
  font-weight: 300;
  letter-spacing: 0.02em;
  color: rgba(240, 231, 213, 0.66);
  transition: opacity 0.4s ease;
}

.join__note.is-error {
  color: #eab0a7;
}

.join.is-done .join__field {
  opacity: 0;
  transform: scale(0.96);
  pointer-events: none;
}

.join.is-done .join__note {
  margin-top: -3.6rem;
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic;
  font-size: 1.35rem;
  letter-spacing: 0;
  color: var(--cream);
}

/* ---------- keyframes ---------- */

@keyframes settle {
  from {
    opacity: 0;
    transform: translate(var(--from-x), var(--from-y)) rotate(var(--from-rotate));
  }
  to {
    opacity: 1;
    transform: translate(0, 0) rotate(0deg);
  }
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  to {
    transform: translate3d(-0.8%, -1.6%, 0) rotate(-0.5deg);
  }
}

@keyframes drift-tall {
  from {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  to {
    transform: translate3d(0.6%, -2%, 0) rotate(0.6deg);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .prop--stack {
    left: -18vw;
    bottom: -6vw;
    width: 86vw;
  }

  .prop--sleeve {
    right: -24vw;
    bottom: -16vw;
    width: 66vw;
  }
}

@media (max-width: 640px) {
  .headline {
    font-size: clamp(1.75rem, 8.4vw, 2.5rem);
  }

  .join__field {
    width: min(400px, 86vw);
  }

  /* On phones the props frame the copy from opposite corners instead of crowding the base. */
  .prop--stack {
    left: -20vw;
    bottom: -14vw;
    width: 118vw;
  }

  .prop--sleeve {
    top: -8vw;
    right: -40vw;
    bottom: auto;
    width: 84vw;
    --from-y: -22%;
    --from-x: 14%;
  }

  .scene__scrim {
    background:
      radial-gradient(70% 34% at 50% 44%, rgba(26, 13, 29, 0.5) 0%, rgba(26, 13, 29, 0) 82%),
      linear-gradient(to top, rgba(26, 13, 29, 0.46) 0%, rgba(26, 13, 29, 0) 42%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .prop__enter {
    opacity: 1;
    animation: none;
  }

  .prop__art {
    animation: none !important;
  }

  .mark,
  .headline,
  .join {
    opacity: 1;
    animation: none;
  }
}
