/* Úvodní přílet kamery (js/ui/arrival.js): video přes plátno spinu ve stejném výřezu, UI během letu skryté
   (hlavička jen tlumeně), při přistání vjede postupně: menu, úvodní panel, lišta podlaží, dok, zdroje, štítky.
   Třída is-arriving přichází už z <head> (index.html), takže se UI před letem vůbec neukáže. */
.arrival { position: absolute; inset: 0; overflow: hidden; pointer-events: none; opacity: 0; transition: opacity .5s ease; }
.arrival.is-on { opacity: 1; }
.arrival video {
  position: absolute; left: 0; top: 0; display: block; max-width: none; object-fit: fill; transform-origin: 0 0;
  background: transparent; pointer-events: none;
}
/* průběh stahování videa: tenká zlatá linka dole, jen když stahování trvá */
.arrival__bar {
  position: absolute; left: 0; right: 0; bottom: env(safe-area-inset-bottom, 0px); height: 2px; background: var(--gold);
  transform: scaleX(0); transform-origin: 0 50%; opacity: 0; transition: opacity .4s, transform .25s linear;
}
.arrival__bar.is-on { opacity: .9; }

/* během letu: UI pryč (zůstává v DOM a pro čtečky, klávesa úvod přeskočí), hlavička tlumeně */
html.is-arriving .intro, html.is-arriving .rail, html.is-arriving .dock, html.is-arriving .msheet,
html.is-arriving .credits, html.is-arriving .pins, html.is-arriving .callout, html.is-arriving .spin-loader,
html.is-arriving .hdr__tab, html.is-arriving .hdr__phone, html.is-arriving .hdr__m {
  opacity: 0; pointer-events: none;
}
/* štítky mají vlastní pointer-events: auto, neviditelný maják A01.1 by jinak klik během letu vybral */
html.is-arriving .pins .pin, html.is-arriving .pins .beacon { pointer-events: none; }
html.is-arriving .hdr__brand { opacity: .78; }
.hdr__brand { transition: opacity .8s ease; }

/* přistání: vjezd po sobě (posun přes vlastnost translate, takže se nepere s transform panelů) */
html.is-landing { --lk: 1; --land-ease: cubic-bezier(.22, .8, .2, 1); }
html.is-landing-fast { --lk: .45; }
/* přechody panelů (opacity .4s) mají v kaskádě přednost před animacemi a smazaly by postupný nástup */
html.is-landing .intro, html.is-landing .rail, html.is-landing .dock, html.is-landing .msheet, html.is-landing .credits,
html.is-landing .pins, html.is-landing .hdr__tab, html.is-landing .hdr__phone, html.is-landing .hdr__m { transition: none; }
@keyframes arrDown { from { opacity: 0; translate: 0 -22px; } }
@keyframes arrLeft { from { opacity: 0; translate: -48px 0; } }
@keyframes arrRight { from { opacity: 0; translate: 48px 0; } }
@keyframes arrUp { from { opacity: 0; translate: 0 34px; } }
@keyframes arrSheet { from { translate: 0 100%; } }
@keyframes arrFade { from { opacity: 0; } }

html.is-landing .hdr__tab, html.is-landing .hdr__phone, html.is-landing .hdr__m {
  animation: arrDown calc(.8s * var(--lk)) var(--land-ease) backwards;
}
html.is-landing .intro { animation: arrLeft calc(1s * var(--lk)) var(--land-ease) calc(.12s * var(--lk)) backwards; }
html.is-landing .rail { animation: arrRight calc(1s * var(--lk)) var(--land-ease) calc(.26s * var(--lk)) backwards; }
html.is-landing .dock { animation: arrUp calc(.95s * var(--lk)) var(--land-ease) calc(.38s * var(--lk)) backwards; }
html.is-landing .credits { animation: arrFade calc(.8s * var(--lk)) ease calc(.62s * var(--lk)) backwards; }
html.is-landing .pins { animation: arrFade calc(.7s * var(--lk)) ease calc(.75s * var(--lk)) backwards; }

/* mobil na výšku: spodní list vyjede souběžně s dorovnáním výřezu videa (CONFIG.INTRO.settleMs, stejná křivka),
   plovoucí ovladač otáčení sjede shora */
@media (max-width: 760px), (max-width: 1023px) and (orientation: portrait) {
  html.is-landing .msheet { animation: arrSheet calc(.95s * var(--lk)) cubic-bezier(.65, 0, .35, 1) backwards; }
  html.is-landing .dock { animation-name: arrDown; animation-delay: calc(.45s * var(--lk)); }
}

@media (prefers-reduced-motion: reduce) {
  html.is-landing *, .arrival { animation: none !important; transition: none !important; }
}
