/* © Pillar Delta AI 2026 — developed by Pillar Delta AI.
   MeaningMemory™ and ZEROTRACE™ are trademarks of Pillar Delta PC. */
/* ZEROTRACE · the marketing page · scene 6, where it runs (step A3). Board A0, scene 6, driven by the reader's scroll.
   One number, --wh, runs from 0 to 1 while the stage crosses the screen, and the picture is worked out from it here: your
   teams and the ZEROTRACE Node are there first; the perimeter draws itself around them and closes at the one checked
   gate; the gate lights; the inside of the line becomes yours (a faint tint); the ways the work takes are drawn; then the
   work flows (m-where.js moves the dots) and the three facts rise.
   - Where the browser has scroll-driven animations, CSS moves --wh (animation-timeline: view(); range cover 15% → 48%).
   - Elsewhere m-where.js sets the same --wh from the same range on each scroll frame (ZT.onScroll).
   - At rest --wh is 1: still mode, reduced motion and a page without scripts all show the closed perimeter.
   The picture is drawn twice, in the same words: across (1000 × 440) on wide screens, and down (360 × 570) on narrow
   ones. Every box sits at its place in the drawing's own space, in per cent, so it scales with the stage. */

@property --wh{syntax:"<number>";inherits:true;initial-value:1}
@keyframes wh-draw{from{--wh:0}to{--wh:1}}
@supports (animation-timeline:view()){
 @media (prefers-reduced-motion:no-preference){
  html:not(.still) .wh-stage{animation-name:wh-draw;animation-timing-function:linear;animation-fill-mode:both;
   animation-duration:1ms;animation-duration:auto;animation-timeline:view();animation-range:cover 15% cover 48%}}}

/* ---- the stage, and what each part does with --wh ---- */
.wh-stage{--wh:1;position:relative;margin-top:clamp(28px,3vw,40px);
 --pa:clamp(0,calc(var(--wh) / .14),1);                     /* the teams, the Node and the services are there first */
 --pd:clamp(0,calc((var(--wh) - .08) / .52),1);             /* the perimeter draws itself */
 --pg:clamp(0,calc((var(--wh) - .58) / .1),1);              /* it closes at the gate, and the gate lights */
 --pi:clamp(0,calc((var(--wh) - .62) / .16),1);             /* the ways inside */
 --po:clamp(0,calc((var(--wh) - .7) / .16),1);              /* the ways out, through the gate */
 --pf:clamp(0,calc((var(--wh) - .84) / .12),1)}             /* the work flows; the facts rise */

.wh-map{position:relative;width:100%;aspect-ratio:1000/440;container-type:inline-size;
 --fs:clamp(9px,1.05cqw,12px)}
.wh-map>*{position:absolute;left:var(--x);top:var(--y);width:var(--w);height:var(--h)}
.wh-map>.wh-svg{left:0;top:0;width:100%;height:100%;overflow:visible}
.wh-svg.wp{display:none}

/* the drawing: the perimeter, its tint, the ways the work takes, the work itself */
.wh-per{fill:none;stroke:var(--acc);stroke-width:2;stroke-linejoin:round;stroke-dasharray:100 100;
 stroke-dashoffset:calc(100 - var(--pd) * 100);opacity:min(1,calc(var(--pd) * 30))}
.wh-fill{fill:var(--acc);stroke:none;opacity:calc(var(--pi) * .045)}
.wh-ln{fill:none;stroke:var(--ink3);stroke-width:1.5;stroke-linecap:round;stroke-dasharray:100 100}
.wh-ln.a,.wh-ln.b{stroke-dashoffset:calc(100 - var(--pi) * 100);opacity:min(.65,calc(var(--pi) * 20))}
.wh-ln.c{stroke-dashoffset:calc(100 - var(--po) * 100);opacity:min(.65,calc(var(--po) * 20))}
.wh-dots{opacity:var(--pf)}
.wh-dots circle{opacity:0}
.wh-dots .k{fill:var(--ink2)}.wh-dots .g{fill:var(--good)}.wh-dots .b{fill:var(--acc)}
html.still .wh-dots{display:none}

/* the boxes: four teams, the Node, the inside AI service; outside, two services (fainter: not yours) */
.wh-box{display:flex;align-items:center;justify-content:center;padding:0 6px;border-radius:12px;background:var(--pl);box-shadow:var(--sh);
 font:600 calc(var(--fs) * 1.16)/1.15 var(--sans);letter-spacing:-.005em;color:var(--text);text-align:center;
 opacity:var(--pa);transform:translateY(calc((1 - var(--pa)) * 8px))}
