/* The FAQ (faq.html): the questions in a cream card, in three groups; a question opens on a click.
   The yellow card at the top, the base and the texture are in page.css; motion.js brings the groups
   in, this file is the resting state. */

.fq {
  position: relative;
  padding: 16px 16px 120px;
}

.fq-card {
  position: relative;
  border-radius: 40px;
  background: #fffce1;
  color: #000000;
  padding: 8px 32px 40px 40px;
}

.fq-card > .pg-fx {
  border-radius: inherit;
}

/* a group: its name on the left, its questions from the line of the homepage's headline (50.27%) */
.fq-group {
  position: relative;
  display: grid;
  grid-template-columns: calc(50.27% - 4px) minmax(0, 1fr);
  align-items: start;
  padding: 32px 0;
  border-bottom: 1px solid #d3d1bb;
  scroll-margin-top: 24px;
}

.fq-group__title {
  position: sticky;
  top: 32px;
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 24px;
  padding: 16px 40px 0 0;
  font-size: clamp(30px, 2.6vw, 46px);
  font-weight: 550;
  line-height: 1;
  letter-spacing: -0.05em;
}

.fq-no {
  flex: none;
  width: 34px;
  font-size: 16.5px;
  font-weight: 500;
  letter-spacing: -0.04em;
  color: #6f6d60;
}

.fq-item {
  border-bottom: 1px solid #d3d1bb;
  interpolate-size: allow-keywords;
}

.fq-item:last-child {
  border-bottom: 0;
}

.fq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 0;
  cursor: pointer;
  list-style: none;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.fq-q::-webkit-details-marker {
  display: none;
}

.fq-q::marker {
  content: '';
}

.fq-q:focus-visible {
  outline: 2px solid #252324;
  outline-offset: 4px;
  border-radius: 6px;
}

.fq-ic {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid rgba(0, 0, 0, 0.5);
  display: grid;
  place-items: center;
  flex: none;
  box-sizing: border-box;
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.fq-ic svg {
  display: block;
}

.fq-q:hover .fq-ic {
  background: #252324;
  border-color: #252324;
  color: #fffce1;
}

/* open: the plus turns into a cross */
.fq-item[open] .fq-ic {
  transform: rotate(45deg);
  background: #252324;
  border-color: #252324;
  color: #feeb8d;
}

.fq-a p {
  margin: 0;
  max-width: 34em;
  padding: 0 58px 26px 0;
  font-size: 19px;
  font-weight: 450;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: #6f6d60;
}

.fq-a a {
  color: #000000;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

/* where the browser can, the answer folds open instead of appearing */
@media (prefers-reduced-motion: no-preference) {
  .fq-item::details-content {
    block-size: 0;
    overflow: clip;
    transition: block-size 0.45s cubic-bezier(0.2, 0.7, 0.2, 1), content-visibility 0.45s allow-discrete;
  }

  .fq-item[open]::details-content {
    block-size: auto;
  }
}

/* the end of the card: on to the contact page */
.fq-more {
  position: relative;
  display: grid;
  grid-template-columns: calc(50.27% - 4px) minmax(0, 1fr);
  align-items: center;
  row-gap: 20px;
  padding: 40px 0 0;
}

.fq-more__text {
  margin: 0;
  padding-left: 58px;
  font-size: clamp(30px, 2.6vw, 46px);
  font-weight: 550;
  line-height: 1;
  letter-spacing: -0.05em;
}

.fq-more__cta {
  justify-self: start;
  height: 52px;
  padding: 0 26px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #252324;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.fq-more__cta,
.fq-more__cta:hover {
  color: #fffce1;
}

/* ------------------------------------------------------------ smaller screens */

@media (max-width: 1000px) {
  .fq-group,
  .fq-more {
    grid-template-columns: minmax(0, 1fr);
  }

  .fq-group__title {
    position: static;
    padding: 8px 0 12px;
  }
}

@media (max-width: 720px) {
  .fq {
    padding-bottom: 96px;
  }

  .fq-card {
    border-radius: 32px;
    padding: 4px 20px 28px;
  }

  .fq-group {
    padding: 24px 0;
  }

  .fq-group__title {
    gap: 14px;
    font-size: 30px;
  }

  .fq-no {
    width: 26px;
    font-size: 15px;
  }

  .fq-q {
    gap: 16px;
    padding: 18px 0;
    font-size: 20px;
  }

  .fq-a p {
    padding-right: 0;
    font-size: 17px;
  }

  .fq-more {
    padding-top: 28px;
  }

  .fq-more__text {
    padding-left: 0;
    font-size: 30px;
  }
}
