/* Bold Line website, created by DI SI DI CONSULTING. */
/* Bold Line lightbox (assets/js/lightbox.js): real-work photos, full screen, zoomable.
   Graphite scrim and brushed-silver controls, so the photo is the only colour on screen. */

/* thumbnails */
.zoomable { cursor: zoom-in; }
.has-zoom.is-zoom-anchor { position: relative; } /* only where the photo's holder had no position of its own (lightbox.js) */
.zoom-badge {
  position: absolute; z-index: 2; pointer-events: none;
  width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%;
  color: #eef0f3; background: rgb(22 24 28 / 0.62); border: 1px solid rgb(255 255 255 / 0.22);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  opacity: 0.85; transition: opacity 0.25s, transform 0.3s var(--ease-out);
}
.zoom-badge svg { width: 18px; height: 18px; }
.has-zoom:hover .zoom-badge, .zoomable:focus-visible ~ .zoom-badge { opacity: 1; transform: scale(1.08); }
/* where the badge sits: on the photo's corner, not over the caption */
.portfolio .zoom-badge { top: 10px; right: 10px; }
.biz__photo .zoom-badge { right: 10px; bottom: 10px; }
.biz__photo--a .zoom-badge { top: 10px; bottom: auto; } /* the metal card covers this photo's lower corner */
.lane__pic .zoom-badge { right: 8%; bottom: 6%; }
.zoomable:focus-visible { outline: 2px dashed var(--silver-2); outline-offset: 4px; }

/* the viewer */
html.lb-open { overflow: hidden; }
.lb {
  position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0; color: #eef0f3;
  background: #101114;
  display: grid; grid-template-rows: 1fr auto; overflow: hidden;
}
.lb:not([open]) { display: none; }
.lb::backdrop { background: rgb(16 17 20 / 0.6); }
.lb[open] { animation: lb-in 0.28s var(--ease-out); }
@keyframes lb-in { from { opacity: 0; } }

.lb__stage {
  position: relative; min-height: 0; overflow: hidden; touch-action: none;
  display: grid; place-items: center; padding: clamp(56px, 7vh, 72px) clamp(12px, 7vw, 96px) 8px;
  cursor: zoom-out;
}
.lb__img {
  max-width: none; max-height: none; width: auto; height: auto; /* sized by fit() in lightbox.js */
  border-radius: 6px; box-shadow: 0 24px 60px rgb(0 0 0 / 0.5);
  user-select: none; -webkit-user-select: none; -webkit-user-drag: none;
  transform-origin: 50% 50%; cursor: zoom-in; will-change: transform;
}
.lb__img.is-animating { transition: transform 0.32s var(--ease-out); }
.lb__img.is-entering { animation: lb-swap 0.35s var(--ease-out); }
@keyframes lb-swap { from { opacity: 0.2; } }
.lb.is-zoomed .lb__img { cursor: grab; border-radius: 0; }
.lb.is-zoomed .lb__img:active { cursor: grabbing; }

.lb__bar {
  display: flex; align-items: baseline; justify-content: center; gap: var(--space-4, 1rem);
  padding: 10px clamp(16px, 5vw, 48px) max(18px, env(safe-area-inset-bottom));
  min-height: 3.2rem; text-align: center;
}
.lb__cap { margin: 0; max-width: 60ch; font-size: 0.95rem; line-height: 1.45; color: #d9dde2; }
.lb__count { font-size: 0.85rem; color: #9aa0a8; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lb.is-zoomed .lb__bar { opacity: 0.35; transition: opacity 0.2s; }

.lb__btn {
  position: absolute; z-index: 3; width: 46px; height: 46px; padding: 0;
  display: grid; place-items: center; border-radius: 50%; cursor: pointer;
  color: #eef0f3; background: rgb(30 32 37 / 0.72); border: 1px solid rgb(255 255 255 / 0.24);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); /* stays legible over a zoomed photo */
  transition: background-color 0.2s, border-color 0.2s, opacity 0.2s;
}
.lb__btn svg { width: 22px; height: 22px; }
.lb__btn:hover { background: rgb(58 61 68 / 0.85); border-color: rgb(255 255 255 / 0.42); }
.lb__btn:focus-visible { outline: 2px dashed var(--silver-2); outline-offset: 3px; }
.lb__btn:disabled { opacity: 0.35; cursor: default; }
.lb__btn[hidden] { display: none; }
.lb__close { top: 12px; right: 12px; }
.lb__nav { top: 50%; margin-top: -40px; }
.lb__prev { left: clamp(8px, 2vw, 28px); }
.lb__next { right: clamp(8px, 2vw, 28px); }
.lb__zoom { position: absolute; top: 12px; left: 12px; z-index: 3; display: flex; gap: 8px; }
.lb__zoom .lb__btn { position: static; }

@media (max-width: 640px) {
  .lb__stage { padding: 64px 0 4px; }
  .lb__img { border-radius: 0; }
  /* on phones the photo takes the full width; the arrows move down beside the caption */
  .lb__nav { top: auto; bottom: max(10px, env(safe-area-inset-bottom)); margin: 0; width: 42px; height: 42px; }
  .lb__prev { left: 10px; } .lb__next { right: 10px; }
  .lb__bar { padding-inline: 62px; align-items: center; flex-direction: column; gap: 2px; min-height: 4.4rem; }
  .lb__cap { font-size: 0.88rem; }
}

@media (prefers-reduced-motion: reduce) {
  .lb[open], .lb__img.is-entering { animation: none; }
  .lb__img.is-animating, .zoom-badge { transition: none; }
}
