/* Board covers (pixel letters, their motion) and board slideshows. */

/* ── Board covers: pixel-letter name on a flat color, like a type specimen ── */
.wb-cover { display: flex; flex-direction: column; }
.wb-cover-art { flex: 1; min-height: 0; display: flex; align-items: center; padding: 9% 9% 4%; }
.wb-cover-pixels { display: block; width: 100%; height: 100%; max-height: 100%; }
.wb-cover-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; padding: 0 9% 7%; }
.wb-cover-label { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wb-tile .wb-cover-art { padding: 10% 9% 4%; }
.wb-cover-art:last-child, .wb-tile .wb-cover-art:last-child { padding: 9%; }
.wb-tile .wb-cover-foot { padding-bottom: 26px; }
.wb-tile .wb-cover-label { font-size: 10px; }
.wb-pv-media .wb-cover { min-height: 280px; }
@media (max-width: 640px) {
  .wb-tile .wb-cover-foot { display: none; }
}

/* ── Board cover pixels in motion ── */
/* The word is one seamless path. While it arrives, separate squares fly in on top of it. */
.wb-cover-pixels .wb-px-word { opacity: 0; }
.wb-cover-pixels.wb-px-ready .wb-px-word { opacity: 1; }
.wb-cover-pixels .wb-px-arrive rect {
  transform-box: fill-box; transform-origin: center;
  animation: wbPxIn 0.7s cubic-bezier(0.2, 1.5, 0.4, 1) var(--d, 0ms) both;
}
@keyframes wbPxIn {
  from { opacity: 0; transform: translate(var(--dx, 0), var(--dy, 0)) scale(0.3); }
}
/* After arrival a few squares flash: switched off for a blink, or a white spark. Hidden in between. */
.wb-cover-pixels .wb-px-fx rect { opacity: 0; }
.wb-cover-pixels.wb-px-ready .px-off { animation: wbPxOff var(--p, 4s) steps(1, end) var(--t, 0s) infinite; }
.wb-cover-pixels.wb-px-ready .px-spark { animation: wbPxSpark var(--p, 4s) ease-out var(--t, 0s) infinite; }
@keyframes wbPxOff {
  0%, 84% { opacity: 0; }
  86%, 92% { opacity: 1; }
  93%, 100% { opacity: 0; }
}
@keyframes wbPxSpark {
  0%, 82%, 100% { opacity: 0; }
  86% { opacity: 0.6; }
}
/* Hover: the whole word hops up a little and lands */
.wb-cover-pixels { transition: transform 0.25s cubic-bezier(0.3, 1.8, 0.5, 1); }
.wb-cover:hover .wb-cover-pixels, .board-card:hover .wb-cover-pixels, .wb-tile:hover .wb-cover-pixels { transform: translateY(-3%); }
@media (prefers-reduced-motion: reduce) {
  .wb-cover-pixels .wb-px-word { opacity: 1; }
  .wb-cover-pixels .wb-px-arrive { display: none; }
  .wb-cover-pixels.wb-px-ready .px-off, .wb-cover-pixels.wb-px-ready .px-spark { animation: none; }
  .wb-cover-pixels { transition: none; }
  .wb-cover:hover .wb-cover-pixels, .board-card:hover .wb-cover-pixels, .wb-tile:hover .wb-cover-pixels { transform: none; }
}

/* ── Board posts: slideshow of the board's websites ── */
.wb-slides { background: var(--border); }
.wb-slides .wb-slides-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
/* The pixel wipe: the next picture, cut into squares that pop in */
.wb-slides-grid { position: absolute; inset: 0; z-index: 1; display: grid; pointer-events: none; }
.wb-slides-cell { position: relative; overflow: hidden; transform: scale(0); animation: wbSlideCell 0.26s cubic-bezier(0.2, 1.4, 0.4, 1) both; }
.wb-slides-cell img { position: absolute; max-width: none; object-fit: cover; object-position: top center; }
@keyframes wbSlideCell { to { transform: scale(1.02); } }
/* "This is a board" sticker, top-left */
.wb-slides-chip {
  position: absolute; top: 10px; left: 10px; z-index: 2; display: inline-flex; align-items: center; gap: 6px;
  max-width: calc(100% - 20px); padding: 5px 10px 5px 8px; font-size: 12px; font-weight: 900; color: var(--black);
  background: #fff; border: 2px solid var(--border); border-radius: 8px; box-shadow: 2px 2px 0 var(--border);
}
.wb-slides-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wb-slides-chip svg { flex: none; }
/* Which slide is showing */
.wb-slides-dots {
  position: absolute; left: 50%; bottom: 10px; z-index: 2; display: flex; gap: 5px; padding: 4px 6px;
  background: rgba(255, 255, 255, 0.9); border: 2px solid var(--border); border-radius: 999px; transform: translateX(-50%);
}
.wb-slides-dots[hidden] { display: none; }
.wb-slides-dots span { width: 7px; height: 7px; background: #cbd5e1; border-radius: 50%; transition: background 0.2s, transform 0.2s; }
.wb-slides-dots span.on { background: var(--lime); box-shadow: 0 0 0 1.5px var(--border); transform: scale(1.15); }
/* Small square tiles in the profile grid */
.wb-slides-compact .wb-slides-chip { top: 6px; left: 6px; padding: 4px; border-radius: 6px; box-shadow: 1.5px 1.5px 0 var(--border); }
.wb-slides-compact .wb-slides-dots { bottom: 6px; gap: 3px; padding: 3px 4px; border-width: 1.5px; }
.wb-slides-compact .wb-slides-dots span { width: 5px; height: 5px; }
@media (prefers-reduced-motion: reduce) {
  .wb-slides-cell { animation: none; transform: none; }
  .wb-slides-dots span { transition: none; }
}
