/* Fontit */
@font-face {
    font-family: 'Headings';
    src: url('Fonts/upheavtt.ttf') format('truetype');
    font-weight: normal;
}

@font-face {
    font-family: 'Text';
    src: url('Fonts/Retron2000.ttf') format('truetype');
    font-weight: normal;
}

body {
    background-color: rgb(41, 151, 188);
    /* taustaväri */
    color: black;
    /* tekstin väri */
    font-family: 'Text';
    /* fontti */
    text-align: center;
    /* tekstin keskitys */
    padding-top: 65px;
    /* tila yläpuolella */
    margin: 0;
    overflow-x: hidden; /* estetään ylivuoto */
}

html {
    scroll-padding-top: 80px;
    /* lisää ylimääräistä tilaa, jotta asiat eivät jää topnavin alle */
    overflow-x: hidden;
}

/* otsikko tyylit */
h1 {
    font-family: 'Headings';
    font-size: 50px;
    letter-spacing: 5px;
}

h2 {
    font-family: 'Headings';
    font-size: 30px;
    letter-spacing: 1px;
}

h3 {
    font-family: 'Headings';
    font-size: 20px;
    letter-spacing: 1px;
}

p {
    font-family: 'Text';
}

.about p {
    margin: 0 50px 0 50px;
    background-color: rgb(135, 211, 236);
    border-radius: 5px;
    padding: 20px;
}

/* Topnav */

/* käytetään tätä vasta isommassa ruudussa */
.topnav-image {
    margin-right: -20px;
    margin-top: -5px;
}

.second-image {
    display: none;
}

#menu-icon {
    display: block;
}

header {
    position: relative;
    display: flex;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgb(135, 211, 236);
    z-index: 1000;
    /* tuo yläpalkin eteen */
    max-height: 82px;
    /* yläpalkin korkeus */
}

header h1 {
    align-items: flex-start;
    margin: 10px 0 -70px -100px;
    /* vaikuttaa myös siihen mistä menu alkaa */
    /* logon paikka */
}

header a {
    text-decoration: none;
    /* ei alleviivausta*/
}

#menu-btn {
    position: absolute;
    top: -100%;
    left: -100%;
}

/* hamppari piilotettu isoilla näytöillä */
.menu-icon {
    visibility: hidden;
}

/* logo ja hamppari kuva sen viereen ja alle itse valikko */
header {
    position: fixed;
    display: grid;
    grid-template-areas:
        "title   title   hamburger"
        "nav     nav     nav";
}

h1 {
    grid-area: title;
}

.menu-btn {
    display: none;
}

.menu-icon {
    grid-area: hamburger;
    cursor: pointer;
    display: flex;
    justify-content: flex-end;
    align-items: baseline;
    padding: 40px 50px;
    /* menu icon paikka */
    position: relative;
    user-select: none;
    visibility: visible;
}

/* viivat raksille */
.navicon {
    background: #333;
    display: block;
    height: 2px;
    width: 20px;
    position: relative;
}

.navicon:before {
    top: 7px;
}

.navicon:after {
    top: -7px;
}

.navicon:before,
.navicon:after {
    background: #333;
    display: block;
    width: 100%;
    height: 100%;
    content: '';
    position: absolute;
    transition: all .2s ease-out;
}

/* menun asettelu */
.menu {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0;

    grid-area: nav;
    max-width: unset;
    /* tekee koko sivun levyiseksi */
    max-height: 0;
    transition: max-height .2s ease-out;
    overflow: hidden;
    background-color: white;
    flex-direction: column;
    position: absolute;
}

.nav-item {
    width: 100%;
    text-align: center;
    font-size: 20px;
    display: block;
    margin: 12px 0;
    padding: 0px 50px;
    transition: all .50s ease;
    position: relative;
}

.nav-item a {
    color: rgb(41, 151, 188);
    text-decoration: none;
    /* alleviivaus pois */
}


.nav-item:first-child {
    margin-top: -5px;
}

.menu a:hover {
    color: #f62b7c;
    transform: translateY(5px) !important;
    /* hoveroidessa menee hieman alaspäin */
    /* miksi ei toimi pienellä näytöllä?!!*/
}

/* hamppari menu näkyvyyn */
.menu-btn:checked~.menu {
    max-height: 400px;
    /* hampparin pituus */

}

/* rastin muodostaminen */
.menu-btn:checked~.menu-icon .navicon {
    background: transparent;
}

.menu-btn:checked~.menu-icon .navicon:before {
    transform: rotate(-45deg);
}

