/*
 * Styles for the playful modules: bee, whale, cairn.
 */

/* Hives are clickable (bee.js). */
.hive {
  cursor: pointer;
}

.bee {
  pointer-events: none;
}

/* Whale: rises, holds, dives. Total 6 s. */
.whale {
  cursor: pointer;
}
.whale-body {
  transform-box: fill-box;
  transform-origin: center bottom;
}
.whale-body.is-playing {
  animation: whale-surface 6s ease-in-out 1 forwards;
}
.whale-spray {
  opacity: 0;
  animation: whale-spray 6s ease-out 1;
}
@keyframes whale-surface {
  0%   { transform: translateY(26px); opacity: 0; }
  20%  { transform: translateY(0); opacity: 1; }
  75%  { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(28px); opacity: 0; }
}
@keyframes whale-spray {
  0%, 25% { opacity: 0; transform: translateY(0); }
  35%     { opacity: 1; transform: translateY(-6px); }
  55%     { opacity: 0; transform: translateY(-14px); }
  100%    { opacity: 0; }
}

.splash {
  fill: none;
  stroke: #cfe6f0;
  stroke-width: 2;
  animation: splash 0.8s ease-out 1 forwards;
}
@keyframes splash {
  from { r: 6; opacity: 1; }
  to   { r: 34; opacity: 0; }
}

/* Cairn: three slightly different greys, a highlight on each stone, a shadow below. */
.cairn-stone {
  fill: #7d848e;
  stroke: rgba(43, 42, 39, 0.35);
  stroke-width: 0.5;
}
.cairn-stone--1 {
  fill: #8e9398;
}
.cairn-stone--2 {
  fill: #6f7a84;
}
.cairn-light {
  fill: rgba(246, 241, 231, 0.45);
}
.cairn-shadow {
  fill: rgba(30, 60, 40, 0.2);
}
.cairn-label {
  font-family: var(--font-display);
  font-size: 8px;
  fill: rgba(43, 42, 39, 0.7);
}

@media (prefers-reduced-motion: reduce) {
  .whale-body.is-playing,
  .whale-spray,
  .splash {
    animation: none;
  }
}
