@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;500;700&display=swap');
@import url('normalize.css');

:root {
    --dark-blue: hsl(240, 38%, 20%);
    --grayish-blue: hsl(240, 18%, 77%);

    --dark: hsl(217, 19%, 35%);
    --light: hsl(210, 46%, 95%);

    --white: hsl(0, 0%, 100%);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    line-height: 1.5;
    background: url('images/pattern-curve.svg') no-repeat left bottom var(--white);
    background-size: 230px;
    color: var(--dark-blue);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100vh;
}

p {
    margin: 0 0 1rem;
}

.container {
    max-width: 375px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.testimonials {
    position: relative;
}

.testimonial__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.testimonial__item {
    text-align: center;
}

.testimonial__item:nth-child(1) {
    display: none;
}

.testimonial__image {
    margin-bottom: 5.25rem;
    position: relative;
}

.testimonial__image::after {
    content: '';
    display: block;
    width: 327px;
    height: 308px;
    position: absolute;
    top: -30px;
    left: 0;
    z-index: -1;
    background: url('images/pattern-bg.svg') no-repeat center transparent;
    background-size: 100%;
}

.testimonial__image img {
    max-width: 254px;
    height: auto;
    display: block;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 4rem 3rem -2.5rem hsl(240deg 18% 77%);
}

.testimonial__body {
    position: relative;
    max-width: 320px;
}

.testimonial__body::after {
    content: '';
    display: block;
    width: 120px;
    height: 100px;
    background: url('images/pattern-quotes.svg') no-repeat center top transparent;
    background-size: 60px;
    position: absolute;
    top: -24px;
    left: 50%;
    transform: translateX(-50%);
}

.testimonial__quote {
    font-size: 1.125rem;
    font-weight: 300;
    margin: 0;
    color: var(--dark-blue);
}

.testimonial__author strong {
    display: block;
}

.testimonial__author span {
    display: block;
    color: var(--grayish-blue);
}

.testimonial__nav {
    position: absolute;
    top: 234px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
}

.testimonial__prev,
.testimonial__next {
    border: 0;
    padding: 0;
    background: white;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background-size: 10px;
}

.testimonial__prev:hover,
.testimonial__prev:focus,
.testimonial__next:hover,
.testimonial__next:focus {
    background-color: var(--light);
}

.testimonial__prev {
    background: url('images/icon-prev.svg') no-repeat center white;
    border-radius: 56px 0 0 56px;
}

.testimonial__next {
    background: url('images/icon-next.svg') no-repeat center white;
    border-radius: 0 56px 56px 0;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

.fade-1 {
    animation: .5s .25s fade backwards ease-out;
}

.fade-2 {
    animation: .5s .5s fade backwards ease-out;
}

@keyframes fade {
    from {
        transform: translate3d(0, -1.5rem, 0);
        opacity: 0;
    }
}

.attribution {
    display: none;
    font-size: 11px;
    text-align: center;
}

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

@media (min-width: 1200px) {
    body {
        background-size: 42%;
    }

    .container {
        max-width: 1158px;
        padding-top: 113px;
        padding-bottom: 147px;
    }

    .testimonial__item {
        text-align: left;
        display: flex;
    }

    .testimonial__image {
        order: 2;
        margin-bottom: 0;
    }

    .testimonial__image::after {
        width: 700px;
        height: 660px;
        top: -64px;
        left: -67px;
    }

    .testimonial__image img {
        max-width: 540px;
        border-radius: 0.25rem;
        box-shadow: none;
        box-shadow: -7.5rem 9.5rem 2rem -8.5rem hsl(240deg 18% 77%);
    }

    .testimonial__body {
        order: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        margin-right: -3.9rem;
        padding-top: 5.75rem;
        max-width: none;
    }

    .testimonial__body::after {
        background-size: 120px;
        top: 18.8%;
        left: 24%;
    }

    .testimonial__quote {
        font-size: 2rem;
        line-height: 1.375;
        position: relative
    }

    .testimonial__quote p {
        margin-bottom: 2.25rem;
    }

    .testimonial__author {
        font-size: 1.25rem;
        display: flex;
    }

    .testimonial__author strong {
        margin-right: 0.75rem;
    }

    .testimonial__nav {
        top: auto;
        left: auto;
        bottom: -28px;
        right: 310px;
        box-shadow: 0 0.6rem 2rem -0.5rem hsl(240deg 18% 77%);
        border-radius: 56px 56px 56px 56px;
        overflow: hidden;
    }

    .testimonial__prev,
    .testimonial__next {
        width: 56px;
        height: 56px;
        background-size: 13px;
    }
}
