/* ------------------------------------------------------------------
   Lightbox / image viewer
   Matches the site language: coal backdrop, square edges, IBM Plex
   Mono micro-labels, orange accent. No border-radius, no gradients.
   ------------------------------------------------------------------ */

/* --- affordance on the page images themselves --- */
.lb-armed {
    cursor: zoom-in;
}

.lb-armed:focus-visible {
    outline: 2px solid #c97431;
    outline-offset: 3px;
}

@media (hover: hover) {
    .lb-armed:hover {
        filter: brightness(1.06);
    }
}

/* --- overlay --- */
.lb {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 12, 11, .96);
    opacity: 0;
    visibility: hidden;
    transition: opacity .16s ease, visibility .16s ease;
}

.lb.is-open {
    opacity: 1;
    visibility: visible;
}

body.lb-locked {
    overflow: hidden;
}

/* --- top bar: count + close --- */
.lb__bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 14px 18px;
    z-index: 3;
}

.lb__count,
.lb__cap {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(245, 243, 238, .78);
}

/* --- stage --- */
.lb__stage {
    margin: 0;
    max-width: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 58px 74px 64px;
}

.lb__img {
    display: block;
    max-width: calc(100vw - 148px);
    max-height: calc(100vh - 150px);
    width: auto;
    height: auto;
    border: 1px solid rgba(245, 243, 238, .22);
    background: #141615;
}

.lb__cap {
    margin-top: 14px;
    max-width: 760px;
    text-align: center;
    line-height: 1.5;
    letter-spacing: .05em;
    text-transform: none;
}

.lb__cap:empty {
    display: none;
}

/* --- controls --- */
.lb__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 0 13px;
    background: rgba(26, 29, 27, .92);
    border: 1px solid rgba(245, 243, 238, .58);
    color: #f3f1e8;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    transition: background .14s ease, border-color .14s ease, color .14s ease;
}

.lb__btn:hover,
.lb__btn:focus-visible {
    background: #c97431;
    border-color: #c97431;
    color: #171917;
    outline: none;
}

.lb__close {
    font-size: 20px;
}

.lb__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
}

.lb__nav--prev {
    left: 14px;
}

.lb__nav--next {
    right: 14px;
}

.lb__nav[hidden] {
    display: none;
}

/* --- mobile --- */
@media (max-width: 620px) {
    .lb__stage {
        padding: 54px 12px 58px;
    }

    .lb__img {
        max-width: calc(100vw - 24px);
        max-height: calc(100vh - 132px);
    }

    .lb__nav--prev {
        left: 6px;
    }

    .lb__nav--next {
        right: 6px;
    }

    .lb__cap {
        font-size: 10px;
        max-width: 90vw;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lb,
    .lb__btn {
        transition: none;
    }
}
