/* WYRD (branding): the projects as books hanging on the blue wall, covers out (branding-books.js builds it from the
   page's own project cards). Each cover carries the project's picture in its window, the name under it.
   The books are landscape, like photo books, because most of the work is wide: five across on a wide screen, three on
   a narrow one, two on a phone. A book lifts and tips under the cursor; pressed, it comes off the wall and opens:
   the cover turns round on the spine and lies down on the left. No shelf board, no shadows, no glow, no fades. The picture's position in the
   cover is the one _tools/books/wide.py prints. */
.bk-live .wkc-reelwrap{display:none}
/* the heading: one line on the wall. Number, name, what it is */
.pg-line .wkc-ch.bk-live{padding-top:clamp(14px,2.6svh,30px)}
.bk-live .wkc-head{display:block}
.bk-live .wkc-title{display:flex;align-items:baseline;flex-wrap:wrap;column-gap:clamp(12px,1.5vw,24px);row-gap:4px}
.bk-live .wkc-title .wkc-num,.bk-live .wkc-title .wkc-q{margin:0}
.pg-work .bk-live .wkc-title h2{font-size:clamp(36px,3.8vw,60px)}
.pg-work .bk-live .wkc-title .wkc-q{font-size:clamp(17px,1.5vw,24px)}
/* what the line does: its plate of three lists, under the title and above the books */
.bk-live .wkc-head .wkc-cols{margin-top:clamp(14px,2.4svh,24px)}
.bkw{--slate:linear-gradient(160deg,#ffffff4d,#0000 45%,#a79f8226),url('/assets/suede/suede-tile-cream-430.webp?v=3') 0 0/215px 215px,#f2f0e7;
  position:relative;z-index:1;margin-top:clamp(10px,1.8svh,20px);padding:0 var(--pad)}

/* the wall */
.bk__wall{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));column-gap:clamp(16px,2.2vw,38px);row-gap:clamp(24px,3.6svh,44px);align-items:start;padding-top:8px}
.bk{position:relative;display:block;min-width:0;color:var(--cream);text-decoration:none;outline:0;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none}
.bk--soon{cursor:default}
/* the book itself: its lean and drop are its own; the lift and tip are the cursor's */
.bk__lift{--rx:0deg;--ry:0deg;--l:0;position:relative;display:block;aspect-ratio:1475/1039;will-change:transform;
  transform:translateY(calc(var(--drop,0px) - var(--l) * 9px)) perspective(900px) rotateX(var(--rx)) rotateY(var(--ry)) rotate(var(--lean,0deg)) scale(calc(1 + var(--l) * .035));
  transition:opacity .4s ease calc(var(--i) * 18ms),translate .5s cubic-bezier(.2,.8,.2,1) calc(var(--i) * 18ms)}
