/* BANNERS */
#bannerSection {
    display: flex;
    height: 700px;
    max-height: 80%;
    width: 100%;
    max-height: 90vh;
    align-content: center;
    align-items: center;
    background-attachment: scroll;
    background-size: cover;
    user-select: none;
    position: relative;
    overflow: hidden;
}

#bannerCanvas,
#bannerCanvasPlay {
    display: block;
    width: 100vw;
    height: 750px;
}

#bannerCanvas {
    background-image: url(../img/banner-bg.webp);
}

#bannerCanvasPlay {
    background-image: url(../img/bannerPlay-bg.webp);
}

#bannerWithTextSection {
    display: flex;
    justify-content: left;
    align-items: center;
    overflow: hidden;
    view-transition-name: banner;
}

#bannerTextImg {
    padding: 64pt;
    padding-bottom: 14pt;
    width: 500px;
    view-transition-name: bannerText;
    transition: filter 1s, opacity 1s, scale 1.3s, top 0.2s;
    transform-origin: center center;
    position: absolute;
    z-index: 120;

    @starting-style {
        filter: blur(25px);
        opacity: 0;
        scale: 0.5;
    }

    transition-timing-function: linear(0, 0.02 2.1%, 0.081 4.7%, 0.467 15.7%, 0.645, 0.778 28.5%, 0.872 35.8%, 0.909 40.1%, 0.938 44.9%, 0.977 56.5%, 0.994 72.3%, 1);
}

#bannerBG {
    height: 750px;
    width: 100%;
    align-content: center;
    align-items: center;
    background-attachment: scroll;
    background-size: cover;
    user-select: none;
    position: relative;
    box-sizing: border-box;
}

#bannerSection::after,
#playTop::after {
    content: "";
    background-image: url("../img/grain.webp");
    height: 750px;
    width: 100%;
    opacity: 0.2;
    position: absolute;
    mix-blend-mode: soft-light;
    animation: grain 0.6s steps(1) infinite;
}

#bannerSection::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: top;
    z-index: -1;
}

#banner {
    display: block;
}

/* GRID */
#grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 36pt;
    flex-wrap: wrap;
    margin-top: 22pt;
    padding: var(--grid-margins);
    padding-top: 0;
    justify-content: center;
    box-sizing: border-box;
    max-width: 2560px;
}

#gridInline {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 36pt;
    flex-wrap: wrap;
    margin-top: 0;
    padding: var(--grid-margins);
    padding-top: 22pt;
    justify-content: center;
    box-sizing: border-box;
}

@media (max-width: 1300px) {
    #grid {
        grid-template-columns: repeat(3, 1fr);
    }

    #gridInline {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    #grid {
        grid-template-columns: repeat(2, 1fr);
    }

    #gridInline {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    #grid {
        grid-template-columns: repeat(1, 1fr);
    }

    #gridInline {
        grid-template-columns: repeat(1, 1fr);
    }
}


#gridWrapper {
    height: 100%;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* THUMBNAILS */
.thumbnail {
    background-size: cover;
    display: flex;
    align-content: left;
    justify-content: left;
    align-items: end;
    aspect-ratio: 157/192 !important;
    /* flex: 1 1 300px; */
    margin: 0;
    width: 100%;
    position: relative;
    overflow: hidden;
    transition: scale 0.3s, opacity 0.6s, filter 0.5s;
    user-select: none;
    mask-border: url("../img/squircleMask.svg") 49% fill / 42px;
    will-change: transform;
    border-radius: 28px;
    box-sizing: border-box;
}

.thumbnail:hover:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%);
    transition: opacity 0.3s, scale 0.3s;
    opacity: 0.1;
    pointer-events: none;
    z-index: 400000;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 15px 53px 0 rgba(255, 255, 255, 0.05), inset 0 21px 43px 0 rgba(0, 0, 0, 0.07), inset 0 1px 1px -1px rgba(255, 255, 255, 0.50), inset 0 -1px 1px -1px rgba(255, 255, 255, 0.50), inset 0 -8px 13px -3px rgba(255, 255, 255, 0.08);
    mix-blend-mode: overlay;
}

.photoThumbnail {
    display: flex;
    align-content: left;
    justify-content: left;
    align-items: end;
    aspect-ratio: 4/3 !important;
    width: 100%;
    margin: 0;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    transition: scale 0.3s, opacity 0.6s, filter 0.5s;
    user-select: none;
    mask-border: url("../img/squircleMask.svg") 49% fill / 42px;
    will-change: transform;
    border-radius: 28px;
}

