/* Parasbuilds: sound toggle + cross-document view transitions. */

/* ---------- Sound toggle (sits right of .pb-pause; stacks above it on phones) ---------- */
.pb-snd { position: fixed; left: calc(18px + var(--pb-pause-w, -8px) + 8px); bottom: 18px; z-index: 9000; display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px 0 12px; border-radius: 999px; border: 1px solid var(--pb-line-2); background: rgba(16, 16, 21, .82); color: var(--pb-muted); font: 500 11px/1 var(--pb-font-mono); text-transform: uppercase; letter-spacing: .08em; cursor: pointer; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: color var(--pb-t1), border-color var(--pb-t1), opacity .3s var(--pb-ease), translate .45s var(--pb-ease); }
.pb-snd:hover, .pb-snd[aria-pressed="true"] { color: var(--pb-text); border-color: var(--pb-accent); }
.pb-snd:focus-visible { outline: 2px solid var(--pb-accent); outline-offset: 3px; }
.pb-snd__eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.pb-snd__eq i { width: 2px; height: 3px; background: currentColor; border-radius: 1px; transform-origin: 50% 100%; }
.pb-snd[aria-pressed="true"] .pb-snd__eq i { background: var(--pb-accent); animation: pb-snd-eq .9s ease-in-out infinite alternate; }
.pb-snd[aria-pressed="true"] .pb-snd__eq i:nth-child(1) { height: 7px; animation-delay: -.3s; }
.pb-snd[aria-pressed="true"] .pb-snd__eq i:nth-child(2) { height: 12px; animation-delay: -.6s; }
.pb-snd[aria-pressed="true"] .pb-snd__eq i:nth-child(3) { height: 9px; animation-delay: -.1s; }
.pb-snd[aria-pressed="true"] .pb-snd__eq i:nth-child(4) { height: 11px; animation-delay: -.45s; }
@keyframes pb-snd-eq { from { transform: scaleY(.3); } to { transform: scaleY(1); } }
@media (max-width: 520px) {
	.pb-snd { left: 18px; bottom: 64px; padding: 0 12px; }
	.pb-snd__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) { .pb-snd__eq i { animation: none !important; } .pb-snd { transition: opacity .2s linear, color var(--pb-t1), border-color var(--pb-t1); } }
/* Hide while reading (html.pb-floaters-hide) is styled with the other floaters in pb.css. */
@media print { .pb-snd { display: none; } }

/* ---------- View transitions (the @view-transition rule is added by the early head script only when supported and enabled) ---------- */
html.pb-has-vt .pb-transition { display: none; }
::view-transition { background: var(--pb-bg, #07070a); }
/* Blueprint wipe: old sheet steps back, new sheet is drawn in from the top edge. */
::view-transition-old(root), ::view-transition-new(root) { mix-blend-mode: normal; }
::view-transition-old(root) { animation: pb-vt-out .5s var(--pb-ease, cubic-bezier(.22, 1, .36, 1)) both; }
::view-transition-new(root) { animation: pb-vt-in .8s var(--pb-ease-io, cubic-bezier(.65, 0, .35, 1)) .06s both; }
@keyframes pb-vt-out { to { opacity: 0; transform: scale(.98); } }
@keyframes pb-vt-in { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
/* Project card image morphs into the case study cover. */
::view-transition-group(pb-cover) { z-index: 2; animation-duration: .8s; animation-timing-function: var(--pb-ease-io, cubic-bezier(.65, 0, .35, 1)); }
::view-transition-old(pb-cover), ::view-transition-new(pb-cover) { height: 100%; object-fit: cover; overflow: clip; animation-duration: .8s; }
@media (prefers-reduced-motion: reduce) {
	::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
