/* The questions accordion: five questions on a black page, separated by thin lines. The open one has a dark card
   behind it, a white disc with a cross, and its answer below. */
:root {
  --page: #000000;          /* the page */
  --text: #f2f0ea;          /* the questions */
  --answer: #a8a59d;        /* the answers */
  --line: #262626;          /* between two questions */
  --card: #131313;          /* behind the open question */
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  overflow-x: clip;
}

body {
  min-height: 100svh;
  background: var(--page);
  color: var(--text);
  font-family: 'Instrument Sans Variable', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* held from the top: when an answer opens, only the bottom of the list moves */
.stage {
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  align-content: start;
  padding: clamp(40px, 16vh, 160px) 16px 48px;
}

.faq {
  width: min(660px, 100%);
}

/* ---------------------------------------------------------------- one question */
.faq__item {
  position: relative;
  border-top: 1px solid var(--line);
}

.faq__item:last-child {
  border-bottom: 1px solid var(--line);
}

/* the card behind the open question: drawn by the script, a little wider than the row */
.faq__item::before {
  content: '';
  position: absolute;
  inset: -1px -18px;
  z-index: 0;
  border-radius: 20px;
  background: var(--card);
  opacity: var(--card-on, 0);
  transform: scale(var(--card-scale, 0.97));
  pointer-events: none;
}

.faq__head {
  position: relative;
  z-index: 1;
  margin: 0;
  font: inherit;
}

.faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  padding: 22px 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-size: 21px;
  font-weight: 520;
  letter-spacing: -0.01em;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.faq__q:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 4px;
  border-radius: 8px;
}

.faq__text {
  transition: transform 0.45s cubic-bezier(0.34, 1.5, 0.5, 1), color 0.3s ease;
}

@media (hover: hover) and (pointer: fine) {
  .faq__q:hover .faq__text {
    transform: translateX(6px);
  }
}

/* the plus: two bars in a ring; open, the ring fills and the bars turn into a cross */
.faq__icon {
  position: relative;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px #3c3c3c;
}

.faq__icon span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 13px;
  height: 1.8px;
  margin: -0.9px 0 0 -6.5px;
  border-radius: 1px;
  background: currentColor;
}

.faq__icon span + span {
  transform: rotate(90deg);
}

/* the answer */
.faq__a {
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.faq__a p {
  margin: 0;
  padding: 0 56px 26px 0;
  max-width: 58ch;
  font-size: 17px;
  line-height: 1.6;
  color: var(--answer);
}

@media (max-width: 520px) {
  .faq__q {
    font-size: 18px;
    padding: 18px 0;
  }

  .faq__item::before {
    inset: -1px -10px;
  }

  .faq__a p {
    padding-right: 0;
    font-size: 16px;
  }
}
