/* ==================================================
   URIART — GALLERY
================================================== */

:root {

    --bg: #f2f2ef;
    --text: #111111;
    --line: rgba(17, 17, 17, .22);

    --transition:
        cubic-bezier(.76, 0, .24, 1);

}


body.dark {

    --bg: #111111;
    --text: #f2f2ef;
    --line: rgba(242, 242, 239, .22);

}


/* ==================================================
   RESET
================================================== */

* {

    margin: 0;
    padding: 0;

    box-sizing: border-box;

}


html {

    scroll-behavior: smooth;

}


body {

    background: var(--bg);
    color: var(--text);

    font-family:
        "Inter",
        sans-serif;

    overflow-x: hidden;

    transition:
        background .4s ease,
        color .4s ease;

}


body.menu-open {

    overflow: hidden;

}


img,
video {

    display: block;

    width: 100%;

}


a {

    color: inherit;
    text-decoration: none;

}


button {

    color: inherit;
    font: inherit;

}


/* ==================================================
   CURSOR
================================================== */

.cursor {

    position: fixed;

    top: 0;
    left: 0;

    width: 10px;
    height: 10px;

    border-radius: 50%;

    background: var(--text);

    pointer-events: none;

    z-index: 9999;

    transform:
        translate(-50%, -50%);

    mix-blend-mode: difference;

    transition:
        width .3s var(--transition),
        height .3s var(--transition);

}


.cursor-text {

    position: absolute;

    top: 50%;
    left: 50%;

    transform:
        translate(-50%, -50%);

    font-family:
        "DM Mono",
        monospace;

    font-size: 8px;

    color: white;

    opacity: 0;

}


.cursor.active {

    width: 80px;
    height: 80px;

}


.cursor.active .cursor-text {

    opacity: 1;

}


/* ==================================================
   HEADER
================================================== */

.header {

    position: fixed;

    top: 0;
    left: 0;

    width: 100%;

    padding: 24px 30px;

    display: grid;

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

    align-items: center;

    z-index: 100;

    mix-blend-mode: difference;

    color: white;

}


.logo {

    font-size: 14px;

    font-weight: 700;

    letter-spacing: -.04em;

}


.header-center {

    text-align: center;

    font-family:
        "DM Mono",
        monospace;

    font-size: 9px;

}


.header-right {

    display: flex;

    justify-content: flex-end;

    gap: 20px;

}


.theme-toggle,
.menu-button {

    border: 0;

    background: transparent;

    cursor: pointer;

    font-family:
        "DM Mono",
        monospace;

    font-size: 9px;

}


/* ==================================================
   MENU
================================================== */

.fullscreen-menu {

    position: fixed;

    inset: 0;

    z-index: 90;

    background: var(--bg);

    padding: 30px;

    display: flex;

    flex-direction: column;

    justify-content: center;

    transform:
        translateY(-100%);

    transition:
        transform .8s var(--transition);

}


.fullscreen-menu.open {

    transform:
        translateY(0);

}


.fullscreen-menu nav {

    display: flex;

    flex-direction: column;

}


.fullscreen-menu nav a {

    font-size:
        clamp(4rem, 11vw, 10rem);

    font-weight: 700;

    line-height: .82;

    letter-spacing: -.08em;

    padding: 12px 0;

    border-bottom:
        1px solid var(--line);

    transition:
        padding-left .4s var(--transition);

}


.fullscreen-menu nav a:hover {

    padding-left: 30px;

}


.menu-footer {

    position: absolute;

    bottom: 30px;

    left: 30px;
    right: 30px;

    display: flex;

    justify-content: space-between;

    font-family:
        "DM Mono",
        monospace;

    font-size: 9px;

}


/* ==================================================
   HERO
================================================== */

.gallery-hero {

    min-height: 100svh;

    padding:
        120px 30px 30px;

    display: flex;

    flex-direction: column;

    justify-content: space-between;

    border-bottom:
        1px solid var(--line);

}


.gallery-meta {

    display: flex;

    justify-content: space-between;

    font-family:
        "DM Mono",
        monospace;

    font-size: 9px;

}


.gallery-title {

    margin: auto 0;

}


.gallery-title h1 {

    font-size:
        clamp(5rem, 15vw, 17rem);

    font-weight: 700;

    line-height: .78;

    letter-spacing: -.09em;

}


.gallery-title h1 span {

    font-family:
        "DM Mono",
        monospace;

}


