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

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

@font-face {
  font-family: "Work Sans";
  font-weight: 400;
  src: url("./assets/fonts/static/WorkSans-Regular.ttf");
}
@font-face {
  font-family: "Work Sans Semi Bold";
  font-weight: 600;
  src: url("./assets/fonts/static/WorkSans-SemiBold.ttf");
}
@font-face {
  font-family: "Work Sans Bold";
  font-weight: 700;
  src: url("./assets/fonts/static/WorkSans-Bold.ttf");
}

body {
  font-family: "Work Sans", sans-serif;
  min-height: 100vh;
  background-color: var(--light-pink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-image: url('./assets/images/background-pattern-mobile.svg');
  background-size: contain;
  background-repeat: no-repeat;
}

.container {
  width: fit-content;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: var(--white);
  border-radius: .5rem;
  padding: 1.5rem;
  margin: 0 1.5rem;
  gap: 1.5rem;
  box-shadow: 0 1rem 2rem 2rem rgba(0, 0, 0, 0.05);
}

.header {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: start;
    gap: 1.5rem;
}
.header-icon {
    max-width: 1.5rem;
    max-height: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}   
.header-icon img {
    width: 100%;
    height: 100%;
}

h1 {
  color: var(--dark-purple);
  font-family: "Work Sans Bold", sans-serif;
}

.accordion, .accordion-item {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.question {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.title-button {
    width: fit-content;
    background-color: transparent;
    border-radius: 1rem;
    border: none;
    cursor: pointer;
    color: var(--dark-purple);
    font-family: "Work Sans Semi Bold", sans-serif;
    font-size: 1rem;
    text-align: left;
    transition: color .3s ease-in-out;
}
.title-button:hover {
    color: var(--purple);
}
.question-button {
    min-width: fit-content;
    min-width: fit-content;
    max-height: 2rem;
    max-height: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    border-radius: 50%;
    border: none;
    cursor: pointer;
}
.question-button > .icon-plus:hover {
    filter: brightness(50%);
    transition: filter .3s ease-in-out, transform .3s ease-in-out;
    transform: scale(1.1);
}
.question-button > .icon-minus:hover {
    filter: brightness(250%);
    transition: filter .3s ease-in-out, transform .3s ease-in-out;
    transform: scale(1.1);
}
.icon-plus, .icon-minus {
    width: 100%;
    height: 100%;
    background-size: cover;
}
.answer {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: start;
    justify-content: center;
}
.answer-text {
    color: var(--grayish-purple);
    font-family: "Work Sans", sans-serif;
    font-size: .9rem;
    line-height: 1.5;
    display: none;
    text-align: left;
}

.attribution { 
    font-size: 11px;
    text-align: center;
}
.attribution a { 
    color: hsl(228, 45%, 44%);
}

.isOff{
    display: none;
}
.isOn{
    display: flex;
    animation: fadeIn .3s ease-in-out;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

@media (min-width: 768px) {
    body {
        background-image: url('./assets/images/background-pattern-desktop.svg');
    }
    .container {   
        padding: 1.5rem 3rem;
        margin: 0;
    }
    .header-icon {
        max-width: 2rem;
        max-height: 2rem;
    }   
    h1 {
        font-size: 3rem;
    }
    .question-title {
        font-size: 1.25rem;
    }
    .answer-text {
        font-size: 1rem;
    }
}