/* Styles for the animation at the top of the home page (dots.js). Uses the colour variables
   from styles.css. */
@keyframes hbounce { 0%, 100% { transform: scaleY(0.3); } 50% { transform: scaleY(1); } }

/* The recording capsule */
.hcap { display: inline-flex; align-items: center; gap: 9px; height: 36px; padding: 0 16px; border-radius: 999px; background: var(--ink); color: var(--paper); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; transition: background 0.3s ease; }
.hcap-dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(251, 248, 242, 0.35); }
.hcap.live .hcap-dot { background: #ff6b57; }
.hcap.done .hcap-dot { background: #5ecb8a; }
.hcap-bars { display: flex; align-items: center; gap: 2.5px; height: 16px; }
.hcap-bars i { width: 3px; height: 16px; border-radius: 2px; background: var(--paper); display: block; transform: scaleY(0.25); }
.hcap.live .hcap-bars i { animation: hbounce 0.7s ease-in-out infinite; }
.hcap.live .hcap-bars i:nth-child(2) { animation-delay: 0.12s; }
.hcap.live .hcap-bars i:nth-child(3) { animation-delay: 0.31s; }
.hcap.live .hcap-bars i:nth-child(4) { animation-delay: 0.2s; }
.hcap.live .hcap-bars i:nth-child(5) { animation-delay: 0.42s; }
.hcap.done .hcap-bars { display: none; }

/* The space is reserved before the script runs, so nothing below it jumps when it starts. */
[data-dots] { min-height: calc(44px + clamp(260px, 30vw, 400px)); }

/* The canvas runs the full width of the window, past the page margins. */
.hd { text-align: center; }
.hd .hcap { transition: opacity 0.5s ease; }
.hd .hcap.hd-hide { opacity: 0; }
.hd-canvas { display: block; width: 100vw; height: clamp(260px, 30vw, 400px); margin: 8px 0 0 calc(50% - 50vw); }

@media (prefers-reduced-motion: reduce) {
  .hcap.live .hcap-bars i { animation: none; }
}
