/* Photo gallery. Uses the storefront type and buttons.
   The mural is the Zippo Legacy plate technique, gallery page only. */

.blv4-work-lead {
    max-width: 760px;
    margin: 0 0 22px;
}

.blv4-work-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 14px;
}

.blv4-work-filter {
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid #3a3a3a;
    border-radius: 3px;
    background: transparent;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
}

.blv4-work-filter[aria-pressed="true"] {
    border-color: var(--gold);
    color: #fff;
}

.blv4-work-filter:hover,
.blv4-work-filter:focus-visible {
    color: #fff;
    border-color: #fff;
    outline: 2px solid #ff4a3a;
    outline-offset: 2px;
}

.blv4-work-count {
    margin: 0 0 16px;
    color: var(--dim);
    font-size: 13px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.blv4-work-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.blv4-work-grid li {
    min-width: 0;
}

.blv4-work-grid li[hidden] {
    display: none !important;
}

.blv4-work-open {
    display: block;
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    margin: 0;
    padding: 0;
    border: 1px solid #2a241c;
    border-radius: 4px;
    background: #070707;
    line-height: 0;
    cursor: zoom-in;
    overflow: hidden;
}

.blv4-work-grid .blv4-work-open img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
    background: #070707;
    transition: filter 180ms ease;
}

.blv4-work-open:hover,
.blv4-work-open:focus-visible {
    border-color: var(--gold);
}

.blv4-work-grid .blv4-work-open:hover img,
.blv4-work-grid .blv4-work-open:focus-visible img {
    filter: brightness(1.06);
}

.blv4-work-open:focus-visible {
    outline: 2px solid #ff4a3a;
    outline-offset: 3px;
}

.blv4-work-empty {
    margin: 8px 0 28px;
}

.blv4-work-cta {
    margin-top: 36px;
    padding-top: 22px;
    border-top: 1px solid #2a241c;
}

.blv4-work-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 22px;
}

.blv4-work-zoom[hidden],
.blv4-work-nav[hidden] {
    display: none !important;
}

.blv4-work-zoom {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 64px 28px 24px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.88);
}

.blv4-work-dialog {
    position: static;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: auto;
    min-width: 0;
    min-height: 0;
    max-width: min(1100px, calc(100vw - 56px));
    max-height: calc(100dvh - 88px);
}

.blv4-work-frame {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 0;
    max-width: 100%;
    max-height: calc(100dvh - 160px);
}

.blv4-work-frame img,
.blv4-work-frame video {
    position: static;
    inset: auto;
    float: none;
    display: block;
    width: auto;
    height: auto;
    max-width: min(1100px, calc(100vw - 88px));
    max-height: calc(100dvh - 170px);
    margin: 0;
    object-fit: contain;
    object-position: center;
    background: #070707;
}

.blv4-work-frame img[hidden],
.blv4-work-frame video[hidden] {
    display: none !important;
}

.blv4-work-x,
.blv4-work-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 50%;
    background: rgba(8, 8, 8, 0.78);
    color: #fff;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.blv4-work-x {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 1001;
    font-size: 20px;
}

.blv4-work-nav {
    position: absolute;
    top: 50%;
    z-index: 2;
    transform: translateY(-50%);
}

.blv4-work-prev { left: 8px; }
.blv4-work-next { right: 8px; }

.blv4-work-x:hover,
.blv4-work-x:focus-visible,
.blv4-work-nav:hover,
.blv4-work-nav:focus-visible {
    background: #8d1d1d;
    outline: 2px solid #ff4a3a;
    outline-offset: 2px;
}

.blv4-work-caption {
    position: static;
    flex: 0 0 auto;
    max-width: min(720px, calc(100vw - 56px));
    margin: 0;
    color: #f3f3f3;
    font-size: 15px;
    letter-spacing: 0;
    line-height: 1.45;
    text-align: center;
    text-transform: none;
}

.blv4-work-caption[hidden] {
    display: none !important;
}

.blv4-work-caption strong {
    display: block;
    margin-bottom: 4px;
    color: #fff;
    font-size: 16px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

html.blv4-work-locked,
body.blv4-work-locked {
    overflow: hidden;
}

@media (max-width: 1100px) {
    .blv4-work-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 14px;
    }
}

@media (max-width: 700px) {
    .blv4-work-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
}

@media (max-width: 640px) {
    .blv4-work-grid {
        gap: 10px;
    }

    .blv4-work-zoom {
        padding: 60px 12px 16px;
    }

    .blv4-work-frame,
    .blv4-work-frame img,
    .blv4-work-frame video {
        max-width: calc(100vw - 32px);
        max-height: calc(100dvh - 156px);
    }

    .blv4-work-nav {
        width: 40px;
        height: 40px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .blv4-work-grid .blv4-work-open img {
        transition: none;
    }
}

/* Gallery mural. The original plate stays in proportion at the top.
   A quiet side band repeats for the rest of the column. The lower steel
   sits at the footer when the column is tall enough to leave room. */

.blv4-gallery-page {
    overflow-x: clip;
    background: #050505;
}

.blv4-gallery-stage {
    position: relative;
    background: #050505;
}

.blv4-gallery-pin {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    line-height: 0;
}

.blv4-gallery-continue {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-color: #050505;
    background-image: url('../images/pages/v4-gallery-side.png');
    background-image: -webkit-image-set(url('../images/pages/v4-gallery-side.webp') type('image/webp'), url('../images/pages/v4-gallery-side.png') type('image/png'));
    background-image: image-set(
        url('../images/pages/v4-gallery-side.webp') type('image/webp'),
        url('../images/pages/v4-gallery-side.png') type('image/png')
    );
    background-repeat: repeat-y;
    background-position: center top;
    background-size: 100% auto;
}

.blv4-gallery-pin picture {
    display: block;
}

.blv4-gallery-mural {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    display: block;
    width: 100%;
    max-width: none;
    height: auto;
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 44%, transparent 52%);
    mask-image: linear-gradient(to bottom, #000 0%, #000 44%, transparent 52%);
}

.blv4-gallery-base {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2;
    display: none;
    width: 100%;
    margin: 0;
}

.blv4-gallery-room .blv4-gallery-base {
    display: block;
}

.blv4-gallery-base img {
    display: block;
    width: 100%;
    max-width: none;
    height: auto;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 24%);
    mask-image: linear-gradient(to bottom, transparent 0%, #000 24%);
}

.blv4-gallery-veil {
    position: absolute;
    inset: 0;
    z-index: 3;
    background:
        linear-gradient(180deg, rgba(5, 5, 5, 0) 0, rgba(5, 5, 5, 0) calc(100% - 96px), rgba(5, 5, 5, 0.72) calc(100% - 36px), #050505 100%),
        linear-gradient(90deg, rgba(5, 5, 5, 0) 0%, rgba(5, 5, 5, 0.2) 10%, rgba(5, 5, 5, 0.78) 24%, rgba(5, 5, 5, 0.94) 36%, rgba(5, 5, 5, 0.94) 64%, rgba(5, 5, 5, 0.78) 76%, rgba(5, 5, 5, 0.2) 90%, rgba(5, 5, 5, 0) 100%);
}

.blv4-gallery-stage > .blv4-wrap {
    position: relative;
    z-index: 1;
}

.blv4-gallery-page + .blv4-foot {
    margin-top: 0;
}
