/* ─────────────────────────────────────────
   COMPONENTS
   Reusable UI components
───────────────────────────────────────── */

/* ── FAQ Accordion ── */
.faq {
  margin-top: 56px;
  border: 1px solid var(--border);
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-q {
  width: 100%;
  padding: 22px 28px;
  cursor: pointer;
  font-family: var(--font-head);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  text-align: left;
  background: none;
  border: none;
  transition: background var(--t-fast);
  letter-spacing: -0.01em;
}

.faq-q:hover {
  background: var(--bg-1);
}

.faq-icon {
  color: var(--accent);
  font-size: 20px;
  font-weight: 300;
  line-height: 1;
  flex-shrink: 0;
  transition: transform var(--t-base);
  font-family: var(--font-mono);
}

.faq-item.open .faq-icon {
  transform: rotate(45deg);
}

.faq-q[aria-expanded="true"] .faq-icon {
  transform: rotate(45deg);
}

.faq-a {
  padding: 0 28px;
  overflow: hidden;
  max-height: 0;
  transition: max-height var(--t-slow), padding var(--t-slow);
}

/* JS toggles hidden attr; CSS animates the height */
.faq-a:not([hidden]) {
  max-height: 600px;
  padding: 0 28px 24px;
}

/* Remove browser default for hidden — we handle visibility via max-height */
.faq-a[hidden] {
  display: block !important; /* override [hidden] so transitions work */
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
}

.faq-a p {
  font-size: var(--text-base);
  color: var(--sub);
  line-height: 1.85;
  font-family: var(--font-mono);
  font-weight: 300;
}
