.harbour-life {
  z-index: 1;
  position: absolute;
  inset: 0;
  overflow: hidden;
  container-type: inline-size;
  pointer-events: none;
}
.harbour-roo {
  --lane: 83%;
  --size: 12.8cqw;
  --hop: 1s;
  --route: 22s;
  --offset: 0s;
  position: absolute;
  top: var(--lane);
  left: 67%;
  width: var(--size);
  aspect-ratio: 1;
  transform: translate(-50%, -100%);
  animation: harbour-roo-route var(--route) linear var(--offset) infinite;
}
.harbour-roo-first {
  --lane: 86%;
  --size: 7.3cqw;
  --offset: -1.56s;
  left: 76%;
}
.harbour-roo-second {
  --lane: 83.5%;
  --size: 6.1cqw;
  --offset: -3.3s;
  left: 83%;
}
.harbour-roo-bounce {
  width: 100%;
  height: 100%;
  animation: harbour-roo-bounce var(--hop) ease-in-out var(--offset) infinite;
}
.harbour-roo-frames,
.harbour-koala {
  width: 100%;
  height: 100%;
  background-repeat: no-repeat;
  background-size: 800% 100%;
  animation: harbour-sprite var(--hop) steps(8, jump-none) var(--offset) infinite both;
}
.harbour-roo-frames { background-image: url(harbour-life/roo.webp); }
.harbour-roo-first .harbour-roo-frames,
.harbour-roo-second .harbour-roo-frames {
  filter: saturate(.85) brightness(1.08);
}
.harbour-koala {
  --hop: 1.25s;
  --offset: -0.5s;
  position: absolute;
  left: 10.7%;
  top: 78.1%;
  width: 9.3cqw;
  height: auto;
  aspect-ratio: 1;
  transform: translate(-50%, -100%);
  background-image: url(harbour-life/koala.webp);
  animation: harbour-koala-wave 7s var(--offset) infinite;
}
.harbour-ferry {
  position: absolute;
  left: 87%;
  top: 36.4%;
  width: 7.6cqw;
  height: 2.8cqw;
  transform: translate(-50%, -100%);
  animation: harbour-ferry-route 92s linear -25s infinite;
}
.harbour-ferry-hull {
  width: 100%;
  height: 100%;
  background: url(harbour-life/ferry.webp) center bottom / contain no-repeat;
  transform-origin: 50% 83%;
  animation: harbour-ferry-bob 2.8s ease-in-out infinite;
}
.harbour-ferry-hull::after {
  content: "";
  position: absolute;
  right: -30%;
  bottom: 0;
  width: 75%;
  height: 10%;
  transform: skewX(-24deg);
  border-radius: 80%;
  background: linear-gradient(90deg,#f8ecddc2, #e0eaff60 65%, transparent);
  filter: blur(.5px);
}
/* Reuse the aligned scenery for the shapes that pass in front of the actors. */
.harbour-depth {
  position: absolute;
  inset: 0;
  background: url(harbour-life/scene.webp) center / 100% 100% no-repeat;
}
.harbour-shore-left {
  clip-path: polygon(
    61% 29%, 66.7% 29%, 68.3% 31.5%, 69.4% 34.5%, 68.9% 36%,
    69.7% 36.8%, 70.6% 36.5%, 71.4% 37.4%, 72% 38.8%, 73.2% 38.4%,
    74.1% 39.2%, 75.1% 38.8%, 76.2% 39%, 76.5% 40.3%, 78.3% 40.9%,
    79.9% 42.9%, 76.6% 43.8%, 73% 44.1%, 71% 44.7%, 70% 47.5%,
    72.5% 50.5%, 61% 51%);
}
.harbour-shore-right {
  clip-path: polygon(
    77% 49%, 79.5% 46.7%, 81.5% 45.6%, 83.2% 44.6%, 85% 43.4%,
    88% 43%, 90.5% 42.6%, 92% 41.8%, 92.5% 39.4%, 93.9% 37.6%,
    94.7% 35.4%, 94% 33.8%, 95.2% 32.5%, 96.5% 31.5%, 100% 30.6%,
    100% 53%, 77% 53%);
}
.harbour-fence-left {
  clip-path: polygon(
    29.5% 88.5%, 31.4% 86%, 31.4% 83.2%, 32.1% 82.6%, 33.4% 82.5%,
    34.1% 83%, 34.3% 84.1%, 36.6% 81.2%, 36.5% 78.4%, 36.9% 77.7%,
    37.9% 77.6%, 38.4% 78.1%, 38.4% 85.9%, 37.5% 86.3%, 36.7% 86%,
    36.7% 82.1%, 34.1% 85.2%, 34.1% 92.8%, 33.3% 93.1%, 31.6% 92.7%,
    31.6% 87.1%, 30.1% 90.3%, 29.5% 90.1%);
}
.harbour-fence-right {
  clip-path: polygon(
    58.6% 78.1%, 59.1% 77.5%, 60.1% 77.5%, 60.6% 78%, 60.5% 80%,
    63.1% 83.5%, 63.3% 82.7%, 64.3% 82.2%, 65.3% 82.5%, 65.8% 83.3%,
    65.8% 86.1%, 68.3% 90.5%, 68.3% 92%, 67.3% 91.3%, 65.7% 87.3%,
    65.5% 95.3%, 64.2% 95.4%, 63.1% 94.9%, 63.1% 84.8%, 60.5% 81.3%,
    60.4% 86.7%, 59.5% 86.7%, 58.6% 86%);
}
.harbour-gum {
  clip-path: polygon(
    0% 62%, 4.7% 62%, 5.3% 68.5%, 6.4% 72.8%, 7.9% 76.9%, 10.2% 76.4%,
    12.4% 74.4%, 14.2% 73.2%, 15.4% 72.6%, 17.1% 73.1%, 18.7% 74.2%,
    20.6% 74.6%, 21.4% 75%, 22.7% 74.4%, 24% 75.1%, 24.8% 76%, 23.5% 76.1%,
    23.8% 77.3%, 22.4% 76.7%, 21.8% 77.2%, 22.2% 78.5%, 23% 77.6%,
    23.9% 78.3%, 24.2% 79.8%, 23.6% 80%, 24.1% 81.2%, 25% 82.3%,
    25.9% 84.1%, 24.8% 83.8%, 24% 82.5%, 23.1% 82.2%, 23.5% 84.9%,
    22.6% 85.7%, 21.7% 83.6%, 21% 81.2%, 20.3% 80.2%, 19.6% 81.3%,
    18.9% 81%, 19.1% 79%, 17.6% 78.6%, 17% 80.1%, 16.8% 82.1%,
    16.3% 82.7%, 16% 79.8%, 15.2% 78.5%, 13.8% 78.4%, 12.2% 79.1%,
    10.8% 80.5%, 9.3% 82.2%, 8% 86.2%, 6.8% 93%, 6.3% 100%, 0% 100%);
}
.harbour-flowerbed {
  clip-path: polygon(
    75.4% 84.9%, 76.3% 82.5%, 77.3% 82.2%, 78.4% 81.3%, 78.5% 79.1%,
    79.2% 79.5%, 79.6% 77.4%, 80.1% 77.6%, 80.5% 79.9%, 81% 78.8%,
    81.4% 75.8%, 82% 75.7%, 82.2% 79%, 82.8% 79.9%, 83.1% 76.2%,
    83.7% 76.1%, 84.3% 78.6%, 84.5% 76.1%, 84.8% 74.8%, 85.3% 75%,
    85.8% 77.7%, 85.4% 80.3%, 86.6% 80.5%, 87.3% 79.7%, 88% 79.7%,
    88.1% 81.3%, 88.7% 80.3%, 89.3% 79.9%, 90% 80.8%, 90.8% 79.4%,
    91.3% 79.7%, 91.6% 81.8%, 93.5% 83%, 96% 83%, 100% 78%, 100% 100%,
    89.8% 100%, 87.7% 91.5%, 85.3% 88.4%, 82% 87.6%, 78% 87.1%);
}
.harbour-christmas-tree {
  clip-path: polygon(
    96.5% 56%, 97.2% 55.2%, 98.2% 58.4%, 99.1% 60%, 100% 60%,
    100% 77.6%, 94% 77.4%, 91.5% 75.2%, 92.4% 72.4%, 93.6% 71.1%,
    93.3% 69.8%, 94.6% 67.5%, 94.1% 66.4%, 95.6% 64.2%, 95.2% 63%,
    96.3% 60.7%, 95.9% 59.4%);
}
.harbour-lantern {
  mask-image: radial-gradient(circle 2.3cqw at var(--x) var(--y), #000 15%, #000b 46%, transparent 100%);
  animation: harbour-lantern-glow var(--period, 6s) ease-in-out var(--phase, 0s) infinite;
}
.harbour-smoke {
  position: absolute;
  left: 57.1%;
  top: 22.5%;
  width: 1.9cqw;
  aspect-ratio: 1;
  transform: translate(-50%, -40%);
}
.harbour-smoke i {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 42% 45%, #fff0d6c9, #fbebdd65 42%, transparent 67%),
    radial-gradient(ellipse at 66% 29%, #ffe7d693, transparent 48%);
  opacity: 0;
  animation: harbour-smoke-rise 5.2s ease-out infinite;
}
.harbour-smoke i:nth-child(2) { animation-delay: -1.3s; }
.harbour-smoke i:nth-child(3) { animation-delay: -2.6s; }
.harbour-smoke i:nth-child(4) { animation-delay: -3.9s; }
.harbour-bulb {
  position: absolute;
  top: var(--y);
  left: var(--x);
  width: max(3px, .26cqw);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #fff9cf;
  box-shadow: 0 0 .36cqw .12cqw var(--bulb), 0 0 .74cqw .18cqw var(--bulb);
  opacity: .24;
  animation: harbour-twinkle 3.7s ease-in-out var(--phase) infinite;
}

@keyframes harbour-roo-route {
  0% { left: 86%; transform: translate(-50%, -100%) scaleX(1); }
  49.99% { left: 22%; transform: translate(-50%, -100%) scaleX(1); }
  50% { left: 22%; transform: translate(-50%, -100%) scaleX(-1); }
  99.99% { left: 86%; transform: translate(-50%, -100%) scaleX(-1); }
  100% { left: 86%; transform: translate(-50%, -100%) scaleX(1); }
}
@keyframes harbour-roo-bounce {
  0%, 100% { transform: translateY(0); }
  45% { transform: translateY(-.7cqw); }
}
@keyframes harbour-sprite {
  from { background-position: 0 0; }
  to { background-position: 100% 0; }
}
@keyframes harbour-koala-wave {
  0%, 29% { background-position: 0 0; animation-timing-function: steps(8, jump-none); }
  63% { background-position: 100% 0; animation-timing-function: steps(1, end); }
  100% { background-position: 0 0; }
}
@keyframes harbour-ferry-route {
  0% { left: 107%; top: 38.7%; opacity: 1; }
  60% { left: 82.4%; top: 40.7%; opacity: 1; }
  92% { left: 69.3%; top: 43%; opacity: 1; }
  97%, 100% { left: 66%; top: 44%; opacity: 0; }
}
@keyframes harbour-ferry-bob {
  0%, 100% { transform: translateY(0) rotate(-.5deg); }
  50% { transform: translateY(-.09cqw) rotate(.7deg); }
}
@keyframes harbour-smoke-rise {
  0% { transform: translate(0,0) scale(.5); opacity: 0; }
  15% { opacity: .88; }
  100% { transform: translate(3.8cqw,-7cqw) scale(3.1); opacity: 0; }
}
@keyframes harbour-twinkle {
  0%, 100% { opacity: .16; transform: translate(-50%, -50%) scale(.66); }
  47% { opacity: .97; transform: translate(-50%, -50%) scale(1.12); }
}
@keyframes harbour-lantern-glow {
  0%, 100% { filter: brightness(1); }
  31% { filter: brightness(var(--dim, .9)); }
  73% { filter: brightness(var(--bright, 1.13)); }
}
.paused .harbour-life * { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .harbour-life * { animation: none !important; }
}
