/* ==================================================================
   FAQ — kwizzbit/faq (whole-file segment)
   Faithful slice of /HTML/faq.html. Globals (reset/body/font-face/:root)
   dropped; tokens canonical (theme.json). Full-bleed via the .kwb-segment wrapper.
   ================================================================== */

  .faq {
    /* Match the comparison section's backdrop */
    background: var(--wp--preset--color--cream);
    position: relative;
  }

  .faq__inner {
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: clamp(1rem, 4vw, 3rem);
    padding-block: 8.5rem 9.5rem;
    display: grid;
    grid-template-columns: 380px 600px;
    justify-content: center;
    gap: 80px;
    align-items: start;
  }

  .faq__sidebar {
    position: sticky;
    top: calc(88px + 2rem);
    align-self: start;
    /* Cap height to the visible window minus the sticky offset so the sidebar
       never scrolls out of view even with a long FAQ list. */
    max-height: calc(100vh - 88px - 4rem);
    overflow-y: auto;
  }

  .faq__title {
    font-family: var(--wp--preset--font-family--display);
    font-size: 3.4375rem; /* 55px — matches comparison + features-9 headline */
    font-weight: 400;
    line-height: 0.95;
    letter-spacing: -0.10769em;
    color: var(--wp--preset--color--ink);
    margin-bottom: 1rem;
  }

  .faq__title-accent {
    color: var(--wp--preset--color--coral);
    animation: cursor-blink 1.1s step-end infinite;
  }

  .faq__lead {
    font-family: var(--wp--preset--font-family--body);
    font-size: var(--wp--preset--font-size--nav);
    font-weight: 500;
    line-height: 1.5;
    color: var(--wp--preset--color--ink);
    margin-bottom: 1.75rem;
    max-width: 28ch;
  }

  .faq__lead a {
    color: var(--wp--preset--color--ink);
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-thickness: 1px;
    transition: color var(--wp--custom--motion--dur-base) var(--wp--custom--motion--ease-out);
  }

  .faq__lead a:hover { color: var(--wp--custom--color--nav-ink); }

  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 1.5rem;
    border: none;
    border-radius: 0;
    font-family: var(--wp--preset--font-family--body);
    font-size: var(--wp--preset--font-size--sm);
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: background var(--wp--custom--motion--dur-base) var(--wp--custom--motion--ease-out),
                transform var(--wp--custom--motion--dur-base) var(--wp--custom--motion--ease-out);
  }

  .btn--secondary {
    background: linear-gradient(to right, #1D0B09, #3E1916);
    color: var(--wp--preset--color--white);
  }

  @media (hover: hover) {
    .btn--secondary:hover {
      background: linear-gradient(to right, #0D0504, #2A100E);
      transform: translateY(-1px);
    }
  }

  .faq__list { position: relative; }


  .faq-item { border-top: 0.5px solid var(--wp--custom--color--faq-divider); }
  .faq-item:first-child { border-top: none; }


  .faq-item__trigger {
    width: 100%;
    background: none;
    border: none;
    padding: 1.375rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    cursor: pointer;
    text-align: left;
  }

  .faq-item__question {
    font-family: var(--wp--preset--font-family--body);
    font-size: var(--wp--preset--font-size--nav);
    font-weight: 600;
    line-height: 1.3;
    color: var(--wp--preset--color--ink);
    transition: color var(--wp--custom--motion--dur-base) var(--wp--custom--motion--ease-out);
  }

  .faq-item__trigger:hover .faq-item__question { color: var(--wp--custom--color--nav-ink); }

  .faq-item__chevron {
    flex-shrink: 0;
    width: 12px;
    height: 8px;
    color: var(--wp--preset--color--ink);
    transition: transform var(--wp--custom--motion--dur-base) var(--wp--custom--motion--ease-out);
  }

  .faq-item.is-open .faq-item__chevron { transform: rotate(180deg); }

  .faq-item__body {
    overflow: hidden;
    height: 0;
    transition: height var(--wp--custom--motion--dur-slow) var(--wp--custom--motion--ease-out);
  }

  .faq-item__answer {
    font-family: var(--wp--preset--font-family--body);
    font-size: var(--wp--preset--font-size--nav);
    font-weight: 500;
    line-height: 1.6;
    color: var(--wp--custom--color--faq-answer);
    padding-bottom: 1.375rem;
    padding-right: 2rem;
    max-width: 100%;
  }

  /* Answers are backend-editable (kwb_faq) and may hold several paragraphs. */
  .faq-item__answer p { margin: 0 0 0.875rem; }
  .faq-item__answer p:last-child { margin-bottom: 0; }

  .scroll-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.65s var(--wp--custom--motion--ease-out),
                transform 0.65s var(--wp--custom--motion--ease-out);
  }
  .scroll-reveal.is-visible { opacity: 1; transform: translateY(0); }
  .scroll-reveal--delay { transition-delay: 0.1s; }

  @media (prefers-reduced-motion: reduce) {
    .scroll-reveal { opacity: 1; transform: none; transition: none; }
    .faq-item__body { transition: none; }
    .faq-item__chevron { transition: none; }
    .faq__title-accent { animation: none; }
  }

  @keyframes cursor-blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
  }

  @media (max-width: 1023px) {
    .faq__inner {
      grid-template-columns: 1fr;
      gap: 3rem;
      padding-block: 7rem 7.5rem;
    }
    .faq__sidebar { position: static; }
    .faq__title { font-size: 3.4375rem; line-height: 0.95; }
    .faq__lead { max-width: 44ch; }
  }

  @media (max-width: 640px) {
    .faq__inner { padding-block: 7.875rem 6.5rem; gap: 2rem; }
    .faq__title {
      font-size: clamp(1.875rem, 10.13vw, 2.375rem);
      line-height: 0.8421;
      letter-spacing: -0.10763em;
    }
    /* Centre sidebar — title, lead text, and View all FAQs button */
    .faq__sidebar { text-align: center; }
    /* Lead — constrained width on mobile + centred */
    .faq__lead { font-size: 1rem; max-width: min(28ch, 90%); margin-inline: auto; }
    /* Button is display:inline-flex — centred by text-align:center on parent */
    .faq-item__question { font-size: var(--wp--preset--font-size--sm); }
    .faq-item__answer { font-size: var(--wp--preset--font-size--sm); }
    .faq-item__trigger { padding: 1rem 0; }
  }
