/* ==========================================================================
   Sub-pages (FAQ, Terms & Conditions) — Dafa Partners
   Uses the tokens in styles.css; adds the few the sub-pages need.
   ========================================================================== */

:root {
  --font-display: var(--font-carousel);
  --surface: #FAFAFA;
  --surface-hover: #F2F3F2;
  --border: #E9EAE9;
  --text-neutral-2: #5D6260;
  --radius-card: 16px;
  --radius-panel: 24px;
  --page-bg: #F2F3F2;
}

body.subpage { background: var(--page-bg); }

/* ==========================================================================
   FAQ page — builds on style.css (header, footer, buttons, tokens)
   ========================================================================== */

/* Animated aurora background (FAQ) — js/aurora.js draws into the canvas.
   The CSS gradient underneath is the fallback when WebGL isn't available. */
.page-hero.page-hero--aurora {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(120% 140% at 85% 20%, #6A0000 0%, rgba(106, 0, 0, 0) 55%),
    radial-gradient(90% 120% at 20% 100%, #3A0000 0%, rgba(58, 0, 0, 0) 60%),
    #020D0B;
}

.aurora-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  display: block;
  opacity: 0;
  transition: opacity .6s ease;
}
.aurora-bg.is-ready { opacity: 1; }

/* Keep the copy legible over the brightest parts of the animation */
.page-hero--aurora::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(2, 13, 11, 0.55) 0%, rgba(2, 13, 11, 0.15) 60%, rgba(2, 13, 11, 0) 100%);
  pointer-events: none;
}

.page-hero--aurora .page-hero__inner { position: relative; }

/* Page hero — dark band */
.page-hero {
  background: #020D0B;
  color: #FFFFFF;
}

.page-hero__inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 84px 24px 72px 128px;
}

.page-hero__title {
  font-family: var(--font-display);
  font-size: 64px;
  font-weight: 800;
  line-height: 68px;
  margin-bottom: 26px;
}

.page-hero__eyebrow {
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  letter-spacing: 0.3px;
  color: var(--primary-alert);
  margin-bottom: 14px;
}

.page-hero__subtitle {
  font-size: 18px;
  font-weight: 600;
  line-height: 24px;
  letter-spacing: 0.1px;
  margin-bottom: 14px;
}

.page-hero__text {
  max-width: 680px;
  font-size: 16px;
  line-height: 22px;
  letter-spacing: 0.25px;
  color: #E2E4E3;
}


/* Layout: sticky topic list + questions */
.faq-layout {
  max-width: 1440px;
  margin: 0 auto;
  padding: 70px 24px 80px 88px;
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  column-gap: 50px;
  align-items: start;
}

/* Topic list */
.faq-topics {
  position: sticky;
  top: 99px;
  padding: 16px;
  background: var(--surface);
  border-radius: var(--radius-card);
}

.faq-topics__label {
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.3px;
  color: var(--text-neutral-1);
  margin-bottom: 8px;
}

.faq-topics__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.faq-topics__link {
  position: relative;
  display: block;
  padding: 13px 40px 13px 26px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  letter-spacing: 0.3px;
  color: var(--text-neutral-1);
  transition: background-color .15s ease, color .15s ease;
}

.faq-topics__link::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  border-radius: 2px;
  background: var(--secondary-border);
}

.faq-topics__link:hover { background: var(--surface-hover); color: var(--text-dark); }

.faq-topics__link.is-active {
  background: var(--primary);
  color: #FFFFFF;
}
.faq-topics__link.is-active::before { background: #FFFFFF; }


/* Sections */
.faq-section { scroll-margin-top: 99px; }
.faq-section + .faq-section { margin-top: 36px; }

.faq-section__title {
  position: relative;
  padding-left: 16px;
  margin-bottom: 16px;
  font-size: 16px;
  font-weight: 500;
  line-height: 22px;
  letter-spacing: 0.1px;
  color: var(--text-neutral-1);
}
.faq-section__title::before {
  content: "";
  position: absolute;
  left: 0;
  top: -2px;
  bottom: -2px;
  width: 3px;
  border-radius: 2px;
  background: var(--primary);
}

/* Question cards */
.faq-item {
  padding: 16px 16px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.faq-item + .faq-item { margin-top: 12px; }

.faq-item__q {
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
  font-size: 16px;
  font-weight: 600;
  line-height: 22px;
  letter-spacing: 0.1px;
  color: var(--text-dark);
}

.faq-item__a {
  font-size: 13px;
  line-height: 20px;
  letter-spacing: 0.2px;
  color: var(--text-neutral-1);
}

.faq-item__a a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.faq-item__a a:hover { color: var(--primary-hover); }

/* Marks content still to be supplied — remove once real copy is in */
.faq-placeholder {
  background: #FFF4CC;
  color: #6B5200;
  padding: 0 4px;
  border-radius: 3px;
}


/* Tablet (834w frame) */
@media (max-width: 1199px) {
  .page-hero__inner { padding-left: 121px; }
  .faq-layout {
    padding: 56px 27px 64px 28px;
    grid-template-columns: 255px minmax(0, 1fr);
    column-gap: 26px;
  }
  .faq-topics__link { padding-right: 16px; }
}

/* Mobile — no mobile frame provided yet: topics become a scrollable chip row */
@media (max-width: 767px) {
  .page-hero__inner { padding: 48px 24px 40px; }
  .page-hero__title { font-size: 48px; line-height: 52px; margin-bottom: 18px; }

  .faq-layout {
    display: block;
    padding: 0 16px 48px;
  }

  .faq-topics {
    top: 59px;
    z-index: 10;
    margin: 0 -16px 24px;
    padding: 12px 16px;
    border-radius: 0;
    border-bottom: 1px solid var(--border);
  }
  .faq-topics__label { display: none; }
  .faq-topics__list {
    flex-direction: row;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .faq-topics__list::-webkit-scrollbar { display: none; }
  .faq-topics__link {
    white-space: nowrap;
    padding: 8px 12px;
    font-size: 12px;
    border: 1px solid var(--secondary-border);
    border-radius: 32px;
  }
  .faq-topics__link::before { display: none; }
  .faq-topics__link.is-active { border-color: var(--primary); }

  .faq-section { scroll-margin-top: 130px; }
}

/* Eyebrow needs a lighter red to stay legible over the red aurora */
.page-hero--aurora .page-hero__eyebrow { color: #FF8A8A; }
