* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #050505;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    color: #fff;
}


/* =========================================================
   GALLERY
========================================================= */

.gallery {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #050505;
}


/* =========================================================
   LOADING
========================================================= */

.loading {
    position: fixed;
    inset: 0;
    z-index: 1000;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #050505;

    transition:
            opacity 0.8s ease,
            visibility 0.8s ease;
}

.loading.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loading-logo {
    font-size: 42px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.loading-bottom {
    position: absolute;
    left: 30px;
    right: 30px;
    bottom: 30px;

    display: flex;
    justify-content: space-between;

    font-size: 11px;
    letter-spacing: 0.15em;
}


/* =========================================================
   TOP
========================================================= */

.top {
    position: fixed;

    top: 0;
    left: 0;
    right: 0;

    z-index: 50;

    padding: 28px 35px;

    display: flex;
    justify-content: space-between;
    align-items: center;

    pointer-events: none;
}

.brand {
    font-size: 11px;
    letter-spacing: 0.18em;
    opacity: 0.7;
}

.youtube {
    pointer-events: auto;

    color: #fff;
    text-decoration: none;

    font-size: 12px;
    font-weight: 600;

    letter-spacing: 0.14em;

    padding: 10px 0;

    transition: opacity 0.25s ease;
}

.youtube span {
    margin-left: 6px;
}

.youtube:hover {
    opacity: 0.55;
}


/* =========================================================
   VIEWPORT
========================================================= */

.viewport {
    position: absolute;
    inset: 0;

    overflow: hidden;

    cursor: grab;
}

.viewport.dragging {
    cursor: grabbing;
}


/* =========================================================
   TRACK
========================================================= */

.track {
    height: 100%;

    display: flex;
    align-items: center;

    gap: 12vw;

    padding: 0 12vw;

    width: max-content;

    transform: translate3d(0, 0, 0);

    will-change: transform;
}


/* =========================================================
   SCENES
========================================================= */

.scene {
    position: relative;

    flex: 0 0 auto;

    width: 75vw;
    height: 72vh;

    display: grid;

    place-items: center;
}


/* =========================================================
   SINGLE
========================================================= */

.scene-single {
    width: 72vw;
    height: 76vh;
}

.scene-single .photo {
    width: 100%;
    height: 100%;
}


/* =========================================================
   TWO
========================================================= */

.scene-two {
    width: 80vw;

    grid-template-columns: repeat(2, 1fr);

    gap: 20px;
}

.scene-two .photo {
    width: 100%;
    height: 100%;
}


/* =========================================================
   THREE
========================================================= */

.scene-three {
    width: 82vw;

    grid-template-columns:
        1fr
        1fr
        1fr;

    gap: 16px;
}

.scene-three .photo {
    width: 100%;
    height: 65%;
}


/* =========================================================
   FOUR
========================================================= */

.scene-four {
    width: 82vw;

    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);

    gap: 16px;
}

.scene-four .photo {
    width: 100%;
    height: 100%;
}


/* =========================================================
   FIVE
========================================================= */

.scene-five {
    width: 85vw;

    grid-template-columns:
        1.2fr
        0.8fr
        1fr;

    grid-template-rows:
        1fr
        1fr;

    gap: 14px;
}

.scene-five .photo:nth-child(1) {
    grid-row: span 2;
}

.scene-five .photo {
    width: 100%;
    height: 100%;
}


/* =========================================================
   PHOTO
========================================================= */

.photo {
    position: relative;

    overflow: hidden;

    background: #111;

    cursor: zoom-in;
}

.photo img {
    position: absolute;

    inset: 0;

    width: 100%;
    height: 100%;

    object-fit: cover;

    opacity: 0;

    transition:
            opacity 0.6s ease,
            transform 0.8s cubic-bezier(.2,.7,.2,1);
}

.photo.loaded img {
    opacity: 1;
}

.photo:hover img {
    transform: scale(1.02);
}


/* =========================================================
   IMAGE LOADING
========================================================= */

.photo::after {
    content: "";

    position: absolute;

    inset: 0;

    background:
            linear-gradient(
                    90deg,
                    transparent,
                    rgba(255,255,255,0.05),
                    transparent
            );

    transform: translateX(-100%);

    animation: shimmer 1.4s infinite;
}

.photo.loaded::after {
    display: none;
}

@keyframes shimmer {

    to {
        transform: translateX(100%);
    }

}


/* =========================================================
   BOTTOM
========================================================= */

.bottom {
    position: fixed;

    left: 35px;
    right: 35px;
    bottom: 25px;

    z-index: 50;

    display: flex;
    align-items: center;

    gap: 25px;
}

.counter {
    flex: 0 0 auto;

    min-width: 65px;

    font-size: 10px;
    letter-spacing: 0.12em;

    opacity: 0.8;
}

.counter-separator {
    margin: 0 4px;
    opacity: 0.4;
}

.progress {
    position: relative;

    width: 100%;
    height: 1px;

    background: rgba(255,255,255,0.2);
}

