/* The floating wall: thin cream tiles hovering over a blue suede ground (the Work landing), and the same tiles
   turned blue side up (each line's own page). The ground below is this element's own background: WYRD blue suede,
   a little deeper toward the lower right, where the light falls off. */
.pellets{position:fixed;left:0;right:0;top:0;height:100vh;height:100lvh;z-index:0;pointer-events:none;
  background:linear-gradient(150deg,#0a3fd014 0%,#0000 38%,#000b3d4d 100%),var(--blue-suede) 0 0/460px 460px,#002fa7}
.pellets canvas{display:block;width:100%;height:100%}
/* The wall is as tall as the screen at its tallest, so a phone's address bar sliding in and out does not resize it
   (every resize emptied the canvas for a frame and the ground flashed through). On a line's page the ground is the
   plain blue of the turned tiles, so a moment without the canvas, a reload or a fast scroll, reads as the same wall. */
.pellets[data-mode="blue"]{background:#002b99}

/* One journey: going from the landing to a line (and between lines) the browser holds the old page until the new one
   is ready and dissolves between them. The wall is the same on both, so only the words and pictures arrive. */
@view-transition{navigation:auto}
::view-transition-old(root),::view-transition-new(root){animation-duration:.7s;animation-timing-function:cubic-bezier(.4,0,.2,1)}
html:has(.pg-line){background:#002fa7!important}

/* ---------- landing ---------- */
html:has(.wk-start){background:#002fa7}
.wk-start{background:#002fa7;color:var(--blue);overflow:hidden}
.wk-start__main{position:relative;height:100svh;min-height:560px;overflow:hidden}
.wk-start__stage{position:relative;z-index:1;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:clamp(22px,4.2svh,46px);
  padding:calc(var(--hdr) + 16px) 20px 36px;text-align:center;transition:opacity .45s ease}
/* the title has nothing behind it but the wall itself */
.wk-start__head{position:relative;padding:clamp(6px,1svh,12px) clamp(20px,4vw,60px)}
.wk-start__title{margin:0;font:400 clamp(46px,6.6vw,108px)/1 var(--font-display);letter-spacing:-.035em;color:var(--blue)}
.wk-start__lede{margin:clamp(8px,1.4svh,14px) 0 0;font:500 clamp(16px,1.35vw,21px)/1.4 var(--font-body);letter-spacing:.01em;color:#22305a}
/* on a touch screen the landing does not scroll, so a finger on the wall raises the tiles the way a cursor does */
@media(hover:none),(pointer:coarse){.pellets-live .wk-start__main{touch-action:pinch-zoom}}

/* four big rounded suede tiles, floating over the wall. Their float and tilt are driven by work-pellets.js. */
.wk-start__lines{display:grid;grid-template-columns:repeat(4,auto);gap:clamp(14px,2vw,30px);perspective:1100px}
/* with the wall running, the four tiles lie in the wall's own plane: same camera, same slant (the numbers come from work-pellets.js) */
.pellets-live .wk-start__lines{perspective:none;transform-style:preserve-3d;transform-origin:var(--wall-ox,50%) var(--wall-oy,0px);
  transform:perspective(var(--wall-p,1500px)) rotateX(var(--wall-tilt,25deg))}
.pellets-live .wk-tile{transform:translateZ(var(--fy)) rotateX(var(--rx)) rotateY(var(--ry)) scale(var(--sc))}
.wk-tile{--fy:0px;--rx:0deg;--ry:0deg;--sc:1;position:relative;display:grid;grid-template-columns:1fr auto;grid-template-rows:auto 1fr auto auto;
  width:clamp(150px,15.5vw,232px);aspect-ratio:5/6;padding:clamp(15px,1.5vw,24px);box-sizing:border-box;border-radius:clamp(30px,2.9vw,46px);
  color:var(--cream);text-align:left;text-decoration:none;-webkit-tap-highlight-color:transparent;
  background:linear-gradient(155deg,#1c4fd633,#00124f4d),var(--blue-suede) 0 0/380px 380px,#002fa7;
  box-shadow:inset 0 2px 2px #7c9dff59,inset 0 -4px 6px #000a3a73;                 /* a bevel on the slab itself, not a glow */
  transform:translate3d(0,var(--fy),0) rotateX(var(--rx)) rotateY(var(--ry)) scale(var(--sc));will-change:transform}
.wk-tile__n{grid-column:1;font:600 12px/1 var(--font-body);letter-spacing:.14em;opacity:.85}
.wk-tile__arrow{grid-column:2;grid-row:1;width:clamp(20px,1.7vw,26px);height:clamp(20px,1.7vw,26px);transition:transform .35s cubic-bezier(.22,1,.36,1)}
.wk-tile__name{grid-column:1 / -1;grid-row:3;font:400 clamp(24px,2.25vw,37px)/1.02 var(--font-display);letter-spacing:-.025em}
.wk-tile__q{grid-column:1 / -1;grid-row:4;margin-top:8px;font:400 clamp(12px,.95vw,14px)/1.35 var(--font-body);color:#f2f0e7cc}
@media(hover:hover) and (pointer:fine){.wk-tile:hover .wk-tile__arrow{transform:translate(3px,-3px)}}
.wk-tile:focus-visible{outline:2px solid var(--blue);outline-offset:6px}
/* once a line is chosen everything steps back and the wall takes over */
.pellets-leaving .wk-start__stage,.pellets-leaving .hdr{opacity:0;transition:opacity .45s ease}
@media(max-width:760px){
  .wk-start__title{font-size:54px}
  .wk-start__lines{grid-template-columns:repeat(2,auto);gap:14px}
  .wk-tile{width:min(41vw,190px)}
}

/* ---------- a line's own page: its chapter alone, standing on the blue wall ---------- */
.pg-line .wkc-jump--lines{margin-top:calc(var(--hdr) + clamp(26px,5svh,54px))}
/* the line menu is one thick cream suede tile with the lines written on it. It is weighted: it tips toward the side the
   cursor is on and rocks back when the cursor leaves (work-pellets.js). The strip under it is the slab's own side, not a shadow. */
.pg-line .wkc-jump--lines{--rx:0deg;--ry:0deg;--sx:0px;gap:0;align-items:stretch;height:52px;padding:0 12px;border-radius:19px;isolation:isolate;
  background:linear-gradient(160deg,#ffffff4d,#0000 45%,#a79f8226),url('/assets/suede/suede-tile-cream-430.webp?v=3') 0 0/215px 215px,#f2f0e7;
  box-shadow:inset 0 2px 2px #ffffffb3,inset 0 -4px 6px #8e866a4d,var(--sx) 4px 0 #bdb7a1;
  transform:perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));will-change:transform}
.pg-line .wkc-jump--lines a{position:relative;height:auto;white-space:nowrap;padding:0 21px;border-radius:0;background:none;color:var(--blue);font-size:14.5px;opacity:.74;transition:opacity .2s}
.pg-line .wkc-jump--lines a:hover{background:none;opacity:1}
.pg-line .wkc-jump--lines a[aria-current="page"]{background:none;color:var(--blue);opacity:1;font-weight:700}
.pg-line .wkc-jump--lines a[aria-current="page"]::after{content:"";position:absolute;left:50%;bottom:8px;width:4px;height:4px;margin-left:-2px;border-radius:50%;background:var(--blue)}
/* on a phone the line menu sits centred under the main menu and scrolls away with the page: one menu stays, not two */
@media(max-width:760px){.pg-line .wkc-jump--lines{position:relative;top:auto;margin-left:auto;margin-right:auto;height:46px;padding:0 8px;border-radius:17px}.pg-line .wkc-jump--lines a{padding:0 8px;font-size:12.5px}
  .pg-line .wkc-jump--lines a[aria-current="page"]::after{bottom:6px}}
.pg-line .wkc-ch{padding-top:clamp(40px,7svh,84px)}
