/* Depth Creates Results — chaptered ocean dive */

:root {
  --sky-top: #7eb9d6;
  --sky-mid: #c2dae8;
  --sky-horizon: #efd4a8;
  --water-light: #4aa0b4;
  --water-mid: #2a7a90;
  --water-deep: #1a5568;
  --water-abyss: #123848;
  --ink: #0c1c24;
  --sand: #f3ebe1;
  --accent: #d4a84b;
  --font-display: "Syne", sans-serif;
  --font-body: "Outfit", sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar {
  display: none;
}

body {
  font-family: var(--font-body);
  color: var(--sand);
  background: var(--water-abyss);
  overflow-x: hidden;
  scrollbar-width: none;
}

body::-webkit-scrollbar {
  display: none;
}

/* One viewport per chapter / tour stop */
.scroll-track {
  position: relative;
}

.chapter {
  height: 100vh;
  width: 1px;
  pointer-events: none;
}

/* Extra room so the finale can actually scrub to completion */
.chapter[data-chapter="contact"] {
  height: 180vh;
}

.ocean {
  position: fixed;
  inset: 0;
  overflow: visible;
}

.depth-wash {
  position: absolute;
  inset: 0;
  z-index: 0;
  /* Single underwater field — soft depth only, no transparent seams */
  background: linear-gradient(180deg, #2a7f96 0%, #1a6078 50%, #143f50 100%);
  opacity: 0;
  will-change: opacity;
}

/* Progressive darkening as you descend (driven by scroll) */
.depth-veil {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  opacity: 0;
  background: #020c14;
  will-change: opacity;
}

.sky {
  position: absolute;
  inset: 0;
  z-index: 1;
  /* Seamless sky → haze → water; no hard band */
  background: linear-gradient(
    180deg,
    #8ec4dc 0%,
    var(--sky-top) 18%,
    var(--sky-mid) 42%,
    #d5e6ef 54%,
    var(--sky-horizon) 62%,
    #b7d4ce 70%,
    var(--water-light) 82%,
    #2f8fa6 100%
  );
  will-change: transform, opacity;
  overflow: hidden;
}

.sky-clouds {
  position: absolute;
  z-index: 3;
  pointer-events: none;
  opacity: 0.4;
}

.sky-clouds img {
  display: block;
  width: 100%;
  height: auto;
  mix-blend-mode: soft-light;
}

.cloud-a {
  top: 3%;
  left: 8%;
  width: 34%;
  max-width: 420px;
  animation: cloud-drift-a 56s linear infinite;
}

@keyframes cloud-drift-a {
  0%,
  100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(2%);
  }
}

/* Single gull — upper right sky, clear of clouds + copy */
.sky-bird {
  position: absolute;
  top: 12%;
  right: 9%;
  left: auto;
  width: min(4.8vw, 44px);
  z-index: 3;
  opacity: 0.78;
  pointer-events: none;
}

.sky-bird img {
  display: block;
  width: 100%;
  height: auto;
  transform-origin: 50% 60%;
  filter: drop-shadow(0 3px 8px rgba(20, 48, 60, 0.16));
  animation: bird-float 5s ease-in-out infinite;
  will-change: transform;
}

@keyframes bird-float {
  0%,
  100% {
    transform: translateY(0) rotate(-0.5deg);
  }
  50% {
    transform: translateY(6px) rotate(0.6deg);
  }
}

/* Horizon land — full-bleed ridge sitting in the sky→water blend */
.sky-land {
  position: absolute;
  left: 0;
  right: 0;
  top: 42%;
  height: 28%;
  width: 100%;
  z-index: 6;
  pointer-events: none;
  opacity: 1;
  -webkit-mask-image: linear-gradient(
    180deg,
    transparent 0%,
    rgba(0, 0, 0, 0.55) 12%,
    #000 28%,
    #000 88%,
    rgba(0, 0, 0, 0.5) 96%,
    transparent 100%
  );
  mask-image: linear-gradient(
    180deg,
    transparent 0%,
    rgba(0, 0, 0, 0.55) 12%,
    #000 28%,
    #000 88%,
    rgba(0, 0, 0, 0.5) 96%,
    transparent 100%
  );
}

.sky-land img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 55%;
  opacity: 1;
  filter: saturate(1.05) contrast(1.08) brightness(1.05);
}

