@import 'style.css';

html{
    scroll-behavior: smooth;
    scrollbar-width: none;
    font-size:small;
}

/*makes text bigger on big screens*/

@media screen and (max-width: 2000px){
    html{
        font-size:xx-large;
    }
}

body
{
    width: 100%;
    margin: 0%;
}

/*handles cafe name/title and menu*/
.top-bar{
    font-size: small;
    position: relative;
    overflow-y: hidden;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    img{
        width: 20px;
        height: auto;
    }
    /*makes menu button white in dark mode*/
    @media screen and (prefers-color-scheme: dark) {
        img{
            filter: invert(100%);
        }
    }
    /*title*/
    h1{
        padding-top: 2vh;
        padding-left: 5vh;
        text-shadow: 2px 2px 1px var(--base),
        0px 0px 2px var(--base);
    }
    /*on-hover menu*/
    ul{
        margin-right: 20px;
        display: flex;
        flex-direction: row-reverse;
        gap: 1rem;
        list-style-type: none;
        background-color: var(--base);
        opacity: 90%;
        padding: 3px 10px;
        border-radius:15px 0px 15px 15px;
        /*on-hover menu list items*/
        li{
            display: none;
            a{
                text-decoration: none;
                color: var(--text);
            }
        }
        
    }    
    /*handles on hover menu hovering, excludes small screens because mobile not hover compatible*/
    @media screen and (width > 900px) { 
        ul:hover{
            li{
                display: flex;
            }
            li:hover{
                transform: scale(1.1);
            }
        }
    }
    /*on-hover menu for small screens*/
    @media screen and (width < 900px) { 
        ul{
            gap: 0.25rem;
            li{
                display: inline;
                margin: 0;
            }
            li:hover{
                transform: scale(1.1);
            }
        }
    }
    /*on-hover menu handles really small screens and portrait mode*/
    @media screen and (max-width: 500px) {
        ul{
            flex-direction: column;
            li:nth-child(5){
            padding-bottom: 6px;
        }
        }
    }
}
/*makes top bar big for big screens*/
@media screen and (min-width: 1000px) {
    .top-bar{
        font-size: xx-large;
    }
}
/*handles most of main page*/
header{
    width: auto;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-image: url('../images/light-port.jpg');
    background-size: cover;
    background-position: top;
    background-repeat: no-repeat;
    overflow: hidden;
    p{
        position: absolute;
        top: 35%;
        text-shadow: 2px 2px 1px var(--base);
        margin: 2vw;
        margin-right: 20vw;
        font-size: x-large;
        background-color: var(--base);
        border-radius:0px 15px 15px 15px;
        padding: 4px 10px;
        opacity: 90%;
    }
    /*does weekly special button and animation*/
    .bounce{
        background-color: var(--highlight);
        align-self: center;
        animation: bounce 3s linear infinite;
        .wsplink{
            color: var(--accent);
            display: inline;
            text-decoration: none;
            font-size: x-large;
        }
        /*colour change for animated button*/
        .wsplink:hover{
            color: var(--text);
        }    
    }
}
/*the animation for animated button*/
@keyframes bounce {
0% {transform: translate(0, 0);}
7% {transform: translate(0, 10px);}
15% {transform: translate(0, 0);}
100% {transform: translate(0, 0);}
}

/*these media queries handle hero image change for different situations*/
@media screen and (orientation: landscape){
    header{
        background-image: url('../images/light-land.jpg');
    }
}

@media screen and (prefers-color-scheme: dark){
    header{
        background-image: url('../images/dark-port.jpg');
    }
}

@media screen and (orientation: landscape) and (prefers-color-scheme: dark){
    header{
        background-image: url('../images/dark-land.jpg');
    }
}

.special{
    display: flex;
    position: relative;
    width: auto;
    height: auto;
    border-top: 20px;
    border-color: var(--accent);
    border-style: solid;
    justify-content: center;
    background-image: url('../images/beans.jpg');
}

/*handles background for the special*/
.spackground{
    display: grid;
    grid-template-columns: 3;
    grid-template-rows: 3;
    background-color: var(--base);
    position: relative;
    width: 100vw;
    margin: 20px;
    align-self: center;
    h2{
        grid-column: 1/2;
        grid-row: 1;
        font-size:xx-large;
        margin-left: 20px;
    }
    em{
        
        margin-left: 30px;
        grid-column: 1;
        grid-row: 2;
        font-size: medium;
        a{
            color:  var(--text);
        }
        
    }
    p{
        
        margin-left: 40px;
        margin-right: 20px;
        margin-bottom: 20px;
        grid-column: 1/2;
        grid-row: 2;
        grid-row: span 2;
        font-size:medium;
    }
    /*small screen handling for fonts in special section*/
    @media screen and (min-width: 1000px) {
        p{
            font-size: xx-large;
        }
        em{
            font-size: xx-large;
        }
        h2{
        font-size: 96px;
        margin: 1rem;
        }
    }
}

/*handles special image*/
.spimg{
    grid-column: 3;
    grid-row: 1/4;
    width: 30vw;
    height: auto;
    justify-self: right;
    margin: 20px;
}

/*handles mobile for special*/
@media screen and (orientation: portrait){
    .special{
        margin: 0;
    }
    .spackground{
        display:flex;
        flex-direction: column;
    }
    .spimg{
        height: auto;
        width: 100vw;
        margin: 0;
    }
}

/*footer formatting*/
footer{
    background-color: var(--accent);
    display: flex;
    flex-direction: column;
    a{
        height: 6vh;
        align-self: center;
        color: var(--text);
    }
    a:hover{
        color: var(--highlight);
    }
    section{
        height: 4rem;
        width: 100%;
        background-color: var(--highlight);
        align-items: center;
        display: flex;
        justify-content: space-between;
        
        p{
            padding: 10px;
        }
    }
}
