/* /build/: pages of MiQ's 2024 design book building themselves, layer by layer. */
.bk-intro { padding: calc(var(--head) + 7vh) var(--pad) 3vh; margin: 0; }
.bk-run { position: relative; }
.bk-pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: grid; place-items: center; perspective: 2200px; perspective-origin: 50% 46%; }
.bk-stage { position: relative; width: var(--sw, 80vw); aspect-ratio: 5100 / 3300; transform-style: preserve-3d; margin-top: -2vh; }
.bk-page { position: absolute; inset: 0; transform-style: preserve-3d; will-change: transform; }
.bk-frame { position: absolute; inset: 0; width: 100%; height: 100%; user-select: none; }
.bk-pieces, .bk-credit { position: absolute; inset: 0; transform-style: preserve-3d; transform-origin: 50% 50%; }
.bk-pieces img { position: absolute; max-width: none; transform-origin: 50% 50%; will-change: transform, opacity; opacity: 0; backface-visibility: hidden; }
.bk-pieces img.fly { filter: drop-shadow(0 calc(var(--lift, 0) * 40px) calc(var(--lift, 0) * 46px) rgba(0,0,0,.7)); z-index: 5; }
.bk-credit img { position: absolute; max-width: none; clip-path: inset(0 100% 0 0); }
.bk-hud { position: absolute; left: var(--pad); right: var(--pad); top: calc(var(--head) + 6px); display: flex; justify-content: space-between; gap: 20px; pointer-events: none;
  font: 600 11px/1.5 Archivo, system-ui, sans-serif; font-stretch: 125%; letter-spacing: .2em; text-transform: uppercase; }
.bk-num { color: var(--orange); }
.bk-client { text-align: right; max-width: 60%; }
.bk-shelf { position: absolute; right: var(--pad); bottom: clamp(14px, 3vh, 30px); display: flex; gap: 8px; }
.bk-shelf button { position: relative; width: clamp(40px, 6vw, 92px); aspect-ratio: 4640 / 2955; background: #1a1612 center / cover no-repeat; outline: 1px solid var(--line); opacity: .38; transition: opacity .4s, outline-color .4s, transform .5s var(--ease); }
.bk-shelf button::after { content: ""; position: absolute; inset: -12px -3px; }
.bk-shelf button.done { opacity: 1; }
.bk-shelf button.cur { outline: 1px solid var(--orange); transform: translateY(-4px); opacity: 1; }
/* play / pause: a bar from the book, with the page count and this page's progress running through it */
.bk-play { position: absolute; left: var(--pad); bottom: clamp(14px, 3vh, 30px); z-index: 5; min-width: 240px; height: 52px; }
.bk-play .pp { width: 12px; height: 14px; border-left: 4px solid #000; border-right: 4px solid #000; flex: none; }
.bk-play.paused .pp { width: 0; height: 0; border: 0; border-left: 14px solid #000; border-top: 8px solid transparent; border-bottom: 8px solid transparent; margin-left: 2px; }
.bk-play .cue-n { margin-left: auto; }
.bk-hud a { pointer-events: auto; padding: 8px 0; transition: color .3s; }
.bk-hud a:hover { color: var(--orange-hi); }
/* phones held upright: ask for landscape */
.bk-turn { display: none; }
.bk-portrait .bk-run { height: auto !important; }
.bk-portrait .bk-pin { position: relative; height: 82svh; }
.bk-portrait .bk-stage, .bk-portrait .bk-hud, .bk-portrait .bk-shelf, .bk-portrait .bk-play { display: none; }
.bk-portrait .bk-turn { display: flex; flex-direction: column; align-items: center; gap: 26px; text-align: center; padding: 0 30px; }
.bk-turn p { margin: 0; font: 600 12px/1.6 Archivo, system-ui, sans-serif; font-stretch: 125%; letter-spacing: .22em; text-transform: uppercase; color: var(--orange); }
.bk-phone { width: 54px; height: 96px; border: 2px solid var(--paper); border-radius: 10px; position: relative; animation: turn 2.8s var(--ease-io) infinite; }
.bk-phone::after { content: ""; position: absolute; left: 50%; bottom: 7px; width: 14px; height: 2px; margin-left: -7px; background: var(--paper); border-radius: 2px; }
@keyframes turn { 0%, 25% { transform: rotate(0); } 55%, 85% { transform: rotate(-90deg); } 100% { transform: rotate(0); } }
/* phones on their side: the page fills the screen */
@media (max-height: 520px) and (orientation: landscape) {
  .bk-live .head { opacity: 0; pointer-events: none; transition: opacity .4s; }
  .bk-live .dock { translate: -50% 140%; opacity: 0; pointer-events: none; }
  .bk-hud { top: 10px; font-size: 9px; }
  .bk-stage { margin-top: -6vh; }
  .bk-shelf { bottom: 8px; gap: 5px; } .bk-shelf button { width: 38px; }
  .bk-play { min-width: 176px; height: 40px; bottom: 8px; font-size: 9px; gap: 9px; padding: 3px 14px 0 12px; }
}
.bk-end { padding: 120px var(--pad) 0; }
.bk-end .sec-head { padding: 0; }
.bk-book { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 30px 12px; }
.bk-book a { display: block; }
.bk-book img { width: 100%; aspect-ratio: 4640 / 2955; object-fit: cover; transition: transform .8s var(--ease); }
.bk-book a:hover img { transform: scale(1.02); }
.bk-book span { display: block; margin-top: 12px; font: 600 10px/1.4 Archivo, system-ui, sans-serif; font-stretch: 125%; letter-spacing: .2em; text-transform: uppercase; color: var(--dim); }
.bk-book a:hover span { color: var(--orange-hi); }
@media (max-width: 760px) { .bk-hud { top: calc(var(--head) + 2px); font-size: 9px; } .bk-shelf { gap: 5px; } .bk-shelf button { width: 36px; } }
.still .bk-run { display: none; }