/* Soft dissolve only at ridge tips — keep peaks readable */
.sky-land::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 32%;
  background: linear-gradient(
    180deg,
    rgba(213, 230, 239, 0.45) 0%,
    transparent 100%
  );
  pointer-events: none;
}

.horizon-haze {
  position: absolute;
  left: 0;
  right: 0;
  top: 44%;
  height: 26%;
  z-index: 4;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(213, 230, 239, 0.22) 30%,
    rgba(239, 212, 168, 0.1) 52%,
    rgba(155, 200, 196, 0.12) 72%,
    transparent 100%
  );
  pointer-events: none;
}

.surface-water {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 46%;
  z-index: 3;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(142, 196, 192, 0.25) 12%,
    rgba(74, 160, 180, 0.55) 38%,
    rgba(42, 122, 144, 0.88) 72%,
    #2a7a90 100%
  );
  pointer-events: none;
}

/* Soft join where water meets the lower page/ocean stage */
.surface-water::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 28%;
  background: linear-gradient(
    180deg,
    transparent,
    rgba(18, 56, 72, 0.15)
  );
}

/* Waterline crossing band */
.surface-plane {
  position: absolute;
  left: -5%;
  right: -5%;
  top: 100%;
  height: 42vh;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  will-change: transform, opacity;
}

.surface-plane-foam {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 18%;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.55),
    rgba(200, 230, 235, 0.25) 40%,
    transparent
  );
  filter: blur(1px);
}

.surface-plane-body {
  position: absolute;
  inset: 12% 0 0;
  background: linear-gradient(
    180deg,
    rgba(90, 180, 195, 0.55),
    rgba(42, 122, 144, 0.85) 35%,
    rgba(26, 85, 104, 0.95)
  );
}

.water {
  position: absolute;
  inset: 0;
  z-index: 2;
  /* Soft atmosphere only — depth color comes from wash + veil */
  background: transparent;
  opacity: 0;
  pointer-events: none;
  will-change: opacity;
}

.caustics {
  position: absolute;
  inset: 0;
  opacity: 0.3;
  background:
    radial-gradient(ellipse 40% 20% at 30% 18%, rgba(255, 245, 220, 0.16), transparent 60%),
    radial-gradient(ellipse 35% 18% at 70% 26%, rgba(200, 235, 240, 0.1), transparent 55%);
  mix-blend-mode: soft-light;
  animation: caustic-shift 16s ease-in-out infinite;
}

@keyframes caustic-shift {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(2%) scale(1.04);
  }
}

.light-rays {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0.45;
  pointer-events: none;
}

.light-rays span {
  position: absolute;
  top: -12%;
  width: 11%;
  height: 125%;
  background: linear-gradient(
    180deg,
    rgba(255, 240, 210, 0.16),
    rgba(180, 220, 230, 0.04) 42%,
    transparent 78%
  );
  animation: ray-drift 15s ease-in-out infinite;
}

.light-rays span:nth-child(1) {
  left: 14%;
  transform: skewX(-11deg);
}
.light-rays span:nth-child(2) {
  left: 30%;
  width: 7%;
  animation-delay: -3s;
}
.light-rays span:nth-child(3) {
  left: 48%;
  transform: skewX(-13deg);
  animation-delay: -6s;
}
.light-rays span:nth-child(4) {
  left: 64%;
  width: 9%;
  animation-delay: -2s;
}
.light-rays span:nth-child(5) {
  left: 80%;
  animation-delay: -8s;
}

@keyframes ray-drift {
  0%,
  100% {
    opacity: 0.35;
  }
  50% {
    opacity: 0.65;
  }
}

.particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0;
}

.particle {
  position: absolute;
  bottom: -8%;
  border-radius: 50%;
  background: rgba(210, 235, 240, 0.5);
  animation: rise linear infinite;
}

@keyframes rise {
  0% {
    transform: translateY(0);
    opacity: 0;
  }
  12% {
    opacity: 0.5;
  }
  100% {
    transform: translateY(-110vh) translateX(var(--drift, 20px));
    opacity: 0;
  }
}

