


/* ── both canvases: invisible until their first frame, never interactive ── */
.m1-gl { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; pointer-events: none; opacity: 0; transition: opacity .9s cubic-bezier(.2, .7, .2, 1); }
.m1-gl.m1-live.m1-on, .m1-journey-gl.m1-live { opacity: 1; }
html.w2g-paused .m1-gl { transition: none; }   /* «עצירת תנועה»: even the fallback → live swap is instant */

/* ── HERO_WORLD: behind Gal's grid (canvas first in .hero-screen, z 0) ── */
#top .m1-hero-gl { z-index: 0; }
#top .service-strip { position: relative; z-index: 1; }   /* Gal's strip (and its words) above the world, as his z-index:25 intended */
#top.m1-front .m1-hero-gl { z-index: 2; }   /* phones (≤1000px): the world floats in front of Gal's cards, under his copy (z 20) */
#top.m1-front .service-strip { z-index: 3; }   /* …and under his service strip */
/* desktop dive: the hero is pinned over #journey (pinSpacing:false) and the canvas reaches the bottom of the screen */
#top.m1-dive { position: relative; z-index: 3; overflow-x: clip; overflow-y: visible; }
#top.m1-dive .m1-hero-gl { height: calc(100vh - var(--m1-hh, 96px)); }
#top.m1-diving, #top.m1-diving .hero-screen { background: transparent; pointer-events: none; }   /* the navy depth covers the screen; #journey waits beneath */
#top.m1-dived { visibility: hidden; pointer-events: none; }   /* after the pin the hero sits over #journey (pinSpacing:false) — gone */
/* the dive (desktop pin + phones' scroll-out): the phone's screen opens into depth — Gal's journey navy, a portal glow, light trails flying outward
   (inside Gal's .website-photo, which is position:relative + overflow:hidden; driven by --m1-portal / --m1-portal-s) */
#top .website-photo::before,
#top .website-photo::after { content: ''; position: absolute; inset: -30%; pointer-events: none; opacity: var(--m1-portal, 0); transform: scale(var(--m1-portal-s, 1)); }
#top .website-photo::before { z-index: 4;
  background: radial-gradient(circle at 50% 50%, #8fd3ff 0, #2a7dff 6%, #0b4fb0 14%, #073b76 26%, #061e42 46%, #04152f 72%); }
#top .website-photo::after { z-index: 5;
  background: repeating-conic-gradient(from 2deg at 50% 50%, transparent 0deg 3.7deg, rgba(189, 246, 228, .5) 3.7deg 3.92deg),
              repeating-conic-gradient(from 0deg at 50% 50%, transparent 0deg 5.3deg, rgba(110, 180, 255, .55) 5.3deg 5.52deg);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, transparent 0 8%, #000 20%, #000 46%, transparent 68%);
          mask-image: radial-gradient(circle at 50% 50%, transparent 0 8%, #000 20%, #000 46%, transparent 68%); }

/* ── DIVE_ZOOM: the journey world sits where Gal's ribbon image sits (behind his .cinema-artbox, z 3) and ABOVE his
   .cinema-light (z 1): his end-of-journey whitening turns the navy into the white page while the 3D city stays on it → #work ── */
#journey .m1-journey-gl { z-index: 2; }
html.m1-ribbon-off #journey .cinema-ribbon { visibility: hidden !important; }         /* Gal's image leaves once the live ribbon has faded in */
html.m1-journey-live #journey [data-scene-id="journey-city"],
html.m1-journey-live #journey [data-scene-id^="journey-pin-"] { visibility: hidden !important; }   /* replaced by the 3D city + pins (Gal's map card stays) */
#journey .cinema-dive { position: absolute; inset: 0; transform-origin: 50% 50%; }
#journey .m1-flash { position: absolute; inset: 0; z-index: 4; pointer-events: none; opacity: 0;
  background: radial-gradient(circle at var(--m1-fx, 36%) var(--m1-fy, 50%), #fff 0, #fff 7%, var(--mint, #bdf6e4) 20%, rgba(0, 106, 255, .5) 44%, rgba(4, 21, 47, 0) 80%); mix-blend-mode: screen; }

/* mobile / static journey: a light WebGL ribbon strip at the head of the section (canvas moved there by x-journey.js) */
#journey .m1-journey-gl.m1-strip { position: absolute; top: 0; left: 0; width: 100%; height: var(--m1-strip-h, 240px); z-index: 0;
  -webkit-mask-image: linear-gradient(180deg, #000 0, #000 62%, transparent 100%); mask-image: linear-gradient(180deg, #000 0, #000 62%, transparent 100%); }
#journey.m1-has-strip .cinema-static-story { padding-top: var(--m1-strip-pad, 0px); }
/* phones, chapter 04: the same canvas moves into Gal's city art box and draws the 3D city (his image + 2D pins stay as the fallback) */
#journey .m1-journey-gl.m1-cityslot { position: absolute; left: 0; top: 0; width: 100%; height: auto; aspect-ratio: 1568 / 1003; z-index: 2; }
#journey .cinema-static-city.m1-city-on > img, #journey .cinema-static-city.m1-city-on .static-city-pin { visibility: hidden; }
html.w2g-fail-journey #journey .cinema-static-city > img, html.w2g-fail-journey #journey .cinema-static-city .static-city-pin { visibility: visible !important; }
#journey .cinema-static-art.m1-reveal { will-change: clip-path; }

/* ── fallbacks: no WebGL / failed / reduced motion → Gal's original visuals, untouched ── */
html.w2g-nowebgl .m1-gl, html.w2g-reduce .m1-gl, html.w2g-fail-hero .m1-hero-gl, html.w2g-fail-journey .m1-journey-gl,
html.w2g-nowebgl .m1-flash, html.w2g-reduce .m1-flash, html.w2g-fail-journey .m1-flash { display: none !important; }
html.w2g-fail-journey #journey .cinema-ribbon { visibility: visible !important; }
@media (prefers-reduced-motion: reduce) { .m1-gl, .m1-flash { display: none !important; } }
