/* Both Matrix pages paint their digits with the same font file and metrics. */
@font-face {
  font-family: "Share Tech Mono Rain";
  src: url("/fonts/ShareTechMono.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

/* Stretch each original two-flip cycle and phase together. */
.code-rain { --cycle-stretch: 4; }

.code-rain pre {
  font: 400 var(--size)/1.13 "Share Tech Mono Rain", ui-monospace, monospace;
  letter-spacing: normal;
  font-synthesis: initial;
  font-kerning: auto;
  text-rendering: auto;
  -webkit-font-smoothing: auto;
  -moz-osx-font-smoothing: auto;
}

.kv-rain-bit::before {
  content: "0";
  animation: kv-glyph-binary calc(var(--beat) * var(--cycle-stretch)) step-end calc(var(--offset) * var(--cycle-stretch)) infinite;
}

.kv-rain-bit[data-start="1"]::before { animation-direction: reverse; }

@keyframes kv-glyph-binary {
  0%, 100% { content: "0"; }
  50% { content: "1"; }
}
