:root {
    --bg-color: var(--color-white);
    --text-color: var(--color-dark);
    --accent-color: var(--color-black);
}



.hero-video {
    position: relative;
    width: 100%;
    height: 100svh;
    background-color: transparent;
    color: white;
    overflow: hidden;
    z-index: 105;
}

.hero-video video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-video__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    pointer-events: none;
    padding: 3vw;
    z-index: 110;
}

.hero-video__gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top,
            rgba(0, 0, 0, 0.8) 0%,
            rgba(0, 0, 0, 0.2) 50%,
            transparent 100%);
    z-index: 1;
    pointer-events: none;
}

@media (max-width: 640px) {
    .hero-video__overlay {
        padding: 2.5vw;
    }
}

.hero-video__title {
    font-size: 1.5vw;
    font-weight: 600;
    text-align: left;
    max-width: 64vw;
    letter-spacing: -0.05em;
    line-height: 1.1;
    margin: 0;
}

.layout__title {
    font-size: 4vw;
    font-weight: 600;
    text-align: left;
    letter-spacing: -0.05em;
    line-height: 1.1;
    margin-bottom: 2.5vw;
    color: var(--text-color);
}

.hero-video__subtitle {
    font-size: 1.125vw;
    font-weight: 300;
    margin-top: 0.3vw;
    opacity: 0.9;
    letter-spacing: 0.05em;
}

.layout {
    display: flex;
    width: 100%;
    min-height: 100svh;
    overflow: hidden;
    background: var(--bg-color);
}

.layout__content {
    width: 45%;
    padding: 8vw 5vw;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    background: var(--bg-color);
    z-index: 10;
    align-self: flex-start;
}

.description__text {
    font-size: 1.5vw;
    line-height: 1.4;
    font-weight: 300;
    opacity: 1;
    color: gray;
    margin-bottom: 3vw;
}

.layout__gallery {
    width: 55%;
    position: relative;
    background: var(--bg-color);
    padding: 0;
    overflow: hidden;
}

.gallery {
    position: relative;
    width: 100%;
    min-height: 400vh;
    margin: 2vw;
}

.gallery__item {
    position: absolute;
    transition: opacity 0.6s ease;
}

.gallery__image-container {
    position: relative;
    width: 100%;
    height: 0;
}

.gallery__image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.u-fade-on-scroll {
    opacity: 1;
    transition: opacity 0.8s ease-out;
    cursor: pointer;
}

.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: auto;
    height: auto;
    padding: 0.2vw 0.667vw;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(0.533vw);
    -webkit-backdrop-filter: blur(0.533vw);
    color: #000;
    font-size: 1.133vw;
    pointer-events: none;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    border-radius: 0.267vw;
}

.lightbox {
    display: none;
    position: fixed;
    z-index: 20000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0);
    justify-content: center;
    align-items: center;
    cursor: zoom-out;
}

.lightbox-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    will-change: clip-path, transform;
}

