@font-face {
    font-family: 'Simula';
    src: url('../fonts/Simula-Book.eot');
    src: url('../fonts/Simula-Book.eot?#iefix') format('embedded-opentype'),
         url('../fonts/Simula-Book.woff2') format('woff2'),
         url('../fonts/Simula-Book.woff') format('woff');

    font-style: normal;
    font-weight: 700;
}

@font-face {
    font-family: 'Simula';
    src: url('../fonts/Simula-BookItalic.eot');
    src: url('../fonts/Simula-BookItalic.eot?#iefix') format('embedded-opentype'),
         url('../fonts/Simula-BookItalic.woff2') format('woff2'),
         url('../fonts/Simula-BookItalic.woff') format('woff');

    font-style: italic;
    font-weight: 700;
}

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

:root {
    font-size: 18px;
}

body, 
main {
    height: 100%;
    width: 100%;
    position: relative;
}

body {
    margin: 0;
    --color-text: #000;
    --color-text-alt: #848484;
    --color-title: #231F20;
    --color-bg: #FBFBF4;
    --color-link: #E3154D;
    --color-link-hover: #000;
    color: #ffffff;
    background-color: #447737;
    --cursor-stroke: #E3154D;
    --cursor-fill: none;
    --cursor-stroke-width: 1px;
    --cursor-text: #000;
    font-family: 'Simula', -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: var(--color-title);
    outline: none;
}

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

.unbutton {
    background: none;
    border: 0;
    padding: 0;
    margin: 0;
    font: inherit;
    cursor: pointer;
}

.unbutton:focus {
    outline: none;
}

/* Page Loader */
.js .loading::before,
.js .loading::after {
    content: '';
    position: fixed;
    z-index: 1000;
}

.js .loading::before {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #447737;
}

.js .loading::after {
    top: 50%;
    left: 50%;
    width: 60px;
    height: 60px;
    margin: -30px 0 0 -30px;
    border-radius: 50%;
    opacity: 0.4;
    background: #3C2415;
    animation: loaderAnim 0.7s linear infinite alternate forwards;

}

@keyframes loaderAnim {
    to {
        opacity: 1;
        transform: scale3d(0.5,0.5,1);
    }
}

.message {
    position: relative;
    z-index: 100;
    background: var(--color-text);
    color: var(--color-bg);
    padding: 0.5rem;
    font-size: 0.75rem;
    position: relative;
}

.no-select {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

#logo {
    max-width: 300px;
    object-fit: contain;
    padding-top: 12px;
}

.frame {
    padding: 1rem 5vw;
    position: relative;
    z-index: 1000;
}

.frame__title {
    font-size: 40px;
    margin: 0 0 1rem;
    font-weight: normal;
    color: #ffffff;
}

.frame__title-wrap div {
    margin: 10px 0;
    text-transform: uppercase;
}

.frame__links {
    display: inline;
    margin-top: 18px;
}

.frame__links a {
    color: #ffffff;
}

.frame__links a:not(:last-child),
.frame__demos a:not(:last-child) {
    margin-right: 2rem;
}

.frame__demos {
    margin: 1rem 0;
}

.frame__demo--current,
.frame__demo--current:hover {
    color: var(--color-text);
    text-decoration: none;
}

.content {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 0;
    justify-content: center;
    position: relative;
    align-items: center;
    background: #ccc;
    background-image: url(../img/map.png);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding-top: 82.32%; /* (img-height / img-width * container-width) */
                /* (2305 / 2800 * 100) */
}

.grid {
    position: absolute;
    /*width: 120%;
    height: 120%;
    top: -10%;
    left: -10%;*/
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(50,2%);
    grid-template-rows: repeat(50,2%);
    perspective: 2100px;
}

.grid--inactive {
    pointer-events: none;
}

.grid__item {
    position: relative;
    will-change: transform;
    grid-area: var(--grid-row) / var(--grid-column) / span 12 / span 5;
}

.grid__item-img {
    position: relative;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: 50% 50%;
    border-radius: 10px;
    will-change: transform;
}

.grid__item-img span {
    display: none;
    font-size: 1rem;
    text-transform: uppercase;
    color: #ffffff;
}

.char {
    will-change: transform;
}

/* Shorthand grid-area: grid-row-start / grid-column-start / grid-row-end / grid-column-end */

.pos-1 {
    --grid-row: 10;
    --grid-column: 1;
}

.pos-2 {
    --grid-row: 1;
    --grid-column: 18;
}

