@import url("https://fonts.googleapis.com/css2?family=Work+Sans:ital,wght@0,100..900;1,100..900&display=swap");

:root {
  --White: hsl(0, 100%, 100%);
  --Purple-100: hsl(275, 100%, 97%);
  --Purple-600: hsl(292, 16%, 49%);
  --Purple-950: hsl(292, 42%, 14%);
  --Purple: hsl(284, 76%, 53%);
  --bg: hsl(279, 100%, 97%);
}

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

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Work Sans", sans-serif;
  font-size: 1rem;
  background-image: url("./assets/images/background-pattern-desktop.svg");
  background-repeat: no-repeat;
  background-color: var(--bg);
}

.container {
  background-color: var(--White);
  max-width: 600px;
  padding: 40px 40px 12px;
  width: 88%;
  border-radius: 20px;
  box-shadow: 0 0 40px rgba(80, 42, 92, 0.15);
  margin-block: 120px;
}

.title-section {
  display: flex;
  flex-direction: row;
  align-items: center;
  margin-bottom: 32px;
}
.star {
  margin-right: 24px;
}
.title,
.question {
  color: var(--Purple-950);
}
.title {
  font-size: 3.5rem;
}

.qna + .qna {
  border-top: 1px solid var(--Purple-100);
}
.question-section {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  margin-block: 24px;
  cursor: pointer;
}
.question-section:active .question{
  color: var(--Purple);
}
.question {
  font-size: 1.125rem;
}
.btn {
  cursor: pointer;
}
.answer {
  color: var(--Purple-600);
  line-height: 1.5;
  margin-bottom: 24px;
  display: none;
}

/* Attribution */
.attribution {
  font-size: 11px;
  text-align: center;
  position: fixed;
  bottom: 10px;
}
.attribution a {
  color: hsl(228, 45%, 44%);
  font-size: 11px;
}

@media screen and (max-width: 375px) {
  body {
    background-image: url("./assets/images/background-pattern-mobile.svg");
  }
  .container {
    padding: 32px 24px 6px;
    border-radius: 10px;
  }

  .title-section {
    margin-bottom: 20px;
  }
  .star {
    width: 10%;
    margin-right: 24px;
  }
  .title {
    font-size: 2rem;
  }
  
  .question-section {
    margin-block: 20px;
  }
  .question {
    font-size: 1rem;
  }
  .answer {
    font-size: 0.875rem;
    margin-bottom: 18px;
  }
}
