/* ============================================================
   ANNABI COOKIES — faq.css
   Page-specific styles for faq.html only.
   Shared tokens, reset, nav, footer → main.css.
   ============================================================ */


/* ============================================================
   PAGE BANNER
   Matches story.html / contact.html pattern: off-white,
   compact, heading only, no label, no hero image.
   ============================================================ */

#faq-hero {
  padding-top: calc(var(--nav-height) + var(--space-12));
  padding-bottom: var(--space-12);
  background: var(--off-white);
}

.faq-hero-inner h1 {
  font-family: var(--font-heading);
  font-size: clamp(38px, 4.5vw, 56px);
  font-weight: 900;
  line-height: 1.0;
  letter-spacing: -0.025em;
}


/* ============================================================
   FAQ BODY
   White background. Max-width column, left-aligned.
   ============================================================ */

#faq-body {
  background: var(--white);
  padding-block: var(--space-20);
}

.faq-inner {
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
}


/* ============================================================
   FAQ GROUP
   Each group has a small label and a stack of items.
   ============================================================ */

.faq-group {
  display: flex;
  flex-direction: column;
}

.faq-group-label {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(0,0,0,0.38);
  margin-bottom: var(--space-5);
  scroll-margin-top: calc(var(--nav-height) + var(--space-8));
}


/* ============================================================
   FAQ ITEM
   Each item: question button + collapsible answer panel.
   ============================================================ */

.faq-item {
  border-top: 1px solid rgba(0,0,0,0.09);
}

.faq-item:last-child {
  border-bottom: 1px solid rgba(0,0,0,0.09);
}

/* Question button */
.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: var(--space-6) 0;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  gap: var(--space-8);
  transition: opacity var(--ease);
}

.faq-question:hover {
  opacity: 0.6;
}

.faq-question > span:first-child {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--black);
  letter-spacing: -0.01em;
}

/* Plus / minus icon */
.faq-icon {
  flex-shrink: 0;
  position: relative;
  width: 20px;
  height: 20px;
}

.faq-icon::before,
.faq-icon::after {
  content: '';
  position: absolute;
  background: var(--black);
  border-radius: 2px;
  transition: transform 0.28s ease, opacity 0.28s ease;
}

/* Horizontal bar */
.faq-icon::before {
  width: 14px;
  height: 1.5px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Vertical bar */
.faq-icon::after {
  width: 1.5px;
  height: 14px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Open state: vertical bar rotates away → becomes minus */
.faq-question[aria-expanded="true"] .faq-icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
  opacity: 0;
}

.faq-question[aria-expanded="true"] > span:first-child {
  opacity: 1;
}

/* Answer panel */
.faq-answer {
  overflow: hidden;
  /* Height managed by JS via max-height transition */
  max-height: 0;
  transition: max-height 0.38s ease;
}

/* Not using [hidden] attribute for display — JS toggles max-height.
   Override browser hidden to keep element in flow for animation. */
.faq-answer[hidden] {
  display: block !important;
  visibility: visible;
}

.faq-answer-inner {
  padding-bottom: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.faq-answer p {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.75;
  color: rgba(0,0,0,0.65);
}


/* ============================================================
   MID-PAGE CTA
   Appears after Ordering/Delivery groups.
   Peach band, horizontally arranged.
   ============================================================ */

.faq-mid-cta {
  background: var(--peach);
  border-radius: var(--radius-lg);
  padding: var(--space-10) var(--space-12);
}

.faq-mid-cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
}

.faq-mid-cta-inner p {
  font-family: var(--font-heading);
  font-size: clamp(20px, 2.5vw, 26px);
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--black);
}


/* ============================================================
   BOTTOM CTA
   Dark band. Centred.
   ============================================================ */

#faq-cta {
  background: var(--peach);
  padding-block: var(--space-20);
}

.faq-cta-inner {
  max-width: 560px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-5);
}

.faq-cta-inner h2 {
  font-family: var(--font-heading);
  font-size: clamp(30px, 3.5vw, 44px);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--black);
}

.faq-cta-inner p {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.7;
  color: rgba(0,0,0,0.55);
}

.faq-cta-inner .btn--dark {
  background: var(--white);
  color: var(--black);
  border-color: var(--white);
  margin-top: var(--space-3);
}

.faq-cta-inner .btn--dark:hover {
  background: var(--black);
  border-color: var(--black);
  color: var(--white);
}


/* ============================================================
   RESPONSIVE — Tablet (≤860px)
   ============================================================ */

@media (max-width: 860px) {

  .faq-mid-cta {
    padding: var(--space-8) var(--space-8);
  }

  .faq-mid-cta-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-5);
  }

}


/* ============================================================
   RESPONSIVE — Mobile (≤520px)
   ============================================================ */

@media (max-width: 520px) {

  #faq-hero {
    padding-bottom: var(--space-10);
  }

  .faq-question > span:first-child {
    font-size: 15px;
  }

  .faq-mid-cta {
    border-radius: var(--radius-md);
    padding: var(--space-8) var(--space-6);
  }

}
