@import url('https://fonts.googleapis.com/css2?family=Open+Sans&family=Raleway:wght@400;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', sans-serif;
    font-weight: 400;
}

header {
    margin: 3em 1em;
}

header figure img {
    float: left;
}

header ul li {
    text-decoration: none;
    display: inline;
    float: right;
}

header ul li a {
    text-decoration: none;
    margin: 0.3em;
    font-size: 1.5rem;
    font-family: 'Raleway', sans-serif;
    color: hsl(243, 87%, 12%);
}

main section:first-child {
    padding-top: 10em;
}

main section:first-child div figure img {
    display: block;
    width: 90%;
    height: auto;
    margin: auto;
}

main section:first-child div h1 {
    text-align: center;
    font-family: 'Raleway', sans-serif;
    font-size: 2.3rem;
    margin: 1em;
    color: hsl(243, 87%, 12%);
    font-weight: 700;
}

main section:first-child div p {
    font-size: 1.2rem;
    text-align: center;
    padding: 0 2em 1em 2em;
    color: hsl(243, 87%, 12%);
}

main section:first-child div input {
    display: block;
    padding: 0.8em;
    font-size: 1rem;
    width: 80%;
    margin: auto;
    font-size: 1.5rem;
    border: 3px solid hsl(243, 87%, 12%);
    border-radius: 0.3em;
}

main section:first-child div button {
    display: block;
    padding: 0.8em;
    font-family: 'Raleway', sans-serif;
    font-size: 1rem;
    color: hsl(240, 75%, 98%);
    background-color: hsl(224, 93%, 58%);
    width: 80%;
    margin: 1em auto;
    font-size: 1.5rem;
    border: none;
    border-radius: 0.3em;
    font-weight: 700;
}

main section:first-child div button:hover,
main section:first-child div button:focus-visible {
    background-color: hsla(224, 93%, 58%, 0.6);
    cursor: pointer;
}

main section:nth-child(2) {
    background-color: hsl(240, 75%, 98%);
    background-image: url(../images/bg-curve-mobile.svg);
    background-repeat: no-repeat;
    background-size: auto;
    padding: 2em;
}

main section:nth-child(2) div:first-child figure img {
    width: 99%;
    height: auto;
    display: block;
    margin: auto;
}

main section:nth-child(2) div:nth-child(2) h2 {
    font-family: 'Raleway', sans-serif;
    font-weight: 700;
    text-align: center;
    font-size: 1.6rem;
    margin: 3em auto 1em auto;
}

main section:nth-child(2) div:nth-child(3) p {
    margin: 1em 1.5em;
    font-size: 1.2rem;
    color: hsl(238, 22%, 44%);
}

main section:nth-child(2) div:nth-child(4) p {
    color: hsl(170, 45%, 43%);
    font-size: 1.2rem;
    width: 43%;
    margin: auto;
    padding-bottom: 0.5em;
    border-bottom: 3px solid hsl(170, 45%, 43%);
}

main section:nth-child(2) div:nth-child(5) img {
    width: 10%;
    height: auto;
}

main section:nth-child(2) div:nth-child(5) {
    background-color: hsl(0, 0%, 100%);
    width: 90%;
    margin: 2em auto;
    padding: 1.5em;
    border-radius: 0.5em;
    box-shadow: 0.5em 0.5em 0.5em hsla(0, 0%, 0%, 0.103);
}

main section:nth-child(2) div:nth-child(5) img {
    width: 5%;
    height: auto;
}

main section:nth-child(2) div:nth-child(5) p {
    font-size: 1.1rem;
    color: hsl(243, 87%, 12%);
}

main section:nth-child(2) div:nth-child(5) figure img {
    padding: 0;
    width: 12%;
    margin: 1em 1em 1em 0;
    border-radius: 50%;
    float: left;
}

main section:nth-child(2) div:nth-child(5) h3 {
    margin-top: 0.8em;
    font-family: 'Raleway', sans-serif;
    font-weight: 700;
}

main section:nth-child(2) div:nth-child(5) p span {
    font-size: 0.6em;
    font-weight: 700;
}

main section:last-child {
    padding: 3em;
    background-color: hsl(238, 22%, 44%);
    text-align: center;
    color: hsl(240, 75%, 98%);
}

main section:last-child div h2 {
    font-family: 'Raleway', sans-serif;
    margin: 0.5em auto 1em auto;
    font-size: 2rem;
    font-weight: 700;
}

main section:last-child div p {
    font-size: 1.2rem;
    color: hsl(0, 0%, 75%);
    margin-bottom: 1em;
}

main section:last-child div input {
    display: block;
    padding: 0.8em;
    font-size: 1.2rem;
    width: 80%;
    margin: auto;
    font-size: 1.2rem;
    border: none;
    border-radius: 0.1em;
}

