/* VELA «Закатный постер 2.0» — the layer chosen by the owner on 12.11.2026. It keeps the poster look of poster.css and adds
   motion and finish: blocks rise into view, page heads breathe, and the phone mock-up of «Удалённый доступ» is shared by
   the home page and remote.html. Loads last on every page (brand.mjs); motion.js drives it; all motion is off under
   prefers-reduced-motion and the pages read the same without JavaScript. */

/* External SVG symbols must keep their outline and inherit the surrounding contrast colour. */
svg.i { fill:none; stroke:currentColor; stroke-width:1.75; stroke-linecap:round; stroke-linejoin:round; }

/* --- Blocks rise into view (motion.js marks them .rv on inner pages). ----------------------------------------- */
.motion-js .poster:not(.poster-home) main .rv { opacity:0; transform:translateY(24px); transition:opacity .8s cubic-bezier(.2,.7,.2,1),transform .8s cubic-bezier(.2,.7,.2,1); transition-delay:calc(var(--d,0)*80ms); }
.motion-js .poster:not(.poster-home) main .rv.in { opacity:1; transform:none; }

/* --- Page heads: the art drifts in slowly and a band of sunlight passes over it. ------------------------------- */
html .poster .page-hero .page-hero-bg { animation:p2-drift 1.6s cubic-bezier(.2,.7,.2,1) both; }
.poster .page-hero .page-hero-bg::after { content:''; position:absolute; inset:-10% auto -10% -40%; width:26%; background:linear-gradient(90deg,transparent,rgba(255,210,63,.24),transparent); transform:skewX(-18deg); mix-blend-mode:screen; animation:p2-sweep 8s ease-in-out 1.4s infinite; pointer-events:none; }
.poster .page-hero::after { animation:p2-stripe 1.2s cubic-bezier(.2,.7,.2,1) both .2s; }
.poster .page-hero :is(h1,.h1) { animation:p2-up .9s cubic-bezier(.2,.7,.2,1) both .15s; }
.poster .page-hero :is(.kicker,p,.note-box,.toc,.cta) { animation:p2-up .9s cubic-bezier(.2,.7,.2,1) both .35s; }
@keyframes p2-drift { from { opacity:0; clip-path:polygon(100% 0,100% 0,100% 90%,100% 100%); } to { opacity:1; } }
@keyframes p2-sweep { 0% { left:-40%; } 55%,100% { left:130%; } }
@keyframes p2-stripe { from { transform:rotate(11deg) translateY(-30%); opacity:0; } to { transform:rotate(11deg); opacity:1; } }
@keyframes p2-up { from { opacity:0; transform:translateY(18px); } to { opacity:1; transform:none; } }

/* --- Cards answer the pointer: the sun follows it. ------------------------------------------------------------ */
.poster :is(.player-panel,.panel,.link-card,.feature,.card,.equipment-card).spot { position:relative; isolation:isolate; }
.poster :is(.player-panel,.panel,.link-card,.feature,.card,.equipment-card).spot::after { content:''; position:absolute; inset:0; z-index:-1; pointer-events:none; opacity:0; transition:opacity .35s; background:radial-gradient(380px circle at var(--mx,50%) var(--my,50%),rgba(255,138,61,.16),transparent 60%); }
.poster :is(.player-panel,.panel,.link-card,.feature,.card,.equipment-card).spot:hover::after { opacity:1; }

