/* Chapter 14 · Merchandise (prefix mx-). Mockups are SVG strings built by brandbook/merch.js. */

.mx-st { padding: 4%; }
/* every mockup SVG sits inside a fixed inset, so tall objects scale down instead of spilling out */
.mx-svg { display: block; overflow: visible; }
.mx-st > .mx-svg { position: absolute; inset: 6%; width: 88%; height: 88%; }
.mx-fill { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.mx-st[data-mx="mat"], .mx-st[data-mx="box"], .mx-st[data-mx="grid"], .mx-st[data-mx="notebook"], .mx-st[data-mx="tag"], .mx-st[data-mx="sizes"] { padding: 0; }
.mx-tools { margin-top: -4px; }

/* lanyard sway */
.mx-sway { position: absolute; inset: 0 6% 3%; transform-origin: 50% 0; }
.mx-sway .mx-svg { width: 100%; height: 100%; }
.mx-sway.is-on { animation: mx-sway 6s ease-in-out infinite; }
@keyframes mx-sway { 0%, 100% { transform: rotate(-1.4deg); } 50% { transform: rotate(1.4deg); } }

/* sticker sheet: HTML sheet, SVG stickers you can drag */
.mx-sheet { position: relative; height: 88%; aspect-ratio: 105 / 148; transform: rotate(-2deg); border-radius: 8px;
  background: linear-gradient(160deg, #f5f5f7, #e4e4e8 70%, #dcdce0);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .6), 0 26px 42px rgb(0 0 0 / .6), 0 4px 10px rgb(0 0 0 / .4); touch-action: none; }
.mx-sheet-foot { position: absolute; left: 7%; right: 7%; bottom: 3.5%; display: flex; justify-content: space-between; font: 500 9px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: #86868b; }
.mx-cut { position: absolute; border: 1px dashed rgb(0 0 0 / .16); pointer-events: none; }
.mx-stk { position: absolute; cursor: grab; touch-action: none; filter: drop-shadow(0 1.5px 1px rgb(0 0 0 / .28)); transition: filter .15s; }
.mx-stk svg { display: block; width: 100%; height: auto; overflow: visible; }
.mx-stk.is-drag { cursor: grabbing; z-index: 3; filter: drop-shadow(0 14px 14px rgb(0 0 0 / .4)); }
.mx-stk:focus-visible { outline: 2px solid var(--bp-blue); outline-offset: 3px; border-radius: 6px; }

/* notebook: CSS 3D, sized in container units */
.mx-cq { position: absolute; inset: 0; container-type: inline-size; display: grid; place-items: center; perspective: 180cqw; overflow: hidden;
  background: radial-gradient(70% 70% at 50% 45%, #1c1c1f, #050506); }
.mx-nb { position: relative; width: 50cqw; height: 71cqw; transform-style: preserve-3d; transform: rotateX(50deg) rotateZ(28deg) translateY(-3cqw); }
.mx-nb-shadow { position: absolute; inset: 4cqw -3cqw -4cqw 3cqw; transform: translateZ(-4cqw); background: rgb(0 0 0 / .85); filter: blur(3.4cqw); border-radius: 2cqw; }
/* page block, set in from the cover by a small lip; pages in shade, cover boards top and bottom */
.mx-nb-edge { position: absolute; top: .9cqw; left: calc(100% - .7cqw); width: 3.6cqw; height: calc(100% - 1.8cqw); transform-origin: left center; transform: rotateY(90deg);
  background: linear-gradient(90deg, #050506 0 .5cqw, transparent .5cqw calc(100% - .5cqw), #050506 calc(100% - .5cqw)), repeating-linear-gradient(90deg, #8e8e93 0 1px, #b4b4b9 1px 2.5px); }
.mx-nb-bottom { position: absolute; left: .9cqw; top: calc(100% - .7cqw); width: calc(100% - 1.8cqw); height: 3.6cqw; transform-origin: center top; transform: rotateX(-90deg);
  background: linear-gradient(0deg, #050506 0 .5cqw, transparent .5cqw calc(100% - .5cqw), #050506 calc(100% - .5cqw)), repeating-linear-gradient(0deg, #a1a1a6 0 1px, #c9c9ce 1px 2px); box-shadow: inset 0 0 1.4cqw rgb(0 0 0 / .45); }
.mx-nb-cover { position: absolute; inset: 0; overflow: hidden; border-radius: .4cqw 1cqw 1cqw .4cqw;
  background: repeating-linear-gradient(0deg, rgb(255 255 255 / .03) 0 1px, transparent 1px 3px), repeating-linear-gradient(90deg, rgb(0 0 0 / .3) 0 1px, transparent 1px 3px), linear-gradient(135deg, #222226, #0b0b0d 60%, #050506);
  box-shadow: inset 1.6cqw 0 1.2cqw -1cqw rgb(0 0 0 / .7), inset 0 0 0 1px rgb(255 255 255 / .06); }
.mx-nb-deboss { position: absolute; left: 46%; top: 42%; width: 15cqw; transform: translate(-50%, -50%);
  filter: drop-shadow(0 -.24cqw 0 rgb(0 0 0 / .95)) drop-shadow(0 .24cqw 0 rgb(255 255 255 / .14)); }
.mx-nb-deboss svg { display: block; width: 100%; height: auto; overflow: visible; }
.mx-nb-band { position: absolute; right: 5cqw; top: 0; bottom: 0; width: 1.4cqw; background: linear-gradient(90deg, #050506, #1c1c1f 50%, #050506); box-shadow: .7cqw 0 1cqw rgb(0 0 0 / .5); }
.mx-nb-ribbon { position: absolute; left: 30%; top: 100%; width: 1.4cqw; height: 9cqw; transform-origin: top; transform: rotateX(-70deg); background: linear-gradient(90deg, #6e6e73, #a1a1a6 50%, #6e6e73); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 86%, 0 100%); }
.mx-nb-sheen { position: absolute; inset: 0; background: linear-gradient(160deg, rgb(255 255 255 / .08), transparent 40%, rgb(0 0 0 / .35)); }

@media (prefers-reduced-motion: reduce) { .mx-sway.is-on { animation: none; } }
