/* The ocean moves on its own layer; the content remains stationary. */
.hero-section {
  isolation: isolate;
  background: transparent;
}

.ocean-background {
  position: fixed;
  inset: 0 0 auto;
  /* Keep the drawing surface stable while mobile browser bars hide/show. */
  height: 100vh;
  height: 100lvh;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  transform: translateZ(0);
  background:
    linear-gradient(180deg, #70bce6, #add8ef 45%, #489fcb 70%, #175e8b);
}

.ocean-background::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('ocean-still.svg') center / cover no-repeat;
  opacity: calc(1 - var(--submerged, 0));
}

.ocean-background canvas {
  position: absolute; inset: 0; z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.ocean-background[data-ready='true'] canvas { opacity: 1; }
.ocean-background[data-ready='true']::before { opacity: 0; }

/* Light shafts emerge below the surface; a soft scrim keeps text readable. */
.ocean-light {
  position: absolute; inset: 0; z-index: 2;
  background:
    conic-gradient(from 142deg at 12% -30%, transparent 0deg, #d9f7ff22 5deg, transparent 11deg, #b4eeff1a 16deg, transparent 23deg),
    conic-gradient(from 185deg at 86% -25%, transparent 0deg, #d4f7ff1c 8deg, transparent 18deg),
    linear-gradient(0deg, #02152b55, transparent 45%);
  opacity: calc(.12 + var(--submerged, 0) * .88);
}

/* The no-WebGL/reduced-motion view changes depth without camera movement. */
.ocean-background::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse at 25% -15%, #18759866, transparent 65%),
    linear-gradient(180deg, #073b60, #062b4c 45%, #03162e);
  opacity: var(--submerged, 0);
}

.hero-section .hero-copy {
  position: relative;
  z-index: 2;
}

.hero-section .gold-quote-card {
  transform-origin: 50% 75%;
  animation: quote-water-float 8s ease-in-out infinite;
}
.hero-section .quote-ocean-panel {
  background: linear-gradient(145deg, #172c43b8, #081321e8);
  border-color: #9dd8ff38;
  box-shadow: inset 0 1px #c9edff1c, 0 18px 45px #02091666, 0 7px 24px #3a9ac820;
}
.hero-section .gold-quote-float::after {
  content: ''; position: absolute; left: 12%; right: 12%; bottom: -30px;
  height: 24px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(ellipse, #7ecdf94d, #397fbc1c 55%, transparent 75%);
  filter: blur(9px); animation: quote-water-reflection 8s ease-in-out infinite;
}
@keyframes quote-water-float {
  0%, 100% { transform: translateY(0) rotate(-.5deg); }
  50% { transform: translateY(-10px) rotate(.5deg); }
}
@keyframes quote-water-reflection {
  0%, 100% { transform: scaleX(1); opacity: .7; }
  50% { transform: scaleX(.85); opacity: .4; }
}
.hero-section .gold-quote-float:hover .gold-quote-card,
.hero-section .gold-quote-float:focus-within .gold-quote-card,
.hero-section .gold-quote-float:hover::after,
.hero-section .gold-quote-float:focus-within::after { animation-play-state: paused; }

@media (prefers-reduced-motion: reduce) {
  .hero-section .gold-quote-card,
  .hero-section .gold-quote-float::after { animation: none; transform: none; }
  .ocean-background canvas { transition: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* The same viewport-sized canvas stays visible from the hero to the footer. */
body { isolation: isolate; }
body > section:not(.hero-section) { background-color: transparent; }
body > .ocean-stats { background-color: #082b4c66; }
body > footer { background-color: #03152b99; }
