/* ── THE ARRIVAL ────────────────────────────────────────────────────────── * * Taufik, 23 August 2026: "currently its sudden pop-up, no, make it have * animation of the card spin and fly into the middle, then the card stop, and * then background blur … make it smooth continuous. not sudden. take the time. * make the viewer feel the anticipation, the wait. this apply as well to main * pages cards / box / pop up. make it all standard same style of transition" * * One movement, five beats, and every box on the site opens through here: * the card popup, the knowledge-graph stage, the milestone box and the film * panel. See the head of public/assets/css/arrive.css for the beats and the * timings; this file is the machinery. * * ── WHY A COPY OF THE CARD AND NOT THE CARD ── * * The obvious way is to fly the card itself. It cannot be done. Every one of * these cards is inside something that clips — a rail with `overflow: hidden`, * a ring, a timeline track — so a card that left its place would be cut off at * the edge of the rail rather than crossing the page. It is also inside the * page's scroll, and the middle of the SCREEN is not the middle of anything * the card can reach. * * So the card stays exactly where it is and goes invisible for the length of * the flight, and what travels is a copy on a fixed layer above everything. * The eye cannot tell: it is the same picture, in the same place, at the same * instant it stopped being the original. * * ── AND WHY THE PANEL IS MEASURED, NOT GUESSED ── * * The card flies to where the panel will be, not to the middle of the screen — * those are different points. The graph stage is inset from every edge, the * film panel is 16:7 and very wide, the card popup is a portrait column. A * card that lands in the geometric centre and then watches a panel appear * somewhere slightly else has broken the one thread this whole thing exists to * hold. So the panel is laid out, read, and hidden again inside a single block * of script — no frame is painted in between, which is what makes it free. */ (function () { 'use strict'; var LOGO = '/assets/img/neuon-logo-white.png'; /* Read from the stylesheet rather than repeated here, so the timings have one home. If the sheet has not arrived — a page that fails to load its CSS is broken anyway — these are the same numbers. */ function ms(name, fallback) { var v = getComputedStyle(document.documentElement).getPropertyValue(name).trim(); var n = parseFloat(v); if (!n) return fallback; return /ms\s*$/.test(v) ? n : n * 1000; /* `0.82s` and `820ms` both */ } var T = { fly: 820, hold: 200, veil: 420, lead: 130, settle: 340, out: 260, read: function () { T.fly = ms('--arr-fly', 820); T.hold = ms('--arr-hold', 200); T.veil = ms('--arr-veil', 420); T.lead = ms('--arr-lead', 130); T.settle = ms('--arr-settle', 340); T.out = ms('--arr-out', 260); return T; }, }; var still = matchMedia('(prefers-reduced-motion: reduce)'); /* THE COPY IS LAID OUT AND GIVEN A FRAME TO PAINT BEFORE IT MOVES. It is a whole subtree that has never existed — pictures to decode, gradients to rasterise, a layer to promote. Animate it in the same breath as building it and all of that lands on the flight's first frame, which is where a stutter shows most. */ var WARM = 32; /* WAAPI is how the flight is driven — the keyframes are computed from two rectangles that are not known until the press, and a CSS animation cannot be told a number. Anything old enough not to have it gets the reduced path: the panel is simply there. */ var canFly = typeof Element !== 'undefined' && !!Element.prototype.animate; /* what is in the air right now, so closing knows what to put back */ var live = null; /* ── THE COPY ────────────────────────────────────────────────────────── * A clone with everything stateful taken out of it. `is-turning` matters: * flip.js's 900ms turn may be mid-run on the original at the moment it is * copied, and a copied animation class restarts from the beginning on the * copy — the card would turn twice, once in the air and once at 40% through. * Films and frames are removed for the same reason a second