/* POND LIFE — clouds, dragonfly, ripples, rays, dock, floor, weeds,
   minnows, night stars & fireflies. Split from pond.css (200-line rule). */

/* clouds — slow pencil drift */
.pond .cloud path { fill: rgb(var(--ink-rgb) / 0.04); stroke: rgb(var(--ink-rgb) / 0.35); stroke-width: 2.5; stroke-linejoin: round; }
.pond .cloud { animation: cloud-drift 90s ease-in-out infinite alternate; }
.pond .cloud.c2 { animation-duration: 120s; animation-delay: -40s; }
.pond .cloud.c3 { animation-duration: 105s; animation-delay: -70s; }
@keyframes cloud-drift { from { transform: translateX(-40px); } to { transform: translateX(60px); } }

/* sun rays through the water */
.pond .ray { fill: #fff3cf; opacity: 0.1; }
.pond .ray:nth-of-type(2) { opacity: 0.07; }

/* rings on the water — grow and fade, staggered */
.pond .ripple ellipse { fill: none; stroke: var(--accent); stroke-width: 2; opacity: 0; }
.pond .ripple ellipse { animation: ripple-out 7s ease-out infinite; }
.pond .ripple ellipse:nth-child(2) { animation-delay: 0.6s; }
.pond .rp2 ellipse { animation-delay: 2.4s; }
.pond .rp2 ellipse:nth-child(2) { animation-delay: 3s; }
.pond .rp3 ellipse { animation-delay: 4.8s; }
.pond .rp3 ellipse:nth-child(2) { animation-delay: 5.4s; }
@keyframes ripple-out {
  0%   { transform: scale(0.3); opacity: 0; }
  8%   { opacity: 0.5; }
  35%  { transform: scale(1.6); opacity: 0; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* dock */
.pond .dock-board { fill: #c4a274; fill-opacity: 0.9; stroke: rgb(var(--ink-rgb) / 0.6); stroke-width: 2.5; }
.pond .dock-post { fill: none; stroke: rgb(var(--ink-rgb) / 0.55); stroke-width: 5; stroke-linecap: round; }
.pond .dock-line { fill: none; stroke: rgb(var(--ink-rgb) / 0.4); stroke-width: 1.8; stroke-linecap: round; }
.pond .dock-bucket { fill: #8fa6b8; fill-opacity: 0.85; stroke: rgb(var(--ink-rgb) / 0.6); stroke-width: 2; stroke-linejoin: round; }

/* dragonfly — hovers by the reeds, wings flutter */
.pond .dragonfly { transform: translate(205px, 300px); }
.pond .dfly-body { fill: none; stroke: var(--accent); stroke-width: 2.6; stroke-linecap: round; }
.pond .dfly-eye { fill: var(--accent); }
.pond .dfly-wing { fill: rgb(var(--ink-rgb) / 0.1); stroke: rgb(var(--ink-rgb) / 0.4); stroke-width: 1.2; }

/* floor */
.pond .floor-sand { fill: #d9c9a4; opacity: 0.5; }
.pond .floor-line { fill: none; stroke: rgb(var(--ink-rgb) / 0.4); stroke-width: 3; stroke-linecap: round; }
.pond .stone { fill: rgb(var(--ink-rgb) / 0.1); stroke: rgb(var(--ink-rgb) / 0.45); stroke-width: 2.5; }
.pond .stone.s2 { fill: rgb(var(--ink-rgb) / 0.06); }
.pond .snag path { fill: none; stroke: #7c5f45; stroke-width: 7; stroke-linecap: round; }
.pond .snag .snag-line { stroke: rgb(var(--ink-rgb) / 0.3); stroke-width: 2; }
.pond .snail-body { fill: none; stroke: rgb(var(--ink-rgb) / 0.55); stroke-width: 2; stroke-linecap: round; }
.pond .snail-shell { fill: #c4a274; fill-opacity: 0.6; stroke: rgb(var(--ink-rgb) / 0.55); stroke-width: 2; }
.pond .sunk-bucket path { fill: rgb(var(--ink-rgb) / 0.08); stroke: rgb(var(--ink-rgb) / 0.45); stroke-width: 2.4; stroke-linejoin: round; }

/* waterweed */
.pond .weed { fill: none; stroke: var(--grass); stroke-width: 5; stroke-linecap: round; opacity: 0.75; }
.pond .weed.w2, .pond .weed.w4 { stroke-width: 4; opacity: 0.55; }
.pond .weed.w5 { stroke-width: 3.5; opacity: 0.45; }

/* minnows — a small school drifting near mid-water */
.pond .minnows { transform: translate(560px, 960px); }
.pond .minnow path { fill: #9aa98f; fill-opacity: 0.75; stroke: rgb(var(--ink-rgb) / 0.45); stroke-width: 1.4; stroke-linejoin: round; }
.pond .minnow circle { fill: rgb(var(--ink-rgb) / 0.7); }

/* night sky — hidden by day, drawn in chalk at night */
.pond .night-sky { opacity: 0; transition: opacity 3s ease; }
body[data-phase="night"] .pond .night-sky,
body[data-phase="late-dusk"] .pond .night-sky { opacity: 1; }
.pond .nstar path { fill: none; stroke: #e6e0d2; stroke-width: 2; stroke-linecap: round; opacity: 0.7; }
.pond .firefly { fill: #ffd977; }

@media (prefers-reduced-motion: no-preference) {
  .pond .dfly-inner { animation: dfly-hover 5s ease-in-out infinite; }
  .pond .dfly-wing { animation: dfly-flutter 0.18s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: center; }
  .pond .weed {
    transform-box: fill-box;
    transform-origin: bottom center;
    animation: weed-sway 7s ease-in-out infinite alternate;
  }
  .pond .weed.w2 { animation-delay: 1.2s; }
  .pond .weed.w3 { animation-delay: 2.1s; }
  .pond .weed.w4 { animation-delay: 3.3s; }
  .pond .weed.w5 { animation-delay: 0.7s; }
  .pond .minnows { animation: minnow-drift 22s ease-in-out infinite alternate; }
  .pond .minnow { animation: minnow-bob 3s ease-in-out infinite alternate; }
  .pond .minnow.m2 { animation-delay: 0.8s; }
  .pond .minnow.m3 { animation-delay: 1.5s; }
  .pond .minnow.m4 { animation-delay: 2.2s; }
  .pond .nstar { animation: nstar-blink 4s ease-in-out infinite; }
  .pond .nstar:nth-of-type(2n) { animation-delay: 1.3s; }
  .pond .nstar:nth-of-type(3n) { animation-delay: 2.6s; }
  .pond .firefly { animation: firefly-fly 11s ease-in-out infinite alternate; }
  .pond .firefly.f2 { animation-delay: -4s; animation-duration: 13s; }
  .pond .firefly.f3 { animation-delay: -8s; animation-duration: 9s; }
}

/* night adjustments — dimmer rays and clouds, darker water, sleepy fish */
body[data-phase="night"] .pond .ray,
body[data-phase="late-dusk"] .pond .ray { opacity: 0.03; }
body[data-phase="night"] .pond .water-fill,
body[data-phase="late-dusk"] .pond .water-fill { opacity: 0.75; }
body[data-phase="night"] .pond .nalim-body,
body[data-phase="late-dusk"] .pond .nalim-body { fill: #8f7052; }
body[data-phase="night"] .pond .floor-sand,
body[data-phase="late-dusk"] .pond .floor-sand { opacity: 0.25; }

@keyframes dfly-hover {
  0%, 100% { transform: translate(0, 0) rotate(-3deg); }
  30%      { transform: translate(14px, -10px) rotate(4deg); }
  65%      { transform: translate(-8px, 6px) rotate(-2deg); }
}
@keyframes dfly-flutter { from { transform: scaleY(1); } to { transform: scaleY(0.35); } }
@keyframes weed-sway { from { transform: rotate(-3deg); } to { transform: rotate(3.5deg); } }
@keyframes minnow-drift {
  from { transform: translate(560px, 960px); }
  to   { transform: translate(680px, 930px); }
}
/* `translate` property, not `transform` — m2..m4 carry layout offsets in
   the SVG transform attribute and a transform animation would clobber them */
@keyframes minnow-bob { from { translate: 0 0; } to { translate: 0 -7px; } }
@keyframes nstar-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@keyframes firefly-fly {
  0%   { transform: translate(0, 0); opacity: 0.9; }
  25%  { opacity: 0.15; }
  50%  { transform: translate(40px, -26px); opacity: 1; }
  75%  { opacity: 0.2; }
  100% { transform: translate(-24px, 14px); opacity: 0.85; }
}
