/* Subtle 2.5D motion for the vessel in the homepage hero. */
.hero {
  perspective: 1100px;
}

.hero-image {
  z-index: -4;
  transform: scale(1.012);
}

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

.hero::before {
  z-index: -3;
  background-image: url("vessel-hero.webp");
  background-size: cover;
  background-position: center 56%;
  clip-path: polygon(46% 0, 100% 0, 100% 100%, 42% 100%);
  transform-origin: 78% 66%;
  filter: drop-shadow(-18px 26px 26px rgba(0, 19, 43, .38)) saturate(1.08) contrast(1.03);
  animation: tugu-vessel-float 9s ease-in-out infinite;
  will-change: transform, filter;
}

.hero::after {
  z-index: -2;
  background:
    radial-gradient(ellipse at 79% 71%, rgba(141, 209, 255, .18) 0%, rgba(141, 209, 255, .08) 22%, transparent 46%),
    linear-gradient(105deg, transparent 53%, rgba(255, 255, 255, .10) 62%, transparent 72%);
  clip-path: polygon(52% 37%, 100% 29%, 100% 100%, 48% 100%);
  mix-blend-mode: screen;
  opacity: .55;
  animation: tugu-wake-shimmer 7.5s ease-in-out infinite;
}

@keyframes tugu-vessel-float {
  0% {
    transform: translate3d(0, 0, 0) rotateX(.5deg) rotateY(-1.8deg) scale(1.018);
  }

  32% {
    transform: translate3d(10px, -7px, 36px) rotateX(1.1deg) rotateY(-3deg) scale(1.031);
  }

  67% {
    transform: translate3d(-8px, 5px, 18px) rotateX(-.2deg) rotateY(-.8deg) scale(1.024);
  }

  100% {
    transform: translate3d(0, 0, 0) rotateX(.5deg) rotateY(-1.8deg) scale(1.018);
  }
}

@keyframes tugu-wake-shimmer {
  0%,
  100% {
    opacity: .42;
    transform: translate3d(-8px, 6px, 0) scale(1);
  }

  50% {
    opacity: .7;
    transform: translate3d(10px, -5px, 0) scale(1.025);
  }
}

@media (max-width: 800px) {
  .hero::before {
    background-position: 65% center;
    clip-path: polygon(35% 0, 100% 0, 100% 100%, 33% 100%);
    animation-duration: 10.5s;
  }

  .hero::after {
    clip-path: polygon(41% 35%, 100% 31%, 100% 100%, 36% 100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero::before,
  .hero::after {
    animation: none !important;
  }
}
