/* Consider reducing height of hero section by 100px */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap');

:root {
    --purple-primary: #833E98;
    --purple-secondary: #A745C4;
    --grey-primary: #979696;
    --grey-secondary: #E8E8E8;
    --grey-tertiary: #F5F5F5;
    --max-doc-width: 1440px;
    --min-doc-width: 370px;
    font-size: clamp(50%, 0.695vw, 62.5%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Inter, sans-serif;
}

body {
    font-size: 1.6rem;
}

li {
    font-size: 16px;
}

p {
    font-size: 2rem;
}

h1 {
    font-size: 4rem;
    font-weight: 500;
    margin-bottom: 0.5em;
}

h2 {
    font-size: 3.6rem;
    font-weight: 500;
    margin: 0 auto;
    margin-bottom: 1.111em;
    text-align: center;
}

h3 {
    font-size: 3.2rem;
    font-weight: normal;
    margin-bottom: 0.15625em;
}

.header-container {
    height: 50px;
    background-color: rgba(245, 245, 245, 0.5);
    position: fixed;
    top: 0;
    width: 100%;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
}

header {
    width: 100%;
    max-width: 1406px;
    height: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
}

header > .logo {
    margin-left: 40px;
}

header ul {
    display: flex;
    list-style-type: none;
    position: relative;
}

header li {
    padding: 15px 40px;
}

header nav a {
    text-decoration: none;
    color: inherit;
}

header li:hover {
    background-color: var(--purple-secondary);
    cursor: pointer;
}

.hero-container {
    background-color: var(--grey-tertiary);
    background-image: url('../assets/Vector1.png');
    background-repeat: no-repeat;
    background-position: calc(50% + 256.04px) -75.3px;
}

.hero {
    max-width: 1440px;
    aspect-ratio: 1440 / 687;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

@keyframes fade-in {
    from { opacity: 0;}
}

@keyframes slide-in-right {
    from {
        translate: 50px;
    }
}

.hero-img {
    margin-right: 1.75em;
    border-radius: 5px;
    width: 47.431%;
    animation: 2s fade-in, 2s slide-in-right;
}

.hero > div {
    width: 37.8475%;
    margin-left: 3.563em;
    position: relative;
    top: 10px;
    animation: 2s fade-in;
}

.hero > div > a {
    display: inline-block;
    padding: 0.5em 0.6667em;
    margin-top: 24px;
    text-decoration: none;
    font-size: 3rem;
    border-radius: 10px;
    background-color: var(--purple-primary);
    color: var(--grey-secondary);
}

.services-container {
    background-color: var(--grey-secondary);
    padding: 5.3125em 0 1.5625em;
}

.services {
    margin: 0 auto;
    max-width: 954px;
    width: 66.25vw;
}

.card {
    display: flex;
    padding: 2.9375em 5.1875em;
    margin-bottom: 3.75em;
    background-color: var(--grey-tertiary);
    border-radius: 15px;
    box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
}

.card:nth-of-type(odd) > .service-text {
    margin-right: 0;
    margin-left: 2.25em;
}

.service-text {
    margin-right: 2.25em;
}

.illustration {
    position: relative;
    padding-left: 2.25em;
    display: flex;
    align-items: center;
}

.illustration > img {
    width: 14.06em;
    max-width: 225px;
}

.illustration::after {
    content: "";
    display: block;
    width: 1px;
    height: 88%;
    position: absolute;
    top: 6%;
    left: 0;
    background-color: var(--grey-primary);
}

.card:nth-of-type(odd) > .illustration {
    order: -1;
    padding-left: 0;
    padding-right: 2.25em;
}

.card:nth-of-type(odd) > .illustration::after {
    left: initial;
    right: 0;
}

.about-container {
    height: 539px;
    background-color: var(--purple-primary);
    padding-top: 85px;
    color: var(--grey-secondary);
}

.about > div {
    display: flex;
    justify-content: center;
    align-items: center;
}

.about > div > img {
    max-width: 304px;
    width: 25%;
}

.about > div > p {
    max-width: 707px;
    width: 60%;
    text-align: justify;
    margin-left: 4.3%;
}

.contact-us-container {
    height: 730px;
    padding-top: 85px;
    background-color: #D9D9D9;
}

.contact-us > div {
    display: flex;
    width: fit-content;
    margin: 0 auto;
    margin-top: 62px;
}

form {
    width: 466px;
    display: grid;
    grid-template-columns: repeat(8, 40.75px);
    grid-auto-rows: 61.5px;
    gap: 9.8px 20px;
    font-size: 2rem;
    margin-right: 143px;
}

.form-item input, .form-item select, .form-item textarea {
    height: 38px;
    font-size: 1.6rem;
    width: 100%;
    padding: 2px 5px;
    background-color: var(--grey-secondary);
    border-style: solid;
    border-width: 1px;
    border-radius: 6px;
}

.form-item.fName {
    grid-column: 1 / 5;
    grid-row: 1;
}

.form-item.lName {
    grid-column: 5 / 9;
    grid-row: 1;
}

.form-item.eMail {
    grid-column: 1 / 6;
    grid-row: 2;
}

.form-item.phoneNo {
    grid-column: 6 / 9;
    grid-row: 2;
}

.form-item.subject {
    grid-column: 1 / -1;
    grid-row: 3;
}

.form-item.message {
    grid-column: 1 / -1;
    grid-row: 4 / 7;
}

.form-item.message textarea {
    height: 160px;
    max-height: 160px;
    min-height: 54px;
    max-width: 100%;
    min-width: 100%;
}

.contact-us > div > form .submit {
    grid-column: 1 / -1;
    width: 162px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    margin: 0 auto;
    color: var(--grey-secondary);
    font-size: 2.4rem;
    background-color: var(--purple-primary);
}

.contact-us .address-and-socials {
    width: 377px;
    height: fit-content;
    margin-top: 94px;
}

.contact-us .address-and-socials > p {
    margin-bottom: 20px;
}

.contact-us .address-and-socials > p span {
    display: block;
}

.socials {
    width: fit-content;
    margin-top: 40px;
}

.socials > * {
    margin: 0 10px;
}

footer {
    background-color: var(--purple-primary);
    height: 40px;
    display: flex;
    align-items: center;
}

footer small {
    max-width: 1440px;
    margin: 0 auto;
    color: var(--grey-secondary);
}

#backToTop {
    border: 2px solid black;
    border-radius: 60px;
    background-color: var(--purple-secondary);
    position: fixed;
    right: 30px;
    bottom: 60px;
    width: 50px;
    height: 50px;
    cursor: pointer;
    display: none;
}

#backToTop img {
    display: block;
    width: 100%;
    height: 100%;
}