/* --- Phones with real screens of the Telegram mini app (home page and remote.html). ---------------------------- */
.phone { --pw:290px; position:relative; width:var(--pw); max-width:100%; margin:0; padding:26px 10px 14px; border-radius:44px;
 background:linear-gradient(160deg,#2b1b4f,#121016 60%); border:2px solid rgba(246,227,197,.35); box-shadow:12px 12px 0 #ff8a3d, 0 40px 80px -30px rgba(0,0,0,.8); }
.phone::before { content:''; position:absolute; top:10px; left:50%; width:64px; height:7px; translate:-50% 0; border-radius:6px; background:rgba(246,227,197,.25); }
.phone-screen { overflow:hidden; border-radius:30px; background:#0e0c14; line-height:0; }
.phone-screen img { display:block; width:100%; height:auto; }
.phone-pair { position:relative; display:grid; place-items:center; padding:20px 0 30px; transform:rotateX(var(--rx,0deg)) rotateY(var(--ry,0deg)); transition:transform .25s ease-out; }
.phone-pair .phone:first-child { position:absolute; --pw:250px; left:-6%; top:0; transform:rotate(-9deg); opacity:.9; box-shadow:10px 10px 0 #f2387c, 0 30px 60px -30px rgba(0,0,0,.8); }
.phone-pair .phone:last-child { position:relative; left:18%; transform:rotate(3deg); }
.remote-phone .phone { transform:rotate(-3deg) rotateX(var(--rx,0deg)) rotateY(var(--ry,0deg)); transition:transform .25s ease-out; }
.phone-strip { display:flex; gap:28px; overflow-x:auto; scroll-snap-type:x mandatory; padding:12px 4px 28px; scrollbar-width:thin; scrollbar-color:#ff8a3d transparent; }
.phone-item { flex:none; scroll-snap-align:start; display:grid; gap:14px; justify-items:center; }
.phone-item .phone { --pw:230px; box-shadow:8px 8px 0 #ff8a3d; border-radius:36px; padding:22px 8px 12px; }
.phone-item .phone-screen { border-radius:24px; }
.phone-item p { margin:0; font:700 18px/1.2 var(--head); letter-spacing:.02em; text-transform:uppercase; color:#f6e3c5; }
@media (max-width:900px) { .phone-pair .phone:first-child { left:2%; } .phone-pair .phone:last-child { left:10%; } }
@media (max-width:640px) { .phone { --pw:250px; box-shadow:8px 8px 0 #ff8a3d, 0 30px 60px -30px rgba(0,0,0,.8); } .phone-pair .phone:first-child { --pw:200px; left:0; } .phone-pair .phone:last-child { --pw:230px; left:14%; } .phone-item .phone { --pw:200px; } }

@media (prefers-reduced-motion:reduce) {
 html .poster .page-hero .page-hero-bg, .poster .page-hero::after, .poster .page-hero :is(h1,.h1,.kicker,p,.note-box,.toc,.cta) { animation:none !important; }
 .poster .page-hero .page-hero-bg::after { display:none; }
 .motion-js .poster main .rv { opacity:1 !important; transform:none !important; transition:none !important; }
 .phone, .phone-pair, .remote-phone .phone { transition:none; }
}

/* --- Guide screenshots and the remote page layout. ------------------------------------------------------------ */
.poster .obt-shot { margin:16px 0 0; border:2px solid #121016; box-shadow:6px 6px 0 var(--p-coral,#ff795d); background:#121016; }
.poster .obt-shot img { display:block; width:100%; height:auto; }
.poster .remote-split { display:grid; grid-template-columns:minmax(0,1.3fr) minmax(0,.7fr); gap:clamp(28px,5vw,72px); align-items:center; }
.poster .remote-lead { max-width:62ch; font-size:18px !important; margin-bottom:24px; }
.poster .remote-phone { display:grid; place-items:center; perspective:1000px; }
.poster .remote-features .player-panels { grid-template-columns:repeat(2,minmax(0,1fr)); }
@media (max-width:900px) { .poster .remote-split { grid-template-columns:1fr; } .poster .remote-phone { order:-1; } }
@media (max-width:560px) { .poster .remote-features .player-panels { grid-template-columns:1fr; } }

/* --- Background loops from motion.js ([data-video]). The picture underneath is the poster; the loop fades in over it. */
.bg-video { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; opacity:0; transition:opacity .8s ease; pointer-events:none; }
.bg-video.on { opacity:1; }
html .poster .page-hero .page-hero-bg .bg-video { object-position:var(--art-pos,center); }
.poster-home .ha-sky .bg-video.on { opacity:.42; mix-blend-mode:screen; }
.poster-home .ha-art .bg-video { object-position:44% 30%; transform:translate3d(calc(var(--px,0)*-16px),calc(var(--py,0)*-10px),0) scale(1.06); transition:opacity .8s ease,transform .2s linear; }
.poster-home .nx-final-sky { position:absolute; inset:0; z-index:-1; overflow:hidden; pointer-events:none; }
.poster-home .nx-final-sky .bg-video.on { opacity:.5; mix-blend-mode:screen; }
@media (prefers-reduced-motion:reduce) { .bg-video { display:none; } }
.poster-home .nx-final{isolation:isolate}
