/* ---------- faq ---------- */
#faq-h {
  --big: clamp(min(112px, 35vw), 40vw, 200px); /* phones: 156px at 390 wide; desktop: up to 200px */
}
.faq {
  display: grid;
  gap: 14px;
  max-width: 880px;
}
/* two columns of nine on desktop. Each column is its own stack, so opening a question only pushes down the
   questions under it, never the one beside it (a plain two-column grid would stretch the whole row). */
.faq-col {
  display: grid;
  gap: 14px;
  align-content: start;
}
@media (min-width: 861px) {
  .faq {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    max-width: none;
  }
}
.faq details {
  background: var(--surface);
  border: var(--line) solid var(--edge);
  border-radius: var(--r-card);
  box-shadow: var(--hard);
}
[data-mode="night"] .faq details {
  border: 1.5px solid var(--hair);
  box-shadow: none;
}
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 14px 20px;
  font-weight: 700;
  font-size: var(--t-md);
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary .plus {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  border: 2px solid var(--edge);
  border-radius: 50%;
  background: var(--c);
  color: var(--on-c);
  transition: transform 150ms var(--boing);
}
[data-mode="night"] .faq summary .plus {
  border-color: var(--c);
}
.faq details[open] summary .plus {
  transform: rotate(45deg);
}
.faq details > p {
  padding: 0 20px 20px;
}

/* phones: the section title is one big dropdown for the whole list (js/faq.js): a huge FAQ in the hero letters'
   font and a yellow sticker plus with a "Tap here!" tag, which wiggles once when the section first comes into view */
.faq-toggle {
  display: none;
}
@media (max-width: 640px) {
  .faq-head {
    position: relative;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 16px;
    align-items: end;
  }
  .faq-head > :not(.faq-toggle) {
    grid-column: 1 / -1; /* the line under FAQ runs under the plus too */
  }
  .faq-head > #faq-h {
    grid-column: 1;
  }
  .faq-toggle:not([hidden]) {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-right: 12px;
    grid-column: 2;
    grid-row: 1; /* beside the big letters, centred on them */
    align-self: center;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .faq-toggle::after {
    content: "";
    position: absolute;
    inset: 0; /* the whole title is the tap target */
  }
  .faq-plus {
    display: block;
    width: clamp(76px, 24.6vw, 96px);
  }
  .faq-plus.is-nudge {
    animation: faq-nudge 900ms ease-in-out;
  }
  .faq-plus svg {
    display: block;
    width: 100%;
    fill: var(--yellow);
    stroke: #1a1714;
    stroke-width: 3.5;
    stroke-linejoin: round;
    filter: drop-shadow(4px 4px 0 #1a1714);
    transform: rotate(-8deg);
    transition: transform 450ms var(--boing-soft, cubic-bezier(0.34, 1.56, 0.64, 1));
  }
  [data-mode="night"] .faq-plus svg {
    filter: none;
  }
  .faq-toggle[aria-expanded="true"] .faq-plus svg {
    transform: rotate(45deg);
  }
  .faq-tap {
    margin-top: 8px;
    padding: 3px 8px;
    border-radius: 6px;
    background: var(--ink);
    color: var(--bg);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    transform: rotate(-4deg);
  }
  .faq-toggle[aria-expanded="true"] .faq-tap {
    visibility: hidden; /* hidden, not removed, so the plus doesn't jump */
  }
  #faq.is-shut .faq {
    display: none;
  }
  #faq.is-shut .faq-head {
    margin-bottom: 0;
  }
}
@keyframes faq-nudge {
  20% {
    transform: rotate(-16deg) scale(1.12);
  }
  40% {
    transform: rotate(12deg) scale(1.07);
  }
  60% {
    transform: rotate(-8deg);
  }
  80% {
    transform: rotate(4deg);
  }
}
