@font-face {
    font-family: OldStandard TT;
    font-style: normal;
    font-weight: 600;
    src: url("assets/fonts/OldRound-30-1-1.ttf") format("truetype");
}


* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 600;
    letter-spacing: -0.01em;
    background-color: rgba(245, 245, 245);
}

/* Touch Pan */
html,
body,
#canvasContainer {
    touch-action: none;
    overscroll-behavior: contain;
}

h1, h2, p {
    margin: 0;
}

::selection {
    background-color: rgba(0, 0, 0, 0.1);
    color: black;
}

input,
textarea,
button,
select,
a {
    -webkit-tap-highlight-color: transparent;
}

button {
    border: 0;
    background: transparent;
    font-size: 0.8rem;
    line-height: 0.8rem;
    cursor: pointer;
    padding: 0 0.5rem;
    font-weight: 600;
    font-family: Arial, Helvetica, sans-serif;
    text-transform: uppercase;
    color: inherit !important;
}


a {
    color: inherit;
}

.text-small {
    font-size: 0.8rem;
}

.text-medium {
    font-size: 1.25rem;
}

.text-serif {
    font-family: "OldStandard TT", serif;
}

/* Elements */
.canvas-container {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    overflow: hidden;
    cursor: grab;
    scale: var(--scale, 1);
    transform-origin: var(--originX, 0) var(--originY, 0);
}

.canvas-container.dragging {
    cursor: grabbing !important;
}

.canvas-container canvas {
    background-color: white;
    position: absolute;
    top: 50%;
    left: 50%;
    cursor: grab;
    scale: var(--scale, 1);
    transform-origin: var(--originX, 0) var(--originY, 0);
    /* transition: 50ms; */
}

.canvas-container .map {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 3600px;
    height: 3600px;
    z-index: 10;
    transform-origin: var(--originX, 0) var(--originY, 0);
}


.nav {
    position: fixed;
    bottom: 0;
    right: 0;
    z-index: 5;
    padding: 1rem;
}

.nav button {
    border: 0;
    background: white;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
    width: 2rem;
    height: 2rem;
    border-radius: 4px;
    font-size: 1.25rem;
    cursor: pointer;
}

/* 
    Map 
*/
.map {
    scale: var(--scale, 1);
}

.map-word {
    position: absolute;
    top: 0;
    left: 0;
    translate: var(--posX, 0) var(--posY, 0);
    rotate: var(--rotateValue, 0);
}

.map-word.has-media {
    cursor: pointer;
}

.map-word.no-audio {
    font-family: OldStandard TT, serif;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: unset;
    opacity: 0.5;
}

.map-word-text {
    font-size: 0.875rem;
    text-transform: uppercase;
    display: inline-block;
    transition: text-shadow 10ms linear, translate 300ms 200ms linear, scale 0.1s linear;
    scale: var(--distance, 1);
    user-select: none;
}

.map-word-media {
    display: none;
    opacity: 0;
    width: 350px;
    max-width: 50vw;
    height: auto;
    max-height: 30vh;
    position: absolute;
    bottom: calc(100% + 1rem);
    left: 50%;
    translate: -50% 0;
    pointer-events: none;
    transition: 300ms ease-in-out;
    border-radius: 2px;
    z-index: -1;
    pointer-events: none;
    user-select: none;
}

.map-word-media img,
.map-word-media video {
    width: 100%;
    height: 100%;
    max-height: 30vh;
    object-fit: contain;
    pointer-events: none;
}

.map-word-3d {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.map-word-3d canvas {
    background-color: rgba(0, 0, 0, 0.15);
}

.map-word:hover .map-word-media {
    display: block;
    opacity: 1;
}

/* 
    Page Title 
*/
.page-title {
    position: fixed;
    top: 0;
    left: 0;
    max-width: 100vw;
    width: 450px;
    padding: 1rem;
    z-index: 1000;
    display: flex;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 1) 75%, rgba(255, 255, 255, 0) 100%);
}