/* Dive boat — sits on the shared horizon / waterline; click starts the dive */
.boat {
  position: absolute;
  left: 50%;
  top: 57%;
  z-index: 4;
  width: min(58vw, 480px);
  margin: 0 0 0 calc(min(58vw, 480px) / -2);
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
  will-change: transform;
  transform-origin: 50% 80%;
  filter: drop-shadow(0 14px 24px rgba(12, 40, 55, 0.28));
  transition: filter 0.35s var(--ease-out);
}

.boat:hover,
.boat:focus-visible {
  filter: drop-shadow(0 16px 28px rgba(12, 40, 55, 0.38))
    brightness(1.04);
}

.boat:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 6px;
}

.boat.is-touring,
.ocean:not([data-zone="surface"]) .boat {
  pointer-events: none;
  cursor: default;
}

.boat-stage {
  position: relative;
  display: block;
  width: 100%;
  animation: boat-bob 5s ease-in-out infinite;
  transform-origin: 50% 80%;
}

.boat-hull,
.boat-hull img {
  display: block;
  width: 100%;
  height: auto;
  position: relative;
  z-index: 2;
}

@keyframes boat-bob {
  0%,
  100% {
    transform: translateY(0) rotate(-0.4deg);
  }
  50% {
    transform: translateY(6px) rotate(0.5deg);
  }
}

.ocean.is-under .boat-stage,
.boat.is-departing .boat-stage {
  animation: none;
}

/* Fauna */
.fauna {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.creature {
  position: absolute;
  opacity: 0;
  will-change: transform, opacity;
}

.creature img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 12px 24px rgba(8, 30, 40, 0.35));
}

.shark-a {
  width: min(42vw, 480px);
  top: 26%;
  left: 0;
}

.shark-b {
  width: min(34vw, 400px);
  top: 54%;
  left: 0;
  right: auto;
}

.shark-b img {
  transform: scaleX(-1);
}

.shark-c {
  width: min(28vw, 280px);
  top: 66%;
  left: 0;
}

/* Central shark sits above the copy, never through it */
.shark-d {
  width: min(48vw, 520px);
  top: 4%;
  left: 50%;
  margin-left: calc(min(48vw, 520px) / -2);
}

/* Faces left while swimming right → left */
.shark-d img {
  transform: scaleX(-1);
}

/* Diver rig + flashlight (above veil, below copy) */
.diver-rig {
  position: absolute;
  top: 14%;
  left: 56%;
  z-index: 7;
  width: min(34vw, 300px);
  height: min(52vw, 460px);
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
}

/* Cool ambient from the chest lamp (viewer's right / ~56% × 36%) */
.diver-rig::before {
  content: "";
  position: absolute;
  inset: -10% -20% -6%;
  z-index: 0;
  background: radial-gradient(
    ellipse 52% 48% at 58% 36%,
    rgba(175, 225, 245, 0.28) 0%,
    rgba(90, 170, 205, 0.1) 40%,
    transparent 70%
  );
  mix-blend-mode: screen;
  pointer-events: none;
  filter: blur(3px);
}

