.faq {
  max-width: 72rem;
  margin-inline: auto;
  padding: clamp(4rem, 9vw, 7.5rem) clamp(1.25rem, 4vw, 3rem);
  font-family: system-ui, sans-serif;
  color: #17181a;
  background: #ffffff;
}

.faq__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
  text-align: center;
}

.faq__eyebrow {
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: #f0efed;
  font-size: 0.8rem;
  color: rgba(23, 24, 26, 0.7);
}

.faq__title {
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  font-weight: 500;
  letter-spacing: -0.02em;
}

.faq__subtitle {
  max-width: 30rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: rgba(23, 24, 26, 0.6);
}

.faq__list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 42rem;
  margin-inline: auto;
}

.faq__item {
  padding: 0 1.35rem;
  border-radius: 1rem;
  background: #f7f6f4;
}

.faq__question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem 0;
  list-style: none;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.faq__question::-webkit-details-marker {
  display: none;
}

.faq__icon {
  --px: 2px;
  position: relative;
  flex-shrink: 0;
  width: calc(7 * var(--px));
  height: calc(4 * var(--px));
  transition: transform 0.25s cubic-bezier(0.65, 0, 0.35, 1);
}

/* Pixel chevron pointing down */
.faq__icon::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: var(--px);
  height: var(--px);
  background: #17181a;
  box-shadow:
    var(--px) var(--px),
    calc(2 * var(--px)) calc(2 * var(--px)),
    calc(3 * var(--px)) calc(3 * var(--px)),
    calc(4 * var(--px)) calc(2 * var(--px)),
    calc(5 * var(--px)) var(--px),
    calc(6 * var(--px)) 0;
}

.faq__item[open] .faq__icon {
  transform: rotate(180deg);
}

/* While the closing animation runs the item is still [open]; flip the chevron back right away */
.faq__item.is-closing .faq__icon {
  transform: rotate(0deg);
}

.faq__answer {
  padding: 0 0 1.25rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: rgba(23, 24, 26, 0.6);
}

.faq__item[open]:not(.is-closing) .faq__answer {
  animation: faq-fade 0.32s cubic-bezier(0.65, 0, 0.35, 1);
}

@keyframes faq-fade {
  from {
    opacity: 0;
    transform: translateY(-0.3rem);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}
