/* Off Uptown — koi pond atmosphere.
   Everything in this file is decorative. Remove pond.css, pond.js and the
   two aria-hidden layers in index.html to return to the plain page. */

/* Layer order: .pond (fish, below content) < main/footer < header < .water-light (shimmer, above) */
main, .site-footer { position: relative; z-index: 1; }

.pond {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
  background: linear-gradient(180deg, #EEF5F2 0%, #E0ECE7 55%, #D3E5DE 100%);
}
.pond svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* Sun shimmer: three tiled radial layers drifting in different directions,
   blended over the page. Transform-only animation, so the compositor does the work. */
.water-light {
  position: fixed; inset: 0; z-index: 60; pointer-events: none; overflow: hidden;
  mix-blend-mode: soft-light; opacity: .85;
}
.water-light i {
  position: absolute; left: 0; top: 0; width: 200%; height: 200%; display: block;
  will-change: transform;
}
.water-light .l1 {
  background-image: radial-gradient(closest-side, rgba(255,255,255,.95), rgba(255,255,255,0));
  background-size: 360px 280px; animation: drift1 26s linear infinite;
}
.water-light .l2 {
  background-image: radial-gradient(closest-side, rgba(255,255,255,.8), rgba(255,255,255,0));
  background-size: 560px 420px; animation: drift2 34s linear infinite;
}
.water-light .l3 {
  background-image: radial-gradient(closest-side, rgba(214,246,236,.85), rgba(255,255,255,0));
  background-size: 760px 600px; animation: drift3 44s linear infinite;
}
/* Light rays from the surface, fading out a little over halfway down. */
.water-light .rays {
  width: 220%; height: 100%; left: -60%;
  background-image: linear-gradient(104deg,
    transparent 0 28%, rgba(255,255,255,.22) 31%, transparent 34%,
    transparent 52%, rgba(255,255,255,.14) 55%, transparent 58%,
    transparent 78%, rgba(255,255,255,.18) 81%, transparent 84%);
  background-size: 1100px 100%;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, rgba(0,0,0,.5) 35%, transparent 70%);
          mask-image: linear-gradient(to bottom, #000 0%, rgba(0,0,0,.5) 35%, transparent 70%);
  animation: rays 38s ease-in-out infinite alternate;
}
@keyframes drift1 { to { transform: translate3d(-360px, -280px, 0); } }
@keyframes drift2 { to { transform: translate3d(-560px, 420px, 0); } }
@keyframes drift3 { to { transform: translate3d(760px, -600px, 0); } }
@keyframes rays   { to { transform: translate3d(180px, 0, 0); } }

/* Let the water read through the page. Cards stay near-white so text keeps its contrast. */
.site-header { background: rgba(238, 245, 242, .8); }
.values, .how { background: rgba(255, 255, 255, .72); }
.site-footer { background: rgba(255, 255, 255, .8); }
.owners { background: transparent; }
.band { background: rgba(228, 240, 232, .85); }
.search, .toolbar, .card, .hood, .quote, .owners-list { background: rgba(255, 255, 255, .93); }
.card-media, .hood-media { background: rgba(255, 255, 255, .6); }

/* Pause control */
.pond-toggle {
  position: fixed; left: calc(1rem + env(safe-area-inset-left)); bottom: calc(1rem + env(safe-area-inset-bottom)); z-index: 70;
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .45rem .8rem .45rem .6rem; border-radius: 999px;
  border: 1px solid var(--line-strong); background: rgba(255, 255, 255, .92); color: var(--ink-2);
  font: 600 .74rem/1 var(--font-body); letter-spacing: .02em; cursor: pointer;
  box-shadow: var(--shadow-sm); transition: background-color .15s, color .15s;
}
.pond-toggle:hover { background: #fff; color: var(--ink); }
@media (pointer: coarse) { .pond-toggle { min-height: 44px; } }
.pond-toggle:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
.pond-toggle svg { width: 16px; height: 16px; fill: currentColor; }
.pond-toggle .when-playing, .pond-toggle .when-paused { display: none; }
.pond-toggle[aria-pressed="false"] .when-playing { display: inline; }
.pond-toggle[aria-pressed="true"] .when-paused { display: inline; }

/* Paused state (button, or reduced-motion preference by default) */
.pond-paused .water-light i { animation-play-state: paused; }

@media (prefers-reduced-motion: reduce) {
  .water-light i { animation-play-state: paused; }
}
@media (max-width: 640px) {
  .pond-toggle { left: calc(.75rem + env(safe-area-inset-left)); bottom: calc(.75rem + env(safe-area-inset-bottom)); padding: .4rem .7rem .4rem .55rem; }
  .install-open .pond-toggle { visibility: hidden; }
  /* Room under the footer so the round pause button never covers its last line. */
  .site-footer { padding-bottom: calc(env(safe-area-inset-bottom) + 64px); }
  /* On phones the pause control shrinks to a round 44px button so it covers less of the page. */
  .pond-toggle { width: 44px; height: 44px; padding: 0; justify-content: center; border-radius: 50%; }
  .pond-toggle span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .water-light { opacity: .6; }
}
@media print {
  .pond, .water-light, .pond-toggle { display: none; }
}
