:root {
  --void: #000000;
  --ivory: #f4efe6;
  --foil: #e0b45a;
  --foil-hot: #f3d78a;
  --lamp: rgba(255, 214, 150, 0.22);
}

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

html {
  background: var(--void);
}

body {
  margin: 0;
  min-height: 100dvh;
  color: var(--ivory);
  background: var(--void);
  font-family: "Bodoni Moda", Didot, "Bodoni MT", "Didot LT STD", serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background-image: url("assets/grain.png");
  background-size: 180px 180px;
  opacity: 0.16;
  mix-blend-mode: overlay;
}

::selection {
  background: var(--foil);
  color: var(--void);
}

main {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 100dvh;
  place-items: center;
  padding:
    max(20px, env(safe-area-inset-top))
    max(16px, env(safe-area-inset-right))
    max(28px, env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
  animation: rise 1.6s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.lockup {
  position: relative;
  width: min(92vw, 1000px, calc(86dvh * 1024 / 724));
  transform: translateY(-2vh);
}

.mark {
  position: relative;
  margin: 0;
  overflow: hidden;
}

.mark img {
  display: block;
  width: 100%;
  height: auto;
}

.mark::before,
.mark::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.mark::before {
  inset: 0;
  z-index: 1;
  background: radial-gradient(ellipse 46% 52% at 50% 46%, var(--lamp), transparent 70%);
  mix-blend-mode: overlay;
}

.mark::after {
  z-index: 2;
  top: -30%;
  left: 0;
  width: 34%;
  height: 160%;
  background: linear-gradient(
    100deg,
    transparent 0%,
    rgba(255, 244, 214, 0.05) 38%,
    rgba(255, 248, 230, 0.85) 50%,
    rgba(255, 244, 214, 0.05) 62%,
    transparent 100%
  );
  mix-blend-mode: overlay;
  transform: translateX(-140%) rotate(12deg);
  animation: catchlight 2.8s 0.85s cubic-bezier(0.45, 0.02, 0.18, 1) forwards;
}

.soon {
  position: absolute;
  z-index: 3;
  top: 79%;
  left: 50%;
  margin: 0;
  transform: translateX(-50%);
  font-weight: 500;
  font-size: clamp(0.68rem, 1.15vw, 0.82rem);
  line-height: 1;
  letter-spacing: 0.46em;
  text-indent: 0.46em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ivory);
}

.soon::before {
  content: "";
  display: block;
  width: 28px;
  height: 1px;
  margin: 0 auto 1.05rem;
  background: linear-gradient(
    90deg,
    transparent,
    var(--foil) 18%,
    var(--foil-hot) 50%,
    var(--foil) 82%,
    transparent
  );
}

@keyframes rise {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes catchlight {
  to {
    transform: translateX(380%) rotate(12deg);
  }
}

@media (max-width: 420px) {
  .soon {
    letter-spacing: 0.36em;
    text-indent: 0.36em;
    font-size: 0.66rem;
  }

  .lockup {
    transform: none;
  }
}

@media (max-height: 700px) {
  .lockup {
    width: min(88vw, calc(82dvh * 1024 / 724));
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  main {
    animation: none;
  }

  .mark::after {
    animation: none;
    opacity: 0;
  }
}
