/* Each strip follows one shaped Arabic word. The HTML beneath it remains selectable. */
.foil-word {
display: inline-flex;
flex-flow: row nowrap;
align-items: baseline;
vertical-align: baseline;
direction: rtl;
width: var(--advance);
white-space: nowrap;
}
.foil-copy { flex: 0 0 100%; color: transparent; text-align: center }
.foil-copy::selection { color: HighlightText; background: Highlight }
.foil-origin { position: relative; display: block; flex: none; width: 0; height: 0; pointer-events: none }
.foil-origin::before, .foil-origin::after {
content: "";
  position: absolute;
  top: var(--top);
  left: var(--left);
  width: var(--width);
  height: var(--height);
  background-image: url("assets/lettering-satin.webp?v=41");
  background-repeat: no-repeat;
  background-position: var(--sprite-x) var(--sprite-y);
  background-size: var(--sheet-width) var(--sheet-height);
}
.foil-origin::after {
  background-image: url("assets/lettering-glance.webp?v=41");
  opacity: calc(.28 + var(--tilt-x, 0) * .25 - var(--tilt-y, 0) * .06);
}
/* Headings use flex for their ornaments. Their whole phrase occupies one flex item. */
.foil-phrase { font: inherit; color: inherit }
@media (prefers-reduced-motion: reduce) {
  .foil-origin::after { opacity: .28 }
}
@media (forced-colors: active), print {
  .foil-word { display: inline; width: auto }
  .foil-copy { color: inherit }
  .foil-origin { display: none }
}      
