@import url("https://fonts.googleapis.com/css2?family=League+Spartan:wght@400;500;700&display=swap");

:root {
    --mobile-view: 375px;
    --desktop-view: 1440px;

    --color-very-dark-magenta: hsl(300, 43%, 22%);
    --color-soft-pink: hsl(333, 80%, 67%);
    --color-dark-grayish-magenta: hsl(303, 10%, 53%);
    --color-light-grayish-magenta: hsl(300, 24%, 96%);
    --color-white: hsl(0, 0%, 100%);
}

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

.attribution {
    font-size: 0.6875rem;
    text-align: center;
    background-color: var(--color-very-dark-magenta);
    width: 100%;
    padding-block: 8px;
    color: var(--color-white);
}

.attribution a {
    color: var(--color-soft-pink);
    font-weight: bold;
}

body {
    font-size: 15px;
    background-color: var(--color-white);
    font-family: "League Spartan", sans-serif;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

main {
    max-width: 1010px;
    padding-inline: 24px;
    padding-block: 64px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    flex-grow: 1;
}

.hero-section {
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: space-between;
    margin-bottom: 64px;
}

.hero-section h1 {
    font-size: 48px;
    max-width: 320px;
    letter-spacing: -1px;
    font-weight: bold;
    color: var(--color-very-dark-magenta);
    margin-bottom: 1rem;
}

.hero-section p {
    max-width: 360px;
    line-height: 19px;
    color: var(--color-dark-grayish-magenta);
    font-weight: 500;
}

.rates {
    list-style-type: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rate {
    background-color: var(--color-light-grayish-magenta);
    border-radius: 5px;
    padding-inline: 24px;
    display: flex;
    align-items: center;
    gap: 24px;
    padding-block: 12px;
}

.rate .rate__content {
    color: var(--color-very-dark-magenta);
    font-weight: bold;
    font-size: 13px;
}

.rate:nth-of-type(2) {
    transform: translateX(-32px)
}

.rate:nth-of-type(1) {
    transform: translateX(-64px)
}

.reviews-section {
    display: flex;
    gap: 24px;
    color: var(--color-white);
}

.comment {
    background-color: var(--color-very-dark-magenta);
    padding: 28px;
    border-radius: 7px;

    &>div {
        display: flex;
        align-items: center;
        gap: 20px;

        margin-bottom: 24px;

        &>img {
            border-radius: 100%;
            width: 42px;
        }

        h2 {
            display: flex;
            flex-direction: column;
            gap: 4px;

            .comment__author {
                font-weight: bold;
            }

            .comment__verified-buyer {
                color: var(--color-soft-pink);
            }
        }
    }

    .comment__content {
        line-height: 20px;
    }
}

.comment:nth-last-of-type(1) {
    transform: translateY(32px)
}

.comment:nth-last-of-type(2) {
    transform: translateY(16px)
}

.bg-img {
    position: absolute;
}

.img-top {
    left: 0;
    top: 0;
}

.img-bottom {
    bottom: 0;
    right: 0;
}

.img-mobile {
    display: none;
}

@media (max-width: 630px) {
    .img-mobile {
        display: block;
    }

    .img-desktop {
        display: none;
    }

    .hero-section {
        flex-direction: column;
        margin-bottom: 48px;
        text-align: center;

        &>div {
            width: 100%;
        }

        h1 {
            letter-spacing: -1px;
            margin-inline: auto;
        }

        p {
            max-width: unset;
            margin-bottom: 32px;
        }
    }

    .rates {
        width: 100%;
    }

    .rate {
        transform: translateX(0px) !important;
        width: 100%;

        flex-direction: column;
        gap: 8px;
    }

    .reviews-section {
        flex-direction: column;
    }

    .comment {
        transform: translateY(0) !important;
    }
}