.pos-3 {
    --grid-row: 1;
    --grid-column: 32;
}

.pos-4 {
    --grid-row: 23;
    --grid-column: 10;
}

.pos-5 {
    --grid-row: 17;
    --grid-column: 25;
}

.pos-6 {
    --grid-row: 20;
    --grid-column: 43;
}

.pos-7 {
    --grid-row: 35;
    --grid-column: 5;
}

.pos-8 {
    --grid-row: 40;
    --grid-column: 14;
}

.pos-9 {
    --grid-row: 37;
    --grid-column: 29;
}

.pos-10 {
    --grid-row: 35;
    --grid-column: 42;
}

.pos-11 {
    --grid-row: 1;
    --grid-column: 44;
}

.pos-12 {
    --grid-row: 34;
    --grid-column: 31;
}

.pos-13 {
    --grid-row: 22;
    --grid-column: 2;
}

.pos-14 {
    --grid-row: 7;
    --grid-column: 36;
}

.pos-15 {
    --grid-row: 4;
    --grid-column: 7;
}

.pos-16 {
    --grid-row: 14;
    --grid-column: 24;
}

.content__title {
    font-size: 12vw;
    margin: 0;
    line-height: 1.2;
    position: relative;
    color: var(--color-title);
    text-transform: uppercase;
    pointer-events: none;
}

.content__title-line {
    display: block;
    position: relative;
    overflow: hidden;
    line-height: 1;
}

.content__title-line--1 {
    margin-left: -5vw;
}

.content__title-line--2 {
    margin-right: -5vw;
}

.preview {
    position: relative;
    pointer-events: none;
}

.js .preview {
    width: 100%;
    height: 100vh;
    position: absolute;
    top: 0;
    left: 0;
}

.preview__item {
    /*position: relative;
    margin: 0 auto;
    padding: 0 5vw;
    display: grid;
    grid-template-rows: auto auto auto;
    grid-template-columns: 70% 30%;
    grid-template-areas: 
    'preview-back preview-back' 
    'preview-img preview-title' 
    'preview-content preview-content';*/
    padding: 100px 30px 0;
}

.js .preview__item {
    perspective: 1000px;
}

.js .preview__item:not(.preview__item--open) {
    position: absolute;
    overflow: hidden;
    height: 0;
    opacity: 0;
}

.js .preview__item--open {
    pointer-events: auto;
    width: 100%;
    height: 100vh;
    position: fixed; 
    top: 0; 
    right: 0; 
    bottom: 0; 
    left: 0;
}

.preview__item-back {
    /*grid-area: preview-back;
    justify-self: start;
    font-size: 0.857rem;
    text-transform: uppercase;
    font-weight: 500;
    padding-left: 90px;
    margin-bottom: 1rem;
    background: url(../img/back.png) no-repeat 0% 50%;*/
    position: absolute;
    top: 0;
    right: 30px;
    z-index: 1;
    cursor: pointer;
}

.preview__item-back img {
    max-width: 80px;
}

.preview__item-title {
    /*grid-area: preview-title;*/
    font-family: 'Simula', sans-serif;
    font-size: 60px;
    /*font-size: clamp(1.5rem,12vw,20vh);*/
    margin: 0;
    /*grid-column-start: 1;
    align-self: center;
    padding-left: 1rem;
    position: relative;
    overflow: hidden;*/
    pointer-events: none;
    position: absolute;
    bottom: 60px;
    left: 0px;
}

.preview__item-imgwrap {
    /*width: 100px;
    height: 150px;*/
    /*border-radius: 10px;*/
    width: 100%;
    height: 100%;
    overflow: hidden;
    /*grid-area: preview-img;*/
    transform-origin: 50% 100%;
    position: relative;
}

.preview__item-img {
    width: 100%;
    height: 100%;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: 50% 50%;
}

.preview__item-content {
    position: absolute;
    bottom: 30px;
    right: 0;
    /*grid-area: preview-content;
    max-width: calc(1100px - 80vh);
    min-height: 440px;
    line-height: 1.3;*/
}

.preview__item-meta {
    color: var(--color-text-alt);
    text-transform: uppercase;
    font-size: 0.857rem;
}

.preview__item-meta span {
    display: block;
}

.toggle-day,
.toggle-night {
    max-width: 100px;
    cursor: pointer;
}

.toggle-day {
    margin-right: 25px;
}

.preview__item-info {
    display: block;
    color: var(--color-link);
    margin: 1rem 0;
}

