/* Chrome-first living ukiyo-e ocean.
   Canvas owns the non-rigid water; DOM fish remain between the mid and front
   planes so they break the surface and disappear under the print naturally. */

.hero {
  --sea-duration: 7200ms;
}

.hero-scene {
  position: absolute;
  inset: 0;
  overflow: hidden;
  isolation: isolate;
}

.hero-scene .hero-art {
  z-index: 0;
}

.hero-scene .hero-layer,
.hero-ocean-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero-scene .hero-layer {
  object-fit: cover;
  object-position: center right;
  transform: scale(1.045);
  transition: opacity 180ms linear;
}

.hero-ocean-canvas {
  display: block;
  opacity: 0;
  transition: opacity 180ms linear;
}

.hero-ocean-mid,
.hero-wave-mid {
  z-index: 20;
}

.hero-ocean-front,
.hero-wave-front {
  z-index: 30;
}

.hero-scene.is-canvas-ready .hero-ocean-canvas {
  opacity: 1;
}

.hero-scene.is-canvas-ready .hero-layer {
  opacity: 0;
}

.hero-fish {
  position: absolute;
  z-index: 10;
  width: clamp(42px, 5.2vw, 78px);
  height: auto;
  opacity: 1;
  transform-origin: 50% 55%;
  pointer-events: none;
}

.hero-fish-1 {
  left: 66%;
  bottom: 18%;
  transform: translate3d(0, 72%, 0) rotate(18deg) scaleX(-1);
}

.hero-fish-2 {
  left: 76%;
  bottom: 18%;
  width: clamp(34px, 4.3vw, 64px);
  transform: translate3d(0, 76%, 0) rotate(85deg) scaleX(-1);
}

.hero-fish-3 {
  left: 85%;
  bottom: 20%;
  width: clamp(28px, 3.5vw, 52px);
  transform: translate3d(0, 72%, 0) rotate(22deg);
}

.hero.is-sea-running .hero-fish,
.hero.is-sea-running .hero-ocean-canvas {
  will-change: transform, opacity;
}

.sea-button {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 1;
  width: 68%;
  height: 64%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.sea-button:focus-visible {
  outline: 2px solid var(--vermilion);
  outline-offset: -3px;
}

.sea-button[aria-busy="true"] {
  cursor: progress;
}

/* Reduced motion keeps the exact rest painting and only lets JS breathe the
   shade very slightly. No canvas timeline or fish flight is started. */
@media (prefers-reduced-motion: reduce) {
  .hero-ocean-canvas,
  .hero-layer {
    transition: none;
  }
}

@media (max-width: 880px) {
  .hero-fish-1 {
    left: 58%;
    width: clamp(48px, 10vw, 64px);
  }

  .hero-fish-2 {
    left: 73%;
    width: clamp(36px, 8vw, 52px);
  }

  .hero-fish-3 {
    left: 86%;
    width: clamp(30px, 7vw, 46px);
  }

  .sea-button {
    width: 76%;
    height: 56%;
  }
}