.menu-btn:checked~.menu-icon .navicon:after {
    transform: rotate(45deg);
}

.menu-btn:checked~.menu-icon .navicon:before,
.menu-btn:checked~.menu-icon .navicon:after {
    top: 0;
}



/* About */

.left a {
    display: inline-block;
    transition: all 0.3s ease-in-out;
}

.left a:hover {
    transform: scale(1.0);
}

.download-button {
    width: 200px;
    padding: 20px;
    font-size: x-large;
    background-color: #fb5899;
    color: black;
    border: 5px solid black;
    border-radius: 10px;
    transition: background-color 0.3s ease;
    font-family: 'Text';
    margin-top: 50px;
}

.download-button:hover {
    transition: all 0.3s ease-in-out;
    transform: scale(1.1);

    /* hoveroidessa väri vaihtuu */
}


/* Pictures */

.marketing p {
    font-size: x-large;
    margin-bottom: -6px;
}

.marketing .right img {
    width: 300px;
    border-radius: 5px;
    align-items: center;
}

.marketing .left img {
    align-items: center;
}

.crank.up.logo {
    border-radius: 5px;
    /* Kulmien pyöristys */
}

/* google play imagen isontaminen */
.left a img {
    transition: transform 0.3s ease-in-out;
}

.left a:hover img {
    transform: scale(1.20);
}

/* pictures */

.pictures {
    display: grid;
    /* Yksi sarake */
    justify-items: center;
    align-items: center;
    gap: 20px;
}

.picture {
    width: 80%;
    max-width: 480px;
}

.gameplay {
    width: 80%;
    max-width: 480px;
}

.video {
    width: 90%;
    max-width: 600px;
    height: 300px;
}


/* Team */
/* kuvien ja tekstien asettelu */
.artist.images {
    display: flex;
    justify-content: center;
    gap: 80px;
}

.programer.images {
    display: flex;
    justify-content: center;
    gap: 5px;
}

.artist img {
    width: 120px;
    height: 120px;
}

.programer img {
    width: 120px;
    height: 120px;
}

.artist.names {
    display: flex;
    margin-left: 7px;
    gap: 130px;
    justify-content: center;
}

.programer.names {
    display: flex;
    gap: 70px;
    justify-content: center;
}

/* Korjataan välit, kun ei mene nimien pituuksien takia kivasti */
.programer.names p:nth-child(1) {
    margin-right: 15px;
    margin-left: 20px;
}

.programer p:nth-child(2) {
    margin-right: -12px;
}


/* Collaborators */
#text {
    font-size: 35px
}
.collaborators img {
    width: 140px;
}

/* Footer */
.footer {
    background-color: rgb(135, 211, 236);
    width: 100%;
    bottom: 0;
    left: 0;
    text-align: center;
    padding: 10px 0;
    position: relative;
    z-index: 1000;
}


/* Animations */
.logo {
    width: 80%;
    max-width: 400px;
    opacity: 0;
    transform: translateY(-50px);
    animation: movedown 0.5s linear forwards;
}

@keyframes movedown {
    100% {
        opacity: 1;
        transform: translateY(20px);
    }
}

@media(prefers-reduced-motion) {
    .hidden {
        transition: none;
    }
}

@media(prefers-reduced-motion) {
    .hidden {
        transition: none;
    }
}


/* Media screen */

@media only screen and (min-width: 768px) {
    h1 {
        font-size: 50px;
    }

    h2 {
        font-size: 40px;
    }

    h3 {
        font-size: 30px;
    }

    .about p {
        margin: 0 100px 0 100px;
        padding: 30px;
    }

    /* Top Navigation */
    /* Topnav */

    #menu-icon {
        display: block;
        overflow-x: hidden;
    }

    .menu {
        display: flex;
        right: -300px;
        width: 300px;
        background: white;
        flex-direction: column;
        justify-content: flex-start;
        border-radius: 5px;
        transition: all 0.5s ease;
    }

    .menu a {
        color: rgb(41, 151, 188);
        font-size: 14px;
        display: block;
        margin: 8px 0;
        padding: 0 25px;
        transition: all .50s ease;
    }

    .menu-btn:checked~.menu {
        right: 0;
        /* Tuo valikon näkyviin oikeasta reunasta */
    }

    .nav-item:first-child {
        margin-top: -20px;
    }


    /* About */
    .marketing {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 40px;
    }

    .marketing .left p {
        margin: 0 0 -130px 0;
        /* Vie tekstiä ja kuvaa lähemmäs toisiaan */
        font-size: x-large;
    }

    .download-button {
        margin-top: 200px;
    }

    /* Pictures */
    .pictures {
        grid-template-columns: 1fr 1fr;
        /* Kaksi saraketta */
    }

    .video {
        width: 600px;
        height: 400px;
    }


    /* Team */

    .artist.images {
        gap: 100px;
    }

    .programer.images {
        gap: 20px;
    }

    .artist img {
        width: 250px;
        height: 250px;
    }

    .programer img {
        width: 250px;
        height: 250px;
    }

    .artist.names {
        gap: 280px;
    }

    .programer.names {
        gap: 280px;
    }

    /* Korjataan välit, kun ei mene nimien pituuksien takia kivasti */
    .programer.names p:nth-child(1) {
        margin: 0 -70px 0 25px;
    }

    .programer p:nth-child(2) {
        margin-right: -80px;
    }


    /* Collaborators */

    .collaborators img {
        width: 250px;
    }

    #text {
        font-size: 50px;
    }

}

