/* FROM — About, section 3: questions people ask. The heading stays put on the left while the answers open and
   close on the right, one at a time. */

.faq {
  padding: clamp(88px, 11vw, 160px) 0;
  background: var(--paper);
}

.faq__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  align-items: start;
  gap: 48px clamp(40px, 7vw, 120px);
}

.faq__side {
  position: sticky;
  top: 128px;
}

.faq__title {
  max-width: 10ch;
  margin: 0;
  font-size: clamp(36px, 4.6vw, 72px);
  line-height: 1.02;
  font-weight: 760;
  letter-spacing: -0.05em;
  text-wrap: balance;
}

.faq__lede {
  max-width: 30ch;
  margin-top: 24px;
  font-size: clamp(17px, 1.3vw, 20px);
  line-height: 1.55;
  color: var(--ink-2);
}

.faq__side .btn {
  margin-top: 32px;
}

/* ---------- The questions ---------- */

.faq__list {
  border-bottom: 1.5px solid var(--line);
}

.qa {
  border-top: 1.5px solid var(--line);
}

.qa summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(22px, 2.4vw, 32px) 0;
  font-size: clamp(20px, 1.9vw, 28px);
  line-height: 1.2;
  font-weight: 680;
  letter-spacing: -0.03em;
  cursor: pointer;
  list-style: none;
  transition: color 0.2s;
}

.qa summary::-webkit-details-marker {
  display: none;
}

.qa summary:hover {
  color: var(--orange-ink);
}

/* The plus turns into a cross on an orange dot when the answer is open. */
.qa__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px var(--line);
  color: var(--ink);
  transition: background-color 0.3s, box-shadow 0.3s, color 0.3s, transform 0.45s var(--ease-out);
}

.qa summary:hover .qa__icon {
  box-shadow: inset 0 0 0 1.5px var(--ink);
}

.qa[open] .qa__icon {
  background: var(--orange);
  box-shadow: none;
  color: #fff;
  transform: rotate(45deg);
}

.qa__answer {
  max-width: 56ch;
  padding: 0 64px clamp(24px, 2.6vw, 34px) 0;
  font-size: clamp(17px, 1.3vw, 19px);
  line-height: 1.6;
  color: var(--ink-2);
}

/* Where the browser allows it, the answer slides open instead of appearing at once. */
@supports (interpolate-size: allow-keywords) {
  .faq {
    interpolate-size: allow-keywords;
  }

  .qa::details-content {
    height: 0;
    overflow: clip;
    transition: height 0.45s var(--ease-out), content-visibility 0.45s allow-discrete;
  }

  .qa[open]::details-content {
    height: auto;
  }
}

/* ---------- Tablet and phone ---------- */

@media (max-width: 860px) {
  .faq__grid {
    grid-template-columns: 1fr;
  }

  .faq__side {
    position: static;
  }

  .qa__answer {
    padding-right: 0;
  }
}
