/* ==========================================================================
   Product page — Block 11: FAQ.
   Left (sticky): big heading, filter chips, "still stuck?" card.
   Right: numbered accordion, smooth open/close (grid-rows trick), filter by topic.
   ========================================================================== */

.pfaq {
  padding: 96px var(--gutter) 120px;
  background: var(--c-ink);
  color: #fff;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.pfaq__inner {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 64px;
  align-items: start;
  max-width: 1160px;
  margin: 0 auto;
}

.pfaq__side { position: sticky; top: calc(var(--header-h) + 32px); }

.pfaq__side .eyebrow { color: var(--c-accent); }
.pfaq__side .display { font-size: clamp(52px, 6.5vw, 104px); line-height: 0.9; }
.pfaq__side .display em { font-style: normal; color: var(--c-accent); }

/* topic filter */
.pfaq__filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }

.pfaq__filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.pfaq__filter:hover { color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5); }
.pfaq__filter[aria-pressed="true"] { background: var(--c-accent); color: var(--c-accent-ink); box-shadow: none; }
.pfaq__filter b { font: 700 10px/1 var(--font-mono); opacity: 0.6; }

/* still stuck card */
.pfaq__help {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 40px;
  padding: 22px 24px;
  border-radius: 20px;
  background: #161616;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.pfaq__help p { margin: 0; font-size: 14px; line-height: 1.45; color: rgba(255, 255, 255, 0.6); }
.pfaq__help strong { display: block; margin-bottom: 2px; font-family: var(--font-display); font-size: 22px; font-weight: 400; text-transform: uppercase; color: #fff; }

.pfaq__help a {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  flex: none;
  border-radius: 50%;
  background: var(--c-accent);
  color: var(--c-accent-ink);
  transition: transform 0.3s var(--ease), background-color 0.3s;
}

.pfaq__help a:hover { background: #fff; transform: rotate(-45deg); }
.pfaq__help a svg { width: 20px; height: 20px; }

/* ---------- accordion ---------- */

.pfaq__list { margin: 0; padding: 0; list-style: none; border-top: 1px solid rgba(255, 255, 255, 0.12); }

.pfaq__item { border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
.pfaq__item[hidden] { display: none; }

.pfaq__q {
  display: grid;
  grid-template-columns: 40px 1fr 36px;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 24px 0;
  color: #fff;
  text-align: left;
  cursor: pointer;
}

.pfaq__num { font: 700 12px/1 var(--font-mono); color: rgba(255, 255, 255, 0.35); transition: color 0.25s; }

.pfaq__qtext {
  font-family: var(--font-display);
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 400;
  line-height: 1.1;
  text-transform: uppercase;
  transition: color 0.25s;
}

.pfaq__q:hover .pfaq__qtext { color: var(--c-accent); }

/* + that turns into x */
.pfaq__icon {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  transition: transform 0.35s var(--ease), background-color 0.25s, box-shadow 0.25s;
}

.pfaq__icon::before,
.pfaq__icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 2px;
  margin: -1px 0 0 -6px;
  border-radius: 1px;
  background: currentColor;
}

.pfaq__icon::after { transform: rotate(90deg); }

.pfaq__item.is-open .pfaq__num { color: var(--c-accent); }
.pfaq__item.is-open .pfaq__icon { transform: rotate(45deg); background: var(--c-accent); color: var(--c-accent-ink); box-shadow: none; }

/* answer: animates height with the grid-rows trick */
.pfaq__a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s var(--ease);
}

.pfaq__item.is-open .pfaq__a { grid-template-rows: 1fr; }

.pfaq__a > div { overflow: hidden; }

.pfaq__a p {
  margin: 0;
  padding: 0 52px 26px 52px;
  font-size: 16px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.3s, transform 0.4s var(--ease);
}

.pfaq__item.is-open .pfaq__a p { opacity: 1; transform: none; transition-delay: 0.08s; }
.pfaq__a a { color: #fff; text-underline-offset: 3px; text-decoration-color: var(--c-accent); }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .pfaq { padding: 64px var(--gutter) 80px; }
  .pfaq__inner { grid-template-columns: 1fr; gap: 32px; }
  .pfaq__side { position: static; }
  .pfaq__help { display: none; }        /* shown under the list instead */
  .pfaq__help--bottom { display: flex; margin-top: 28px; }
  .pfaq__q { grid-template-columns: 30px 1fr 32px; padding: 20px 0; }
  .pfaq__icon { width: 32px; height: 32px; }
  .pfaq__a p { padding: 0 0 22px 42px; font-size: 15px; }
}

@media (min-width: 901px) { .pfaq__help--bottom { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .pfaq__a, .pfaq__a p, .pfaq__icon { transition: none; }
}