@media screen and (min-width: 992px) {
    html {
        scroll-padding-top: 90px;
        /* Lisää automaattisesti ylimääräistä tilaa */
    }

    h1 {
        font-size: 60px;
    }

    h2 {
        font-size: 45px;
    }

    h3 {
        font-size: 35px;
    }

    .about p {
        margin: 0 200px 0 200px;
    }


    /* Topanav */

    /* unset / hide */
    .topnav {
        all: revert;
        /* Poistaa kaikki aiemmat tyylit */
    }

    .menu {
        all: unset;
        /* Poistaa kaikki aiemmat tyylit */
    }

    .menu a:hover {
        all: unset;
    }

    .nav-item {
        all: unset;
    }

    .nav-item a {
        all: unset;
    }

    .nav-item:hover {
        all: unset;
    }

    .nav-item:first-child {
        all: unset
    }

    .nav-item:last-child {
        all: unset;
    }

    .topnav-flag {
        all: unset;
    }

    .menu a:hover {
        all: unset;
    }

    #menu-icon {
        all: revert;
        display: none;
    }

    .menu-icon {
        display: none;
    }

    header {
        all: unset;
    }

    header h1 {
        all: unset;
    }

    header a {
        all: unset;
    }

    #menu-btn {
        all: revert;
        display: none;
    }

    .navicon {
        all: revert;
        align-items: center;
    }

    .menu-btn {
        all: revert;
        display: none;
    }

    .menu-btn:checked~.menu {
        all: revert;
    }

    .menu-btn:checked~.menu-icon .navicon {
        all: revert;
    }

    .menu-btn:checked~.menu-icon .navicon:before {
        all: revert;
    }

    .menu-btn:checked~.menu-icon .navicon:after {
        all: revert;
    }

    .menu-btn:checked~.menu-icon .navicon:before,
    .menu-btn:checked~.menu-icon .navicon:after {
        all: revert;
    }

    .second-image {
        display: block;
    }

    .topnav-image {
        display: none;
    }

    /* Yläpalkin kiinnitys yläreunaan, väri, koko ja asettelu */
    .topnav {
        display: flex;
        align-items: center;
        justify-content: space-between;
        /* jakautuu tasaisesti */
        padding: 10px 20px;
        background-color: rgb(135, 211, 236);
        position: fixed;
        /* kiinnitetään yläreunaan */
        top: 0;
        left: 0;
        width: 100%;
        /* koko leveys */
        z-index: 1000;
        height: 60px;
    }

    .menu {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 70px;
        /* Tasainen väli */
        margin: 0 auto;
        padding: 0;
        list-style: none;
    }

    /* About */
    .marketing .left img {
        margin-bottom: 0;
        /* QR koodi samalle tasolle toisen kuvan kanssa */
    }


    /* Pictures */

    .video {
        width: 600px;
        height: 400px;
    }


    /* Team */

    .artist.images {
        gap: 200px;
    }

    .programer.images {
        gap: 120px;
    }

    .artist.names br {
        display: none;
        /* poistetaan rivin vaihto */
    }

    .artist.names {
        gap: 340px;
    }

    .programer.names br {
        display: none;
    }

    .programer.names {
        margin-left: 40px;
    }

    /* Korjataan välit, kun ei mene nimien pituuksien takia kivasti */
    .programer.names p:nth-child(1) {
        margin: 0 -10px 0 0;
    }

    .programer p:nth-child(2) {
        margin-right: -30px;
    }

    /* Collaborators */

    .collaborators {
        gap: 50px;
    }
    #text {
        font-size: 60px;
    }
}