.gallery-bottom {

    display: flex;

    justify-content: space-between;

    align-items: flex-end;

}


.gallery-bottom p {

    max-width: 280px;

    font-size: 14px;

    line-height: 1.5;

}


.scroll-indicator {

    display: flex;

    flex-direction: column;

    align-items: flex-end;

    gap: 12px;

    font-family:
        "DM Mono",
        monospace;

    font-size: 8px;

}


.scroll-line {

    width: 1px;
    height: 50px;

    background: var(--text);

    animation:
        scrollLine 1.8s infinite;

}


@keyframes scrollLine {

    0% {

        transform:
            scaleY(0);

        transform-origin:
            top;

    }

    50% {

        transform:
            scaleY(1);

        transform-origin:
            top;

    }

    51% {

        transform-origin:
            bottom;

    }

    100% {

        transform:
            scaleY(0);

        transform-origin:
            bottom;

    }

}


/* ==================================================
   INTRO
================================================== */

.gallery-intro {

    display: grid;

    grid-template-columns:
        25% 75%;

    padding:
        180px 30px;

    border-bottom:
        1px solid var(--line);

}


.gallery-intro-number {

    display: flex;

    flex-direction: column;

    gap: 8px;

    font-family:
        "DM Mono",
        monospace;

    font-size: 9px;

}


.gallery-intro-text h2 {

    font-size:
        clamp(4rem, 9vw, 12rem);

    font-weight: 600;

    line-height: .78;

    letter-spacing: -.08em;

}


/* ==================================================
   FILTERS
================================================== */

.gallery-filters {

    position: sticky;

    top: 0;

    z-index: 50;

    padding:
        25px 30px;

    display: flex;

    justify-content: space-between;

    align-items: center;

    border-bottom:
        1px solid var(--line);

    background:
        rgba(242, 242, 239, .94);

    backdrop-filter:
        blur(12px);

}


body.dark .gallery-filters {

    background:
        rgba(17, 17, 17, .94);

}


.filters-label {

    font-family:
        "DM Mono",
        monospace;

    font-size: 8px;

}


.filters {

    display: flex;

    gap: 25px;

}


.filter {

    position: relative;

    border: 0;

    background: transparent;

    cursor: pointer;

    font-family:
        "DM Mono",
        monospace;

    font-size: 8px;

    padding-bottom: 5px;

}


.filter::after {

    content: "";

    position: absolute;

    bottom: 0;
    left: 0;

    width: 0;
    height: 1px;

    background: currentColor;

    transition:
        width .3s ease;

}


.filter:hover::after,
.filter.active::after {

    width: 100%;

}


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

.uriart-gallery {

    display: grid;

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

    gap:
        120px 30px;

    padding:
        180px 30px;

}


.gallery-card {

    width: 100%;

}


.gallery-card-large {

    grid-column:
        1 / -1;

}


.gallery-card-wide {

    grid-column:
        1 / -1;

    width: 75%;

}


.gallery-card-offset {

    padding-top: 180px;

}


.gallery-card.hidden {

    display: none;

}


/* ==================================================
   IMAGES
================================================== */

.gallery-image-wrapper {

    width: 100%;

    overflow: hidden;

    background: var(--text);

}


.gallery-image-wrapper img {

    transition:
        transform 1s var(--transition);

}


.gallery-card:hover
.gallery-image-wrapper img {

    transform:
        scale(1.03);

}


/* ==================================================
   VERTICAL VIDEOS — 9:16
================================================== */

.gallery-video-card {

    max-width: 420px;

}


.video-wrapper {

    position: relative;

    width: 100%;

    aspect-ratio: 9 / 16;

    overflow: hidden;

    background: #000;

    cursor: pointer;

}


.gallery-video {

    width: 100%;
    height: 100%;

    object-fit: cover;

    transition:
        transform 1s var(--transition);

}


.gallery-video-card:hover
.gallery-video {

    transform:
        scale(1.03);

}


/* ==================================================
   VIDEO PLAY BUTTON
================================================== */

.video-play {

    position: absolute;

    top: 50%;
    left: 50%;

    width: 70px;
    height: 70px;

    transform:
        translate(-50%, -50%);

    border-radius: 50%;

    border:
        1px solid rgba(255, 255, 255, .8);

    background:
        rgba(0, 0, 0, .2);

    backdrop-filter:
        blur(5px);

    color: white;

    cursor: pointer;

    font-size: 18px;

    transition:
        opacity .3s ease,
        transform .3s ease;

}


