:root {
    --white: hsl(0, 0%, 100%);
    --light-pink: hsl(275, 100%, 97%);
    --grayish-purple: hsl(292, 16%, 49%);
    --dark-purple: hsl(292, 42%, 14%);
}

@font-face {
    font-family: 'WorkSans';
    src: url('./assets/fonts/WorkSans-VariableFont_wght.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'WorkSans-Bold';
    src: url('./assets/fonts/static/WorkSans-Bold.ttf') format('truetype');
    font-weight: normal;
    font-style: bold;
}

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

html {
    font-size: 62.5%;
}

img {
    max-width: 100%;
}

body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100%;
    font-family: 'WorkSans';
    background-color: var(--light-pink);
    color: var(--dark-purple);
}

.img-container {
    position: absolute;
    width: 100%;
    height: 25%;
    top: 0;
    z-index: 0;
    background-image: url(./assets/images/background-pattern-mobile.svg);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: bottom;
}

.faq-container {
    background-color: var(--white);
    padding: 1em 2.6em;
    border-radius: .8em;
    width: 88%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2em;
    z-index: 2;
    box-shadow: rgba(0, 0, 0, 0.1) 0px 10px 50px;
}

header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 2em;
    padding-top: 1.5em;
    padding-bottom: 1em;
}

header img {
    width: 2.4em;
}

h1 {
    font-size: 3.2rem;
    font-family: 'WorkSans-Bold';
}

details {
    border-bottom: 2px solid var(--light-pink);
    list-style: none; 
    width: 100%;
}

details:last-child {
    border-bottom: none;
}

details[open] > summary::after {
    content: url("./assets/images/icon-minus.svg");
}

summary {
    font-size: 1.6rem;
    font-weight: bold;
    list-style: none;
    cursor: pointer;
    padding-bottom: 1em;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2em;
}

summary::after {
    content: url("./assets/images/icon-plus.svg");
}

details p {
    padding: 1em 0;
    font-size: 1.4rem;
    color: var(--grayish-purple);
    font-weight: 500;
    line-height: 1.5em;
}

.attribution { 
    position: absolute;
    bottom: 2em;
    font-size: 11px; 
    text-align: center; 
}

.attribution a { 
    color: var(--grayish-purple); 
}

@media screen and (min-width: 769px) {
    .img-container {
        height: 36%;
        background-image: url(./assets/images/background-pattern-desktop.svg);
    }
    
    .faq-container {
        padding: 1.5em 4em;
        border-radius: 1.5em;
        width: 60%;
        gap: 2em;
    }

    header {
        gap: 3em;
        padding-top: 2em;
        padding-bottom: 0em;
    }
    
    header img {
        width: 4em;
    }
    
    h1 {
        font-size: 3.6rem;
    }

    summary {
        font-size: 1.6rem;
        gap: 2em;
    }
    
    details p {
        padding: 0;
        padding-bottom: 1.5em;
        font-size: 1.4rem;
    }
}

@media screen and (min-width: 1339px) {
    .faq-container {
        width: 46%;
    }
    
    h1 {
        font-size: 5.5rem;
    }

    summary {
        font-size: 1.8rem;
    }
    
    details p {
        font-size: 1.6rem;
    }

}