.page-title button {
    font-size: 1.25rem;
    font-weight: 400;
    transition: 300ms ease-in-out;
}

.page-title button.active {
    rotate: 45deg;
}

/* 
    Page Intro
*/

.page-intro {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    opacity: 0;
    pointer-events: none;
    width: calc(450px );
    max-width: 100vw;
    max-height: 100svh;
    overflow-y: auto;
    padding: 3rem 1rem 1rem;
    background: white;
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.page-intro.active {
    pointer-events: all;
    opacity: 1;   
}

.page-intro-content {
    display: none;
    line-height: 1.3em;
}

.page-intro-content.active {
    display: block;
}

.page-intro-content p {
    margin-bottom: 1em;
}

.page-intro-content .indented {
    margin-left: 1rem;
}

.page-intro-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-intro-footer span,
.page-intro-footer button {
    opacity: 0.5;
}

.page-intro-footer button.active,
.page-intro-footer button:hover {
    opacity: 1;
}

@media screen and (min-width: 768px) {
    .page-intro {
        padding: 3rem 6rem 1rem 1rem;
        background: linear-gradient(to right, rgba(255, 255, 255, 0.9) 90%, rgba(255, 255, 255, 0.1) 100%);
    }
}

/* 
    Page Multimedia 
*/

.page-multimedia {
    display: none;
    opacity: 0;
    pointer-events: none;
    transition: 300ms 150ms ease-in-out;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem 1rem 2rem;
}

.page-multimedia.active {
    display: block;
    pointer-events: all;
    opacity: 1;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 20;
    padding: 3rem 2.5rem 3.5rem;
}

.page-multimedia-close {
    position: absolute;
    top: 0;
    right: 0;
    border: 0;
    border-radius: 0;
    font-size: 2rem;
    padding: 1.25rem 1rem;
    cursor: pointer;
    background: transparent;
    z-index: 1;
    font-weight: 400;
    font-family: Arial, Helvetica, sans-serif;
    text-transform: uppercase;
}

.page-multimedia .media-item {
    display: none;
}

.page-multimedia .media-item img,
.page-multimedia .media-item video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.page-multimedia .media-item video {
    background-color: black;
    border-radius: 4px;
}

.page-multimedia .media-item.active {
    display: block;
    width: 100%;
    height: 100%;
}

.page-multimedia .media-item-caption {
    margin-top: 0.5rem;
    font-size: 0.675rem;
    text-align: center;
}

/* 
    Cursor 
*/
.cursor {
    position: fixed;
    top: 50%;
    left: 50%;
    translate: -50% -50%;
    width: 2rem;
    height: 2rem;
    z-index: 5;
    pointer-events: none;
    user-select: none;
}

.cursor img {
    width: 100%;
    height: 100%;
}

.zoom {
    font-weight: 400;
}


/* 
    Wave Animation 
*/
.wave-animation {
    display: flex;
    gap: 0.5em;
}

.wave-animation .word {
    rotate: var(--rotateValue, 0);
    display: block;
    transition: 500ms linear;
    text-transform: uppercase;

    translate: var(--offsetX, 0) var(--offsetY, 0);
}

.no-audio .wave-animation,
.no-audio .wave-animation .word {
    text-transform: unset;
}

/* 
    Mobile Disclaimer 
*/

.hover-disclaimer {
    display: none;
}



@media screen and (hover:none) {
    .hover-disclaimer {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        
        bottom: 0;
        right: 0;
        padding: 1rem;
        z-index: 100;
        background-color: rgba(255, 255, 255, 0.95);

        display: flex;
        justify-content: center;
        align-items: center;
    }

    .hover-disclaimer-modal p  {
        margin-bottom: 1.5rem;
        text-align: center;
    }

    .hover-disclaimer-modal button  {
        display: block;
        padding: 0.25rem 0.5rem;
        background-color: rgba(0, 0, 0, 0.15);

        margin: 0.5rem auto;
        margin-bottom: 2rem;
    }
}