/* =========================================
   SPACE1993
   PRUDHOE GALLERY
   ========================================= */

.prudhoe-title {
    position: absolute;
    top: 58px;
    left: 50%;
    transform: translateX(-50%);

    width: 72%;
    max-width: 1100px;

    color: #383834;

    font-family: "Blue Screen", monospace;
    font-size: 24px;
    font-weight: normal;

    letter-spacing: 0;
    word-spacing: 0;

    line-height: 1;
    text-align: center;

    z-index: 5;
}

.prudhoe-title span {
    display: inline;
    margin: 0;
    padding: 0;
}

.prudhoe-back {
    position: absolute;
    left: 0;
    top: -4px;

    color: #383834;
    text-decoration: none;

    font-family: "Blue Screen", monospace;
    font-size: 28px;
    font-weight: normal;

    line-height: 1;
    white-space: nowrap;
}

.prudhoe-back:hover {
    color: #33332d;
}


/* =========================================
   GALLERY
   ========================================= */

.prudhoe-gallery {
    position: absolute;

    top: 105px;
    left: 50%;
    transform: translateX(-50%);

    width: 90%;
    max-width: 1100px;

    height: calc(100% - 125px);

    padding: 10px;

    display: grid;

    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 180px;
    gap: 10px;

    overflow-y: auto;
    overflow-x: hidden;

    scrollbar-width: thin;
    scrollbar-color: #080908 transparent;

    z-index: 5;
}

.prudhoe-piece {
    position: relative;
    display: block;

    width: 100%;
    height: 100%;

    padding: 0;
    margin: 0;

    border: none;
    background: transparent;

    overflow: hidden;

    cursor: pointer;

    z-index: 6;

    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.prudhoe-piece img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    opacity: 1;
    filter: none;

    pointer-events: none;

    transition: transform .2s ease;
}

.prudhoe-piece:hover img {
    transform: scale(1.025);
}


/* =========================================
   LIGHTBOX
   ========================================= */

.prudhoe-lightbox {
    position: fixed;
    inset: 0;

    z-index: 1000;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 50px;

    background: rgba(8,9,8,.96);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
        opacity .2s ease,
        visibility .2s ease;
}

.prudhoe-lightbox.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.prudhoe-lightbox-image-container {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 90vw;
    height: 90vh;

    overflow: hidden;

    touch-action: none;

    cursor: zoom-in;
}

.prudhoe-lightbox-image {
    display: block;

    max-width: 90vw;
    max-height: 90vh;

    width: auto;
    height: auto;

    object-fit: contain;

    opacity: 1;
    filter: none;

    transform: translate3d(0,0,0) scale(1);

    transform-origin: center center;

    transition: none;

    user-select: none;
    -webkit-user-drag: none;

    pointer-events: none;

    will-change: transform;

    backface-visibility: hidden;
}

.prudhoe-lightbox button {
    position: absolute;

    border: none;
    background: none;

    color: #d0d0cc;

    font-family:
        "Courier New",
        Courier,
        monospace;

    font-size: 28px;
    line-height: 1;

    cursor: pointer;

    z-index: 2;

    -webkit-tap-highlight-color: transparent;
}

.prudhoe-lightbox button:hover {
    color: white;
}

.prudhoe-lightbox-close {
    top: 25px;
    right: 30px;

    font-size: 34px !important;
}

.prudhoe-lightbox-previous {
    left: 25px;
    top: 50%;

    transform: translateY(-50%);
}

.prudhoe-lightbox-next {
    right: 25px;
    top: 50%;

    transform: translateY(-50%);
}


/* =========================================
   MOBILE
   ========================================= */

@media screen and (max-width:600px) {

    .prudhoe-title {
        top: 58px;
        width: 88%;
        font-size: 20px;
        letter-spacing: 0;
        word-spacing: 0;
    }

    .prudhoe-back {
        top: -3px;
        font-size: 24px;
    }

    .prudhoe-gallery {
        top: 105px;
        width: 94%;
        height: calc(100% - 123px);

        padding: 5px;

        display: grid;

        grid-template-columns:
            repeat(2,minmax(0,1fr));

        grid-auto-rows: max-content;

        gap: 7px;

        align-content: start;
    }

    .prudhoe-piece {
        position: relative;

        display: block;

        width: 100%;
        height: 0 !important;

        padding: 0 0 100% 0 !important;

        margin: 0;

        overflow: hidden;
    }

    .prudhoe-piece img {
        position: absolute;

        top: 0;
        left: 0;

        display: block;

        width: 100%;
        height: 100%;

        object-fit: cover;
    }

    .prudhoe-lightbox {
        padding: 25px;
    }

    .prudhoe-lightbox-image-container {
        width: 94vw;
        height: 84vh;
    }

    .prudhoe-lightbox-image {
        max-width: 94vw;
        max-height: 82vh;
    }

    .prudhoe-lightbox-close {
        top: 18px;
        right: 20px;
    }

    .prudhoe-lightbox-previous {
        left: 12px;
    }

    .prudhoe-lightbox-next {
        right: 12px;
    }
}


/* =========================================
   VERY SMALL
   ========================================= */

@media screen and (max-width:380px) {

    .prudhoe-title {
        top: 54px;
        width: 90%;
        font-size: 18px;
        letter-spacing: 0;
        word-spacing: 0;
    }

    .prudhoe-back {
        top: -3px;
        font-size: 22px;
    }

    .prudhoe-gallery {
        top: 100px;
        height: calc(100% - 118px);

        width: 96%;

        padding: 4px;

        grid-template-columns:
            repeat(2,minmax(0,1fr));

        grid-auto-rows: max-content;

        gap: 6px;

        align-content: start;
    }

    .prudhoe-piece {
        width: 100%;
        height: 0 !important;

        padding: 0 0 100% 0 !important;
    }

    .prudhoe-piece img {
        position: absolute;

        top: 0;
        left: 0;

        width: 100%;
        height: 100%;

        object-fit: cover;
    }

    .prudhoe-lightbox button {
        font-size: 22px;
    }

    .prudhoe-lightbox-close {
        font-size: 30px !important;
    }
}