@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300..700&family=Syne:wght@400..800&display=swap');

body, html{
    scroll-behavior: smooth;
    background-color: #E0D8D4;
    color: black;
    font-family: "Space Grotesk", sans-serif;
    margin: 8px;
}

h1, h2, h3, h4, h5, h6{
    font-family: "Syne", sans-serif;
    text-transform: uppercase;
}

.first-section{
    background-color: transparent;
    z-index: 2;
}
.navbar{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.navbar .logo{
    aspect-ratio: 1;
    height: 64px;
    border-radius: 6px;
}

.nav-link{
    text-decoration: none;
    color: black;
    margin-left: 16px;
    font-size: 24px;
    transition: text-shadow 100ms linear;
}

.nav-link:hover{
    text-shadow:0px 0px 1px black;
}

.background-image{
    height: max(100vh, 400px);
    width: 100vw;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
    object-fit: cover;
    filter: opacity(30%);
    object-position: center 40%;
    pointer-events: none;
    user-select: none;
}

.main-greeting{
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: calc(100vw - 20%);
    position: absolute;
    bottom: 20%;
    left: 50%;
    transform: translateX(-50%);
}

.quote{
    font-size: 44px;
    font-weight: 300;
    margin-left: 68px;
}

button{
    border: none;
    outline: none;
    border-radius: 0;
    background-color: #537074;
    padding: 16px 36px;
    font-size: 24px;
    color: white;
    text-transform: uppercase;
    font-family: "Syne", sans-serif;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: filter 100ms linear;
    cursor: pointer;
}

button .arrow{
    transition: transform 100ms linear;
}

button:hover{
    filter: brightness(80%);
}

button:hover .arrow{
    transform: translateX(8px);
}

.space{
    height: 56px;
}

.main-title{
    font-size: 52px; 
}

.secondary-title{
    font-size: 42px;
}

.section{
    padding-inline: 10%;
}

.section-title{
    color: #537074;
    font-size: 56px;
}


.promise{
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 50px;
    margin-block: 200px;
}

.promise h2{
    text-transform: none;
    max-width: min(900px, 90%);
}

.promise-title{
    margin-bottom: -150px;
}

.promise.reverse{
    flex-direction: row-reverse;
}

.promise-img{
    height: 350px;
    object-fit: cover;
    border-radius: 24px;
    transition: border-radius 100ms linear, transform 100ms linear;
}

.promise:hover .promise-img{
    border-radius: 0;
    transform: scale(1.05);
}

.arrow{
    transition: transform 100ms linear;
}

.promise:hover .arrow{
    transform: translateX(12px);
}

.promise-text h2{
    font-size: 36px;
}

.promise-text p{
    max-width: 60%;
    font-size: 24px;
}

.about-text{
    font-size: 28px;
    width: 50%;
    overflow-wrap: anywhere;
}

.footer{
    background-color: #537074;
    color: white;
    margin: -16px;
    padding: 24px 10%;
}

.footer p{
    margin-block: 0;
    font-size: 20px;
}

.default-text{
    font-size: 36px;
}

.section-promise{
    font-size: 36px;
    width: 60%;
}

.commission{
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 64px;
    margin-block: 64px;
}

.commission:nth-of-type(2n){
    flex-direction: row-reverse;
}

.commission h2{
    display: inline-block;
    text-align: center;
    color: #537074;
}

/* .commission h2 span:nth-of-type(1){
    color: #537074;
    font-size: 36px;
}

.commission h2 span:nth-of-type(2){
    color: #535353;
    font-size: 24px;
} */


.commission img{
    height: 50px;
    aspect-ratio: 1;
    border-radius: 50%;
    object-fit: cover;
}

.commission .names{
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.commission .name{
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;
}

.commission .name.chairman::after{
    content: "Esimees";
    font-weight: normal;
    color: grey;
}

.commission .name:not(.chairman):not(.notitle)::after{
    content: "Aseesimees";
    font-weight: normal;
    color: grey;
}

.name.chairman{
    font-weight: bold;
    transform: scale(1.1);
}

.names-campaign{
    display: inline-grid;
    grid-template-columns: 1fr 1fr; 
    margin: auto;
    gap: 0 16px;
}

.names-campaign .name:nth-child(odd):last-child{
    grid-column: auto / span 2;
}

@media only screen and (max-width: 900px){
    .main-greeting{
        flex-direction: column-reverse;
        position: static;
        transform: none;
        scale: 0.9;
        align-items: end;
        position: absolute;
        bottom: 8px;
        left: 8px;
    }

    .main-greeting-promise{
        width: 100%;
    }

    .navbar .links{
        display: none;
    }

    .quote{
        font-size: 34px;
        margin-left: 56px;
    }

    .background-image{
        object-position: 60% 10%;
    }

    .space{
        height: 24px;
    }

    .main-title{
        font-size: 42px; 
    }
    
    .secondary-title{
        font-size: 32px;
    }

    .section{
        position: static;
        transform: none;
        padding: 0;
    }

    .section-title{
        font-size: 42px;
        scale: 0.95;
    }

    .promise, .promise.reverse{
        flex-direction: column;
        gap: 8px;
        margin-block: 64px;
    }

    .promise-title{
        margin-bottom: -50px;
    }

    .promise p{
        max-width: 100%;
    }

    .promise-img{
        width: calc(100vw - 32px);
        height: auto;
    }

    .about-text{
        width: 100%;
        margin-inline: 8px;
    }

    .section-promise{
        font-size: 24px;
        width: 100%;
    }

    .section-promise p{
        margin-inline: 8px;
    }

    .footer{
        padding-inline: 24px;
    }

    .promise .arrow{
        display: none;
    }


    .commission{
        flex-direction: column !important;
        gap: 16px;
    }
}