.diver-rig .diver {
  position: absolute;
  inset: 0;
  width: 100%;
  z-index: 2;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.diver-rig .diver img {
  filter:
    brightness(1.28)
    contrast(1.06)
    saturate(1.08)
    drop-shadow(0 0 12px rgba(150, 215, 240, 0.28))
    drop-shadow(0 8px 22px rgba(4, 20, 32, 0.35));
}

.diver-descend {
  opacity: 1;
  visibility: visible;
}

/*
 * Soft under-glow — behind the plate so it only extends the painted beam
 * into the water (no hard cone fighting the art).
 */
.flashlight-beam {
  position: absolute;
  inset: -15% -35% -25% -10%;
  z-index: 1;
  opacity: 0;
  pointer-events: none;
  will-change: opacity;
}

/* Hot spot over the chest lamp in the art */
.flashlight-glow {
  position: absolute;
  left: 56%;
  top: 35%;
  width: 28%;
  aspect-ratio: 1;
  transform: translate(-45%, -50%);
  background: radial-gradient(
    circle,
    rgba(210, 240, 255, 0.7) 0%,
    rgba(140, 210, 235, 0.28) 38%,
    transparent 72%
  );
  mix-blend-mode: screen;
  filter: blur(3px);
}

/* Soft scatter continuing the painted beam down-right */
.flashlight-haze {
  position: absolute;
  left: 48%;
  top: 28%;
  width: 110%;
  height: 95%;
  background: radial-gradient(
    ellipse 70% 48% at 22% 18%,
    rgba(170, 225, 245, 0.38) 0%,
    rgba(90, 175, 210, 0.14) 32%,
    transparent 66%
  );
  mix-blend-mode: screen;
  filter: blur(10px);
  transform: rotate(32deg);
  transform-origin: 18% 16%;
}

/* Wider atmospheric pool — fades in at contact under the copy */
.flashlight-pool {
  position: absolute;
  left: 42%;
  top: 48%;
  width: 130%;
  height: 110%;
  opacity: 0;
  background: radial-gradient(
    ellipse 65% 55% at 40% 30%,
    rgba(175, 225, 245, 0.32) 0%,
    rgba(90, 170, 200, 0.12) 40%,
    transparent 70%
  );
  mix-blend-mode: screen;
  filter: blur(14px);
  pointer-events: none;
  will-change: opacity;
}

.ocean[data-zone="deep"] .flashlight-glow {
  filter: blur(2.5px) saturate(0.9);
}

.ocean[data-zone="deep"] .flashlight-haze {
  filter: blur(9px) saturate(0.9);
}

/* Contact: lamp aimed down — soft catchlight on the copy */
.ocean[data-zone="contact"] .panel-contact.is-active h2,
.ocean[data-zone="contact"] .panel-contact.is-active p,
.ocean[data-zone="contact"] .panel-contact.is-active .cta {
  text-shadow:
    0 0 18px rgba(160, 220, 245, 0.45),
    0 0 42px rgba(90, 170, 200, 0.28);
}

/* Seafloor — soft sand + independent plates spanning full width */
.seafloor {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: min(58vh, 520px);
  z-index: 4;
  pointer-events: none;
  opacity: 0;
  transform: translateY(24%);
  will-change: transform, opacity;
  overflow: visible;
}

.sand-bed {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  height: 58%;
  /* Deep sand loses warm reds — muted blue-gray silt */
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(90, 120, 130, 0.14) 30%,
    rgba(70, 95, 105, 0.3) 70%,
    rgba(50, 72, 82, 0.42) 100%
  );
  mask-image: linear-gradient(180deg, transparent 0%, #000 45%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 45%);
}

.floor-item {
  position: absolute;
  z-index: 2;
  opacity: 0.95;
}

.floor-item img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 10px 18px rgba(6, 24, 32, 0.35));
}

/* Left / center / right reef coverage */
.coral-a {
  width: min(42vw, 340px);
  left: 0;
  bottom: 0;
}

.coral-b {
  width: min(42vw, 340px);
  right: 0;
  bottom: -2%;
}

.coral-c {
  width: min(32vw, 260px);
  left: 50%;
  bottom: 3%;
  transform: translateX(-50%);
}

.fish-left {
  width: min(30vw, 250px);
  left: 6%;
  bottom: 34%;
  z-index: 3;
  animation: fish-drift-a 11s ease-in-out infinite;
}

.fish-right {
  width: min(28vw, 230px);
  right: 6%;
  bottom: 38%;
  z-index: 3;
  animation: fish-drift-b 13s ease-in-out infinite;
}

.fish-right img {
  transform: scaleX(-1);
}

@keyframes fish-drift-a {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(16px, -8px);
  }
}

@keyframes fish-drift-b {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(-20px, 6px);
  }
}

/* Copy */
.stage {
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
}

.panel {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(1.5rem, 5vw, 3rem);
  max-width: 40rem;
  margin: 0 auto;
  width: 100%;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.55s var(--ease-out), visibility 0.55s;
}

.panel.is-active {
  opacity: 1;
  visibility: visible;
}

.panel .cta {
  pointer-events: auto;
}

