/* ==========================================================================
   XPLOROO · FAQ page
   faq-page.css — Standalone page (faq.html): hero, premium accordion, and
   a bottom CTA. Reuses the shared design system (variables/reset/base/
   utilities) plus the existing header/footer styles — this file only adds
   page-specific rules. Scoped entirely under `.faq-page` / `.faq-*` —
   never touches any other page.
   ========================================================================== */

.faq-page {
  position: relative;
}
.faq-page__section {
  padding-block: var(--section-gap);
}
.faq-page__container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

/* -------------------------------------------------------------------------
   Hero
   ------------------------------------------------------------------------- */
.faq-hero {
  text-align: center;
  max-width: 44rem;
  margin-inline: auto;
}
.faq-hero__title {
  margin: 0;
  font-size: var(--fs-4xl);
}
.faq-hero__subtitle {
  margin: var(--space-4) 0 0;
  font-size: var(--fs-md, var(--fs-base));
  line-height: 1.6;
  color: var(--color-text-muted);
}

/* -------------------------------------------------------------------------
   Accordion
   ------------------------------------------------------------------------- */
.faq-accordion {
  max-width: 46rem;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* Premium colour identity — cycles by position (8-colour repeat) so every
   FAQ, present and future, automatically gets its own subtle identity.
   Closed state already looks attractive; open state keeps the same hue. */
.faq-item:nth-child(8n+1) { --faqc-a: rgba(147, 51, 234, 0.12); --faqc-b: rgba(124, 58, 237, 0.07); --faqc-border: rgba(192, 132, 252, 0.38); --faqc-glow: rgba(147, 51, 234, 0.22); }
.faq-item:nth-child(8n+2) { --faqc-a: rgba(124, 58, 237, 0.12); --faqc-b: rgba(147, 51, 234, 0.07); --faqc-border: rgba(196, 181, 253, 0.38); --faqc-glow: rgba(124, 58, 237, 0.22); }
.faq-item:nth-child(8n+3) { --faqc-a: rgba(225, 29, 72, 0.12); --faqc-b: rgba(88, 28, 135, 0.07); --faqc-border: rgba(251, 182, 206, 0.38); --faqc-glow: rgba(225, 29, 72, 0.22); }
.faq-item:nth-child(8n+4) { --faqc-a: rgba(37, 99, 235, 0.12); --faqc-b: rgba(79, 70, 229, 0.07); --faqc-border: rgba(147, 197, 253, 0.38); --faqc-glow: rgba(37, 99, 235, 0.22); }
.faq-item:nth-child(8n+5) { --faqc-a: rgba(6, 182, 212, 0.12); --faqc-b: rgba(37, 99, 235, 0.07); --faqc-border: rgba(165, 243, 252, 0.38); --faqc-glow: rgba(6, 182, 212, 0.22); }
.faq-item:nth-child(8n+6) { --faqc-a: rgba(79, 70, 229, 0.12); --faqc-b: rgba(147, 51, 234, 0.07); --faqc-border: rgba(199, 210, 254, 0.38); --faqc-glow: rgba(79, 70, 229, 0.22); }
.faq-item:nth-child(8n+7) { --faqc-a: rgba(219, 39, 119, 0.12); --faqc-b: rgba(147, 51, 234, 0.07); --faqc-border: rgba(251, 182, 206, 0.38); --faqc-glow: rgba(219, 39, 119, 0.22); }
.faq-item:nth-child(8n)   { --faqc-a: rgba(20, 184, 166, 0.12); --faqc-b: rgba(30, 64, 175, 0.07); --faqc-border: rgba(153, 246, 228, 0.38); --faqc-glow: rgba(20, 184, 166, 0.22); }

.faq-item {
  position: relative;
  background: linear-gradient(155deg, var(--faqc-a, transparent) 0%, transparent 60%), linear-gradient(335deg, var(--faqc-b, transparent) 0%, transparent 65%), var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  box-shadow: 0 10px 26px -22px var(--faqc-glow, transparent);
  transition: border-color var(--dur-base) var(--ease-standard), background-color 300ms ease, box-shadow var(--dur-base) var(--ease-out);
}
.faq-item::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  padding: 1px;
  background: var(--faqc-border, var(--color-border));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.55;
  transition: opacity var(--dur-base) var(--ease-standard);
}
.faq-item.is-open {
  border-color: var(--color-border-strong);
  box-shadow: 0 14px 34px -20px var(--faqc-glow, transparent);
}
.faq-item.is-open::before { opacity: 0.9; }
@media (hover: hover) {
  .faq-item:hover::before { opacity: 0.85; }
}

.faq-item__question {
  margin: 0;
}
.faq-item__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-6);
  background: transparent;
  border: none;
  text-align: left;
  font-family: var(--font-display);
  font-size: var(--fs-md, var(--fs-base));
  font-weight: var(--fw-bold);
  color: var(--color-text-strong);
  cursor: pointer;
}
.faq-item__icon {
  flex: none;
  width: 1.1rem;
  height: 1.1rem;
  color: var(--color-text-muted);
  transition: transform var(--dur-base) var(--ease-out);
}
.faq-item.is-open .faq-item__icon {
  transform: rotate(180deg);
  color: var(--color-text-strong);
}

.faq-item__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--dur-base) var(--ease-out);
}
.faq-item.is-open .faq-item__panel {
  grid-template-rows: 1fr;
}
.faq-item__panel-inner {
  overflow: hidden;
}
.faq-item__answer {
  margin: 0;
  padding: 0 var(--space-6) var(--space-5);
  font-size: var(--fs-sm);
  line-height: 1.6;
  color: var(--color-text-muted);
}

/* -------------------------------------------------------------------------
   Bottom CTA
   ------------------------------------------------------------------------- */
.faq-cta {
  text-align: center;
}
.faq-cta__title {
  margin: 0 0 var(--space-6);
  font-size: var(--fs-3xl);
}