main section:last-child div button {
    display: block;
    padding: 0.8em;
    font-family: 'Raleway', sans-serif;
    font-size: 1.2rem;
    color: hsla(240, 80%, 98%, 0.89);
    background-color: hsl(224, 93%, 58%);
    width: 80%;
    margin: 1em auto;
    font-size: 1.2rem;
    border: none;
    border-radius: 0.1em;
    font-weight: 700;
}

main section:last-child div button:hover,
main section:last-child div button:focus-visible {
    background-color: hsla(224, 93%, 58%, 0.5);
    cursor: pointer;

}

footer {
    background-color: hsl(243, 87%, 12%);
    padding: 2em;
    color: hsl(240, 75%, 98%);
    font-size: 1.5rem;
    display: grid;
    gap: 1em;
}

footer p {
    margin: 0.5em;
}

footer div:first-child img {
    width: 50%;
    height: auto;
    background-color: hsla(240, 80%, 98%, 0.5);
    box-shadow: 0.3em 0.3em 0.3em hsl(0, 0%, 0%);
    padding: 0.2em;
    border-radius: 0.2em;
    margin: 0.5em;
}

footer div p figure img {
    width: 20%;
    height: auto;
    margin: 1em;
}

footer div:nth-child(5) {
    width: fit-content;
    margin: auto;
}

footer div:nth-child(5) img {
    margin: 0.5em;
}

.attribution {
    font-size: 0.7rem;
    text-align: center;
    background-color: hsla(0, 0%, 0%, 0.5);
    width: fit-content;
    padding: 0.2em;
    margin: auto;
}

.attribution a {
    color: hsl(228, 45%, 44%);
}

@media (min-width: 600px) {
    header {
        margin: 3em 2em;
    }

    header figure img {
        width: 18%;
        height: auto;
    }

    main section:first-child {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        width: 99%;
        margin: 0 auto 10em auto;

    }

    main section:first-child div:first-child {
        grid-column: 2/3;
        grid-row: 1/2;
    }

    main section:first-child div:last-child {
        grid-column: 1/2;
        grid-row: 1/2;
    }

    main section:first-child div:last-child h1 {
        text-align: left;
        font-size: 3rem;
        margin-top: 2em;
    }

    main section:first-child div:last-child p {
        text-align: left;
        font-size: 1.4rem;
    }

    main section:first-child div:last-child input {
        width: 50%;
        display: inline;
        margin-left: 2em;
    }

    main section:first-child div:last-child button {
        width: 30%;
        display: inline;
        padding: 0.9em;
        margin-left: 0.5em;
    }

    main section:nth-child(2) {
        background-image: url(../images/bg-curve-desktop.svg);
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }

    main section:nth-child(2) div:first-child {
        grid-column: 2/3;
        grid-row: 1/5;
    }

    main section:nth-child(2) div:nth-child(2) h2 {
        text-align: left;
        font-size: 3rem;
        margin-left: 0.6em;
    }

    main section:nth-child(2) div:nth-child(3) p {
        font-size: 1.5rem;
    }

    main section:nth-child(2) div:nth-child(4) p {
        text-align: left;
        margin: 0 0 0 1.7em;
        font-size: 1.2rem;
        width: fit-content;
    }

    main section:nth-child(2) div:nth-child(5) {
        width: 45%;
        margin: 2em 0 4em 1.7em;
    }

    main section:last-child {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }

    main section:last-child div:first-child {
        text-align: left;
    }

    main section:last-child div:first-child h2 {
        font-size: 3rem;
    }

    main section:last-child div:first-child p {
        font-size: 1.5rem;
    }

    main section:last-child div:last-child {
        margin-left: 1em;
    }

    main section:last-child div:last-child input {
        margin: 2em 0 0.8em 0;
    }

    main section:last-child div:last-child button {
        width: fit-content;
        margin: 0;
    }

    footer {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
    }

    footer div:first-child {
        grid-column: 1/2;
        grid-row: 1/2;
    }

    footer div:nth-child(2) {
        grid-column: 1/2;
        grid-row: 2/3;
    }

    footer div:nth-child(3) {
        grid-column: 2/3;
        grid-row: 1/3;
        margin-top: 6em;
    }

    footer div:nth-child(4) {
        grid-column: 3/4;
        grid-row: 1/3;
        margin-top: 6em;
    }

    footer div:nth-child(5) {
        grid-column: 4/5;
        grid-row: 1/3;
        margin-top: 6em;
    }

    footer div:nth-child(5) img {
        margin: 0.5em;
    }

    footer div:last-child {
        grid-column: 1/5;
        grid-row: 3/4;
    }
}