/*
1. Use intuitive box sizing model
*/
*, *::before, *::after {
    box-sizing: border-box;
}

/*
2. Remove default margin
*/
* {
    margin: 0;
}

/*
3. Add accessible line-height
*/
body {
    line-height: 1.5;
}

/*
4. Improve media defaults
*/
img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
}

/*
5. Remove built-in typography styles
*/
input, button, textarea, select {
    font: inherit;
}


/*
 Global styles
*/
body {
    background: #002151;
}

h1 {
    font-family: "IBM Plex Mono", monospace;
    font-weight: 600;
    padding: 4% 0 1% 10%;
    color: aliceblue;
    font-size: 60px;
}

h2 {
    font-family: "IBM Plex Mono", monospace;
    font-weight: 600;
    padding: 4% 0 1% 10%;
    color: aliceblue;
    font-size: 54px;
}

p {
    font-family: "Figtree", sans-serif;
    font-weight: 300;
    width: 55%;
    line-height: 1.6em;
    padding: 2% 0 6% 10%;
    color: aliceblue;
    font-size: 20px;
}

.text {
    margin-top: 5%;
}

.text-image {
    display: none;
    height: 90vh;
}

.back-button {
    width: auto;
    position: absolute;
    right: 30px;
    top: 20px;
    cursor: pointer;
    z-index: 20;
}

a {
    font-family: "Figtree", sans-serif;
    font-weight: 300;
    width: 55%;
    line-height: 1.6em;
    color: aliceblue;
    font-size: 20px;
}

.slideshow-container {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}


/*
Nav Bar
*/

nav {
    padding: 0 1%;
}

nav ul {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    padding: 0;
}

nav ul li {
    list-style-type: none;
}

.logo {
    width: 90px;
    transition: transform 0.2s ease-in-out;
}

.logo:hover {
    transform: scale(1.1);
}

.cancel-button {
    width: 60px;
    top: 20px;
    right: 35px;
    font-size: 44px;
    color: aliceblue;
    text-decoration: none;
    padding: 10px;
    z-index: 100;
    transition: transform 0.2s ease-in-out;
}

.cancel-button:hover {
    transform: rotate(90deg);
}

/* 
Slides
*/

/* Next & previous buttons */
.prev, .next {
    z-index: 10;
    cursor: pointer;
    position: absolute;
    top: 45vh;
    width: auto;
    margin-top: -22px;
    font-weight: 300;
    padding: 20px;
    color: rgb(240,248,255, 0.3);
    font-size: 60px;
    transition: 0.4s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
}

.next {
    right: 7px;
    border-radius: 3px 0 0 3px;
}

.prev:hover, .next:hover {
    transform: scale(1.2);
    color: aliceblue;
}

.fadeIn {
    animation-name: fadeIn;
    animation-duration: 1.5s;
}

/*
Introduction page
*/
#intro {
    padding: 2%;
}

#intro-text {
    padding: 2% 0 2% 10%;
}


/*
Hand drawings and overlays
*/
.scene {
    /* max-width: 960px; */
    position: absolute;
    left: 50%;
    margin: auto;
    width: 50%;
    height: 100%;
    background-position: 90%;
    background-attachment: fixed;
    background-repeat: no-repeat;
    overflow: hidden;
}

.magic {
    z-index: 5;
    position: relative;
    left: 50%;
    width: 200px;
    height: 200px;
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-position: 90%;
    border-radius: 100%;
}

/* 01 Scrolling */
#right-thumb-background {
    background-image: url('./images/1RightThumb.webp');
    background-size: 30%;
}

#right-thumb-foreground {
    background-image: url('./images/1RightThumbDV.webp');
    background-size: 30%;
}

/* 02 Selfies */
#left-index-background {
    background-image: url('./images/2LeftIndexFinger.webp');
    background-size: 35%;
}

#left-index-foreground {
    background-image: url('./images/2LeftIndexFingerDV.webp');
    background-size: 35%;
}

/* 03 Identity */
#right-index-background {
    background-image: url('./images/3RightIndexFinger.webp');
    background-size: 25%;
}

#right-index-foreground {
    background-image: url('./images/3RightIndexFingerDV.webp');
    background-size: 25%;
}

/* 04 Mice */
#right-middle-background {
    background-image: url('./images/6RightMiddleFinger.webp');
    background-size: 25%;
}

#right-middle-foreground {
    background-image: url('./images/6RightMiddleFingerDV.webp');
    background-size: 25%;
}

/* 05 Support */
#right-little-background {
    background-image: url('./images/5RightLittleFinger.webp');
    background-size: 28%;
}

#right-little-foreground {
    background-image: url('./images/5RightLittleFingerDV.webp');
    background-size: 28%;
}

/* 06 Language */
#left-right-ring-background {
    background-image: url('./images/4LeftRightRingFingers.webp');
    background-size: 38%;
}

#left-right-ring-foreground {
    background-image: url('./images/4LeftRightRingFingersDV.webp');
    background-size: 38%;
}

/* 07 Games */
#left-thumb-background {
    background-image: url('./images/7LeftThumb.webp');
    background-size: 35%;
}

#left-thumb-foreground {
    background-image: url('./images/7LeftThumbDV.webp');
    background-size: 35%;
}

/* 08 Virtuality */
#left-middle-background {
    background-image: url('./images/8LeftMiddleFinger.webp');
    background-size: 30%;
}

#left-middle-foreground {
    background-image: url('./images/8LeftMiddleFingerDV.webp');
    background-size: 30%;
}

