@import url('https://fonts.googleapis.com/css2?family=Jost:ital,wght@0,700;1,700&family=Lato:wght@400;700&display=swap');
html {
    background-color: rgb(14, 6, 41);
}
body {
    width: 90%;
    max-width:2400px;
    margin: 0 auto;
    font-size: 1.2rem;
    line-height: 1.75rem;
    background-image: url(../img/tausta-landscape.jpg);
    background-size:contain;
    
    background-position: center top;

    font-family: "Lato", sans-serif;
    font-weight: 400;
    font-style: normal;
    color: #f4f1fb;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    line-height: 1.1em;
    text-align: center;
    font-family: "Lato", sans-serif;
    font-weight: 700;
    font-style: normal;
    overflow-wrap: anywhere; 
}



img {
    max-width: 100%;
    height: auto;
}

header,
footer,
ul,
ul>li {
    display: flex;
    flex-direction: column;
    align-items: center;

}

header ul,
footer ul {
    list-style-type: none;
    gap: 1rem;
    text-align: center;
    margin: 0;
    padding: 0;
    line-height: 1.25rem;
}

header {
    margin-bottom: 4rem;
}

header>section>ul>li {
    background-color: rgba(16, 8, 43, 0.9);
    padding: 1rem 2rem;
    border-radius: 2rem;
}

footer {
    width: 100%;
    padding-top: 2rem;
    padding-bottom: 12rem;
    background-color: rgba(16, 8, 43, 0.9);
    margin-top: 8rem;
}

#aloitus {
    min-height: 50vh;
}

header>img:nth-of-type(1) {
    max-width: 30vw;
    width: 12rem;
    margin-top: 4rem;
    margin-bottom: 4rem;
}

header>img:nth-of-type(2) {
    max-width: 60vw;
    width: 24rem;
    margin-bottom: 4rem;
}

.grid,
.gallery,
.services {
    margin: 0;
    display: grid;
    justify-items: center;
    column-gap: 4rem;
    grid-template-columns: 1fr;
    background-color: rgba(16, 8, 43, 0.9);
}

.grid {
    padding-left: 6vw;
    padding-right: 6vw;
}

.gallery>*:nth-child(-n+1) {
    grid-column: 1 / -1;
}

.gallery>figure,
.services>figure,
#konseptisuunnittelu>figure {
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}
.gallery figcaption {
display: none;
}

main {
    max-width: 100%;
    font-size: 1.5rem;
    line-height: 2.25rem;
}



@media screen and (min-width: 1200px) {

    header ul,
    footer ul {
        flex-direction: row;
    }

    .gallery {
        grid-template-columns: repeat(2, 1fr);
    }

    .services {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media screen and (min-width: 1600px) {
    .gallery {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media only screen and (orientation: portrait) {
    body {
        background-image: url(../img/tausta-portrait.jpg);
        background-repeat: repeat-y;
    }
}