.panel-bubbles {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(36rem, 90vw);
  height: min(22rem, 50vh);
  transform: translate(-50%, -52%);
  pointer-events: none;
  z-index: 0;
  overflow: visible;
}

.panel-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 100%;
}

.panel-mid .panel-copy > *,
.panel-deep .panel-copy > *,
.panel-contact .panel-copy > * {
  will-change: transform, opacity;
  opacity: 0;
  transform: translateY(56px);
}

@media (prefers-reduced-motion: reduce) {
  .panel-mid .panel-copy > *,
  .panel-deep .panel-copy > *,
  .panel-contact .panel-copy > * {
    opacity: 1;
    transform: none;
  }
}

.text-bubble {
  position: absolute;
  bottom: 18%;
  border-radius: 50%;
  width: var(--size, 10px);
  height: var(--size, 10px);
  border: 1px solid rgba(210, 240, 255, 0.5);
  background: radial-gradient(
    circle at 32% 28%,
    rgba(255, 255, 255, 0.45),
    rgba(140, 210, 235, 0.14) 55%,
    rgba(80, 160, 190, 0.06)
  );
  box-shadow: inset 0 0 4px rgba(255, 255, 255, 0.25);
  opacity: 0;
  animation: text-bubble-rise 1.45s var(--ease-out) forwards;
  animation-delay: var(--delay, 0s);
}

@keyframes text-bubble-rise {
  0% {
    transform: translate3d(0, 36px, 0) scale(0.55);
    opacity: 0;
  }
  18% {
    opacity: 0.9;
  }
  100% {
    transform: translate3d(var(--drift, 0px), -130px, 0) scale(1.15);
    opacity: 0;
  }
}

.brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.4rem, 7.5vw, 4.75rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
  max-width: 14ch;
}

.headline {
  font-weight: 300;
  font-size: clamp(1.15rem, 2.6vw, 1.55rem);
  line-height: 1.35;
  margin-bottom: 0.85rem;
}

.lede,
.panel p {
  font-weight: 300;
  font-size: clamp(0.95rem, 1.8vw, 1.1rem);
  line-height: 1.55;
  max-width: 34ch;
  margin-bottom: 1.75rem;
  color: rgba(235, 242, 245, 0.85);
}

.panel h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.75rem, 4.5vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #eef5f7;
  margin-bottom: 1rem;
  max-width: 16ch;
}

.panel-surface {
  /* Sit on the sky → land blend (~47% land ridge) */
  justify-content: flex-start;
  padding-top: clamp(34vh, 40vh, 44vh);
  padding-bottom: 0;
  /* Scrubbed fade — don't fight GSAP with CSS transitions */
  transition: none;
}

.panel-surface .brand {
  color: #102834;
  margin-bottom: 0.85rem;
  text-shadow: 0 1px 12px rgba(213, 230, 239, 0.55);
}

.panel-surface .headline {
  color: rgba(16, 40, 52, 0.9);
  text-shadow: 0 1px 10px rgba(213, 230, 239, 0.4);
}

.panel-surface .lede {
  color: rgba(20, 48, 60, 0.72);
  margin-bottom: 0;
  text-shadow: 0 1px 8px rgba(213, 230, 239, 0.35);
}

.panel-contact {
  justify-content: center;
  padding-top: clamp(1.5rem, 5vw, 3rem);
  padding-bottom: clamp(1.5rem, 5vw, 3rem);
}

.panel-contact h2 {
  max-width: none;
  white-space: nowrap;
  margin-bottom: 1.25rem;
}

/* CTA */
.cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  background: var(--sand);
  border: none;
  cursor: pointer;
  pointer-events: auto;
}

.cta-light {
  background: transparent;
  color: var(--sand);
  border-bottom: 1px solid rgba(243, 235, 225, 0.55);
  padding: 0.35rem 0;
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 1.05rem;
  box-shadow: none;
}

.cta-light:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
  transform: none;
}

