@import url('https://fonts.googleapis.com/css2?family=Recursive:wght,CASL,CRSV@300..800,0..1,0&display=swap');

:root {
    --white: #ece9d4;
    --light-gray: #E2D2B5;
    --orange: #c78147;
    --yellow: #d5c96c;
    --cyan: #5596a6;
    --blue: #32557e;
    --black: #1f2042;
}

a { color: var(--blue); }
a:active, a:hover { color: var(--orange); }
img { width: 100%; height: auto; }
p, figure { margin: 0; padding: 1rem 0; }
p:first-child, #faq>details:first-child { padding-top: 0;}
p:last-child, #faq>detail:last-child { padding-bottom: 0;}
ul { margin: 0; padding: 1rem 0 1rem 1rem; }
h2 {
    margin: 0; padding: 1rem 0; font-size: 2.5em; text-align: center;
    font-variation-settings: "CASL" 0.5, "wght" 800;
    img { max-height: 10rem; width: auto; max-width: 100%; height: auto; }
}

body {
    padding: 0; margin: 0;
    font-family: 'Recursive', Arial, sans-serif;
    font-variation-settings: "CASL" 0.25, "wght" 500;
    background-color: var(--light-gray); color: var(--black);
}

#ideas p, #ideas li {
    filter: drop-shadow(0px 0px 2px var(--white));
}

header {
    background-image: url("water.png"), linear-gradient(to top, var(--cyan), var(--blue));
    background-size: 16rem auto; background-blend-mode: overlay; text-align: center;
    display: flex; align-items: center; flex-direction: column; gap: 1rem;
    h1 {
        margin: 0 auto; padding: 2rem 1rem 0;
        img { max-width: 25rem; }
    }
    p {
        padding: 1rem; max-width: 20rem; margin: 0 1rem;
        background-color: var(--white); border-radius: 2rem;
        position: relative;
        &::before {
            content: ""; display: block; position: absolute;
            width: 0; height: 0; top: -1.5rem; left: calc(50% - 1rem);
            border-left: 1rem solid transparent;
            border-right: 1rem solid transparent;
            border-bottom: 1.5rem solid var(--white);
        }
    }
    a {
        background-color: var(--yellow); padding: 1rem 2rem; margin: 0 1rem; display: block;
        border-radius: 2rem; max-width: 10rem; border: 2px solid var(--yellow);
        cursor: pointer;
        &:hover, &:active { background-color: var(--blue); color: var(--white); border-color: var(--cyan);}
    }
    &::after {
        content: ""; width: 100%; height: 6rem;
        display: block;
        background-image: url("shore.png");
        background-size: auto 100%; background-repeat: repeat-x;
    }
}

main {
    background-image: url("sand.webp"), linear-gradient(to top, var(--light-gray), var(--white));
    background-blend-mode: overlay;
    padding: 1rem 2rem; 
    h2>img { max-height: 7rem;}
    #scatters {
        position: relative; height: 3rem; top: -1rem; max-width: 20rem; margin: auto; 
        img { position: absolute; width: 3.5rem; height: auto; }
        img:first-child { rotate: -15deg; }
        img:nth-child(2) { display: none; width: 2.5rem; left: 3rem; top: 2rem; rotate: 5deg; }
        img:nth-child(3) { width: 2.5rem; right: 3rem; top: 3rem; rotate: 60deg; }
        img:nth-child(4) { display: none; width: 3rem; left: calc(50% - 1.25rem);  }
        img:last-child { right: 0; }
    }
    #prizes>div {display: flex; gap: 1rem; flex-direction: column;}
    #prizes figure {
        text-align: center;
        img { max-width: 10rem; }
    }
    #ideas>ul { max-width: 30rem; margin: auto;}
    #ideas>h2>img { max-height: 10rem;}
    #faq {
        details {
            background-color: var(--cyan);
            border-radius: 1rem; margin: 1rem 0;
            summary {
                background-color: var(--blue); color: var(--white);
                padding: 1rem 2rem; border-radius: 1rem;
            }
            p { padding: 1rem; }
            ul { padding: 1rem 1rem 1rem 2rem;}
        }
    }
}

footer {
    background-color: var(--cyan);
    color: var(--light-gray);
    padding: 1rem 2rem;
}

footer a {
    color: var(--white)
}

#thermometer {
    position: fixed;
    right: 20px;
    top: 20px;
    height: 90%;
    width: 20px;
    background-color: #fff;
    border-radius: 10px;
    z-index: 100;
}

#thermometer .fill {
    position: absolute;
    right: 4px;
    bottom: 22px;
    width: 12px;
    height: 95%;
    background-color: var(--orange);
    border-radius: 10px;
    z-index: 101;
}

#thermometer .bulb {
    position: absolute;
    bottom: 0;
    left: -10px;
    width: 30px;
    height: 30px;
    background-color: var(--orange);
    border-radius: 50%;
    border: 5px solid #fff;
    z-index: 100;
}

#jerboa-popup {
    position: absolute;
    z-index: 10;
    transform: translate(-50%, -50%);
    display: none;
    height: 200px !important;
    width: 200px !important;
}   


/* Mobile large */
@media screen and (min-width: 18rem) {
    main>#scatters {
        img:nth-child(2), img:nth-child(4) { display: block; }
    }
    #ideas>p {max-width: 40rem; margin: auto; }
}
/* Tablet view */
@media screen and (min-width: 40rem) {
    header {
        background-size: 20rem auto;
        padding-top: 2rem;
        h1>img { max-width: 30rem;}
        p { max-width: 25rem; margin-bottom: 1rem;}
        &::after { height: 8rem; }
    }
    main {
        h2>img { max-height: 10rem;}
        #scatters {
            max-width: 30rem; height: 4rem;
            img { width: 4rem; }
            img:nth-child(2) { width: 3rem; left: 4rem; }
            img:nth-child(3) { width: 3rem; right: 5rem; }
            img:nth-child(4) { width: 4rem; top: -0.5rem;}
            
        }
        #prizes {
            >div { flex-direction: row; justify-content: center; }
            figure>img { max-width: 15rem;}
        }
        #ideas>ul { max-width: 30rem;}
        #ideas>h2>img { max-height: 12rem;}
        #faq>h2>img { max-height: 10rem;}
        #faq {
            details { width: 35rem; margin-left: auto; margin-right: auto; }
        }
    }
    footer { text-align: center; padding: 2rem; }
}
/* Desktop view */
@media screen and (min-width: 67rem) {
    header {
        background-size: 25rem auto;
        padding-top: 3rem;
        h1>img { max-width: 40rem;}
        &::after { height: 10rem; }
    }
    main {
        h2>img { max-height: 15rem;}
        #scatters {
            max-width: 40rem; height: 5rem;
            img { width: 5rem; }
            img:nth-child(2) { width: 4rem; left: 5rem; }
            img:nth-child(3) { width: 4rem; right: 6rem; }
            img:nth-child(4) { width: 5rem; top: -1rem;}
            
        }
        #ideas>h2>img { max-height: 14rem;}
        #faq>h2>img { max-height: 12rem;}
        #faq {
            details { width: 35rem; margin-left: auto; margin-right: auto; }
        }
    }
}
