*,
:after,
:before {
    box-sizing: border-box
}

:root {
    --color-text: #fff;
    --color-bg: #000;
    --color-link: #ffffff80;
    --color-link-hover: #f8c5dc;
    --color-bg-slide: #171719;
    font-size: 20px;

body {
    color: var(--color-text);
    background-color: var(--color-bg);
    text-transform: uppercase;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    width: 100%;
    height: 100vh;
    margin: 0;
    font-family: "Sofia Sans Extra Condensed", sans-serif;
    font-optical-sizing: auto;
    font-weight: normal;
    font-style: normal;
    overflow: hidden
}

.js .loading:before,
.js .loading:after {
    content: "";
    z-index: 1000;
    position: fixed
}

.js .loading:before {
    width: 100%;
    height: 100%;
    background: var(--color-bg);
    top: 0;
    left: 0
}

.js .loading:after {
    width: 60px;
    height: 60px;
    opacity: .4;
    background: var(--color-link);
    border-radius: 50%;
    margin: -30px 0 0 -30px;
    animation: loaderAnim .7s linear infinite alternate forwards;
    top: 50%;
    left: 50%
}

@keyframes loaderAnim {
    to {
        opacity: 1;
        transform: scale(.5)
    }
}

a {
    color: var(--color-link);
    cursor: pointer;
    outline: none;
    text-decoration: none
}

a:hover {
    color: var(--color-link-hover);
    outline: none
}

a:focus {
    background: #d3d3d3;
    outline: none
}

a:focus:not(:focus-visible) {
    background: 0 0
}

a:focus-visible {
    background: 0 0;
    outline: 2px solid red
}

.unbutton {
    font: inherit;
    cursor: pointer;
    color: var(--color-link);
    background: 0 0;
    border: 0;
    margin: 0;
    padding: 0
}

.unbutton:focus {
    outline: none
}

.frame {
    width: 100%;
    height: 100vh;
    z-index: 100;
    pointer-events: none;
    grid-gap: 1rem;
    grid-template: "back sponsor" "title title" "info info" "nav nav" 1fr/auto auto;
    padding: 2.5rem;
    display: grid;
    position: fixed;
}

.frame a {
    pointer-events: auto
}

.frame__title {
    grid-area: title;
    place-self: end;
    align-items: start;
    display: flex;
    background: rgba(0,0,0,.8);
    padding: .5rem .5rem;
}

.frame__title-main {
    margin: 0 0 0 0;
    font-size: 1.5rem;
    font-weight: 400
}
.frame__title-main .heavy {
    font-weight: bold;
}
.frame__title-main .light {
    font-weight: 200;
}

.frame__title-back {
    align-items: flex-end;
    margin-bottom: .15rem;
    display: flex;
    position: relative
}

.frame__title-back span {
    font-size: 1.25rem;
    line-height: 1;
    transform: rotate(-45deg)
}

.frame__title-back svg {
    fill: currentColor
}

.frame__info {
    grid-area: info;
    align-self: end;
    background: rgba(0,0,0,.8);
    padding: .25rem;
    font-size: 15px;
}

.frame__nav {
    /* grid-gap: .5rem;
    grid-area: nav;
    grid-auto-flow: row;
    align-content: end;
    place-items: start;
    display: grid;
    background: rgba(0,0,0,.8);
    padding: .25rem;
    width: 25vw;
    font-size: .8rem;
    height: auto; */
    position: fixed;
    bottom: 50px;
    right: 10px;
    width: 30vw;
    background: rgba(255,255,255,.95);
    color:#333;
    border: 2px solid #333;
    padding: .5rem;
    -webkit-box-shadow: 0px 3px 5px 0px rgba(0,0,0,0.75);
    -moz-box-shadow: 0px 3px 5px 0px rgba(0,0,0,0.75);
    box-shadow: 0px 3px 5px 0px rgba(0,0,0,0.75);
    font-size: 1rem;
}

.frame__nav-button {
    text-transform: uppercase;
    pointer-events: auto;
    transition: color .3s;
    position: relative;
    display: none;
    text-align: left;
}

.frame__nav-button:not(.frame__nav-button--current):hover {
    color: var(--color-link-hover)
}

.frame__nav-button--current {
    color: #333;
    display: block;
}

.frame__nav-button:before {
    /* content: "";
    width: 2.5rem;
    height: 3px;
    border: 1px solid #fff;
    transform-origin: 100%;
    background-color: currentColor;
    transition: transform .8s ease-in-out;
    position: absolute;
    top: 50%;
    right: calc(100% + 4px);
    transform: scaleX(0) */
}

.frame__nav-button--current:before {
    transform: scaleX(1);
    color: #333;
}

.frame__back {
    opacity: 0;
    pointer-events: none;
    text-transform: uppercase;
    grid-area: back;
    justify-self: start
}

.frame__back--show {
    opacity: 1;
    pointer-events: auto
}

.slides {
    width: 100%;
    height: 100vh;
    grid-template-rows: 100%;
    grid-template-columns: 100%;
    place-items: center;
    display: grid;
    overflow: hidden
}

.slide {
    width: 100%;
    height: 104%;
    pointer-events: none;
    opacity: 0;
    will-change: transform;
    grid-area: 1/1/-1/-1;
    position: relative;
    overflow: hidden
}

.slide--current {
    pointer-events: auto;
    opacity: 1
}

.slide__inner {
    width: 100%;
    height: 100%;
    will-change: transform;
    grid-template-rows: 100%;
    grid-template-columns: 100%;
    display: grid;
    position: relative;
    overflow: hidden
}

.slide__img {
    cursor: pointer;
    z-index: 1;
    grid-area: 1/1/-1/-1;
    position: relative;
    overflow: hidden
}

.slide__img-inner {
    width: 100%;
    height: 100%;
    will-change: transform;
    background-position: 50%;
    background-repeat: no-repeat;
    background-size: cover;
}

.slide__content {
    background: var(--color-bg-slide);
    grid-column-gap: 2rem;
    grid-template: "img title" "img text" "img." /1fr 1fr;
    grid-area: 1/1/-1/-1;
    place-content: center;
    padding: 1rem;
    display: grid
}

.slide__content-img {
    height: 300px;
    /* width: 25vw;
    height: 30vh; */
    will-change: transform;
    background-position: 50%;
    background-size:contain;
    background-repeat: no-repeat;
    grid-area: img;
}

.slide__content h2 {
    text-transform: none;
    grid-area: title;
    margin: 0 0 1rem;
    font-size: max(3rem, min(2vw, 3rem));
    font-weight: 200;
    line-height: 1
}

.slide__content p {
    max-width: 260px;
    color: #ffffff80;
    grid-area: text;
    margin: 0;
    line-height: 1.5
}

.cursor {
    pointer-events: none;
    position: absolute;
    top: 0;
    left: 0;
    font-size: .8rem;
}

@media screen and (min-width:53em) {
    .frame {
        grid-template: "back.sponsor" "nav info title" /auto auto auto;
        align-content: space-between
    }

    .frame__info {
        justify-self: center
    }

    .slide__content {
        grid-column-gap: 2rem;
        grid-template: "img title" "img text" "img." /220px 300px
    }
}

.splitting .word,
.splitting .char {
    display: inline-block
}

.splitting .char {
    position: relative
}

.splitting .char:before,
.splitting .char:after {
    content: attr(data-char);
    visibility: hidden;
    -webkit-user-select: none;
    user-select: none;
    transition: inherit;
    position: absolute;
    top: 0;
    left: 0
}

.splitting {
    --word-center: calc((var(--word-total) - 1)/2);
    --char-center: calc((var(--char-total) - 1)/2);
    --line-center: calc((var(--line-total) - 1)/2)
}

.splitting .word {
    --word-percent: calc(var(--word-index)/var(--word-total));
    --line-percent: calc(var(--line-index)/var(--line-total))
}

.splitting .char {
    --char-percent: calc(var(--char-index)/var(--char-total));
    --char-offset: calc(var(--char-index) - var(--char-center));
    --distance: calc((var(--char-offset)*var(--char-offset))/var(--char-center));
    --distance-sine: calc(var(--char-offset)/var(--char-center));
    --distance-percent: calc((var(--distance)/var(--char-center)))
}

.splitting.cells img {
    width: 100%;
    display: block
}

/* ---------------- customizations */


header {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: auto;
    padding: .25rem;
    background: rgba(0,0,0,.8);
    color:#fff;
    z-index: 100;
}
header .scroll-instructions {
    position: fixed;
    z-index: 101;
    top: 0px;
    right: 0;
    left: 0;
    text-align: center;
    background: rgba(0,0,0,0.6);
    color:#fff;
    font-size: 1rem;
    display: block;
}





/* supports */

@supports (display: grid) {

    .splitting.cells {
        visibility: hidden;
        background-size: cover;
        position: relative;
        overflow: hidden
    }

    .splitting .cell-grid {
        background: inherit;
        width: 100%;
        height: 100%;
        grid-template: repeat(var(--row-total), 1fr)/repeat(var(--col-total), 1fr);
        display: grid;
        position: absolute;
        top: 0;
        left: 0
    }

    .splitting .cell {
        background: inherit;
        position: relative;
        overflow: hidden
    }

    .splitting .cell-inner {
        background: inherit;
        visibility: visible;
        width: calc(100%*var(--col-total));
        height: calc(100%*var(--row-total));
        left: calc(-100%*var(--col-index));
        top: calc(-100%*var(--row-index));
        position: absolute
    }

    .splitting .cell {
        --center-x: calc((var(--col-total) - 1)/2);
        --center-y: calc((var(--row-total) - 1)/2);
        --offset-x: calc(var(--col-index) - var(--center-x));
        --offset-y: calc(var(--row-index) - var(--center-y));
        --distance-x: calc((var(--offset-x)*var(--offset-x))/var(--center-x));
        --distance-y: calc((var(--offset-y)*var(--offset-y))/var(--center-y))
    }
}
