body {
  height: 100vh;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

div {
  transform-style: preserve-3d;
}

.sea {
  position: absolute;
  left: -300px;
  top: -300px;
}

.sea .surface {
  position: absolute;
  height: 600px;
  width: 600px;
  background: #2be3fa;
  overflow: hidden;
  animation: surface 13s ease-in-out infinite alternate,
    rotateZ 20s linear infinite;
}

.sea .surface .inner {
  width: 600px;
  height: 600px;
  animation: rotateZ 20s linear infinite reverse;
}

@keyframes surface {
  0% {
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  }

  25% {
    border-radius: 65% 35% 51% 49%/ 49% 52% 48% 51%;
  }

  50% {
    border-radius: 42% 58% 28% 72% / 65% 34% 66% 35%;
  }

  75% {
    border-radius: 34% 66% 63% 37%/77% 38% 62% 23%;
  }

  100% {
    border-radius: 24% 76% 72% 28%/ 53% 68% 32% 47%;
  }
}

@keyframes rotateZ {
  0% {
    transform: rotateZ(0deg);
  }

  100% {
    transform: rotateZ(360deg);
  }
}

/* ship style */

.ship {
  position: absolute;
  top: -15px;
  left: -50px;
  filter: drop-shadow(-30px 40px 0 rgba(0, 0, 0, 0.1));
}

.ship .rotate {
  transform: rotateZ(10deg);
  animation: ship 10s linear infinite alternate;
}

@keyframes ship {
  0% {
    transform: rotateZ(20deg);
  }

  100% {
    transform: rotateZ(-30deg);
  }
}

.ship .human {
  position: absolute;
  top: 0;
  left: 40px;
}

.ship .human .hat {
  position: absolute;
  width: 30px;
  height: 30px;
  background: #f0f09e;
  border-radius: 100%;
  animation: hat 1s ease-in-out infinite alternate;
}

@keyframes hat {
  0% {
    transform: rotateZ(30px) translateX(-5px) rotateY(-20deg);
  }

  100% {
    transform: rotateZ(30px) translateX(0) rotateY(20deg);
  }
}

.ship .human .hat::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 7px;
  width: 16px;
  height: 16px;
  border: 1px solid #d9845d;
  border-radius: 100%;
  box-sizing: border-box;
  transform: translateZ(5px);
}

.ship .human .leg {
  position: absolute;
  width: 20px;
  height: 8px;
  background: #0849a3;
  border-radius: 40%;
}

.ship .human .leg::before {
  content: "";
  position: absolute;
  left: -4px;
  width: 5px;
  height: 7px;
  background: #fff;
  border-radius: 40%;
}

.ship .human .leg.-left {
  top: 16px;
  left: -10px;
  transform: rotateZ(-5deg);
}

.ship .human .leg.-left::before {
  top: 1px;
}

.ship .human .leg.-right {
  top: 6px;
  left: -10px;
  transform: rotateZ(5deg);
}

.ship .human .leg.-right::before {
  top: -1px;
}

.ship .body {
  position: relative;
}

.ship .body .base {
  width: 100px;
  height: 30px;
  background: #d9845d;
  border-radius: 45% 45% 45% 45%;
}

.ship .body .base::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 96px;
  height: 26px;
  background: #dead5e;
  border-radius: 100%;
}

.ship .body .board {
  position: absolute;
  top: 5px;
  width: 10px;
  height: 20px;
  background: #d9845d;
  border-radius: 2px;
}

.ship .body .board.-front {
  right: 20px;
}

.ship .body .board.-back {
  left: 20px;
}

.ship .body .waves {
  position: absolute;
}

.ship .body .waves .wave {
  position: absolute;
  animation: wave 2s linear infinite;
}

.ship .body .waves .wave .graphic {
  background: #fff;
  animation: surface 2s ease-in-out infinite alternate,
    rotateZ 6s linear infinite;
}

.ship .oars {
  position: absolute;
  top: -30px;
  left: 50px;
  transform: translateZ(10px);
}

.ship .oars .graphic {
  position: relative;
  width: 3px;
  height: 40px;
  background: #d9845d;
  animation: oarGraphic 1s ease-in-out infinite alternate;
}

.ship .oars .graphic::before {
  content: "";
  position: absolute;
  top: 0;
  left: -3px;
  width: 9px;
  height: 15px;
  background: #d9845d;
  border-radius: 5px 5px 100% 100%;
}

@keyframes oarGraphic {
  0% {
    transform: rotateY(-60deg);
  }

  100% {
    transform: rotateY(-110deg);
  }
}

.ship .oars .oar {
  position: absolute;
  top: 0;
  left: 50%;
}

.ship .oars .oar.-right {
  transform-origin: 50% 45px;
  transform: scaleY(-1);
}

.ship .oars .row {
  position: absolute;
  animation: row 1s ease-in-out infinite alternate;
  transform-origin: 50% 35px;
}

.ship .oars .depth {
  animation: depth 1s ease-in-out infinite alternate;
  transform-origin: 50% 35px;
  animation-delay: -500ms;
}

@keyframes wave {
  0% {
    transform: translateX(0) scale(0);
  }

  10% {
    transform: translateX(-10px) scale(1);
  }

  100% {
    transform: translateX(-130px) scale(0);
  }
}

@keyframes depth {
  0% {
    transform: rotateX(-20deg);
  }

  100% {
    transform: rotateX(50deg);
  }
}

@keyframes row {
  0% {
    transform: rotateZ(20deg);
  }

  100% {
    transform: rotateZ(-50deg);
  }
}

h1 {
  position: absolute;
  top: 40px;
  text-align: center;
  font-family: cursive;
  left: 50%;
  transform: translate(-50%);
}