.lightbox__container {
    position: relative;
    width: 90vw;
    max-height: 90vh;
    aspect-ratio: 16 / 9;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.lightbox-img--back,
.lightbox-img--front {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.lightbox-img--back {
    z-index: 100;
}

.lightbox-img--front {
    z-index: 101;
}

.lightbox__prev,
.lightbox__next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    width: 4.667vw;
    height: 4.667vw;
    cursor: pointer;
    z-index: 1001;
    padding: 1.333vw;
    opacity: 0;
    transition:
        opacity 0.4s ease,
        transform 0.4s ease;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox__prev {
    left: 1.333vw;
}

.lightbox__next {
    right: 1.333vw;
}

.lightbox__next svg {
    transform: scaleX(-1);
}

.lightbox__prev:hover,
.lightbox__next:hover {
    opacity: 1 !important;
}

.lightbox__prev:active {
    transform: translateY(-50%) translateX(-0.533vw);
}

.lightbox__next:active {
    transform: translateY(-50%) translateX(0.533vw);
}

.lightbox__close {
    position: absolute;
    top: 2vw;
    right: 2.667vw;
    color: #fff;
    width: 2.667vw;
    height: 2.667vw;
    cursor: pointer;
    z-index: 1001;
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition:
        transform 0.4s ease,
        opacity 0.4s ease;
}

.lightbox__close:hover {
    transform: rotate(90deg);
    color: #ddd;
}

.lightbox__meta {
    position: absolute;
    bottom: 2.667vw;
    left: 2.667vw;
    color: #fff;
    z-index: 1002;
    pointer-events: none;
    opacity: 0;
}

.lightbox__author {
    font-size: 1.2vw;
    font-weight: 500;
    margin-bottom: 0.267vw;
    overflow: hidden;
    line-height: 1;
}

.lightbox__title {
    font-size: 1vw;
    font-weight: 300;
    margin-bottom: 0.533vw;
    opacity: 0.8;
    overflow: hidden;
    line-height: 1;
}

.lightbox__residency {
    font-size: 0.8vw;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.6;
    overflow: hidden;
    line-height: 1;
}

.lightbox__author div,
.lightbox__title div,
.lightbox__residency div {
    clip-path: inset(100% 0 0 0);
    transform: translateY(100%);
}

/* Brak mapowania = brak atrybutu / pusty tekst — nie rezerwuj miejsca w meta */
.lightbox__meta > .lightbox__author:has(> div:empty),
.lightbox__meta > .lightbox__title:has(> div:empty),
.lightbox__meta > .lightbox__residency:has(> div:empty) {
    display: none;
    margin: 0;
}

.title-line {
    display: inline-block;
    width: 7vw;
    height: 0.5vw;
    background-color: currentColor;
    vertical-align: middle;
    margin: 0 0.7vw;
    transform: translateY(-0.1vw);
}

@media (max-width: 768px) {

    .hero-video__title {
        font-size: 6vw;
        max-width: 90vw;
    }

    .hero-video__subtitle {
        font-size: 4vw;
        margin-top: 1vw;
    }

    .layout {
        flex-direction: column;
    }

    .layout__content {
        width: 100%;
        padding: 5vw 6vw 15vw 6vw;
        order: 2;
    }

    .layout__title {
        font-size: 8vw;
        margin-bottom: 6vw;
    }

    .title-line {
        width: 15vw;
        height: 1vw;
    }

    .description__text {
        font-size: 4.5vw;
        line-height: 1.6;
    }

    .layout__gallery {
        width: 100%;
        order: 1;
        padding: 4vw;
        overflow: visible;
    }

    .gallery {
        /* JS nadpisze min-height po układzie; start zapobiega zerowej wysokości przy top:% */
        min-height: 70vh;
        margin: 0;
        display: block;
        position: relative;
    }

    .lightbox__prev,
    .lightbox__next {
        width: 12vw;
        height: 12vw;
        padding: 2vw;
    }

    .lightbox__close {
        top: 4vw;
        right: 4vw;
        width: 8vw;
        height: 8vw;
    }

    /* aspect-ratio wymagane: dzieci (img/video) są position:absolute i nie nadają wysokości —
       przy aspect-ratio:auto kontener miał 0px wysokości → czarne tło, dźwięk bez obrazu */
    .lightbox__container {
        width: 100%;
        max-width: 100vw;
        max-height: 85vh;
        aspect-ratio: 16 / 9;
        height: auto;
    }

    .lightbox-img--back,
    .lightbox-img--front {
        object-fit: contain;
    }

    .lightbox__author {
        font-size: 4vw;
        margin-bottom: 1vw;
    }

    .lightbox__title {
        font-size: 3.5vw;
        margin-bottom: 1.5vw;
    }

    .lightbox__residency {
        font-size: 2.5vw;
    }

    .lightbox__meta {
        bottom: 8vw;
        left: 4vw;
    }

    .custom-cursor {
        display: none !important;
    }
}

/* Media Highlights */
.media-highlights {
    margin-top: 5vw;
}

.media-highlights__title {
    font-size: 1.2vw;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 2vw;
    letter-spacing: 0.1em;
    opacity: 0.8;
}

.media-highlights__grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.3vw;
    align-items: flex-start;
    padding-bottom: 3vw;
    width: 100%;
}

.media-highlights__item {
    position: relative;
    width: 2.2vw;
    height: 5vw;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    cursor: pointer;
    overflow: visible;
    border-radius: 0.2vw;
    filter: grayscale(100%);
    opacity: 0.6;
    flex-shrink: 0;
}

.media-highlights__play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 2vw;
    height: 2vw;
    color: white;
    opacity: 0.8;
    pointer-events: none;
    filter: drop-shadow(0 0.2vw 0.5vw rgba(0,0,0,0.3));
    transition: opacity 0.3s ease, scale 0.3s ease;
}

.media-highlights__label {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 1vw;
    font-size: 0.8vw;
    font-weight: 600;
    color: var(--color-dark);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
}


.lightbox-video {
    display: none;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

#lightbox-video-back {
    z-index: 104;
}

#lightbox-video-front {
    z-index: 105;
}

@media (max-width: 768px) {
    .media-highlights {
        margin-top: 2.5rem;
        /* pierwszy rząd siatki nie wchodzi pod fixed header (logo / menu) */
        padding-top: max(0.5rem, env(safe-area-inset-top, 0px));
    }

    .media-highlights__title {
        font-size: 0.75rem;
        margin-bottom: 1rem;
    }

    /* Siatka: 3 kolumny obok siebie (tablet / telefon) */
    .media-highlights__grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.75rem 0.625rem;
        padding-bottom: 2rem;
        width: 100%;
    }

    .media-highlights__item {
        width: 100%;
        height: auto;
        min-height: 0;
        aspect-ratio: 3 / 4;
        border-radius: 0.5rem;
        flex-shrink: unset;
        filter: grayscale(0%);
        opacity: 1;
    }

    .media-highlights__item.active,
    .media-highlights__item:hover {
        width: 100%;
        height: auto;
        aspect-ratio: 3 / 4;
        filter: grayscale(0%);
        opacity: 1;
    }

    .media-highlights__label {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        margin-top: 0;
        padding: 0.55rem 0.6rem 0.5rem;
        font-size: clamp(0.625rem, 2.75vw, 0.8125rem);
        font-weight: 600;
        color: #fff;
        text-transform: none;
        letter-spacing: 0.02em;
        white-space: normal;
        line-height: 1.25;
        overflow-wrap: anywhere;
        opacity: 1;
        background: linear-gradient(
            to top,
            rgba(0, 0, 0, 0.78) 0%,
            rgba(0, 0, 0, 0.2) 55%,
            transparent 100%
        );
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
    }

    .media-highlights__play {
        width: 2.25rem;
        height: 2.25rem;
    }
}
