/* Revealer */
.revealer {
    position: fixed;
    width: 100vw;
    height: 100vh;
    top: 0;
    left: 0;
    transform: rotate(-8deg);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.revealer__inner {
    background-color: var(--color-reveal-bg);
    width: 200%;
    height: 200%;
    position: relative;
    flex: none;
}

/* Grid */
.grid {
    position: absolute;
    display: grid;
    height: 400px;
    width: 100%;
    left: 0;
    top: 0;
    grid-template-columns: 30% 30% 30%;
    grid-column-gap: 5%;
    grid-template-areas: 'griditem-left griditem-center griditem-right';
}

.grid--slideshow,
.grid--interaction {
    left: -5%;
    width: 110%;
    pointer-events: none;
}

.grid--slideshow {
    top: 17rem;
    transform: rotate(-8deg);
}

.grid--titles {
    align-items: center;
    text-align: center;
    cursor: default;
}

.titles-wrap {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 1000;
    pointer-events: none;
    transform: rotate(16deg);
}

.grid__item {
    display: flex;
    justify-content: center;
    position: relative;
    pointer-events: none;
    opacity: 0;
    grid-area: griditem-center;
}

.grid__item--slide {
    flex-direction: column;
    width: 100%;
}

.grid__item--title {
    font-size: 8vw;
    margin: 0;
    font-family: var(--font-display);
    font-weight: 600;
    color: white;
    width: 100%;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: break-word;
    line-height: 1;
}

.grid__item--title span {
    display: inline-block;
}

.grid__item--center,
.grid__item--left,
.grid__item--right {
    opacity: 1;
    cursor: pointer;
}

.grid__item--left {
    grid-area: griditem-left;
}

.grid__item--center {
    grid-area: griditem-center;
}

.grid__item--right {
    grid-area: griditem-right;
}

.grid__item--cursor {
    pointer-events: auto;
}

.content-open .grid__item--cursor {
    display: none;
}

.number {
    font-size: 2rem;
    -webkit-text-stroke: 1.5px var(--color-number);
    text-stroke: 1.5px var(--color-number);
    -webkit-text-fill-color: transparent;
    text-fill-color: transparent;
    color: transparent;
    line-height: 1;
    margin: 0 0 0.5rem 0;
    font-weight: 700;
}

.img-wrap {
    width: 100%;
    overflow: hidden;
    position: relative;
    height: 100%;
}

.img-wrap::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    pointer-events: none;

}

.img {
    width: calc(100% + 40px);
    height: 100%;
    left: -20px;
    top: 0;
    background-size: cover;
    background-position: 50% 50%;
    position: absolute;
    pointer-events: none;
}

.caption {
    text-transform: uppercase;
    letter-spacing: 0.1rem;
    font-size: 0.875rem;
    line-height: 1.5;
    font-weight: 400;
    margin: 0.75rem 0 0 0;
    color: var(--color-caption);
}

.caption::before {
    content: '---------';
    margin: 0 0.5rem 0 0;
    letter-spacing: -0.15rem;
}

.img-wrap,
.caption,
.number,
.grid__item--title,
.grid__item--title span,
.revealer__inner {
    will-change: transform;
}

.grid__item--cursor.grid__item--left::after,
.grid__item--cursor.grid__item--right::after {
    position: absolute;
    left: calc(50% - 30px);
    cursor: pointer;
}

.grid__item--cursor.grid__item--left::after {
    top: 70%;
}

.grid__item--cursor.grid__item--right::after {
    top: 20%;
}

.grid__item--cursor.grid__item--left::after {
    content: url("data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' width='61px' height='44px' viewBox='0 0 61 44' style='enable-background:new 0 0 61 44;' xml:space='preserve'%3E %3Cpath fill='%23ffffff' d='M.613 21.671L21.584.7l5.642 5.642-11.74 11.74H60.45v7.978H15.487l11.74 11.739-5.643 5.642L.613 22.469a.57.57 0 0 1 0-.798z'/%3E %3C/svg%3E");
}

.grid__item--cursor.grid__item--right::after {
    content: url("data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' width='61px' height='44px' viewBox='0 0 61 44' style='enable-background:new 0 0 61 44;' xml:space='preserve'%3E %3Cpath fill='%23ffffff' d='M60.287 21.671L39.316.7l-5.642 5.642 11.74 11.74H.45v7.978h44.963l-11.74 11.739 5.643 5.642 20.971-20.972a.57.57 0 0 0 0-.798z'/%3E %3C/svg%3E");
}

