@import url(./reset.css);
@import url(./fonts.css);

:root {
    --very-dark-magenta: hsl(300, 43%, 22%);
    --soft-pink: hsl(333, 80%, 67%);

    --dark-grayish-magenta: hsl(303, 10%, 53%);
    --light-grayish-magenta: hsl(300, 24%, 96%);
    --white: hsl(0, 0%, 100%);

    --fs-normal: clamp(0.9375rem, 0.29vw + 0.944rem, 1.125rem);
    --fs-large: clamp(2.625rem, 3.188vw + 2.007rem, 52px);
    --mx-width: clamp(310px, 90%, 1200px);
}

body {
    font-family: 'League Spartan', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('/images/bg-pattern-bottom-mobile.svg') bottom right no-repeat,
        url('/images/bg-pattern-top-mobile.svg') top left no-repeat;
}

main {
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wrapper {
    margin-inline: auto;
    /* max-width: 75rem;
    width: 90%; */
    margin-top: 4rem;
    max-width: var(--mx-width);
}

.hero {
    text-align: center;
}

.social-proof__title {
    color: var(--very-dark-magenta);
    line-height: .8;
    margin-inline: auto;
    font-weight: 800;
    font-size: var(--fs-large);
    max-width: 12ch;
}

.social-proof__paragraph {
    font-size: var(--fs-normal);
    font-weight: 500;
    margin-inline: auto;
    min-width: 32ch;
    max-width: 45ch;
    margin-block: 1.5rem;
    color: var(--dark-grayish-magenta);
}

.social-proof__rates {
    display: flex;
    flex-flow: column nowrap;
    gap: .8em;
    margin-block: 2rem;
}

.rating-container {
    padding: 1em 0em;
    border-radius: .5em;
    display: flex;
    flex-flow: column;
    text-align: center;
    gap: .5rem;
    font-size: var(--fs-normal);
    background-color: var(--light-grayish-magenta);
}

.rating-box {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: .5em;

    & img {
        width: .9375rem;
    }
}

.rating-text {
    color: var(--very-dark-magenta);
    font-weight: 700;
}

.social-proof__testimonials {
    display: flex;
    flex-flow: column;
    gap: 1rem;
    margin-bottom: 1rem;
}

.testimonial {
    background-color: var(--very-dark-magenta);
    border-radius: .5rem;
    padding: 2rem 2rem;
}

.user-profile {
    display: flex;
    align-items: center;
    color: var(--white);
    margin-bottom: 1rem;
    gap: 1rem;

    & .user-profile__picture {
        width: 42px;
        height: 42px;
        border-radius: 50%;
    }
}

.user-profile__name {
    font-weight: 700;
}

.user-profile__occupation {
    color: var(--soft-pink);
    font-size: 15px;
}

.testimony {
    font-size: var(--fs-normal);
    color: var(--light-grayish-magenta);
}

@media (width >=62.5em) {

    body {
        background: url('/images/bg-pattern-bottom-desktop.svg') bottom right no-repeat,
            url('/images/bg-pattern-top-desktop.svg') top left no-repeat;
    }

    .wrapper {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(1, 1fr);
        row-gap: 2.5rem;
    }

    .hero {

        align-self: center;
        text-align: left;
    }

    .social-proof__paragraph {
        margin-inline: 0;
    }

    .social-proof__title {
        margin: 0;
    }

    .rating-container {
        padding: .8em 2em;
        max-width: 27.8125rem;
        flex-flow: row;
        justify-content: center;
        gap: 1.5rem;
    }

    .rating-box {
        gap: .5em;

        & img {
            width: 1.125rem;
        }
    }

    .rating-container:nth-of-type(1) {
        align-self: self-start;
    }

    .rating-container:nth-of-type(2) {
        align-self: center;
    }

    .rating-container:nth-of-type(3) {
        align-self: self-end;
    }

    .social-proof__testimonials {
        flex-flow: row;
        grid-column: 1/3;
        margin-bottom: 0;
        position: relative;
        gap: 2.5rem;
        /* outline: 1px solid red; */
    }

    .testimonial:nth-of-type(2) {
        position: relative;
        top: 1.5rem;
    }

    .testimonial:nth-of-type(3) {
        position: relative;
        top: 2.5rem;
    }
}

@media (width >=1024px) {
    .rating-container {
        padding: .6em 1em;
        min-width: 400px;
        font-size: 1rem;
        flex-flow: row;
        justify-content: center;
        gap: 1.5rem;
    }
}