/* The project heroes reuse the artwork from each product, inside the modal's
   own scroll viewport. Scene assets and animation are activated on opening. */
.project-parallax {
  --scene-scroll: 0px;
  --scene-dusk: 0;
  position: relative;
  height: clamp(380px, 65vh, 660px);
  height: clamp(380px, 65svh, 660px);
  margin: 0;
  overflow: hidden;
  isolation: isolate;
  background: #164e50;
}
.project-parallax-scene {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.project-parallax img,
.project-parallax canvas {
  display: block;
  max-width: none;
  user-select: none;
}
.project-parallax--manatee {
  /* Match the desktop story viewport, allowing for the dialog's border. */
  --manatee-stage-height: calc(80svh - 2px);
  height: calc(var(--manatee-stage-height) * 2.2);
  overflow: clip;
  background: #0eb4be;
}
.project-parallax-stage {
  position: sticky;
  top: 0;
  height: var(--manatee-stage-height);
  overflow: hidden;
}
/* This opening title sits outside the sticky water stage, so the first scroll
   carries it naturally out of the sky while the manatee begins its dive. */
.project-parallax--manatee .manatee-hero-copy {
  position: absolute;
  z-index: 4;
  top: calc(var(--manatee-stage-height) * .085);
  left: 50%;
  width: min(84%, 680px);
  transform: translateX(-50%);
  color: #123a48;
  text-align: center;
  pointer-events: none;
}
.project-parallax--manatee .manatee-hero-title {
  max-width: none;
  margin: 0;
  color: inherit;
  font: 750 clamp(38px, 4.8vw, 74px)/.98 var(--font-body, "Outfit", sans-serif);
  letter-spacing: -.035em;
  text-transform: none;
  text-shadow: 0 1px 0 #ffffff8c, 0 3px 20px #e8fbff66;
}
.project-parallax--manatee .manatee-hero-title > span { display: block; }
.project-parallax--manatee .manatee-hero-scroll {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  margin: 18px 0 0;
  color: inherit;
  font: 650 11px/1.3 var(--font-body, "Outfit", sans-serif);
  letter-spacing: .16em;
  text-transform: uppercase;
  text-shadow: 0 1px 8px #effcffb3;
}
.project-parallax--manatee .manatee-hero-arrow {
  font: 500 28px/1 Arial, sans-serif;
  letter-spacing: 0;
}
.project-parallax-sighting {
  position: absolute;
  z-index: 1;
  width: clamp(170px, 25vw, 285px);
  aspect-ratio: 1;
  left: 68%;
  top: var(--surface-y, 70%);
  transform: translate(-50%, -65%);
  container-type: inline-size;
}
.project-parallax-sighting img {
  width: 100%;
  height: auto;
  transform-origin: 50% 70%;
  /* Remove the illustrated splash; the live ocean supplies the waterline. */
  clip-path: polygon(19.54% 7.97%, 80.38% 7.97%, 80.38% 50.8%, 79.11% 52.87%, 78.71% 53.59%, 79.19% 55.42%, 80.54% 61%, 79.51% 62.76%, 74.08% 64.11%, 65.47% 65.31%, 51.59% 66.19%, 37.88% 65.63%, 30.54% 64.11%, 29.74% 63.32%, 31.66% 57.42%, 31.34% 56.46%, 26.71% 54.63%, 23.76% 51.83%, 19.54% 50.64%);
  transform: translate(calc(-26% * var(--dive, 0)), calc(4% + 58% * var(--dive, 0) + var(--bob, 0px))) rotate(calc(-24deg * var(--dive, 0))) scale(calc(1 - .22 * var(--dive, 0)));
}
.project-parallax-surface,
.project-parallax-submerged { position: absolute; inset: 0; }
.project-parallax-surface { mask-image: linear-gradient(#000 63cqw, transparent 65.5cqw); }
.project-parallax-submerged {
  height: 180%;
  opacity: .3;
  mask-image: linear-gradient(transparent 63cqw, #000 65cqw, transparent 85cqw);
  filter: sepia(.85) saturate(1.7) hue-rotate(132deg) brightness(.85) blur(.8px);
  mix-blend-mode: multiply;
}
.project-parallax-sighting::after {
  content: '';
  position: absolute;
  left: 14%;
  top: 62%;
  width: 70%;
  height: 8%;
  border: 1px solid #d5fff4a6;
  border-radius: 50%;
  box-shadow: 0 3px 0 #07546730, 0 0 0 5px #c3f8ee26;
  transform: scale(calc(1 + var(--dive, 0) * .5));
}
.project-parallax-waterline { z-index: 2; }
.project-parallax-ocean,
.project-parallax-water,
.project-parallax-waterline {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.project-parallax-ocean { object-fit: cover; object-position: center; }
.project-parallax-caption {
  position: absolute;
  z-index: 3;
  left: clamp(20px, 4vw, 48px);
  bottom: 24px;
  margin: 0;
  padding: 8px 11px;
  border: 1px solid #ffffff59;
  border-radius: 2px;
  background: #073f4969;
  color: #fff;
  font: 600 10px/1.4 Arial, sans-serif;
  letter-spacing: .17em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}
.project-parallax-toggle {
  position: absolute;
  z-index: 3;
  right: 20px;
  bottom: 22px;
  min-height: 36px;
  padding: 8px 11px;
  border: 1px solid #ffffff70;
  border-radius: 3px;
  background: #073f498c;
  color: white;
  font: 600 11px/1.2 Arial, sans-serif;
  cursor: pointer;
}
.project-parallax-toggle:focus-visible { outline: 2px solid white; outline-offset: 4px; }
@media (max-width: 640px) {
  .project-parallax { height: clamp(400px, 65svh, 520px); }
  .project-parallax--manatee { --manatee-stage-height: calc(100svh - 18px); height: calc(var(--manatee-stage-height) * 2.2); }
  .project-parallax--manatee .manatee-hero-copy { top: calc(var(--manatee-stage-height) * .10); width: calc(100% - 44px); }
  .project-parallax--manatee .manatee-hero-title { font-size: clamp(34px, 9.8vw, 54px); }
  .project-parallax--manatee .manatee-hero-scroll { margin-top: 16px; font-size: 10px; }
  .project-parallax-sighting { width: clamp(170px, 42vw, 240px); left: 65%; }
  .project-parallax-caption { left: 16px; bottom: 20px; font-size: 8px; letter-spacing: .12em; }
  .project-parallax-toggle { right: 14px; bottom: 18px; font-size: 10px; }
}
@media (max-height: 520px) and (min-aspect-ratio: 1/1) {
  .project-parallax--manatee .manatee-hero-copy { top: calc(var(--manatee-stage-height) * .07); }
  .project-parallax--manatee .manatee-hero-title { font-size: clamp(30px, 5svh, 42px); }
  .project-parallax--manatee .manatee-hero-scroll { margin-top: 10px; gap: 2px; font-size: 9px; }
  .project-parallax--manatee .manatee-hero-arrow { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .project-parallax { --scene-scroll: 0px !important; --scene-dusk: 0 !important; }
  .project-parallax--manatee { height: var(--manatee-stage-height); }
  .project-parallax-stage { position: relative; }
}