.wh-box.o{opacity:calc(var(--pa) * .75)}
.wh-map>.wh-lbl{width:auto;height:auto}
.wh-lbl{font:500 calc(var(--fs) * 1.08)/1.2 var(--sans);white-space:nowrap}
.wh-lbl.per{color:var(--acc);opacity:clamp(0,calc((var(--wh) - .5) / .14),1)}
.wh-lbl.out{color:var(--ink3);opacity:var(--pa)}
.wh-node{display:flex;flex-direction:column;justify-content:space-between;padding:clamp(10px,1.7cqw,20px) clamp(12px,1.9cqw,22px);box-shadow:var(--lift);
 opacity:var(--pa);transform:translateY(calc((1 - var(--pa)) * 10px))}
.wh-node img{width:auto;height:clamp(12px,1.55cqw,18px);align-self:flex-start}
.wh-node small{font:400 calc(var(--fs) * 1.04)/1.2 var(--sans);color:var(--ink3);white-space:nowrap}
.wh-node small i{display:inline-block;width:7px;height:7px;margin-right:8px;border-radius:50%;background:var(--good);vertical-align:1px}
.wh-gate{display:grid;place-items:center;border-radius:50%;background:var(--pl);box-shadow:0 0 0 2px var(--acc);color:var(--acc);
 opacity:var(--pg);transform:scale(calc(.4 + var(--pg) * .6))}
.wh-gate i{width:34%;height:34%;border-radius:50%;background:var(--acc)}

/* the places, in the drawing's own space (across: 1000 × 440) */
.wh-lbl.per{--x:4.6%;--y:7.3%}
.wh-box.t1,.wh-box.t2,.wh-box.t3,.wh-box.t4{--x:5%;--w:11%;--h:10%}
.wh-box.t1{--y:15.91%}.wh-box.t2{--y:29.55%}.wh-box.t3{--y:43.18%}.wh-box.t4{--y:56.82%}
.wh-node{--x:27%;--y:36.36%;--w:20%;--h:27.27%}
.wh-box.ai{--x:49%;--y:75%;--w:15%;--h:10%}
.wh-gate{--x:64.5%;--y:44.32%;--w:3%;--h:6.82%}
.wh-lbl.out{--x:79%;--y:15.6%}
.wh-box.eu,.wh-box.ww{--x:79%;--w:17%;--h:10%}
.wh-box.eu{--y:25%}.wh-box.ww{--y:56.82%}

/* ---- the three facts, under the picture: a mark and words each ---- */
.wh-ans{margin-top:clamp(36px,4vw,56px);align-items:start}
.wh-facts{list-style:none;margin:10px 0 0;padding:0}
.wh-facts li{display:flex;align-items:center;gap:14px;padding:15px 0;border-top:1px solid var(--line);font-size:15px;font-weight:600;letter-spacing:-.008em}
.wh-facts li:first-child{border-top:0;padding-top:10px}
.wh-facts .mk{width:8px;height:8px}

/* ---- narrower: the picture runs down (360 × 570) ---- */
@media (max-width:860px){
 .wh-map{max-width:520px;margin:0 auto;aspect-ratio:360/570;--fs:clamp(8.5px,2.75cqw,12px)}
 .wh-svg.wd{display:none}.wh-svg.wp{display:block}
 .wh-box{padding:0 3px;border-radius:10px;letter-spacing:.08em}
 .wh-node{padding:clamp(10px,4.4cqw,22px) clamp(12px,5cqw,24px)}
 .wh-node img{height:clamp(13px,4.4cqw,20px)}
 .wh-lbl.per{--x:7.2%;--y:6.6%}
 .wh-box.t1,.wh-box.t2,.wh-box.t3,.wh-box.t4{--y:12.28%;--w:20%;--h:6.32%}
 .wh-box.t1{--x:6.67%}.wh-box.t2{--x:28.89%}.wh-box.t3{--x:51.11%}.wh-box.t4{--x:73.33%}
 .wh-node{--x:25%;--y:29.82%;--w:50%;--h:17.54%}
 .wh-box.ai{--x:6.67%;--y:64.91%;--w:47.22%;--h:7.02%}
 .wh-gate{--x:69.17%;--y:78.07%;--w:8.33%;--h:5.26%}
 .wh-lbl.out{--x:7.2%;--y:84.2%}
 .wh-box.eu,.wh-box.ww{--y:89.82%;--w:41.67%;--h:7.02%}
 .wh-box.eu{--x:6.67%}.wh-box.ww{--x:51.67%}
}