/* 09 Promises */
#left-little-background {
    background-image: url('./images/9LeftLittleFinger.webp');
    background-size: 15%;
}

#left-little-foreground {
    background-image: url('./images/9LeftLittleFingerDV.webp');
    background-size: 15%;
}

/* 10 AI */
#ai-digits-background {
    background-image: url('./images/10AiDigits.webp');
    background-position-x: 90%;
    background-position-y: 70%;
    background-size: 30%;
}

#ai-digits-foreground {
    background-image: url('./images/10AiDigitsDV.webp');
    background-position-x: 90%;
    background-position-y: 70%;
    background-size: 30%;
}

/* Text instructions on first slide */
.hover-text {
    position: absolute;
    top: 20%; /* Adjust this based on where you want it to appear */
    left: 80%;
    transform: translateX(-50%);
    background-color: rgba(1, 32, 81, 0.5);
    color: aliceblue;
    padding: 10px 20px;
    border-radius: 5px;
    font-family: "Figtree", sans-serif;
    z-index: 100;
    font-size: 14px;
    transition: opacity 0.5s ease;
}

.hover-text.hidden {
    opacity: 0;
    pointer-events: none;
}

/*
Animations
*/
@keyframes fadeIn {
    0% { opacity: 0.2}
    100% { opacity: 1}
}


/*
##### RESPONSIVE #####
*/

@media (max-width: 768px) {

    h1 {
        padding: 15% 10% 8% 10%;
        font-size: 44px;
    }

    h2 {
        padding: 10% 10% 4% 10%;
        font-size: 30px;
    }

    p {
        width: 100%;
        padding: 4% 10%;
        font-size: 16px;
    }

    nav {
        padding: 2% 4%;
    }

    #intro-text {
        padding-right: 8%;
        padding-bottom: 8%;
    }

    .intro-link {
        padding-bottom: 10%;
    }

    .logo {
        width: 60px;
    }

    .cancel-button {
        font-size: 36px;
    }
    
    .text-image {
        display: flex;
        flex-direction: column; /* Stack title, image, and text vertically */
        align-items: center;
        padding: 10% 5%;
        position: relative; /* Ensure it contains absolutely positioned children */
        height: auto;
    }

    .prev, .next {
        font-size: 30px;
    }

    .scene {
        order: 2;
        width: 100%;
        left: 0;
        height: 40vh;
        position: relative;
        background-position: 90%;
        background-attachment: fixed;
        background-repeat: no-repeat;
        overflow: hidden;
    }

    .magic {
        position: absolute;
        top: 0;
        left: 0;
        width: 200px;
        height: 200px;
        background-position: 90%;
        background-attachment: fixed;
        background-repeat: no-repeat;
        overflow: hidden;
        border-radius: 50%;
    }

    .text {
        order: 3;
        width: 100%;
        text-align: left;
        padding: 0;
    }

    .hover-text {
        top: 10%;
        left: 50%;
    }

    /* 01 Scrolling */
    #right-thumb-background {
        background-size: 70%;
        background-position-x: 50%;
        background-position-y: 10%;
    }

    #right-thumb-foreground {
        background-size: 70%;
        background-position-x: 50%;
        background-position-y: 10%;
    }

    /* 02 Selfies */
    #left-index-background {
        background-size: 70%;
        background-position-x: 50%;
        background-position-y: 10%;
    }

    #left-index-foreground {
        background-size: 70%;
        background-position-x: 50%;
        background-position-y: 10%;
    }

    /* 03 Identity */
    #right-index-background {
        background-size: 60%;
        background-position-x: 50%;
        background-position-y: 0;
    }

    #right-index-foreground {
        background-size: 60%;
        background-position-x: 50%;
        background-position-y: 0;
    }

    /* 04 Mice */
    #right-middle-background {
        background-size: 60%;
        background-position-x: 50%;
        background-position-y: 10%;
    }

    #right-middle-foreground {
        background-size: 60%;
        background-position-x: 50%;
        background-position-y: 10%;
    }

    /* 05 Support */
    #right-little-background {
        background-size: 70%;
        background-position-x: 50%;
        background-position-y: 10%;
    }

    #right-little-foreground {
        background-size: 70%;
        background-position-x: 50%;
        background-position-y: 10%;
    }

    /* 06 Language */
    #left-right-ring-background {
        background-size: 90%;
        background-position-x: 50%;
        background-position-y: 15%;
    }

    #left-right-ring-foreground {
        background-size: 90%;
        background-position-x: 50%;
        background-position-y: 15%;
    }

    /* 07 Games */
    #left-thumb-background {
        background-size: 90%;
        background-position-x: 50%;
        background-position-y: 10%;
    }

    #left-thumb-foreground {
        background-size: 90%;
        background-position-x: 50%;
        background-position-y: 10%;
    }

    /* 08 Virtuality */
    #left-middle-background {
        background-size: 70%;
        background-position-x: 50%;
        background-position-y: 10%;
    }

    #left-middle-foreground {
        background-size: 70%;
        background-position-x: 50%;
        background-position-y: 10%;
    }

    /* 09 Promises */
    #left-little-background {
        background-size: 40%;
        background-position-x: 50%;
        background-position-y: 10%;
    }

    #left-little-foreground {
        background-size: 40%;
        background-position-x: 50%;
        background-position-y: 10%;
    }

    /* 10 AI */
    #ai-digits-background {
        background-size: 55%;
        background-position-x: 50%;
        background-position-y: 15%;
    }

    #ai-digits-foreground {
        background-size: 55%;
        background-position-x: 50%;
        background-position-y: 15%;
    }
}
