/* ============================================================
   HOME WIDGETS  —  static/home-widgets.css

   The three small animations in the WHAT / HOW MUCH / WHEN
   cards on the home page.

   Every class is prefixed hw- so nothing here can reach the
   rest of the home page, the nav or Bootstrap. The 3D canvases
   are transparent, so each one sits on whatever the card's own
   background is.
   ============================================================ */

.hw {
  --hw-ink:  #634BE0;
  --hw-off:  rgba(99, 75, 224, .14);
  display: block;
  width: 100%;
  margin: 2px 0 14px;
}
:root[data-theme="dark"] .hw {
  --hw-ink: #D2CBF7;
  --hw-off: rgba(210, 203, 247, .16);
}

/* the two 3D widgets */
.hw-3d { aspect-ratio: 1 / 1; }
.hw-3d canvas { width: 100%; height: 100%; display: block; }

/* the scale is wider than it is tall */
#hw-scale { aspect-ratio: 16 / 11; }

/* the clock */
.hw-clock {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hw-clock svg {
  display: block;
  width: 100%;
  max-width: 260px;
  height: auto;
  margin: auto;
}
.hw-seg { fill: var(--hw-off); }
.hw-seg.hw-on { fill: var(--hw-ink); }
.hw-dot { fill: var(--hw-ink); }
.hw-lb {
  fill: var(--hw-ink);
  font: 700 17px ui-monospace, Menlo, Consolas, monospace;
  letter-spacing: .12em;
  text-anchor: middle;
}

@media (prefers-reduced-motion: reduce) {
  /* the 3D widgets already hold a still pose; nothing to do here */
}
