/* ==========================================================================
   SubjectRX — faq.css
   Page-specific styles for faq.html only.
   ========================================================================== */


/* ─────────────────────────────────────────────────────────────────────────
   HERO — FAQ-specific variant
   Uses two <p> elements styled as the headline pair.
   In the rebuild the first <p> becomes <h1> — same classes, same output.
   ───────────────────────────────────────────────────────────────────────── */
.faq-hero {
  padding-top: var(--nav-h, 52px);
  background: var(--g-gradient);
}

.faq-hero-inner {
  padding: 72px 0 80px;
}

.faq-hero-label {
  font-family: 'DM Mono', monospace;
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .32);
  display: block;
  margin-bottom: 24px;
}

/* In rebuild: this becomes <h1> — visual output unchanged */
.faq-hero-h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(38px, 4.8vw, 58px);
  font-weight: 400;
  font-style: italic;
  line-height: 1.03;
  letter-spacing: -.018em;
  color: var(--white);
  margin-bottom: 0;
  display: block;
}

.faq-hero-h1-fade {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(38px, 4.8vw, 58px);
  font-weight: 400;
  font-style: italic;
  line-height: 1.03;
  letter-spacing: -.018em;
  color: rgba(255, 255, 255, .55);
  display: block;
}

@media (max-width: 600px) {
  .faq-hero-inner {
    padding: 52px 0 60px;
  }

  .faq-hero-h1,
  .faq-hero-h1-fade {
    font-size: clamp(32px, 9vw, 44px);
  }
}


/* ─────────────────────────────────────────────────────────────────────────
   TAB NAVIGATION
   <button role="tab"> pattern. aria-selected drives .active styling.
   The tabs-wrap is sticky — it pins below the fixed nav on scroll.
   ───────────────────────────────────────────────────────────────────────── */
.faq-tabs-wrap {
  background: var(--surf);
  border-bottom: 1px solid var(--bdr);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  position: sticky;
  top: var(--nav-h, 52px);
  z-index: 10;
}

.faq-tabs {
  display: flex;
  gap: 0;
}

.faq-tab {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: .005em;
  color: var(--muted);
  padding: 16px 36px 16px 0;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  margin-bottom: -1px;
  transition: color .15s, border-color .15s;
  white-space: nowrap;
  background: none;
  -webkit-appearance: none;
}

.faq-tab:first-child {
  padding-left: 0;
}

/* Driven by aria-selected in faq.js */
.faq-tab[aria-selected="true"] {
  color: var(--g);
  font-weight: 500;
  border-bottom-color: var(--g);
}

.faq-tab:hover:not([aria-selected="true"]) {
  color: var(--ink);
}

.faq-tab:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

@media (max-width: 600px) {
  .faq-tab {
    padding: 16px 22px 16px 0;
    font-size: 12.5px;
  }
}


/* ─────────────────────────────────────────────────────────────────────────
   FAQ BODY — panels and accordion items
   ───────────────────────────────────────────────────────────────────────── */
.faq-body {
  background: var(--cream);
  padding: 52px 0 88px;
}

.faq-panel {
  display: none;
  opacity: 0;
  transition: opacity .22s ease;
}

.faq-panel.active {
  display: block;
  opacity: 1;
}

.faq-list {
  max-width: 720px;
}

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

.faq-item:first-child {
  border-top: 1px solid var(--bdr);
}

/* Accordion trigger */
.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
  cursor: pointer;
  gap: 24px;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  -webkit-appearance: none;
}

.faq-question:focus-visible {
  outline: 2px solid var(--g);
  outline-offset: 2px;
}

.faq-question:hover .faq-q-text {
  color: var(--g);
  transition: color .18s ease;
}

.faq-q-text {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: -.006em;
  color: var(--ink);
}

/* Chevron icon — rotates on open */
.faq-chevron {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  transition: transform .25s ease;
}

.faq-chevron svg {
  display: block;
  width: 100%;
  height: 100%;
  stroke: var(--sage);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Driven by aria-expanded in faq.js */
.faq-question[aria-expanded="true"] .faq-chevron {
  transform: rotate(180deg);
}

/* Answer panel — height driven by JS scrollHeight measurement */
.faq-answer {
  overflow: hidden;
  /* max-height set dynamically by faq.js — not hardcoded */
  max-height: 0;
  transition: max-height .36s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-answer-inner {
  border-left: 2px solid var(--g);
  padding: 4px 80px 24px 20px;
}

.faq-answer-text {
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  font-weight: 400;
  line-height: 1.78;
  color: var(--muted);
}

.faq-answer-text p {
  margin-bottom: 10px;
}

.faq-answer-text p:last-child {
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .faq-q-text {
    font-size: 14px;
  }

  .faq-answer-inner {
    padding-right: 0;
  }
}


/* ─────────────────────────────────────────────────────────────────────────
   CLOSING PROMPT — "Still have questions?" strip
   ───────────────────────────────────────────────────────────────────────── */
.faq-closing {
  background: var(--surf);
  border-top: 1px solid var(--bdr);
  padding: 40px 0;
}

.faq-closing-inner {
  max-width: 720px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.faq-closing-text {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -.006em;
}

@media (max-width: 600px) {
  .faq-closing-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
}
