In Slavic mythology, Kapalo or Kupalo is the god of the summer solstice. Kupalo is the mature, the aging Yarilo. Yarilo comes into human world (Yav) every spring to bring new life, fertility and rich harvest. In the summer he turns into Kupalo. His life on the world gradually moves to its end.
He has accomplished his mission in our world and sets off for the Underworld, so he can return again next summer.
This is why the Kupalo festival (summer solstice) is actually bidding farewell to the old-aged Yarilo - a preparation for his later ritual burial. During the celebrations, for the last time people express their joy of god Yarilo's visit in their world, the happiness he had brought; they sing incantations and prayers to the fertile god to come again next year.
The year is half-way through, last fruitful months are elapsing and then winter will come - the time of death goddess Mora, time of darkness, cold, misery, illness and death.