:root {
  --mist: #fff8f2;
  --plum: #5b4a61;
  --plum-deep: #534159;
  --petal-light: #ffe7f0;
  --petal-mid: #f5b3cf;
  --petal-deep: #e795bd;
}

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

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

body {
  overflow: hidden;
  background: var(--mist);
  color: var(--plum);
  font-family: "Avenir Next", Avenir, ui-rounded, "SF Pro Rounded", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.world {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: 1fr auto;
  width: 100%;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}

.world__art {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
}

.world__art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.world__intro {
  position: relative;
  z-index: 2;
  align-self: start;
  justify-self: center;
  width: min(100%, 46rem);
  margin-top: clamp(4.5rem, 11.5svh, 7rem);
  padding-inline: 1.5rem;
  text-align: center;
  text-shadow: 0 1px 22px rgba(255, 250, 244, 0.55);
}

h1 {
  margin: 0;
  color: var(--plum-deep);
  font-size: clamp(2.5rem, 4.75vw, 4.25rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.05em;
}

.world__tagline {
  margin: clamp(0.7rem, 1.8svh, 1.05rem) 0 0;
  color: var(--plum);
  font-size: clamp(1rem, 1.35vw, 1.2rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0.005em;
  text-wrap: balance;
}

.world__marks {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.9rem, 1.4vw, 1.15rem);
  margin-top: clamp(0.85rem, 2svh, 1.1rem);
  color: var(--plum);
}

.world__marks svg {
  display: block;
  width: clamp(1.3rem, 1.6vw, 1.5rem);
  height: auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.45;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.world__footer {
  position: relative;
  z-index: 2;
  justify-self: center;
  padding: 0 1.5rem max(1.5rem, env(safe-area-inset-bottom));
  text-align: center;
  text-shadow: 0 1px 18px rgba(255, 250, 244, 0.65);
}

.world__footer p {
  margin: 0;
  color: #4e3d55;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0.025em;
}

.petals {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.petal {
  position: absolute;
  top: -6vh;
  left: var(--x);
  width: var(--size);
  height: calc(var(--size) * 0.64);
  border-radius: 72% 28% 64% 36% / 58% 68% 32% 42%;
  background: radial-gradient(
    ellipse at 34% 28%,
    var(--petal-light) 0%,
    var(--petal-mid) 46%,
    var(--petal-deep) 100%
  );
  filter: blur(0.35px);
  opacity: 0;
  animation: petal-drift var(--duration) linear var(--delay) infinite;
  will-change: transform, opacity;
}

.petal:nth-child(1) {
  --x: 11%;
  --size: 7px;
  --duration: 58s;
  --delay: -9s;
  --drift: 34px;
  --alpha: 0.26;
}

.petal:nth-child(2) {
  --x: 29%;
  --size: 5px;
  --duration: 47s;
  --delay: -33s;
  --drift: -24px;
  --alpha: 0.2;
}

.petal:nth-child(3) {
  --x: 46%;
  --size: 8px;
  --duration: 67s;
  --delay: -51s;
  --drift: 46px;
  --alpha: 0.24;
}

.petal:nth-child(4) {
  --x: 63%;
  --size: 4px;
  --duration: 44s;
  --delay: -17s;
  --drift: -18px;
  --alpha: 0.18;
}

.petal:nth-child(5) {
  --x: 78%;
  --size: 6px;
  --duration: 62s;
  --delay: -41s;
  --drift: 27px;
  --alpha: 0.22;
}

.petal:nth-child(6) {
  --x: 88%;
  --size: 5px;
  --duration: 52s;
  --delay: -4s;
  --drift: -30px;
  --alpha: 0.17;
}

@keyframes petal-drift {
  0% {
    opacity: 0;
    transform: translate3d(0, -8vh, 0) rotate(8deg);
  }
  10%,
  88% {
    opacity: var(--alpha);
  }
  50% {
    transform: translate3d(var(--drift), 49vh, 0) rotate(186deg);
  }
  100% {
    opacity: 0;
    transform: translate3d(calc(var(--drift) * -0.4), 108vh, 0) rotate(344deg);
  }
}

@media (max-aspect-ratio: 1/1) {
  .world__intro {
    margin-top: clamp(7.5rem, 22svh, 12rem);
  }
}

@media (max-width: 540px) {
  .world__intro {
    padding-inline: 1.25rem;
  }

  .world__tagline {
    margin-top: 0.8rem;
  }

  .world__footer {
    padding-bottom: max(1.35rem, env(safe-area-inset-bottom));
  }
}

@media (max-height: 600px) and (min-aspect-ratio: 1/1) {
  .world__intro {
    margin-top: clamp(2.25rem, 8svh, 3.5rem);
  }

  .world__footer {
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  .petal {
    display: none;
    animation: none;
  }
}
