/* ═══════════════════════════════════════════════════════════
   ABOUT · "Veox Library" shelf (#portfolio)
   All case files + clients stand as book spines on one shelf.
   Hover lifts a spine and shows its title below; click any spine
   and the book flies out, turns cover-out and opens to its page.
   Built by about-shelf.js from the .bk books (about-books.css).
   ═══════════════════════════════════════════════════════════ */
.bk-source.sh-hidden { display: none; }

.sh {
  position: relative; background: #0e0c0b; color: #faf3e1; border-radius: 30px; overflow: hidden;
  padding: 26px 0 30px; box-shadow: 0 40px 80px -40px rgba(0,0,0,.55);
}
.sh::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background: radial-gradient(60% 50% at 50% 62%, rgba(255,85,85,.16), transparent 70%); }
.sh-top { position: relative; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; padding: 0 clamp(18px, 3vw, 36px); }
.sh-brand { font-family: var(--font-display); font-weight: 800; font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; }
.sh-brand b { color: var(--orange); }
.sh-count { justify-self: end; font-family: var(--font-display); font-weight: 800; font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; color: rgba(250,243,225,.55); }
.sh-tabs { display: flex; border: 1.5px solid rgba(250,243,225,.35); }
.sh-tabs button {
  background: none; border: 0; border-left: 1.5px solid rgba(250,243,225,.35); color: #faf3e1; cursor: pointer;
  font-family: var(--font-display); font-weight: 800; font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; padding: 9px 16px;
  transition: background .25s, color .25s;
}
.sh-tabs button:first-child { border-left: 0; }
.sh-tabs button:hover { background: rgba(250,243,225,.08); }
.sh-tabs button.on { background: var(--orange); color: #fff; }

/* the shelf */
.sh-rail {
  position: relative; display: flex; align-items: flex-end; gap: 6px; height: clamp(360px, 52vh, 460px);
  margin-top: 30px; padding: 30px clamp(18px, 3vw, 36px) 0; overflow-x: auto; overflow-y: hidden;
  scrollbar-width: none; cursor: grab; -webkit-overflow-scrolling: touch;
}
.sh-rail::-webkit-scrollbar { display: none; }
.sh-rail.dragging { cursor: grabbing; }
.sh-rail.dragging .sh-spine { pointer-events: none; }
.sh-plank { position: relative; height: 14px; margin: 0 clamp(10px, 2vw, 24px); border-radius: 3px;
  background: linear-gradient(180deg, #2a2420, #15110f); box-shadow: 0 12px 24px -6px rgba(0,0,0,.8), 0 -1px 0 rgba(255,255,255,.07) inset; }

.sh-spine {
  --bg: #ff5555; --fg: #faf3e1; --ac: #0e0c0b;
  position: relative; flex: none; width: var(--w, 62px); height: var(--h, 92%); border: 0; padding: 0; cursor: pointer;
  background: var(--bg); color: var(--fg); border-radius: 3px 3px 1px 1px; font: inherit;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 12px 0 10px;
  box-shadow: inset 4px 0 0 rgba(255,255,255,.12), inset -5px 0 8px rgba(0,0,0,.28), 0 -2px 0 rgba(0,0,0,.3) inset;
  transform-origin: 50% 100%;
  transition: transform .45s cubic-bezier(.22,1,.36,1), width .5s cubic-bezier(.65,0,.2,1), opacity .4s, margin .5s cubic-bezier(.65,0,.2,1), filter .3s;
  opacity: 0; translate: 0 30px;
}
.sh-in .sh-spine { opacity: 1; translate: 0 0; transition: transform .45s cubic-bezier(.22,1,.36,1), width .5s cubic-bezier(.65,0,.2,1), opacity .6s ease var(--d, 0s), translate .8s cubic-bezier(.22,1,.36,1) var(--d, 0s), margin .5s, filter .3s; }
.sh-spine::before, .sh-spine::after { content: ""; position: absolute; left: 0; right: 0; height: 2px; background: currentColor; opacity: .35; }
.sh-spine::before { top: 46px; } .sh-spine::after { bottom: 44px; }
.sh-rail:hover .sh-spine:not(:hover) { filter: brightness(.72); }
.sh-spine:hover, .sh-spine:focus-visible { transform: translateY(-18px); z-index: 2; }
.sh-spine:focus-visible { outline: 3px solid #faf3e1; outline-offset: 3px; }
.sh-spine.out { width: 0 !important; opacity: 0 !important; margin-left: -6px; pointer-events: none; padding: 0; overflow: hidden; }
.sh-spine.is-pulled { opacity: 0 !important; }

.sh-mark { width: 30px; height: 30px; border-radius: 50%; background: var(--ac); color: var(--bg); display: grid; place-items: center; font-size: 15px; line-height: 1; font-family: var(--font-display); font-weight: 900; letter-spacing: -.04em; overflow: hidden; flex: none; }
.sh-mark.t { font-size: 9px; }
.sh-title {
  writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-height: calc(100% - 110px); font-family: var(--font-display); font-weight: 900; text-transform: uppercase; letter-spacing: -.02em;
  font-size: var(--fs, 15px); line-height: 1;
}
.sh-foot { font-family: var(--font-display); font-weight: 800; font-size: 8px; letter-spacing: .14em; text-align: center; line-height: 1.5; opacity: .8; }
.sh-foot b { display: block; font-size: 10px; letter-spacing: 0; color: var(--ac); }
.sh-spine[style*="--ac:#0e0c0b"] .sh-foot b { color: inherit; }

/* caption */
.sh-cap { position: relative; text-align: center; margin-top: 22px; min-height: 96px; padding: 0 20px; }
.sh-cap-title { font-family: var(--font-head); font-weight: 600; font-size: clamp(1.7rem, 3.2vw, 2.6rem); line-height: 1.05; }
.sh-cap-sub { margin-top: .45rem; font-family: var(--font-display); font-weight: 800; font-size: .66rem; letter-spacing: .2em; text-transform: uppercase; color: var(--orange); }
.sh-cap-num { margin-top: .4rem; font-family: var(--font-display); font-size: .7rem; letter-spacing: .14em; color: rgba(250,243,225,.5); }
.sh-arrows { position: absolute; right: clamp(18px, 3vw, 36px); bottom: 0; display: flex; gap: 8px; }
.sh-arrows button { width: 42px; height: 42px; border-radius: 50%; border: 1.5px solid rgba(250,243,225,.3); background: none; color: #faf3e1; cursor: pointer; display: grid; place-items: center; transition: background .25s, border-color .25s; }
.sh-arrows button:hover { background: var(--orange); border-color: var(--orange); }
.sh-arrows svg { width: 16px; height: 16px; }
.sh-hint { position: absolute; left: clamp(18px, 3vw, 36px); bottom: 12px; font-family: var(--font-display); font-weight: 800; font-size: .6rem; letter-spacing: .16em; text-transform: uppercase; color: rgba(250,243,225,.45); }

/* open book overlay */
.shm { position: fixed; inset: 0; z-index: 99990; display: grid; place-items: center; pointer-events: none; }
.shm-bg { position: absolute; inset: 0; background: rgba(14,12,11,.86); backdrop-filter: blur(8px); opacity: 0; transition: opacity .45s ease; }
.shm.on { pointer-events: auto; }
.shm.on .shm-bg { opacity: 1; }
.shm-stage { position: relative; width: min(360px, 66vw); }
.shm-stage ul { list-style: none; margin: 0; padding: 0; display: block; }
.shm .bk { width: 100%; }
@media (min-width: 700px) { .shm .bk { translate: 34% 0; } }
.shm .bk .bk-book { transform: none; opacity: 1; translate: none; cursor: default; }
.shm .bk.is-open .bk-book { transform: translateX(14%); }
.shm .bk:not(.is-open) .bk-cover { transform: translateZ(calc(var(--T) / 2)) rotateY(0deg) !important; }
.shm .bk::after { display: none; }
.shm-ui { position: fixed; left: 0; right: 0; bottom: 24px; display: flex; justify-content: center; gap: 10px; opacity: 0; transition: opacity .4s .3s; }
.shm.on .shm-ui { opacity: 1; }
.shm-ui button, .shm-x {
  height: 46px; min-width: 46px; padding: 0 16px; border-radius: 50px; border: 1.5px solid rgba(250,243,225,.3); background: rgba(14,12,11,.6); color: #faf3e1;
  font-family: var(--font-display); font-weight: 800; font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: background .25s, border-color .25s;
}
.shm-ui button:hover, .shm-x:hover { background: var(--orange); border-color: var(--orange); }
.shm-x { position: fixed; top: 22px; right: 22px; opacity: 0; transition: opacity .4s .3s, background .25s; padding: 0; width: 46px; font-size: 1.1rem; }
.shm.on .shm-x { opacity: 1; }
.shm-label { position: fixed; top: 28px; left: 0; right: 0; text-align: center; color: rgba(250,243,225,.6); font-family: var(--font-display); font-weight: 800; font-size: .64rem; letter-spacing: .2em; text-transform: uppercase; opacity: 0; transition: opacity .4s .3s; pointer-events: none; }
.shm.on .shm-label { opacity: 1; }
html.shm-lock, html.shm-lock body { overflow: hidden !important; }
body.shm-lock-cursor #cursor-dot, body.shm-lock-cursor #cursor-star { z-index: 100000; }

@media (max-width: 700px) {
  .sh { border-radius: 22px; }
  .sh-top { grid-template-columns: 1fr; justify-items: center; gap: .8rem; }
  .sh-count { justify-self: center; }
  .sh-tabs button { padding: 8px 11px; font-size: .58rem; }
  .sh-rail { height: 430px; gap: 5px; padding-top: 24px; }
  .sh-spine { width: calc(var(--w, 62px) * .78); }
  .sh-title { font-size: calc(var(--fs, 15px) * .76); max-height: calc(100% - 96px); }
  .sh-arrows { display: none; }
  .sh-hint { position: static; display: block; text-align: center; margin-top: 10px; }
  .shm-stage { width: 64vw; margin-right: 10vw; }
}
@media (prefers-reduced-motion: reduce) {
  .sh-spine { transition: none !important; opacity: 1; translate: none; }
}
.shm[hidden] { display: none; }
/* bigger open book for growth stories */
.shm-stage { width: min(420px, 40vw, 62vh); }
@media (max-width: 700px) { .shm-stage { width: 80vw; margin-right: 22vw; } }
