body,
html {
    max-width: 100vw;
    max-height: 100vh;
    overflow: hidden;
}

video {
    position: absolute;

    width: 100vw;
    height: 100vh;
    object-fit: cover;

    top: 50%;
    left: 50%;

    translate: -50% -50%;
}

.subtitles {
    position: absolute;
    bottom: 35vh;
    left: 49.3%;
    translate: -50% 0;

    text-align: center;
    text-wrap: balance;
    max-width: 25vw;
    font-size: 1.1em;
    color: white;

    text-shadow: 1px 1px 0 black, -1px -1px 0 black, -1px 1px 0 black, 1px -1px 0 black, 2px 2px 0 black, -2px -2px 0 black, -2px 2px 0 black, 2px -2px 0 black;
}

.subtitles.hide {
    display: none;
}

#ingressos {
    height: 100vh;
    width: 100vw;
    display: grid;

    grid-template-columns: 1fr 25vw 1fr;
    grid-auto-rows: calc((100vh - 10rem) / round(up, var(--count-ingressos) / 2) - 2rem);
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding: 5rem 5vw;

    position: absolute;
    top: 0;
    left: 0;
    margin: 0;

    opacity: 1;
    transition: opacity 750ms;
}

#ingressos #spacer {
    grid-row: 1 / 99;
    grid-column: 2;
}

@media (max-width: 800px) {
    .subtitles {
        top: 2rem;
        bottom: auto;

        max-width: none;
        width: 80%;
    }

    #ingressos {
        top: auto;
        bottom: 3vh;

        height: auto;
        grid-template-columns: repeat(6, 1fr);
        grid-auto-rows: auto;

        gap: 0.5rem 0;
        padding: 2vh 2rem;
    }

    #ingressos li {
        grid-column: span 2;
    }

    #ingressos #spacer {
        display: inline;
        content: calc(round(up, var(--count-ingressos) / 3) * 3 - round(down, var(--count-ingressos) / 3) * 3);
        grid-row: calc(round(up, var(--count-ingressos) / 3));
        grid-column: calc(round(up, var(--count-ingressos) / 3) * 3 - round(down, var(--count-ingressos) / 3) * 3);
    }
}


@keyframes wobble {

    from,
    to {
        rotate: -5deg;
        translate: 5px 0;
    }

    50% {
        rotate: 5deg;
        translate: 0;
    }

}

#ingressos li,
#ingressos a {
    max-width: 100%;
    max-height: 100%;

    width: 100%;
    height: 100%;

    display: flex;
    justify-content: center;
    align-items: center;
}

#ingressos img {
    max-width: 100%;
    max-height: 100%;
    scale: 0.9;

    animation: wobble 30s linear infinite;
    transition: scale 350ms;
}

#ingressos img:hover {
    scale: 1;
    filter: drop-shadow(0 0 1.2rem #e75c00);
}

#ingressos.hide {
    opacity: 0;
}

body>img {
    position: absolute;
    cursor: pointer;

    opacity: 0.5;
    transition: opacity 350ms;

    z-index: 1;
    bottom: 7vh;
    left: 50vw;
    translate: -50%;

    width: 2rem;
    height: 2rem;
}

body>img:hover {
    opacity: 1;
}

#overlay {
    position: absolute;
    top: 0;
    left: 0;

    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;

    cursor: pointer;
    color: white;

    z-index: 999;
    width: 100vw;
    height: 100vh;

    background-color: rgba(0, 0, 0, 0.95);
    transition: opacity 250ms;
}

#overlay.hide {
    opacity: 0;
    pointer-events: none;
}

@keyframes fade-in {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

#overlay img {
    width: 30vmin;
    aspect-ratio: 1 / 1;
    object-fit: contain;

    margin-bottom: 3em;
    animation: fade-in 1500ms 1000ms ease-out both;

    filter: drop-shadow(0 0 1.2rem #e75c00);
}

#overlay h1 {
    text-transform: uppercase;
    font-size: 1.1em;

    animation: fade-in 1500ms 3000ms ease-out both, fade-in 1000ms 4500ms infinite alternate;
}