.thumbnailPlaceholder {
    display: flex;
    align-content: left;
    justify-content: left;
    align-items: end;
    aspect-ratio: 157/192 !important;
    flex: 1 1 300px;
    margin: 18pt;
    position: relative;
    overflow: hidden;
    cursor: var(--cursor-default) !important;
}

.thumbnailPlaceholderPhoto {
    background: transparent;
    display: flex;
    align-content: center;
    justify-content: center;
    align-items: center;
    aspect-ratio: 157/192;
    flex: 1 1 300px;
    margin: 18pt;
    position: relative;
    overflow: hidden;
    cursor: var(--cursor-default) !important;
}

.background-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    pointer-events: none;
    transition: opacity 0.1s ease-in-out;
    opacity: 0;
}

.video-thumb .thumbTextBoth {
    position: relative;
    z-index: 2;
}

.thumbnail::after,
.photoThumbnail::after {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    z-index: 1;
    pointer-events: none;
    transition: background 0.3s;
}

.thumbnail:hover,
.photoThumbnail:hover {
    scale: 1.05;
}

.thumbnail:hover::after,
.photoThumbnail:hover::after {
    background: rgba(0, 0, 0, 0.25);
    z-index: 1;
    pointer-events: none;
}

.thumbnail:hover .thumbTextBoth,
.photoThumbnail:hover .thumbTextBoth {
    opacity: 1;
    scale: 1.0;
    z-index: 120;
}

.thumbnail:hover,
.photoThumbnail:hover {
    opacity: 1;
}

.thumbnail:hover,
.photoThumbnail:hover {
    background-color: rgba(0, 0, 0, 0.6);
}

.thumbnail:active,
.photoThumbnail:active {
    scale: 0.95;
}

.thumbText {
    font-size: 18pt;
    font-weight: 600;
    color: white;
    opacity: 1;
    scale: 0.97;
    transition: opacity 0.3s, scale 0.3s;
    z-index: 3;
    text-align: left;
}

.thumbTextCategory {
    font-size: 12pt;
    font-weight: 400;
    color: white;
    mix-blend-mode: plus-lighter;
    filter: blur(8px);
    opacity: 0;
    scale: 0.97;
    transition: opacity 0.3s, scale 0.3s, transform 0.3s;
    z-index: 3;
}

.brightThumbText {
    color: black;
}

.thumbnail:hover .thumbTextBoth,
.photoThumbnail:hover .thumbTextBoth {
    transform: translateY(0px);
}

.thumbnail:hover .thumbTextCategory,
.photoThumbnail:hover .thumbTextCategory {
    opacity: 0.7;
    filter: blur(0px);
}

.thumbTextBoth {
    padding-bottom: 16pt;
    padding-left: 16pt;
    transform: translateY(20px);
    transition: opacity 0.3s, scale 0.3s, transform 0.3s, filter 0.3s;
    animation-timing-function: linear(0, 0.02 2.1%, 0.081 4.7%, 0.467 15.7%, 0.645, 0.778 28.5%, 0.872 35.8%, 0.909 40.1%, 0.938 44.9%, 0.977 56.5%, 0.994 72.3%, 1);
}

.thumbTextSingle {
    padding-bottom: 16pt;
    padding-left: 16pt;
    z-index: 120;
    transition: opacity 0.3s, scale 0.3s, transform 0.3s, filter 0.3s;
    animation-timing-function: linear(0, 0.02 2.1%, 0.081 4.7%, 0.467 15.7%, 0.645, 0.778 28.5%, 0.872 35.8%, 0.909 40.1%, 0.938 44.9%, 0.977 56.5%, 0.994 72.3%, 1);
}

@media (max-width: 760px) {
    #bannerTextImg {
        width: 250px;
        padding-left: 34pt;
    }

    .thumbnail,
    .photoThumbnail {
        margin: 0;
    }
}

/* KEYFRAMES  */
@keyframes grain {

    0%,
    100% {
        background-position-x: 0%;
        background-position-y: 0%;
    }

    10% {
        background-position-x: -5%;
        background-position-y: -10%;
    }

    20% {
        background-position-x: -15%;
        background-position-y: -5%;
    }

    30% {
        background-position-x: 7%;
        background-position-y: 25%;
    }

    40% {
        background-position-x: -5%;
        background-position-y: 25%;
    }

    50% {
        background-position-x: -15%;
        background-position-y: 10%;
    }

    60% {
        background-position-x: 5%;
        background-position-y: 0%;
    }

    70% {
        background-position-x: 0%;
        background-position-y: 15%;
    }

    80% {
        background-position-x: 3%;
        background-position-y: 35%;
    }

    90% {
        background-position-x: -10%;
        background-position-y: 10%;
    }
}