*,
*::after,
*::before {
  box-sizing: border-box;
}
:root {
  --red: #e34a6f;
  --pink: #f7b2bd;
}
html {
  height: 100%;
}
body {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.stack {
  display: grid;
  grid-template-areas: "stack";
  position: relative;
}
.blobs {
  display: grid;
  grid-template-areas: "stack";
  position: relative;
  animation: spin infinite 16s linear;
  grid-area: stack;
}
.blob {
  --border-radius: 115% 140% 145% 110% / 125% 140% 110% 125%;
  --border-width: 7vmin;

  aspect-ratio: 1;
  display: block;
  grid-area: stack;
  background-size: calc(100% + var(--border-width) * 2);
  background-repeat: no-repeat;
  background-position: center;
  border: var(--border-width) solid transparent;
  border-radius: var(--border-radius, 50%);
  mask-image: linear-gradient(transparent, transparent),
    linear-gradient(black, white);
  mask-clip: padding-box, border-box;
  mask-composite: intersect;
  mix-blend-mode: screen;
  height: 80vmin;
  filter: blur(1vmin) opacity(75%);
  min-width: 42rem;

  &:nth-child(1) {
    background-color: var(--red);
    background-image: linear-gradient(var(--red), var(--orange), var(--red));
    rotate: 60deg;
    scale: 0.95;
  }

  &:nth-child(2) {
    background-color: var(--pink);
    background-image: linear-gradient(var(--pink), var(--maroon), var(--pink));
    rotate: 120deg;
    scale: 1.02;
  }
}

@keyframes spin {
  from {
    rotate: 0deg;
  }
  to {
    rotate: 360deg;
  }
}

.poem {
  position: absolute;
  inset: 0;
  width: 16rem;
  height: fit-content;
  max-width: 100vw;
  max-height: 100dvh;
  margin: auto;
}

p {
  font-family: "Outfit", sans-serif;
  font-optical-sizing: auto;
  font-weight: 100;
  font-style: normal;
  opacity: 0; /* Initially hidden */
  animation-name: fadeIn;
  animation-duration: 4s;
  animation-fill-mode: forwards;
  margin: 0.2em auto;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  text-align: center;
}
p:nth-child(1) {
  animation-delay: 0.4s; /* No delay for the first paragraph */
}

p:nth-child(2) {
  animation-delay: 1.4s; /* Delay after previous animation */
}

p:nth-child(3) {
  animation-delay: 2.4s; /* Delay after previous animation */
}

@media screen and (min-width: 768px) {
  h1 {
    font-size: clamp(2rem, 5vw, 4rem);
  }
}

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