/* FAQ — loaded on /faq/ and wherever a subset renders (contact). Editorial
   list, not cards: sage hairlines, terracotta plus/minus markers (same
   technique as the about principles), underline-tab filters (same language
   as the contact participation tabs). Tokens only, no shadows, no gradients. */
.faq-sec {
  background: var(--color-bg);
  padding: var(--space-8) 0 var(--space-9);
}

.faq-head {
  max-width: 760px;
  margin: 0 auto var(--space-6);
  text-align: center;
}

.faq-eyebrow {
  margin: 0 0 var(--space-3);
  font-size: var(--text-caption);
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--color-text-secondary);
}

.faq-head h2 { margin: 0 0 var(--space-3); font-size: var(--text-h2); }

.faq-lede {
  margin: 0;
  font-size: var(--text-lede);
  color: var(--color-text-secondary);
}

/* Filter tabs: one left-aligned row at desktop, same full-container line as
   every other section — no centered 960px column. Scrolls quietly if the
   viewport ever runs short. */
.faq-pills {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: var(--space-2) var(--space-5);
  margin: 0 0 var(--space-6);
  overflow-x: auto;
  scrollbar-width: none;
}

.faq-pills::-webkit-scrollbar { display: none; }

.faq-pill {
  background: none;
  border: 0;
  padding: var(--space-2) var(--space-1);
  font: inherit;
  font-size: var(--text-small);
  font-weight: 500;
  color: var(--color-text);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}

.faq-pill:hover { border-bottom-color: var(--color-border-strong); }

.faq-pill.is-on {
  font-weight: 700;
  border-bottom-color: var(--color-text);
}

.faq-list {
  margin: 0;
}

.faq-item { border-top: 1px solid color-mix(in srgb, var(--tmj-sage) 55%, var(--tmj-off-white)); }
.faq-item:last-child { border-bottom: 1px solid color-mix(in srgb, var(--tmj-sage) 55%, var(--tmj-off-white)); }

.faq-qhead { margin: 0; }

.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  width: 100%;
  min-height: 64px;
  padding: var(--space-3) 0;
  background: none;
  border: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.faq-qtext {
  font-size: var(--text-body);
  font-weight: 700;
  line-height: 1.45;
  color: var(--tmj-anthracite);
}

.faq-q:hover .faq-qtext { text-decoration: underline; text-underline-offset: 4px; }

/* Plus → minus marker: people-accent bars, same build as the about points. */
.faq-mark {
  position: relative;
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
}

.faq-mark::before,
.faq-mark::after {
  content: "";
  position: absolute;
  background: var(--tmj-terracotta);
  border-radius: var(--radius-pill);
  transition: transform 250ms cubic-bezier(0.22, 1, 0.36, 1), opacity 200ms cubic-bezier(0.22, 1, 0.36, 1);
}

.faq-mark::before { left: 0; top: 7px; width: 16px; height: 2px; }
.faq-mark::after { left: 7px; top: 0; width: 2px; height: 16px; }

.faq-item.is-open .faq-mark::after { transform: rotate(90deg); opacity: 0; }

/* Reveal: grid-rows sweep + fade, ~300ms. Collapsed states exist only
   under .faq-live (added by faq.js) — no-JS reads every answer open. */
.faq-a {
  display: grid;
  grid-template-rows: 1fr;
}

.faq-abody { overflow: hidden; min-height: 0; }

.faq-live .faq-a {
  grid-template-rows: 0fr;
  opacity: 0;
  transition:
    grid-template-rows 300ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 250ms cubic-bezier(0.22, 1, 0.36, 1);
}

.faq-live .faq-item.is-open .faq-a {
  grid-template-rows: 1fr;
  opacity: 1;
}

.faq-abody p { margin: 0 0 var(--space-3); max-width: 68ch; }
.faq-abody p:last-child { margin-bottom: var(--space-5); }

.faq-abody a { text-underline-offset: 3px; }
.faq-abody strong { font-weight: 700; }

/* Compact closing CTA: one line of invitation, ghost contact action. */
.faq-cta {
  max-width: 960px;
  margin: var(--space-7) auto 0;
  text-align: center;
  padding-top: var(--space-6);
  border-top: 1px solid color-mix(in srgb, var(--tmj-sage) 55%, var(--tmj-off-white));
}

.faq-cta h2 { margin: 0 0 var(--space-2); font-size: var(--text-h3); }
.faq-cta p { margin: 0 0 var(--space-4); color: var(--color-text-secondary); }

.faq-ghost {
  display: inline-block;
  padding: var(--space-2) var(--space-5);
  border: 2px solid var(--tmj-anthracite);
  border-radius: var(--radius-sm);
  color: var(--tmj-anthracite);
  font-size: var(--text-body);
  font-weight: 700;
  text-decoration: none;
  transition: background 200ms cubic-bezier(0.22, 1, 0.36, 1), color 200ms cubic-bezier(0.22, 1, 0.36, 1);
}

.faq-ghost:hover { background: var(--tmj-anthracite); color: var(--tmj-off-white); }

/* Scroll entrance: heading rises once, items follow in a short stagger.
   Filtering never replays it — calm after first paint. */
.faq-live .faq-head,
.faq-live .faq-item,
.faq-live .faq-cta {
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 500ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 500ms cubic-bezier(0.22, 1, 0.36, 1);
}

.faq-live.is-inview .faq-head,
.faq-live.is-inview .faq-item,
.faq-live.is-inview .faq-cta {
  opacity: 1;
  transform: none;
}

.faq-live.is-inview .faq-item:nth-child(1) { transition-delay: 40ms; }
.faq-live.is-inview .faq-item:nth-child(2) { transition-delay: 80ms; }
.faq-live.is-inview .faq-item:nth-child(3) { transition-delay: 120ms; }
.faq-live.is-inview .faq-item:nth-child(4) { transition-delay: 160ms; }
.faq-live.is-inview .faq-item:nth-child(5) { transition-delay: 200ms; }
.faq-live.is-inview .faq-item:nth-child(6) { transition-delay: 240ms; }
.faq-live.is-inview .faq-item:nth-child(7) { transition-delay: 280ms; }
.faq-live.is-inview .faq-item:nth-child(8) { transition-delay: 320ms; }

/* Left-aligned variant (contact page): head + list run full-container like
   the neighbouring sections instead of centered narrow columns. */
.faq-sec--start .faq-head {
  max-width: none;
  margin: 0 0 var(--space-6);
  text-align: left;
}

@media (max-width: 767px) {
  .faq-sec { padding: var(--space-7) 0 var(--space-8); }
  .faq-head { text-align: left; }
  .faq-pills {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
    margin-inline: calc(-1 * var(--space-4));
    padding-inline: var(--space-4);
  }
  .faq-pills::-webkit-scrollbar { display: none; }
  .faq-q { min-height: 56px; }
  .faq-cta { text-align: left; }
  .faq-live .faq-head,
  .faq-live .faq-item,
  .faq-live .faq-cta { transform: translateY(8px); }
}

@media (prefers-reduced-motion: reduce) {
  .faq-live .faq-a { transition: none; }
  .faq-live .faq-head,
  .faq-live .faq-item,
  .faq-live .faq-cta { transition: none; }
}