.progress-bar {
    position: absolute;

    top: 0;
    left: 0;

    width: 0;
    height: 100%;

    background: #fff;

    transition: width 0.15s linear;
}


/* =========================================================
   LIGHTBOX
========================================================= */

.lightbox {
    position: fixed;

    inset: 0;

    z-index: 500;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(0,0,0,0.97);

    opacity: 0;
    visibility: hidden;

    transition:
            opacity 0.35s ease,
            visibility 0.35s ease;
}

.lightbox.open {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    width: 90vw;
    height: 88vh;

    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 100%;

    object-fit: contain;

    user-select: none;
}


/* =========================================================
   LIGHTBOX CONTROLS
========================================================= */

.lightbox-close {
    position: absolute;

    top: 25px;
    right: 30px;

    z-index: 10;

    border: 0;
    background: none;

    color: #fff;

    font-size: 32px;

    cursor: pointer;

    font-weight: 200;
}

.lightbox-arrow {
    position: absolute;

    top: 50%;

    transform: translateY(-50%);

    z-index: 10;

    border: 0;
    background: none;

    color: #fff;

    font-size: 28px;

    cursor: pointer;

    opacity: 0.7;

    transition: opacity 0.2s ease;
}

.lightbox-arrow:hover {
    opacity: 1;
}

.lightbox-prev {
    left: 30px;
}

.lightbox-next {
    right: 30px;
}

.lightbox-counter {
    position: absolute;

    bottom: 25px;

    left: 50%;

    transform: translateX(-50%);

    font-size: 10px;

    letter-spacing: 0.15em;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 700px) {

    .top {
        padding: 20px;
    }

    .brand {
        font-size: 9px;
    }

    .youtube {
        font-size: 10px;
    }


    .track {
        gap: 35vw;

        padding: 0 8vw;
    }


    .scene {
        width: 84vw;
        height: 70vh;
    }


    .scene-single {
        width: 84vw;
        height: 70vh;
    }


    .scene-two {
        width: 90vw;

        grid-template-columns: 1fr;
        grid-template-rows: 1fr 1fr;

        gap: 10px;
    }


    .scene-two .photo {
        height: 100%;
    }


    .scene-three {
        width: 90vw;

        grid-template-columns: 1fr;
        grid-template-rows:
            repeat(3, 1fr);

        gap: 10px;
    }

    .scene-three .photo {
        height: 100%;
    }


    .scene-four {
        width: 90vw;

        gap: 10px;
    }


    .scene-five {
        width: 90vw;

        gap: 8px;
    }


    .bottom {
        left: 20px;
        right: 20px;
        bottom: 18px;

        gap: 15px;
    }


    .counter {
        min-width: 55px;
    }


    .lightbox-content {
        width: 94vw;
        height: 85vh;
    }


    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-close {
        top: 15px;
        right: 20px;
    }

}

html,
body {
    margin: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #030706;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    color: #fff;
}


/* =========================================================
   DARK AMBIENT BACKGROUND
========================================================= */

.gallery {
    position: fixed;
    inset: 0;

    width: 100%;
    height: 100%;

    overflow: hidden;

    background: #030706;
}


/* Barevné světlo */

.gallery::before {
    content: "";

    position: absolute;

    inset: -30%;

    z-index: 0;

    background:
            radial-gradient(
                    ellipse at 18% 45%,
                    rgba(16, 66, 55, 0.38) 0%,
                    rgba(16, 66, 55, 0.16) 25%,
                    transparent 58%
            ),

            radial-gradient(
                    ellipse at 78% 25%,
                    rgba(72, 104, 94, 0.28) 0%,
                    rgba(72, 104, 94, 0.10) 25%,
                    transparent 58%
            ),

            radial-gradient(
                    ellipse at 65% 85%,
                    rgba(8, 45, 39, 0.35) 0%,
                    rgba(8, 45, 39, 0.12) 30%,
                    transparent 60%
            );

    filter: blur(100px);

    transform: scale(1.1);

    animation:
            ambientMove 22s ease-in-out infinite alternate;
}


/* Tmavá vrstva přes ambient */

.gallery::after {
    content: "";

    position: absolute;

    inset: 0;

    z-index: 1;

    background:
            radial-gradient(
                    ellipse at center,
                    rgba(0, 0, 0, 0.05) 0%,
                    rgba(0, 0, 0, 0.30) 65%,
                    rgba(0, 0, 0, 0.62) 100%
            );

    pointer-events: none;
}


@keyframes ambientMove {

    0% {
        transform:
                scale(1.1)
                translate3d(-2%, -1%, 0);
    }

    50% {
        transform:
                scale(1.14)
                translate3d(2%, 1%, 0);
    }

    100% {
        transform:
                scale(1.1)
                translate3d(-1%, 2%, 0);
    }

}


/* =========================================================
   CONTENT ABOVE BACKGROUND
========================================================= */

.viewport {
    position: absolute;
    inset: 0;

    z-index: 2;

    overflow: hidden;

    cursor: grab;
}

.top,
.bottom {
    z-index: 50;
}