/* Soft edge dim — no mask rings / layered transparent bands */
.mask-overlay {
  position: absolute;
  inset: 0;
  z-index: 9;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.hud {
  position: absolute;
  z-index: 50;
  left: clamp(0.75rem, 3vw, 1.5rem);
  bottom: clamp(0.75rem, 3vh, 1.5rem);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  font-variant-numeric: tabular-nums;
}

.hud.is-on {
  pointer-events: auto;
}

.mask-glass {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 92% 84% at 50% 48%,
    transparent 55%,
    rgba(2, 12, 20, 0.28) 100%
  );
}

.gauge {
  position: relative;
  background: transparent;
  border: none;
  padding: 0;
  min-width: 0;
  color: #f3ebe1;
  backdrop-filter: none;
}

.gauge-depth {
  pointer-events: auto;
  cursor: pointer;
  z-index: 1;
}

.gauge-depth:focus-visible .dial-rim {
  stroke: var(--accent);
  stroke-width: 2.5;
}

.dial {
  position: relative;
  width: clamp(6.4rem, 14vw, 7.4rem);
  aspect-ratio: 1;
  filter: drop-shadow(0 10px 18px rgba(2, 10, 16, 0.45));
  transition: transform 0.25s var(--ease-out), filter 0.25s ease;
}

.gauge-depth:hover .dial,
.gauge-depth.is-plan-open .dial,
.gauge-depth:focus-within .dial {
  transform: scale(1.04);
  filter: drop-shadow(0 12px 22px rgba(2, 10, 16, 0.55));
}

.dial-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.dial-rim {
  fill: none;
  stroke: rgba(210, 190, 150, 0.55);
  stroke-width: 1.75;
}

.dial-plate {
  fill: #0a1a24;
}

.dial-track,
.dial-progress {
  fill: none;
  stroke-width: 6.5;
  stroke-linecap: round;
  transform: rotate(135deg);
  transform-origin: 60px 60px;
  stroke-dasharray: 75 100;
}

.dial-track {
  stroke: rgba(243, 235, 225, 0.12);
  stroke-dashoffset: 0;
}

.dial-progress {
  stroke-dashoffset: 75;
  transition: stroke-dashoffset 0.2s linear;
}

.dial-progress-depth {
  stroke: #e8c56a;
}

.dial-progress-o2 {
  stroke: #6fbf9a;
}

.dial-hub {
  fill: #e8c56a;
  stroke: rgba(6, 19, 28, 0.85);
  stroke-width: 1;
}

.gauge-o2 .dial-hub {
  fill: #6fbf9a;
}

.dial-face {
  position: absolute;
  inset: 18%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
}

.gauge-label {
  display: block;
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  opacity: 0.7;
  margin-bottom: 0.1rem;
  color: rgba(243, 235, 225, 0.75);
}

.gauge-readout {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1;
  color: #f7f1e7;
}

.gauge-unit {
  font-size: 0.62rem;
  font-weight: 500;
  margin-left: 0.12rem;
  opacity: 0.72;
}

.dial-hint,
.dial-sub {
  margin-top: 0.28rem;
  max-width: 6.2em;
  font-size: 0.52rem;
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  color: rgba(232, 197, 106, 0.92);
}

