/* Music control in the header: four thin bars that move while the song
   plays and settle into short ticks when paused, plus a small label. */

.kkw .kkw-sound {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 44px;
  margin-left: auto;
  padding: 0 0.25rem;
  font-size: var(--kkw-fs-label);
  font-weight: 500;
  letter-spacing: var(--kkw-track-label);
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.86);
  transition: color 0.4s var(--kkw-ease);
}
.kkw .kkw-sound:hover,
.kkw .kkw-sound[aria-pressed="true"] { color: var(--kkw-white); }

.kkw .kkw-sound__bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 3px;
  height: 14px;
}
.kkw .kkw-sound__bars i {
  display: block;
  width: 1px;
  height: 3px;
  background: currentColor;
  transition: height 0.4s var(--kkw-ease);
}
.kkw .kkw-sound[aria-pressed="true"] .kkw-sound__bars i { animation: kkaBar 1.1s var(--kkw-ease-in-out) infinite alternate; }
.kkw .kkw-sound[aria-pressed="true"] .kkw-sound__bars i:nth-child(2) { animation-duration: 0.8s; animation-delay: -0.3s; }
.kkw .kkw-sound[aria-pressed="true"] .kkw-sound__bars i:nth-child(3) { animation-duration: 1.3s; animation-delay: -0.6s; }
.kkw .kkw-sound[aria-pressed="true"] .kkw-sound__bars i:nth-child(4) { animation-duration: 0.95s; animation-delay: -0.15s; }
@keyframes kkaBar {
  from { height: 3px; }
  to { height: 14px; }
}

/* Desktop: sit just before the nav links */
@media (min-width: 861px) {
  .kkw .kkw-sound { margin-right: clamp(0.5rem, 2vw, 1.5rem); }
}
/* Narrow: bars only, beside the Menu button */
@media (max-width: 480px) {
  .kkw .kkw-sound__label { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .kkw .kkw-sound[aria-pressed="true"] .kkw-sound__bars i { animation: none; height: 10px; }
}