.preview__item-button {
    color: #fff;
    border: 0;
    border-radius: 2rem;
    text-transform: uppercase;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    background: #000;
    padding: 1rem 2rem;
    display: inline-block;
    cursor: pointer;
    margin-bottom: 1rem;
}

.preview__item-button:hover,
.preview__item-button:active,
.preview__item-button:focus {
    outline: none;
    background: var(--color-link);
}

.cursor {
    display: none;
}

@media screen and (min-width: 53em) {
    /*body, 
    main {
        overflow: hidden;
    }*/
    .message {
        display: none;
    }
    .frame {
        position: fixed;
        z-index: 100;
        top: 0;
        left: 0;
        display: grid;
        align-content: space-between;
        width: 100%;
        max-width: none;
        height: 100%;
        padding: 1rem 1.5rem;
        grid-gap: 6vw;
        pointer-events: none;
        grid-template-columns: auto 1fr auto;
        grid-template-rows: auto auto auto;
        grid-template-areas: 'title links ...'
                            '... ... ...'
                            '... ... ...';
    }
    .frame__title-wrap {
        grid-area: title;
    }
    .frame__title-wrap div {
        margin-bottom: 0;
    }
    .frame__title {
        margin: 0;
    }
    .frame__tagline {
        position: relative;
        margin: 0 0 0 1rem;
        padding: 0 0 0 1rem;
        opacity: 0.5;
    }
    .frame__demos {
        margin: 0;
        grid-area: demos;
        justify-self: end;
    }
    .frame__links {
        grid-area: links;
        padding: 0;
    }
    .frame a {
        pointer-events: auto;
    }
    .content {
        width: 1680px;
        height: 1383px;
    }
    .preview__item {
        height: 100%;
        /*width: 80vw;*/
        /*grid-template-columns: 70% 30%;
        grid-template-rows: minmax(max(5rem, 18vh), 1fr) auto auto 1fr;
        grid-template-areas: 
        '... ...'
        'preview-back ...' 
        'preview-title preview-title' 
        'preview-img preview-content';*/
    }
    /*.preview__item-title {
        justify-self: center;
        padding: 60px 0 0 60px;
    }*/
    .preview__item-meta {
        padding: 1rem 0;
    }
    .preview__item-info {
        margin: 1rem 0 3rem;
    }
    .preview__item-imgwrap {
        width: 100%;
        height: 100%;
        /*grid-row-start: 3;
        border-radius: 10px 10px 0 0;*/
        /*max-height: 500px;
        max-width: 720px;
        display: inline-block;*/
    }
    /*.preview__item-content {
        padding: 0 0 0 45px;
    }*/

    /*.preview-side {
        display: inline-block;
        width: calc(100% - 725px);
        vertical-align: top;
        position: relative;
    }*/
}

@media screen and (max-width: 52em) {
    #logo {
        max-width: 250px;
        margin-bottom: 10px;
    }

    .frame__title {
        color: #231F20;
        font-size: 26px;
        margin-bottom: 8px;
    }
    
    .frame__links a {
        color: #231F20;
        font-size: 16px;
    }

    .preview__item {
        padding: 0;
    }

    .preview__item-imgwrap,
    .preview__item-img {
        min-height: 300px;
    }

    .preview__item-title {
        font-size: 30px;
        left: 30px;
    }

    .preview__item-back {
        top: 20px;
    }

    .preview__item-back img {
        max-width: 50px;
    }

    .js .preview__item--open {
        height: initial;
        padding-top: 50px;
    }

    .toggle-day, 
    .toggle-night {
        max-width: 80px;
    }

    .toggle-day {
        margin-right: 10px;
    }
}

@media (min-width: 1680px) {
    .content {
        width: unset;
        height: unset;
        background-size: contain;
    }
}

@media (any-pointer: fine) {
    .cursor {
        display: block;
        position: absolute;
        width: 100%;
        height: 100%;
        top: 0;
        left: 0;
        pointer-events: none;
        z-index: 9999;
    }

    .cursor__svg {
        /*pointer-events: none;
        position: absolute;
        top: 0;
        left: 0;*/
        display: none;
    }

    .cursor__svg-circle {
        /*fill: var(--cursor-fill);
        stroke: var(--cursor-stroke);
        stroke-width: var(--cursor-stroke-width);*/
        display: none;
    }

    .cursor__text {
        display: none;
        position: absolute;
        top: 150px;
        left: 150px;
        font-size: 1rem;
        text-transform: uppercase;
        font-weight: 500;
        fill: var(--cursor-text);
    }
}