.bk__wall.is-waiting .bk__lift{opacity:0;translate:0 16px}
.bk:focus-visible .bk__lift{outline:2px solid var(--cream);outline-offset:5px;border-radius:12px}
.bk__cover{position:absolute;inset:0;display:block;transform-origin:.8% 50%}
.bk__face{position:absolute;inset:0;display:block}
.bk__art{position:absolute;inset:0;width:100%;height:100%;max-width:none;display:block;pointer-events:none}
.bk__pic{position:absolute;left:10.95%;top:11.96%;width:82.27%;height:77.84%;overflow:hidden;border-radius:2.55%/3.83%;background:#00134f;isolation:isolate;transform:translateZ(0)}
.bk__pic img{position:absolute;inset:0;width:100%;height:100%;max-width:none;display:block;object-fit:cover}
.bk__pic--whole img{object-fit:contain}
.bk__pic img:not([src]){visibility:hidden}
.bk__pic::after{content:"";position:absolute;inset:0;border-radius:inherit;box-shadow:inset 0 3px 5px #000c3a59,inset 0 0 0 1px #000c3a30;pointer-events:none}
/* the page under the cover: the project's own page will be set down on it, so it is that page's colour, with its title.
   With it, the rest of what an open book shows (branding-books.js adds these when a book is picked): the back board,
   the block of pages, and the inside of the cover with its endpaper. Only there while the book is off the wall */
.bk__leaf{container-type:inline-size;position:absolute;left:3%;right:.8%;top:1.4%;bottom:1.6%;display:block;overflow:hidden;visibility:hidden;border-radius:2%/2.9%;color:var(--cream);background:#00134f}
/* the title sits where the project page's own title will be, at the same size for the page's width */
.bk__leaf b{display:block;margin:16.2cqw 0 0 2.8cqw;font:400 8.2cqw/1 var(--font-display);letter-spacing:-.03em;white-space:nowrap}
.bk__back{position:absolute;inset:0;width:100%;height:100%;max-width:none;display:block;visibility:hidden;pointer-events:none}
.bk__pages{position:absolute;left:3%;right:.25%;top:1.9%;bottom:.9%;display:block;visibility:hidden;border-radius:2%/2.9%;background:#dcd5c2}
.bk__in{position:absolute;inset:0;display:block;visibility:hidden}
.bk__end{position:absolute;left:5.5%;right:3.4%;top:5%;bottom:5%;display:block;border-radius:1.8%/2.6%;background:#f2f0e7}
.bk.is-out .bk__leaf,.bk.is-out .bk__back,.bk.is-out .bk__pages{visibility:visible}
/* the turn: towards you until the cover is edge on, then down onto the left. The outside is seen for the first part,
   the inside for the second; the cover darkens a little as it turns away from the light. 760ms, as in branding-books.js */
.bk.is-opening .bk__cover{animation:bk-turn .76s linear both}
.bk.is-opening .bk__face{animation:bk-outside .76s step-end both}
.bk.is-opening .bk__in{animation:bk-inside .76s step-end both}
@keyframes bk-turn{
  0%{transform:perspective(var(--pp,900px)) rotateY(0deg);filter:brightness(1);animation-timing-function:cubic-bezier(.5,0,.9,.6)}
  46%{transform:perspective(var(--pp,900px)) rotateY(-90deg);filter:brightness(.74);animation-timing-function:cubic-bezier(.1,.5,.3,1)}
  100%{transform:perspective(var(--pp,900px)) rotateY(-180deg);filter:brightness(1)}
}
@keyframes bk-outside{0%{visibility:visible}46%,100%{visibility:hidden}}
@keyframes bk-inside{0%{visibility:hidden}46%,100%{visibility:visible}}
/* a book that has been picked comes off the wall to the middle of the window (branding-books.js works out how far),
   and moves over as it opens so the open spread sits in the middle; the rest of the wall stands back */
.bk.is-out{z-index:60}
.bk.is-out .bk__lift{transform:translate(var(--ox,0px),var(--oy,0px)) scale(var(--ok,1));transition:transform .44s cubic-bezier(.3,.85,.25,1)}
.bk.is-opening .bk__lift{transform:translate(calc(var(--ox,0px) + var(--os,0px)),var(--oy,0px)) scale(var(--ok,1));transition:transform .6s cubic-bezier(.4,0,.2,1)}
.bk.is-out .bk__cap{opacity:0;transition:opacity .2s}
.bk__wall.has-open{pointer-events:none}
.bk__wall.has-open .bk:not(.is-out){opacity:.3;transition:opacity .35s}
/* its name, on the wall under it */
.bk__cap{display:block;margin-top:calc(12px + var(--drop,0px));padding:0 2% 0 3%}
.bk__cap b{display:block;font:400 clamp(16px,1.45vw,22px)/1.12 var(--font-display);letter-spacing:-.02em;text-wrap:balance}
.bk__cap small{display:block;margin-top:5px;font:600 10px/1.3 var(--font-body);letter-spacing:.1em;text-transform:uppercase;opacity:.68}
@media(max-width:1099px){.bk__wall{grid-template-columns:repeat(3,minmax(0,1fr));column-gap:clamp(16px,3vw,30px)}}
@media(max-width:699px){
  .bk__wall{grid-template-columns:repeat(2,minmax(0,1fr));column-gap:16px;row-gap:24px;max-width:520px;margin:0 auto}
  .bk__cap b{font-size:15.5px}
}
@media(prefers-reduced-motion:reduce){.bk__lift{transition:none}}

/* under the books: the offer that ended the old row of cards, as a small slate, then the line's plate */
.bk__more{position:relative;z-index:1;margin-top:clamp(40px,8svh,90px);padding:0 var(--pad)}
.bk__more .bk__offer{display:block;width:max-content;max-width:100%;margin:0 0 clamp(16px,2.4svh,24px);text-decoration:none}
.bk__more .bk__offer .wkc-note__in{display:flex;flex-direction:row;flex-wrap:wrap;align-items:baseline;column-gap:clamp(14px,1.6vw,26px);row-gap:6px;aspect-ratio:auto;height:auto;min-height:0;
  box-sizing:border-box;padding:15px 22px 17px;border-radius:clamp(16px,1.5vw,22px);
  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,0 4px 0 #bdb7a1;transform:none;transition:transform .2s cubic-bezier(.3,.7,.2,1)}
.bk__more .bk__offer .wkc-note__k,.bk__more .bk__offer .wkc-note__t,.bk__more .bk__offer .wkc-note__b,.bk__more .bk__offer .wkc-note__cta{margin:0}
.bk__more .bk__offer .wkc-note__t{font-size:clamp(22px,1.9vw,29px);line-height:1.15}
@media(hover:hover) and (pointer:fine){.bk__more a.bk__offer:hover .wkc-note__in{transform:translateY(-2px)}}

@media(max-width:999px){.bk__more .bk__offer{width:auto}}
