/* The one-time crossing lives inside the display line's band: the character flies behind
   the words "מאחוריו, אני" and across the empty ground beside them, never over other text. */
#about.about-scene { position: relative; isolation: isolate; overflow-x: clip; }
#about {
  /* Flyer width; the frame is 854x480 and its visible figure spans rows 102-344 (21%-72%). */
  --fly-w: min(46vw, 720px);
  --fly-h: calc(var(--fly-w) * .5621);
  --fly-drift: min(24px, calc(var(--fly-w) * .034));
}
.about-heading-band { position: relative; display: grid; align-content: center; }
/* Room for the visible figure plus its drift, so the lane never clips the cape. Only once the
   scene script has mounted (data-about-flight): without JS there is no crossing to make room for. */
#about[data-about-flight] .about-heading-band { min-height: calc(var(--fly-h) * .51 + 2 * var(--fly-drift) + 8px); }
#about .about-display { position: relative; z-index: 2; }
/* A paper halo keeps each glyph legible while the figure passes behind it. */
.has-about-flight .about-display {
  text-shadow: .045em 0 0 var(--paper), -.045em 0 0 var(--paper), 0 .045em 0 var(--paper), 0 -.045em 0 var(--paper),
    .032em .032em 0 var(--paper), -.032em .032em 0 var(--paper), .032em -.032em 0 var(--paper), -.032em -.032em 0 var(--paper);
}
#about .about-letter { position: relative; z-index: 2; }
/* Full viewport width so the figure enters and leaves at the screen edges, not mid-page. */
.about-flight-lane { position: absolute; z-index: 1; inset-block: 0; left: 50%; width: 100vw; margin-left: -50vw; overflow: clip; pointer-events: none; }
.about-flight-lane video {
  position: absolute;
  /* Centre the visible figure (its centre is 3.5% above the frame centre) on the band. */
  top: calc(50% + var(--fly-h) * .035);
  left: 0;
  width: var(--fly-w);
  height: var(--fly-h);
  object-fit: contain;
  transform: translate(-110%, -50%);
  visibility: hidden;
}
.has-about-flight .about-flight-lane video { visibility: visible; }
@media (max-width: 720px), (max-height: 540px) {
  /* Bounded by height too, so a landscape phone does not get a 675px figure and a tall band. */
  #about { --fly-w: min(80vw, 90svh); }
  /* Spare band height goes above the words, so the head and cape show over line one
     and the gap down to the letter stays under 48px. */
  .about-heading-band { align-content: end; }
  #about[data-about-flight] .about-heading-band { min-height: calc(var(--fly-h) * .51 + 2 * var(--fly-drift)); }
}
/* No crossing, no reserved flight room: the band shrinks to the words. */
.motion-off .about-flight-lane, .a11y-nomotion .about-flight-lane { display: none; }
.motion-off #about .about-heading-band, .a11y-nomotion #about .about-heading-band { min-height: 0; }
@media (prefers-reduced-motion: reduce) {
  .about-flight-lane { display: none; }
  #about[data-about-flight] .about-heading-band { min-height: 0; }
}
