/* Decorative motion for the homepage only; the original hero is the fallback. */
.hero--motion .hk-scene,
.hero--motion .hk-shade { display: none; pointer-events: none; }
@media (prefers-reduced-motion: no-preference) {
  .hero--motion.hk-ready { background-image: none; }
}
.hero--motion.hk-ready .hk-scene,
.hero--motion.hk-ready .hk-shade { display: block; }
.hero--motion .hk-scene {
  position: absolute;
  inset: -10px;
  z-index: 0;
  transform: translate3d(var(--hk-x, 0px), var(--hk-y, 0px), 0);
  transition: transform 1.8s cubic-bezier(.2, .7, .3, 1);
  will-change: transform;
}
.hero--motion .hk-photo {
  position: absolute;
  inset: 0;
  background: url('./hk-hero.jpg') 76% center / cover no-repeat;
}
.hero--motion .hk-art { position: absolute; max-width: none; overflow: visible; }
.hero--motion .hk-shade {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(90deg, #050d22 0%, rgba(5,13,34,.96) 12%, rgba(5,13,34,.82) 26%, rgba(5,13,34,.52) 42%, rgba(5,13,34,.22) 56%, rgba(5,13,34,.08) 68%, transparent 100%),
    linear-gradient(180deg, rgba(5,13,34,.42) 0%, transparent 45%, rgba(5,13,34,.6) 100%),
    radial-gradient(900px 520px at 14% 18%, rgba(31,71,156,.4) 0%, transparent 58%);
}
.hero--motion .hk-twinkle { opacity: .22; animation: hk-light 10s ease-in-out infinite; }
.hero--motion .hk-twinkle:nth-child(2n) { animation-duration: 13s; animation-delay: -4s; }
.hero--motion .hk-twinkle:nth-child(3n) { animation-duration: 15s; animation-delay: -8s; }
.hero--motion .hk-port-glimmer { opacity: .2; animation: hk-reflection 14s ease-in-out infinite; }
.hero--motion .hk-node-halo { opacity: .18; transform-box: fill-box; transform-origin: center; animation: hk-harbour-pulse 12s ease-in-out infinite; }
.hero--motion .hk-node-halo:nth-of-type(2n) { animation-delay: -6s; }
.hero--motion.is-hk-paused .hk-art * { animation-play-state: paused; }
.hero--motion .hk-motion-toggle {
  position: absolute;
  right: 25px;
  bottom: 19px;
  z-index: 3;
  width: 31px;
  height: 31px;
  padding: 7px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(202,167,118,.32);
  border-radius: 50%;
  background: rgba(5,13,34,.3);
  color: rgba(255,255,255,.7);
  cursor: pointer;
}
.hero--motion .hk-motion-toggle[hidden] { display: none; }
.hero--motion .hk-motion-toggle:hover { border-color: rgba(202,167,118,.75); color: #fff; }
.hero--motion .hk-motion-toggle:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
.hero--motion .hk-motion-toggle svg { width: 14px; height: 14px; }
.hero--motion .hk-play { display: none; }
.hero--motion.hk-user-paused .hk-pause { display: none; }
.hero--motion.hk-user-paused .hk-play { display: block; }
@keyframes hk-light { 0%,100% { opacity: .18; } 45% { opacity: .64; } 70% { opacity: .32; } }
@keyframes hk-reflection { 0%,100% { opacity: .12; transform: translateX(-2px); } 50% { opacity: .35; transform: translateX(3px); } }
@keyframes hk-harbour-pulse { 0%,100% { opacity: .16; transform: scale(.88); } 50% { opacity: .42; transform: scale(1.12); } }
@media (max-width: 1040px) {
  .hero--motion .hk-photo { background-position: center 28%; }
  .hero--motion .hk-shade {
    background:
      linear-gradient(180deg, rgba(5,13,34,.88) 0%, rgba(5,13,34,.45) 28%, rgba(5,13,34,.18) 48%, transparent 72%),
      linear-gradient(180deg, transparent 0%, rgba(5,13,34,.55) 100%),
      radial-gradient(700px 420px at 50% 12%, rgba(31,71,156,.35) 0%, transparent 55%);
  }
  .hero--motion .hk-flow-marker { display: none; }
  .hero--motion .hk-scene { transition: none; will-change: auto; }
}
@media (max-width: 600px) {
  .hero--motion .hk-photo { background-position: center 22%; }
  .hero--motion .hk-motion-toggle { right: 24px; bottom: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero--motion.hk-ready .hk-scene,
  .hero--motion.hk-ready .hk-shade,
  .hero--motion .hk-motion-toggle { display: none; }
  .hero--motion .hk-scene { transition: none; transform: none; }
  .hero--motion .hk-art * { animation: none !important; }
}
@media print {
  .hero--motion .hk-scene,
  .hero--motion .hk-shade,
  .hero--motion .hk-motion-toggle { display: none !important; }
}
