/* ---------------------------------------
   THE CALLOUT
   Sizes are in em of the callout's own font size, which callout.js sets
   to the unit times the layout scale. The unit is 1.75vh, kept between
   11px and 18px.
--------------------------------------- */

.callout {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  font-size: clamp(11px, 1.75vh, 18px);
  pointer-events: none;
  opacity: 0;
  transition: opacity 300ms ease;
}

.callout.is-shown {
  opacity: 1;
}

/* No fade: used for reduced motion and while the first sequence runs. */
.callout.is-instant {
  transition: none;
}


/* ---------------------------------------
   THE LINE
   Drawn by moving the dash offset (set in callout.js) to 0.
--------------------------------------- */

.callout-line {
  position: absolute;
  overflow: visible;
  pointer-events: none;
}

.callout-line polyline {
  fill: none;
  stroke: #fdfbd4;
  stroke-width: 1.5px;
  stroke-linejoin: round;
}

.callout.is-animating .callout-line polyline {
  transition: stroke-dashoffset 500ms ease-out;
}


/* ---------------------------------------
   THE TEXT
--------------------------------------- */

.callout-text {
  position: absolute;
  margin: 0;
  padding: 0;
  font-family: 'Orbitron', sans-serif;
  /* Smaller than the line's unit would give: the owner asked for smaller text, twice. */
  font-size: 0.85em;
  font-weight: normal;
  line-height: 1.9;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-align: left;
  white-space: nowrap;
  color: #fdfbd4;
  text-shadow: 0 0 0.5em rgba(0, 0, 0, 0.9), 0 0 0.2em rgba(0, 0, 0, 0.8);
}

.callout-row {
  display: block;
  white-space: nowrap;
}

.callout-label {
  color: #f2a93b;
}

/* 0.9u gap, measured in the text's own size of 1.05u. */
.callout-value {
  margin-left: 0.857em;
}

.callout-typed {
  white-space: pre;
}

/* The text not yet typed. It keeps its place in the layout and stays in the
   page for screen readers, but it is transparent and has no shadow. */
.callout-rest {
  white-space: pre;
  color: transparent;
  text-shadow: none;
}


/* ---------------------------------------
   REDUCED MOTION
   callout.js already shows the finished callout at once. These rules are a
   second guard in case a transition is still set.
--------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .callout,
  .callout.is-animating .callout-line polyline {
    transition: none;
  }
}
