/* FAQ page only. Shared header/footer/button/chip/card styles live in
   shared/css/components.css. */

.faq-page {
  padding-top: clamp(28px, 6vw, 72px);
  padding-bottom: clamp(64px, 10vw, 140px);
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 4vw, 44px);
}

/* ---- Hero ---- */

.faq-hero {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 760px;
}

.faq-hero__title {
  font-size: clamp(36px, 5.6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  font-weight: 850;
  text-wrap: balance;
}

/* ---- Controls: search + category tabs ---- */

.faq-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-search {
  width: 100%;
  max-width: 640px;
  min-height: 56px;
  padding: 14px 18px;
  border-radius: 16px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font: 500 17px var(--font-text);
  outline: 0;
}

.faq-search:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 16%, transparent);
}

.faq-cats {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.faq-cat {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font: 600 14px var(--font-text);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}

.faq-cat:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--brand) 40%, var(--line));
}

.faq-cat.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--bg);
}

.faq-cat__icon {
  width: 15px;
  height: 15px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.8;
}

.faq-cat__count {
  font-size: 12px;
  opacity: 0.65;
}

/* ---- Accordion list ---- */

.faq-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
  max-width: 860px;
}

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

.faq-item[hidden] {
  display: none;
}

.faq-item__q {
  list-style: none;
  cursor: pointer;
  padding: 22px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.4;
}

.faq-item__q::-webkit-details-marker {
  display: none;
}

.faq-item__q-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.faq-item__cat {
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.faq-item__icon {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font-size: 16px;
  color: var(--brand);
  transition: transform 0.3s, background 0.3s;
}

.faq-item[open] .faq-item__icon {
  transform: rotate(45deg);
  background: var(--ghost);
}

.faq-item__a {
  margin: 0 0 24px;
  max-width: 680px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--muted);
  text-wrap: pretty;
}

.faq-item__a a {
  color: var(--brand);
  font-weight: 600;
}

.faq-item:hover .faq-item__q {
  color: var(--brand);
}

.faq-empty {
  margin: 0;
  font-size: 16px;
  color: var(--muted);
}

/* ---- "Still stuck?" CTA ---- */

.faq-cta {
  border-radius: 28px;
  padding: clamp(22px, 4vw, 36px);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  max-width: 860px;
}

.faq-cta__text {
  font-size: 20px;
}

.faq-cta__btn {
  border-radius: 14px;
  min-height: 48px;
  padding: 0 20px;
}

/* ---- v2: dark hero band, springy accordion ---- */
.faq-page { padding-top: clamp(32px, 4vw, 56px); }

.faq-item {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s, box-shadow 0.3s;
}

.faq-item:hover { transform: translateX(4px); }

.faq-item[open] {
  border-color: color-mix(in srgb, var(--brand) 55%, var(--line));
  box-shadow: 0 24px 44px -32px rgba(0, 0, 0, 0.5);
}

.faq-item[open] .faq-item__a { animation: faq-open 0.5s cubic-bezier(0.16, 1, 0.3, 1) both; }

@keyframes faq-open {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: none; }
}

html.is-reduced-motion .faq-item[open] .faq-item__a { animation: none; }
html.is-reduced-motion .faq-item:hover { transform: none; }
