:root {
    --viewport-width: 1300vw;
    --viewport-height: 1300vh;
    --walker-scale: 1.25;
}

@layer reset {
    *, *::before, *::after { box-sizing: border-box; }
    img { display: block; width: 100%; }
    figure { margin: 0; position: relative; }
}

body, html {
    color: #eee;
    height: var(--viewport-height);
    font-family: system-ui, -apple-system, 'Hevetica', 'Helvetica Neue', sans-serif;
    font-size: 1.75vh !important;
    line-height: 1.6em;
    user-select: none;
    background: #000;
}

h1 {
    font-family: "Bangers";
    font-size: 1.5em;
    letter-spacing: 1px;
}

.nes-btn { font-family: 'Press Start 2P'; }
.nes-icon { margin-bottom: 0; transform-origin: center; }
.nes-container.is-dark { background: rgba(0,0,0,0.7); }

.content {
    display: flex;
    flex-direction: column;
    background: rgba(20, 20, 20, 0.25) !important;
    padding: 2rem !important;
    backdrop-filter: blur(50px) saturate(300%);
    box-shadow: 0 0 50px rgba(255,255,255,.35);
    margin: 2rem !important;
}

.content a:not(.nes-btn), 
.content a:not(.nes-btn):visited { color: #fff; text-decoration: underline; }

.content a:not(.nes-btn):hover { text-decoration: none; }


.photo img { margin: 0 0 .5rem; }
.photo p { font-style: italic; font-size: 0.8em; line-height: 1.5em; margin: 0; }

.mb-2 { margin-bottom: 1.5rem; }
.mb-3 { margin-bottom: 2.5rem; }
.h-100 { height: 100%; }
.slide { position: relative; }

/* --- CORE LAYOUT --- */
.container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    width: 100vw;
    padding: 12em clamp(1rem, 2vw, 4vw);
    border-radius: 1rem;
}

.wrapper {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: var(--viewport-width);
    animation: slide auto linear;
    animation-timeline: scroll();
}

section {
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

.epg-bezel {
    background: url('../images/bezle.png') no-repeat;
    background-size: cover;
    z-index: 10;
    position: fixed;
    height: 100%;
    width: 100%;
    mix-blend-mode: soft-light;
    opacity: 0.3;
    pointer-events: none;
    top: 0;
    left: 0;
}

#walker {
    position: fixed;
    z-index: 8;
    bottom: 9vh;
    right: 0;
    width: 256px;
    height: 256px;
    background-image: url("../images/walker.webp");
    background-repeat: no-repeat;
    background-position: 0 0;
    transform: scale(calc(var(--walker-dir, 1) * var(--walker-scale)), var(--walker-scale));
    transform-origin: bottom center;
}

figure {
    height: 100vh;
    flex: 0 0 100vw;
    position: relative;
}

img.fit-screen {
    height: 100vh;
    width: 100%;
    object-fit: fill;
}

.sign {
    position: absolute;
    bottom: 8vh;
    left: 8vw;
    width: 25vh;
    transform: scale(1.25);
}

/* --- ANIMATIONS --- */
@keyframes slide {
    0% { translate: 0; }
    100% { translate: -1200vw; }
}

@keyframes slide2 {
    0% { translate: 0%; }
    100% { translate: 90%;}
}

@keyframes slide-3 {
    0% { translate: 0; }
    100% { translate: -92.3076%; } 
}

/* --- MEDIA QUERIES --- */
@media (min-width: 768px) {
    .container {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        aspect-ratio: 4 / 3;
        width: 100vw;
        height: auto;
        max-height: 100vh;
        max-width: calc(100vh * 4 / 3);
        overflow: hidden;
        z-index: 5;
        padding: 2em clamp(1rem, 2vw, 4vw);
        align-items: center;
        min-height: auto;
        overflow: hidden;
    }

    .wrapper, .epg-bezel, #walker { position: absolute; }

    .wrapper {
        height: 100%;
        width: 1300%; 
        animation: slide-3 auto linear;
        animation-timeline: scroll(root);
    }

    section, figure, img.fit-screen { height: 100%; min-height: 100%; }
    figure { flex: 0 0 calc(100% / 13); }
    #walker { bottom: 9%; }

    .content { 
        /*
        width: 50%;
        min-width: 800px;
        */
        width: 100%;
        max-width: 40vw;
        max-height: 80vh;
        overflow-y: auto;
    }

    .parallax {
        position: absolute;
        right: 0;
    }

    .parallax2 {
        animation: slide2 auto linear;
        animation-timeline: scroll(root);
    }
    .sign {
        bottom: 7.5%;
    }
}

@media (max-width: 767px) {
    html { scroll-snap-type: y mandatory; scroll-behavior: smooth; }
    .epg-bezel { display: none; }
    
    .snap-ghost {
        height: 100vh;
        width: 100vw;
        scroll-snap-align: start;
        scroll-snap-stop: always;
        pointer-events: none;
        position: relative;
        z-index: -1;
    }

    body, html {
        font-size: 0.9em !important;
        overflow-y: auto !important; 
        overflow-x: hidden;
        height: auto;
        min-height: 1300vh;
    }

    .container { 
        padding: 0; 
        align-items: center; 
        /* Ensure the container doesn't block the scroll track */
        pointer-events: none; 
    }

    .content {
        /* Re-enable touch for the text boxes */
        pointer-events: auto; 
        width: calc(100vw - 3rem);
        max-height: 65vh;
        overflow-y: auto;
        translate: -1rem 0;
        position: relative;
        z-index: 2;
        margin: 1rem 2.5rem !important;
    }

    .wrapper {
        position: fixed;
        top: 0;
        left: 0;
        display: flex;
        width: 1300vw; /* 13 slides */
        will-change: transform; 
        /* Chrome support */
        animation: slide-mobile auto linear;
        animation-timeline: scroll(root);
    }

    figure {
        flex: 0 0 100vw;
        width: 100vw;
        height: 100vh;
    }

    .hearts, .mute { display: none; }
    #walker { --walker-scale: 0.7; translate: 50px 0; position: fixed; bottom: 7vh; }
    .parallax { position: absolute; }

    @keyframes slide-mobile {
        0% { transform: translateX(0); }
        100% { transform: translateX(-1200vw); }
    }
}

@media (min-width: 1200px) { html { font-size: 20px; } }

