/* A promo video in a page hero. First used 2026-11-14 on /how-it-works, in the place the static
   illustration had. The box keeps the .marketing-hero geometry (pages.css): 1200 px at most, 16:9,
   the cards' 20 px radius, the same margins at every breakpoint — so the page does not move when
   the picture becomes a video.

   Two <video> elements, one shown: the 16:9 cut, and on a phone the 9:16 cut in a 9:16 box (a 16:9
   frame is 366 x 206 px there and its type cannot be read). Both are preload="none" with a poster:
   nothing of the video is fetched before the visitor presses play. No script. */
.promo-video{
  display:block;
  max-width:1200px;
  margin:32px auto 48px;
  padding:0;
  border:0;
}
.promo-video__frame{
  position:relative;
  aspect-ratio:16 / 9;
  border-radius:20px;
  overflow:hidden;
  background:#05050B;
}
.promo-video__frame video{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  background:#05050B;
}
.promo-video__frame video.promo-video__tall{display:none}
.promo-video figcaption{
  margin:12px 16px 0;
  font-size:13px;
  line-height:1.5;
  text-align:center;
  color:rgba(170,180,214,.86);
}
/* The words of the video for a reader who cannot see it: in the page, read by a screen reader,
   not painted. */
.promo-video__words{
  position:absolute;
  width:1px;
  height:1px;
  margin:-1px;
  padding:0;
  overflow:hidden;
  clip:rect(0 0 0 0);
  clip-path:inset(50%);
  white-space:nowrap;
  border:0;
}
@media (max-width:768px){
  .promo-video{margin:24px auto 32px}
}
@media (max-width:640px){
  .promo-video__frame{aspect-ratio:9 / 16}
  .promo-video__frame video.promo-video__wide{display:none}
  .promo-video__frame video.promo-video__tall{display:block}
}
@media (max-width:480px){
  .promo-video{margin:18px -4px 24px}
}

/* ── The same tour, driven by scroll (2026-11-14; /assets/js/quantor-tour.js) ─────────────────────
   On a wide screen the figure above is switched for this section, and the owner's scenes are drawn in
   it at the time the scroll stands for — like a shot of the landing.

   2026-11-15 — the scene fills the window (Pavel: «расширь на полую страницу чтобы было не как окошко
   видео а полноценная сцена»). It was a 16:9 card in the page's column; now it runs from the top bar to
   the bottom of the window and from the left edge to the right, with no card around it:
   - the section breaks out of the page's centred column: the script tells it the window's width and how
     far left of the column that begins (--tour-w, --tour-ml);
   - the scene is held under the top bar (--tour-top) and is as high as the window below it less the
     caption's line (--tour-h);
   - the caption — what the tour is, and the way past it — is a line of its own at the bottom of the
     window for as long as any of the section is on screen (it used to sit under the card, below the
     window's edge until the card was held);
   - the section's own height is the track the scene travels: about four screens. A sticky box can only
     move inside its parent's content, never inside padding.
   An element with the hidden attribute stays hidden even though these rules give it a display. */
.promo-video[hidden],
.tour-scroll[hidden]{display:none}
.tour-scroll{
  --tour-top:72px;      /* the top bar's height; set by the script */
  --tour-cap:36px;      /* the caption line's height; set by the script */
  --tour-h:calc(100vh - var(--tour-top) - var(--tour-cap));   /* the scene's height; set by the script */
  position:relative;
  display:flex;
  flex-direction:column;
  width:var(--tour-w,100vw);
  max-width:none;
  height:calc(400vh + var(--tour-h) + var(--tour-cap));
  /* 32 above, as the figure had. Below: the figure's 48 and the hero's own 50 of bottom padding, which
     the rule after this one takes off the hero while the figure is hidden. To the left: out of the
     column, to the window's edge. */
  margin:32px 0 98px var(--tour-ml,calc(50% - 50vw));
}
.how-hero:has(#tourVideo[hidden]){padding-bottom:0}
.tour-scroll__pin{
  position:sticky;
  top:var(--tour-top);
  flex:none;
  height:var(--tour-h);
  /* its own height of room below: the scene never comes down over the caption's line */
  margin-bottom:var(--tour-cap);
  overflow:hidden;
  background:#05050B;
}
/* While it is still coming up the page, the scene has no hard top edge: its first pixels come out of the
   page (--tour-fade, set by the script from how far the scene is from the top bar, 120px at most). Held
   under the bar the script takes the mark off and this rule does not apply: nothing of the page is seen
   through the scene. */
.tour-scroll[data-tour-rising] .tour-scroll__pin{
  -webkit-mask-image:linear-gradient(to bottom,transparent,#000 var(--tour-fade,0px));
  mask-image:linear-gradient(to bottom,transparent,#000 var(--tour-fade,0px));
}
/* The stage is the piece's size for this window (1920 x 1080 or larger), scaled to the scene by the
   script. It is a picture made of text: not selectable, not clickable. */
.tour-scroll__stage{
  position:absolute;
  left:0;
  top:0;
  transform-origin:0 0;
  pointer-events:none;
  user-select:none;
  -webkit-user-select:none;
}
.tour-scroll__caption{
  position:sticky;
  bottom:0;
  z-index:1;
  box-sizing:border-box;
  width:100%;
  max-width:none;
  margin:auto 0 0;      /* at the very end of the section: held at the window's bottom until then */
  padding:8px 16px;
  background:#05050B;
  font-size:13px;
  line-height:20px;
  text-align:center;
  color:rgba(170,180,214,.86);
}
.tour-scroll__caption a{color:#27A4DA;white-space:nowrap}
.tour-scroll__caption a:hover{color:#FCFCFC}
#steps{scroll-margin-top:96px}