@media screen and (min-width: 53em) {
    body {
        overflow: hidden;
    }

    .grid {
        height: 100vh;
        grid-template-columns: repeat(3, calc((100% - 6vw) / 3));
        grid-column-gap: 8vw;
    }

    .grid--slideshow {
        top: 0;
    }

    .grid--interaction {
        grid-template-columns: repeat(3, calc(100% / 3));
        grid-column-gap: 5vw;
        height: 60vh;
        top: 50%;
        transform: translateY(-50%);
    }

    .number {
        font-size: 4.25vw;
    }

    .img-wrap {
        height: 35vw;
    }

    .grid__item--cursor.grid__item--left::after,
    .grid__item--cursor.grid__item--right::after {
        display: none;
    }

    .grid__item--cursor.grid__item--left {
        cursor: url("data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' width='61px' height='44px' viewBox='0 0 61 44' style='enable-background:new 0 0 61 44;' xml:space='preserve'%3E %3Cpath fill='%23ffffff' d='M.613 21.671L21.584.7l5.642 5.642-11.74 11.74H60.45v7.978H15.487l11.74 11.739-5.643 5.642L.613 22.469a.57.57 0 0 1 0-.798z'/%3E %3C/svg%3E") 30 22, sw-resize;
    }

    .grid__item--cursor.grid__item--center {
        cursor: url("data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' width='52px' height='52px' viewBox='0 0 52 52' style='enable-background:new 0 0 52 52;' xml:space='preserve'%3E %3Cpath fill='%23ffffff' d='M29.889 30.05l-.036 21.361c-.222.213-7.654.213-7.876 0l-.007-21.358-21.52.007v-7.978l21.518.036L21.96.571h7.978l-.037 21.56 21.388.037c.213.222.213 7.654 0 7.876l-21.401.007z'/%3E %3C/svg%3E") 26 26, crosshair;
    }

    .grid__item--cursor.grid__item--right {
        cursor: url("data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' width='61px' height='44px' viewBox='0 0 61 44' style='enable-background:new 0 0 61 44;' xml:space='preserve'%3E %3Cpath fill='%23ffffff' d='M60.287 21.671L39.316.7l-5.642 5.642 11.74 11.74H.45v7.978h44.963l-11.74 11.739 5.643 5.642 20.971-20.972a.57.57 0 0 0 0-.798z'/%3E %3C/svg%3E") 30 22, ne-resize;
    }

    .dark-mode .grid__item--cursor.grid__item--left {
        cursor: url("data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' width='61px' height='44px' viewBox='0 0 61 44' style='enable-background:new 0 0 61 44;' xml:space='preserve'%3E %3Cpath fill='%23bb3a3a' d='M.613 21.671L21.584.7l5.642 5.642-11.74 11.74H60.45v7.978H15.487l11.74 11.739-5.643 5.642L.613 22.469a.57.57 0 0 1 0-.798z'/%3E %3C/svg%3E") 30 22, sw-resize;
    }

    .dark-mode .grid__item--cursor.grid__item--center {
        cursor: url("data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' width='52px' height='52px' viewBox='0 0 52 52' style='enable-background:new 0 0 52 52;' xml:space='preserve'%3E %3Cpath fill='%23bb3a3a' d='M29.889 30.05l-.036 21.361c-.222.213-7.654.213-7.876 0l-.007-21.358-21.52.007v-7.978l21.518.036L21.96.571h7.978l-.037 21.56 21.388.037c.213.222.213 7.654 0 7.876l-21.401.007z'/%3E %3C/svg%3E") 26 26, crosshair;
    }

    .dark-mode .grid__item--cursor.grid__item--right {
        cursor: url("data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' width='61px' height='44px' viewBox='0 0 61 44' style='enable-background:new 0 0 61 44;' xml:space='preserve'%3E %3Cpath fill='%23bb3a3a' d='M60.287 21.671L39.316.7l-5.642 5.642 11.74 11.74H.45v7.978h44.963l-11.74 11.739 5.643 5.642 20.971-20.972a.57.57 0 0 0 0-.798z'/%3E %3C/svg%3E") 30 22, ne-resize;
    }
}

/* Mobile Layout */
@media screen and (max-width: 53em) {
    body {
        overflow-y: auto !important;
        height: auto !important;
    }

    .grid--slideshow {
        position: relative;
        top: 0;
        left: 0;
        width: 100%;
        height: auto;
        transform: none;
        display: flex;
        flex-direction: column;
        padding-top: 2rem;
        /* Reduced from 8rem since info-bar is relative */
        padding-bottom: 4rem;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .grid__item--slide {
        width: 100%;
        height: auto;
        opacity: 1;
        transform: none !important;
        margin-bottom: 6rem;
        pointer-events: auto;
        cursor: pointer;
    }

    .img-wrap {
        height: 60vh;
        transform: none !important;
        width: 100%;
    }

    .img {
        transform: none !important;
        width: 100%;
        left: 0;
        height: 100%;
        position: relative;
    }

    .number {
        transform: none !important;
        opacity: 1 !important;
        font-size: 4rem;
    }

    .caption {
        transform: none !important;
        opacity: 1 !important;
    }

    .grid__item--title {
        font-size: 15vw;
        line-height: 0.9;
        margin-bottom: 1rem;
    }

    /* Hide desktop-only elements */
    .titles-wrap,
    .grid--interaction,
    .revealer {
        display: none;
    }
}