/* Branding (r2/brand.js): each brand as a hardcover book on a table. Also the pieces Branding and Web design share
   (pill, rail with its More, the way on), loaded once here. */
.wb-brand, .wb-web { position: relative; color: var(--ink); }
.wb-brand { --bg: #C9F04A; --ink: #000; } /* placeholders (2026-11-11), the owner may change them; the card's own colours in site3.html match */
.wb-web { --bg: #2F5BFF; --ink: #fff; }
.wb-brand *, .wb-web * { box-sizing: border-box; }
.wb-pill { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 10px 16px; border-radius: 99px;
  background: color-mix(in srgb, var(--ink) 12%, transparent); color: var(--ink); font: 600 14px/1 'Albert Sans', system-ui, sans-serif; white-space: nowrap; transition: background-color .2s, transform 160ms cubic-bezier(.23, 1, .32, 1); }
.wb-pill:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) { .wb-pill:hover { background: color-mix(in srgb, var(--ink) 22%, transparent); } }
.wb-pill[aria-pressed="true"], .wb-pill.inv { background: var(--ink); color: var(--bg); }
.wb-pill:disabled { opacity: .35; cursor: default; }
.wb-pill:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.wb-railrow { display: flex; align-items: center; gap: 14px; }
.wb-rail { position: relative; flex: 1; height: 3px; border-radius: 2px; background: color-mix(in srgb, var(--ink) 22%, transparent); }
.wb-rail b { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 2px; background: var(--ink); }
.wb-next { position: absolute; right: var(--pad, 24px); bottom: 14px; z-index: 4; color: inherit; font: 600 14px/1 'Albert Sans', sans-serif; text-underline-offset: 4px; }

/* ---------- the stage: one screen above the fold map ---------- */
.bb-stage { position: relative; height: calc(100vh - var(--fm)); height: calc(100svh - var(--fm)); padding: 70px var(--pad, 48px) 40px; display: grid; overflow: hidden;
  grid-template-rows: auto minmax(0, 1fr) auto auto; row-gap: 14px;
  background: radial-gradient(ellipse 70% 60% at 50% 48%, color-mix(in srgb, var(--bg) 86%, #fff 14%), var(--bg) 72%); }
.bb-act { margin: 0; max-width: 46ch; font: 500 16px/1.35 'Albert Sans', sans-serif; opacity: .85; }

/* the table and the book */
.bb-table { position: relative; display: grid; place-items: center; min-height: 0; }
.bb-book { --pw: 540px; --ph: calc(var(--pw) * var(--r, .5625)); position: relative; width: calc(var(--pw) * 2); height: var(--ph); perspective: 2800px; outline: none; transition: transform .7s cubic-bezier(.3, .1, .2, 1), opacity .5s; }
.bb-book:focus-visible { outline: 2px dashed var(--ink); outline-offset: 18px; }
.bb-book.out { transform: translateY(40px); opacity: 0; }
/* the boards: a cloth-covered hardcover, a little larger than the pages, with its real shadow on the table */
.bb-book .board { position: absolute; inset: -10px -12px; border-radius: 5px; background: var(--cloth, #222);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .12) inset, 0 40px 60px -18px rgba(0, 0, 0, .55), 0 14px 22px -8px rgba(0, 0, 0, .4), 0 2px 4px rgba(0, 0, 0, .3); }
.bb-book .board::after { content: ''; position: absolute; inset: 0; border-radius: inherit; opacity: .22; mix-blend-mode: overlay;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .4) 0 1px, transparent 1px 3px), repeating-linear-gradient(90deg, rgba(0, 0, 0, .4) 0 1px, transparent 1px 3px); }
/* page-block edges: the stack under the open pages, thicker on the side that holds more */
.bb-book .edge { position: absolute; top: 2px; bottom: -4px; width: calc(var(--pw) - 4px); background: repeating-linear-gradient(180deg, #e9e5dc 0 1px, #d5d0c4 1px 2px); border-radius: 0 2px 3px 0; }
.bb-book .edge.l { right: 50%; transform: translateX(calc(var(--el, 0) * -1px)); border-radius: 2px 0 0 3px; } .bb-book .edge.r { left: 50%; transform: translateX(calc(var(--er, 0) * 1px)); }
.bb-book .endp { position: absolute; top: 0; height: 100%; width: var(--pw); background: var(--endp, #ddd); }
.bb-book .endp.l { left: 0; } .bb-book .endp.r { right: 0; }
.bb-book .wire { display: none; }
.bb-book .leaf { position: absolute; top: 0; left: 50%; width: var(--pw); height: 100%; transform-origin: 0 50%; transform-style: preserve-3d; transition: transform 1.25s cubic-bezier(.33, .08, .18, 1); cursor: pointer; }
.bb-book .leaf.turned { transform: rotateY(-180deg); }
.bb-book .leaf.drag { transition: none; }
.bb-book .face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; background: #f4f1ea; }
.bb-book .face.b { transform: rotateY(180deg); }
.bb-book .face img { display: block; width: 100%; height: 100%; object-fit: contain; -webkit-user-drag: none; user-select: none; }
/* the gutter: every page darkens toward the spine, as paper curving into a binding does */
.bb-book .face::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(0, 0, 0, .28), rgba(0, 0, 0, .06) 6%, transparent 14%, transparent 97%, rgba(255, 255, 255, .08)); }
.bb-book .face.b::after { background: linear-gradient(270deg, rgba(0, 0, 0, .28), rgba(0, 0, 0, .06) 6%, transparent 14%, transparent 97%, rgba(255, 255, 255, .08)); }
/* pages made from a brand's pieces, where there is no book: paper, the piece at its own shape, a caption */
.bb-gp { position: absolute; inset: 0; container-type: size; background: #f3f0e8; color: #1a1a1a; }
.bb-gp .art { position: absolute; left: 9cqw; right: 9cqw; top: 9cqh; bottom: 18cqh; }
.bb-gp .art img { position: absolute; inset: 0; margin: auto; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; box-shadow: 0 .4cqw 1.4cqw rgba(0, 0, 0, .18); }
.bb-gp .art img.flat { box-shadow: none; }
.bb-gp .cap { position: absolute; left: 9cqw; right: 9cqw; bottom: 6cqh; display: flex; justify-content: space-between; font: 600 2.1cqw/1 'Albert Sans', sans-serif; letter-spacing: .02em; }
.bb-gp .cap span { opacity: .55; }
.bb-gp.cover { background: var(--c0); color: var(--c1); }
.bb-gp.cover .art { top: 12cqh; bottom: 24cqh; }
.bb-gp.cover .ttl { position: absolute; left: 7cqw; bottom: 7cqh; font: 700 6cqw/1 'Albert Sans', sans-serif; letter-spacing: -.04em; }
.bb-gp.cover .ttl small { display: block; margin-top: 1.2cqw; font: 600 1.8cqw/1 'Albert Sans', sans-serif; letter-spacing: .1em; text-transform: uppercase; opacity: .75; }
.bb-gp.sw { display: grid; grid-template-columns: repeat(var(--n), 1fr); grid-template-rows: 1fr; padding: 9cqh 9cqw 18cqh; gap: 1.6cqw; }
.bb-gp.sw > i { border-radius: .6cqw; display: flex; flex-direction: column; justify-content: flex-end; padding: 1.6cqw; font: 600 1.9cqw/1.25 'Albert Sans', sans-serif; font-style: normal; box-shadow: 0 0 0 1px rgba(0, 0, 0, .08) inset; }

/* the info under the book */
.bb-info { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.bb-who { display: flex; align-items: baseline; gap: 14px; min-width: 0; }
.bb-who b { font: 400 34px/1 Anton, sans-serif; text-transform: uppercase; }
.bb-who span { font-size: 14px; opacity: .75; white-space: nowrap; }
.bb-chips { display: flex; gap: 6px; align-self: center; } .bb-chips i { width: 18px; height: 18px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--ink) 40%, transparent); }
.bb-turns { display: flex; align-items: center; gap: 10px; font: 600 13px/1 'Albert Sans', sans-serif; font-variant-numeric: tabular-nums; }
/* the other books, face up in a row */
.bb-shelf { display: grid; gap: 10px; min-width: 0; padding-right: 150px; }
.bb-covers { display: flex; gap: 16px; padding: 6px 2px 10px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; overscroll-behavior-x: contain; }
.bb-covers::-webkit-scrollbar { display: none; }
.bb-cv { all: unset; cursor: pointer; flex: none; position: relative; width: 168px; display: grid; gap: 7px; font: 600 12.5px/1.15 'Albert Sans', sans-serif; }
.bb-cv .t { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 3px; overflow: hidden; background: #ddd; box-shadow: 0 10px 16px -8px rgba(0, 0, 0, .5), 0 2px 3px rgba(0, 0, 0, .3); transition: transform .3s; }
.bb-cv .t img { display: block; width: 100%; height: 100%; object-fit: cover; }
@media (hover: hover) and (pointer: fine) { .bb-cv:hover .t { transform: translateY(-3px); } }
.bb-cv[aria-current="true"] .t { outline: 2px solid var(--ink); outline-offset: 3px; }
.bb-cv:focus-visible .t { outline: 2px dashed var(--ink); outline-offset: 3px; }
.bb-cv small { opacity: .6; font-weight: 500; }

/* phone: a presentation book bound at the top; the page you read is below the wire, the last one above it */
@media (max-width: 759px) {
  .bb-stage { padding: 64px 16px 44px; row-gap: 10px; }
  .bb-act { font-size: 13.5px; }
  .bb-book { width: var(--pw); height: calc(var(--ph) * 2 + 14px); perspective: 2000px; }
  .bb-book .board { inset: -8px; }
  .bb-book .edge { display: none; }
  .bb-book .endp { width: 100%; height: var(--ph); } .bb-book .endp.l { top: 0; } .bb-book .endp.r { top: auto; bottom: 0; right: auto; left: 0; }
  .bb-book .wire { display: block; position: absolute; left: 6%; right: 6%; top: calc(var(--ph) + 1px); height: 12px; z-index: 900; pointer-events: none;
    background: repeating-linear-gradient(90deg, transparent 0 4px, #b9b9b9 4px 6px, #6d6d6d 6px 7px, transparent 7px 11px); filter: drop-shadow(0 2px 1px rgba(0, 0, 0, .35)); }
  .bb-book .leaf { left: 0; top: calc(var(--ph) + 14px); width: 100%; height: var(--ph); transform-origin: 50% -7px; }
  .bb-book .leaf.turned { transform: rotateX(180deg); }
  .bb-book .face.b { transform: rotateX(180deg); }
  .bb-book .face::after, .bb-book .face.b::after { background: linear-gradient(180deg, rgba(0, 0, 0, .2), transparent 10%); }
  .bb-info { flex-wrap: wrap; row-gap: 8px; } .bb-who b { font-size: 26px; } .bb-who span { font-size: 12px; } .bb-chips { display: none; }
  .bb-turns .wb-pill { min-height: 40px; padding: 8px 14px; }
  .bb-shelf { padding-right: 0; }
  .bb-cv { width: 104px; font-size: 11.5px; } .bb-covers { gap: 12px; }
  .wb-next { display: none; }
}
@media (prefers-reduced-motion: reduce) { .bb-book, .bb-book .leaf, .bb-cv .t { transition: none !important; } }

/* the page in hand: thin strips, each bent a little more than the last (r2/brand.js) */
.bb-turner { position: absolute; z-index: 600; transform-style: preserve-3d; pointer-events: none; }
.bb-turner .st { position: absolute; top: 0; left: 0; transform-style: preserve-3d; transform-origin: 0 50%; }
.bb-turner.v .st { transform-origin: 50% 0; }
.bb-turner.v > .st { transform-origin: 50% -7px; } /* the phone's page hangs from the wire */
.bb-turner .sf { position: absolute; inset: 0; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden; background: #f4f1ea; }
.bb-turner .sb { transform: rotateY(180deg); }
.bb-turner.v .sb { transform: rotateX(180deg); }
.bb-turner .si { position: absolute; top: 0; left: 0; }
.bb-turner .si > img { display: block; width: 100%; height: 100%; object-fit: contain; }
.bb-turner .ss { position: absolute; inset: 0; background: #1b1712; opacity: 0; pointer-events: none; }
/* the shadow the lifted page throws on the page beneath it, strongest at the spine */
.bb-cast { position: absolute; top: 0; height: 100%; width: var(--pw); z-index: 550; pointer-events: none; opacity: 0; }
.bb-cast[data-side="a"] { left: 50%; background: linear-gradient(90deg, rgba(20, 14, 6, .55), rgba(20, 14, 6, .18) 30%, transparent 75%); }
.bb-cast[data-side="b"] { right: 50%; background: linear-gradient(270deg, rgba(20, 14, 6, .55), rgba(20, 14, 6, .18) 30%, transparent 75%); }
.bb-cast.v { width: 100%; height: var(--ph); left: 0; right: auto; }
.bb-cast.v[data-side="a"] { top: calc(var(--ph) + 14px); background: linear-gradient(180deg, rgba(20, 14, 6, .5), rgba(20, 14, 6, .15) 30%, transparent 75%); }
.bb-cast.v[data-side="b"] { top: 0; background: linear-gradient(0deg, rgba(20, 14, 6, .5), rgba(20, 14, 6, .15) 30%, transparent 75%); }
/* the same gutter shading as a page at rest (.face::after), so nothing appears when the page lands */
.bb-turner .si .sg { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(0, 0, 0, .28), rgba(0, 0, 0, .06) 6%, transparent 14%, transparent 97%, rgba(255, 255, 255, .08)); }
.bb-turner .sb .si .sg { background: linear-gradient(270deg, rgba(0, 0, 0, .28), rgba(0, 0, 0, .06) 6%, transparent 14%, transparent 97%, rgba(255, 255, 255, .08)); }
.bb-turner.v .si .sg, .bb-turner.v .sb .si .sg { background: linear-gradient(180deg, rgba(0, 0, 0, .2), transparent 10%); }