@media screen and (max-width: 1099px) {
    :root {
        font-size: clamp(6px, 1.5vw, 50%);
        min-width: var(--min-doc-width);
    }

    header li {
        padding: 15px 20px;
    }

    .hero-container {
        padding: 50px 0 48px;
        background-image: url('../assets/Vector-mobile.png');
        background-size: 100%;
        background-position: 0 10%;
    }

    .hero {
        flex-direction: column;
    }

    .hero-img {
        margin: 32px 0px 34px;
        /* width: 88.295%; */
        width: 75%;
    }

    .hero > div {
        order: 1;
        position: initial;
        margin: 0;
        width: initial;
        text-align: center;
    }

    h1 {
        margin: 0 auto 0.5em auto;
        width: 335px;
    }

    h2 {
        font-size: 4rem;
    }

    h3 {
        font-size: 3.33333rem;
    }

    p {
        font-size: 2.66667rem;
    }

    .hero > div > p {
        width: 21.6875em;
    }

    .hero button {
        display: block;
        margin: 0 auto;
        font-size: 4rem;
    }

    h3::after {
        content: "";
        display: block;
        width: 60%;
        margin: 5px auto;
        height: 2px;
        background-color: var(--purple-primary);
    }

    body {
        font-size: 2.66667rem;
    }

    .services {
        width: 85.8vw;
    }

    .card {
        flex-direction: column;
        padding: 1.6875em 1.0625em;
        max-width: 515px;
        margin: 0 auto 3.75em;
    }

    .service-text {
        text-align: center;
        margin: 0;
    }

    .card:nth-of-type(odd) > .service-text {
        margin: 0;
    }

    .illustration {
        order: -1;
        margin-bottom: 1em;
        padding: 0;
    }

    .card:nth-of-type(odd) > .illustration {
        padding: 0;
    }

    .illustration::after {
        display: none;
    }

    .illustration > img {
        display: block;
        margin: 0 auto;
    }

    .about-container {
        height: auto;
        padding: 2.5em 0;
    }

    .about > div {
        flex-direction: column;
    }

    .about > div > img {
        width: 77.9%;
        max-width: 500px;
        margin-bottom: 1.875em;
    }

    .about > div > p {
        width: 85.75%;
        margin: 0;
    }

    .contact-us-container {
        height: auto;
    }

    .contact-us > div {
        flex-direction: column;
    }

    form {
        display: block;
        width: auto;
        font-size: 2.66667rem;
        margin: 0 auto;
    }

    .form-item {
        margin: 15px 0;
    }

    .form-item input, .form-item select, .form-item textarea {
        font-size: 1em;
    }

    .contact-us > div > form .submit {
        font-size: 1.25em;
        padding: 0.3125em 1.1875em;
        width: auto;
        display: block;
    }

    .contact-us .address-and-socials {
        width: 80%;
        margin: 50px auto 0;
    }

    .socials {
        margin: 50px 0 80px;
    }

    #backToTop {
        right: 10px;
        width: 40px;
        height: 40px;
    }
}