/* A real Black face, limited to this component and its numeric characters. */
@font-face {
  font-family: "Portfolio Counter";
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('/assets/fonts/portfolio-counter-black-900.ttf?v=shape-41') format('truetype');
}

.page-home .profile-facts .fact-value {
  font-family: "Portfolio Counter", Manrope, Arial, sans-serif;
  font-weight: 900;
  font-synthesis: none;
  -webkit-text-stroke: 0;
}

/* These same character boxes exist before, during and after the animation. */
.profile-facts .counter-display {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: 1em;
  line-height: 1;
  letter-spacing: 0;
}

.counter-literal {
  display: block;
  flex: 0 0 auto;
  line-height: 1;
}

/* Slightly strengthen the square decimal without changing its advance width. */
.profile-facts .counter-literal--decimal {
  -webkit-text-stroke: .008em currentColor;
  paint-order: stroke fill;
}

.counter-reel {
  position: relative;
  display: block;
  flex: 0 0 1ch;
  width: 1ch;
  height: 1em;
  overflow: hidden;
  contain: layout paint;
}

.counter-strip {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  display: block;
}

.counter-final,
.counter-digit {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 1em;
  line-height: 1;
}

.fact-value[data-roll-state="running"] .counter-final {
  visibility: hidden;
}

/* Assistive technology always reads the final value, never the spinning digits. */
.counter-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
