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

  /* font */
  --font-size-p: 1.7rem;
  --font-weight-400: 400;
  --font-weight-600: 600;
  --font-weight-700: 700;
}

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

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

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

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

html {
  font-size: 62.5%;
}

body {
  background-color: var(--light-pink);
  font-family: 'WorkSans', sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* header */
.header {
  background-color: var(--grayish-purple);
  padding: 1.5rem;
  text-align: center;
  color: var(--light-pink);
  width: 100%;
}

/* main */
main {
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(to bottom, transparent 35%, var(--light-pink) 35%),
    url('./assets/images/background-pattern-desktop.svg');
}

.card-component {
  background-color: var(--white);
  padding: 2rem 3rem;
  max-width: 70rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  border-radius: 16px;
  box-shadow: 10px 5px 10px 0px rgba(0, 0, 0, 0.1);
}

.card-title {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.card-title img {
  width: 5rem;
}

h2 {
  font-size: 8rem;
  color: var(--dark-purple);
  font-weight: var(--font-weight-700);
}

.item {
  border-top: solid 1px var(--light-pink);
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 1.4rem;
  row-gap: 1rem;
  align-items: center;
  padding: 2rem 0;
}

.question {
  color: var(--dark-purple);
  font-size: 1.8rem;
  font-weight: var(--font-weight-600);
  align-items: center;
}

.item:hover .question {
  color: #c648dc;
  cursor: pointer;
}

.answer p {
  font-size: var(--font-size-p);
  color: var(--grayish-purple);
  line-height: 1.5;
  font-weight: var(--font-weight-400);
}

.hidden-content {
  grid-column: 1/-1;
  display: none;
  visibility: hidden;
}

/* footer */
.attribution {
  font-size: 1.5rem;
  color: var(--dark-purple);
  place-self: center;
}

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

.attribution a:hover {
  text-decoration: underline;
  color: var(--color-blue-dark);
}

/* for tablets */
@media screen and (max-width: 768px) {
  .card-component {
    max-width: 90%;
    margin: 2rem;
    padding: 2rem;
  }

  h2 {
    font-size: 6rem;
  }

  .card-title img {
    width: 4rem;
  }

  .question {
    font-size: 1.6rem;
  }

  .answer p {
    font-size: 1.5rem;
  }
}

/* for mobile */
@media screen and (max-width: 480px) {
  main {
    background: linear-gradient(
        to bottom,
        transparent 35%,
        var(--light-pink) 35%
      ),
      url('./assets/images/background-pattern-mobile.svg');
    background-repeat: no-repeat;
    background-size: contain;
  }

  .card-component {
    max-width: 95%;
    margin: 1.5rem;
    padding: 1.5rem;
  }

  h2 {
    font-size: 4rem;
  }

  .card-title {
    gap: 1.5rem;
  }

  .card-title img {
    width: 3rem;
  }

  .item {
    padding: 1.5rem 0;
    gap: 1rem;
  }

  .question {
    font-size: 1.4rem;
  }

  .answer p {
    font-size: 1.3rem;
  }

  .attribution {
    font-size: 1.2rem;
    padding: 1rem;
    text-align: center;
  }
}

/* for very small devices */
@media screen and (max-width: 320px) {
  .card-component {
    padding: 1rem;
  }

  h2 {
    font-size: 3rem;
  }

  .question {
    font-size: 1.3rem;
  }

  .answer p {
    font-size: 1.2rem;
  }
}

/* for larger screens */
@media screen and (min-width: 1200px) {
  .card-component {
    max-width: 80rem;
  }

  .question:hover {
    color: var(--grayish-purple);
    cursor: pointer;
  }

  .state-controller:hover {
    cursor: pointer;
  }
}

/* for tvs */
@media screen and (min-width: 1920px) {
  html {
    font-size: 70%;
  }

  .card-component {
    max-width: 90rem;
  }
}
