/* Wilson Photography — gallery lightbox (progressive enhancement, JS-driven) */

.lb {
  position: fixed;
  inset: 0;
  z-index: 9500;
  background: rgba(10, 10, 10, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  overflow-y: auto;
}

.lb[hidden] { display: none; }

.lb-figure {
  max-width: min(1180px, 94vw);
  max-height: 84vh;
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 40px;
}

.lb-img-wrap {
  flex: 1 1 60%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lb-img {
  max-width: 100%;
  max-height: 84vh;
  min-width: 0;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.lb-caption {
  flex: 0 0 320px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  text-align: left;
  overflow-y: auto;
  max-height: 84vh;
  padding: 4px 4px 4px 0;
}

.lb-eyebrow {
  font-size: 8px;
  font-weight: 400;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.lb-title {
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  line-height: 1.3;
}

.lb-rule {
  width: 20px;
  height: 1px;
  background: var(--muted-3);
}

.lb-story {
  font-size: 13px;
  font-weight: 300;
  line-height: 1.85;
  color: #999999;
}

.lb-story p { margin: 0 0 1.2em; }
.lb-story p:last-child { margin: 0; }

.lb-buy {
  align-self: flex-start;
  margin-top: 6px;
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--text);
  padding: 12px 26px;
  transition: background-color 0.2s, color 0.2s;
  white-space: nowrap;
}

.lb-buy:hover {
  background: var(--text);
  color: var(--bg);
}

.lb-close,
.lb-prev,
.lb-next {
  position: fixed;
  background: transparent;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  padding: 12px;
  transition: color 0.2s;
  z-index: 1;
}

.lb-close:hover,
.lb-prev:hover,
.lb-next:hover,
.lb-close:focus-visible,
.lb-prev:focus-visible,
.lb-next:focus-visible { color: var(--text); }

.lb-close {
  top: 14px;
  right: 14px;
  font-size: 22px;
  line-height: 1;
}

.lb-prev,
.lb-next {
  top: 50%;
  transform: translateY(-50%);
  font-size: 28px;
  line-height: 1;
}

.lb-prev { left: 6px; }
.lb-next { right: 6px; }

.lb-counter {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted-2);
}

@media (max-width: 900px) {
  .lb-figure {
    flex-direction: column;
    max-height: none;
    overflow-y: auto;
  }
  .lb-img-wrap { flex: 0 0 auto; }
  .lb-img { max-height: 52vh; }
  .lb-caption {
    flex: 0 0 auto;
    max-height: none;
    padding: 0;
  }
}

@media (max-width: 640px) {
  .lb { padding: 40px 16px; }
  .lb-prev, .lb-next { font-size: 22px; padding: 10px; }
  .lb-img { max-height: 42vh; }
}