.gallery-video-card.playing
.video-play {

    opacity: 0;

    pointer-events: none;

}


/* ==================================================
   VIDEO SOUND
================================================== */

.video-sound {

    position: absolute;

    right: 15px;
    bottom: 15px;

    width: 36px;
    height: 36px;

    border-radius: 50%;

    border:
        1px solid rgba(255, 255, 255, .6);

    background:
        rgba(0, 0, 0, .25);

    backdrop-filter:
        blur(5px);

    color: white;

    cursor: pointer;

    font-size: 12px;

}


/* ==================================================
   CAPTION
================================================== */

.gallery-caption {

    display: flex;

    justify-content: space-between;

    margin-top: 10px;

    font-family:
        "DM Mono",
        monospace;

    font-size: 8px;

}


/* ==================================================
   REVEAL
================================================== */

.reveal {

    opacity: 0;

    transform:
        translateY(50px);

    transition:
        opacity 1s ease,
        transform 1s var(--transition);

}


.reveal.visible {

    opacity: 1;

    transform:
        translateY(0);

}


/* ==================================================
   END
================================================== */

.gallery-end {

    min-height: 100svh;

    padding: 30px;

    display: flex;

    flex-direction: column;

    justify-content: space-between;

    border-top:
        1px solid var(--line);

}


.gallery-end-meta {

    display: flex;

    justify-content: space-between;

    font-family:
        "DM Mono",
        monospace;

    font-size: 9px;

}


.gallery-end h2 {

    margin: auto 0;

    font-size:
        clamp(5rem, 15vw, 17rem);

    font-weight: 700;

    line-height: .78;

    letter-spacing: -.09em;

}


.gallery-end h2 span {

    font-family:
        "DM Mono",
        monospace;

}


.gallery-back {

    font-family:
        "DM Mono",
        monospace;

    font-size: 9px;

    transition:
        transform .3s var(--transition);

}


.gallery-back:hover {

    transform:
        translateX(-10px);

}


/* ==================================================
   FOOTER
================================================== */

.footer {

    padding:
        25px 30px;

    display: flex;

    justify-content: space-between;

    font-family:
        "DM Mono",
        monospace;

    font-size: 8px;

    border-top:
        1px solid var(--line);

}


/* ==================================================
   RESPONSIVE
================================================== */

@media (max-width: 900px) {

    .gallery-intro {

        grid-template-columns:
            1fr;

        gap: 80px;

    }

}


@media (max-width: 600px) {

    .cursor {

        display: none;

    }


    .header {

        padding: 20px;

        grid-template-columns:
            1fr auto;

    }


    .header-center {

        display: none;

    }


    .fullscreen-menu {

        padding: 20px;

    }


    .fullscreen-menu nav a {

        font-size:
            clamp(3.5rem, 16vw, 6rem);

    }


    .menu-footer {

        left: 20px;
        right: 20px;
        bottom: 20px;

    }


    .gallery-hero {

        padding:
            100px 20px 20px;

    }


    .gallery-title h1 {

        font-size:
            clamp(4.5rem, 21vw, 8rem);

    }


    .gallery-bottom {

        gap: 30px;

    }


    .gallery-bottom p {

        max-width: 200px;

        font-size: 13px;

    }


    .gallery-intro {

        padding:
            100px 20px;

        gap: 50px;

    }


    .gallery-intro-text h2 {

        font-size:
            clamp(3.5rem, 16vw, 7rem);

    }


    .gallery-filters {

        padding: 20px;

        display: block;

    }


    .filters-label {

        margin-bottom: 20px;

    }


    .filters {

        gap: 15px;

        flex-wrap: wrap;

    }


    .uriart-gallery {

        grid-template-columns:
            1fr;

        gap: 80px;

        padding:
            100px 20px;

    }


    .gallery-card-large,
    .gallery-card-wide {

        grid-column: auto;

        width: 100%;

    }


    .gallery-card-offset {

        padding-top: 0;

    }


    .gallery-video-card {

        max-width: 100%;

        width: min(100%, 420px);

        margin: 0 auto;

    }


    .gallery-end {

        padding: 20px;

    }


    .gallery-end h2 {

        font-size:
            clamp(4.5rem, 20vw, 8rem);

    }


    .footer {

        padding: 20px;

        flex-direction: column;

        gap: 15px;

    }

}