.dial-sub {
  color: rgba(243, 235, 225, 0.45);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.gauge-depth.is-plan-open .dial-hint,
.gauge-depth:hover .dial-hint,
.gauge-depth:focus-within .dial-hint {
  color: #f3ebe1;
}

@media (hover: none) {
  .dial-hint {
    font-size: 0;
  }

  .dial-hint::after {
    content: "tap for dive plan";
    font-size: 0.52rem;
    letter-spacing: 0.04em;
  }
}

/* Dive plan — TOC pinned by click; hover also opens on desktop */
.dive-plan {
  position: absolute;
  left: calc(100% + 0.4rem);
  bottom: 0;
  width: max-content;
  min-width: 10.75rem;
  padding: 0.75rem 0.75rem 0.7rem;
  border: 1px solid rgba(243, 235, 225, 0.28);
  background: #06131c;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-6px);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease,
    visibility 0.18s;
  pointer-events: none;
  z-index: 60;
}

.dive-plan::before {
  content: "";
  position: absolute;
  right: 100%;
  top: 0;
  bottom: 0;
  width: 0.55rem;
}

.gauge-depth.is-plan-open .dive-plan,
.gauge-depth:hover .dive-plan,
.gauge-depth:focus-within .dive-plan {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  pointer-events: auto;
}

.dive-plan-title {
  margin: 0 0 0.45rem;
  padding: 0 0.35rem;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(243, 235, 225, 0.55);
}

.dive-plan-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.dive-plan-stop,
.dive-plan-stop:link,
.dive-plan-stop:visited,
.dive-plan-stop:hover,
.dive-plan-stop:active {
  display: grid;
  grid-template-columns: 2.35rem 1fr;
  gap: 0.7rem;
  align-items: center;
  width: 100%;
  min-height: 2.25rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid transparent;
  border-radius: 2px;
  background: transparent;
  color: #f3ebe1;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease;
}

.dive-plan-stop:hover,
.dive-plan-stop:focus-visible {
  background: rgba(243, 235, 225, 0.1);
  border-color: rgba(243, 235, 225, 0.28);
  outline: none;
  color: #fffaf3;
}

.dive-plan-stop.is-here {
  background: rgba(232, 197, 106, 0.14);
  border-color: rgba(232, 197, 106, 0.4);
  color: #fffaf3;
}

.plan-depth {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: #e8c56a;
}

.plan-label {
  line-height: 1.2;
  white-space: nowrap;
  color: inherit;
}

.dive-plan-map {
  position: relative;
  margin-top: 0.65rem;
  height: 4px;
  border-radius: 99px;
  background: linear-gradient(
    90deg,
    #c5dde8 0%,
    #2a7a90 35%,
    #143f50 70%,
    #020c14 100%
  );
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.dive-plan-you {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 9px;
  height: 9px;
  margin: -4.5px 0 0 -4.5px;
  border-radius: 50%;
  background: #f3ebe1;
  box-shadow:
    0 0 0 2px rgba(6, 19, 28, 0.9),
    0 0 10px rgba(232, 197, 106, 0.55);
  transition: left 0.25s var(--ease-out);
}

@media (max-width: 640px) {
  .dive-plan {
    left: 0;
    right: auto;
    bottom: calc(100% + 0.35rem);
    transform: translateY(6px);
  }

  .dive-plan::before {
    right: auto;
    left: 0;
    top: 100%;
    bottom: auto;
    width: 100%;
    height: 0.5rem;
  }

  .gauge-depth.is-plan-open .dive-plan,
  .gauge-depth:hover .dive-plan,
  .gauge-depth:focus-within .dive-plan {
    transform: translateY(0);
  }
}

.scroll-hint {
  position: absolute;
  bottom: 1.75rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 11;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(16, 40, 52, 0.5);
  pointer-events: none;
  transition: opacity 0.4s;
}

.ocean:not([data-zone="surface"]) .scroll-hint {
  opacity: 0;
}

.scroll-hint-line {
  width: 1px;
  height: 36px;
  background: linear-gradient(180deg, rgba(16, 40, 52, 0.4), transparent);
  animation: hint-pulse 2.2s ease-in-out infinite;
}

@keyframes hint-pulse {
  0%,
  100% {
    transform: scaleY(0.7);
    opacity: 0.4;
  }
  50% {
    transform: scaleY(1);
    opacity: 1;
  }
}

/* Life-preserver back to top */
.back-top {
  position: absolute;
  z-index: 50;
  right: clamp(0.85rem, 3vw, 1.5rem);
  bottom: clamp(0.85rem, 3vh, 1.5rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px) scale(0.92);
  transition:
    opacity 0.4s var(--ease-out),
    transform 0.4s var(--ease-out);
}

.back-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.back-top:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 50%;
}

.preserver {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  box-shadow:
    0 8px 20px rgba(6, 24, 32, 0.35),
    0 1px 0 rgba(255, 255, 255, 0.25) inset;
  transition: transform 0.35s var(--ease-out);
}

.preserver-band {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(
    #e8e4dc 0deg 45deg,
    #c43c2e 45deg 90deg,
    #e8e4dc 90deg 135deg,
    #c43c2e 135deg 180deg,
    #e8e4dc 180deg 225deg,
    #c43c2e 225deg 270deg,
    #e8e4dc 270deg 315deg,
    #c43c2e 315deg 360deg
  );
}

.preserver-hole {
  position: absolute;
  inset: 28%;
  border-radius: 50%;
  background: rgba(18, 56, 72, 0.92);
  box-shadow:
    0 0 0 3px rgba(40, 40, 40, 0.35) inset,
    0 0 0 1px rgba(255, 255, 255, 0.15);
}

.preserver-rope {
  position: absolute;
  inset: 10%;
  border-radius: 50%;
  border: 2px dashed rgba(255, 255, 255, 0.35);
  pointer-events: none;
}

.back-top-label {
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(220, 232, 236, 0.75);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.back-top:hover .preserver,
.back-top:focus-visible .preserver {
  transform: rotate(-18deg) scale(1.06);
}

.back-top:hover .back-top-label {
  color: var(--accent);
}

@media (max-width: 640px) {
  .boat {
    top: 58%;
    width: min(78vw, 320px);
    margin: 0 0 0 calc(min(78vw, 320px) / -2);
  }

  .sky-land {
    top: 40%;
    height: 30%;
  }

  .cloud-a {
    width: 42%;
  }

  .diver-rig {
    top: 10%;
    left: 54%;
    width: min(56vw, 240px);
    height: min(86vw, 370px);
  }

  .diver-rig::before {
    background: radial-gradient(
      ellipse 55% 48% at 58% 36%,
      rgba(185, 230, 250, 0.32) 0%,
      rgba(100, 180, 210, 0.12) 44%,
      transparent 72%
    );
  }

  .diver-rig .diver img {
    filter:
      brightness(1.32)
      contrast(1.08)
      saturate(1.1)
      drop-shadow(0 0 12px rgba(160, 220, 245, 0.32))
      drop-shadow(0 6px 16px rgba(4, 20, 32, 0.4));
  }

  .flashlight-glow {
    width: 32%;
  }

  .flashlight-haze {
    width: 120%;
    height: 100%;
  }

  .panel-surface {
    padding-top: clamp(32vh, 38vh, 42vh);
  }

  .panel-surface .brand {
    font-size: clamp(2.1rem, 11vw, 3.2rem);
    max-width: 12ch;
  }

  .sky-bird {
    top: 10%;
    right: 6%;
    left: auto;
    width: min(7.5vw, 36px);
  }

  .panel-mid,
  .panel-deep,
  .panel-contact {
    padding-inline: 1.25rem;
  }

  .panel-contact {
    justify-content: center;
    padding-top: clamp(1.5rem, 5vw, 3rem);
    padding-bottom: max(1.5rem, env(safe-area-inset-bottom, 0px));
  }

  .panel-contact h2 {
    font-size: clamp(1.35rem, 6.2vw, 2.1rem);
    white-space: nowrap;
  }

  .hud {
    flex-direction: row;
    left: 0.6rem;
    transform: none;
    bottom: max(5.25rem, calc(env(safe-area-inset-bottom, 0px) + 4.75rem));
  }

  .dial {
    width: 5.6rem;
  }

  .gauge-readout {
    font-size: 1.05rem;
  }

  .back-top {
    right: 0.7rem;
    bottom: max(0.7rem, env(safe-area-inset-bottom, 0px));
  }

  .preserver {
    width: 48px;
    height: 48px;
  }

  .coral-a {
    width: min(52vw, 200px);
    left: -2%;
  }

  .coral-b {
    width: min(52vw, 200px);
    right: -2%;
  }

  .coral-c {
    width: min(40vw, 160px);
  }

  .fish-left {
    left: 2%;
    width: min(38vw, 160px);
    bottom: 30%;
  }

  .fish-right {
    right: 2%;
    width: min(36vw, 150px);
    bottom: 34%;
  }

  .shark-a,
  .shark-c {
    width: min(58vw, 220px);
  }

  .shark-b {
    width: min(64vw, 240px);
  }

  .shark-d {
    width: min(72vw, 280px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .text-bubble,
  .boat-stage,
  .sky-bird img,
  .light-rays span,
  .particle,
  .scroll-hint-line,
  .caustics,
  .fish-left,
  .fish-right,
  .sky-clouds {
    animation: none !important;
  }
}
