/* Legacy-parity text rendering: the old Creditas site sets
 * -webkit-font-smoothing: antialiased globally, which renders type
 * lighter/thinner on macOS. Webflow Code Components live in isolated
 * shadow roots, so this must be declared per-component on :host to
 * inherit into the shadow tree (the property does not cross the
 * shadow boundary). Without it, Blink defaults to subpixel smoothing
 * and identical 400-weight text looks heavier than the old site. */
:host {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/**
 * Faq — vertical accordion list of question/answer pairs with an
 * optional "view all" link at the bottom. Visual contract mirrors
 * `creditas-site/src/sections/Faq/`.
 *
 * Class naming: single-class, no BEM `__` separator. Each component
 * renders inside its own Webflow shadow root, so short element names
 * (`.container`, `.title`, `.link`) can't collide with anything global;
 * they are nested under the `.faq` block for scoping + co-location of
 * media queries and states.
 *
 * Token values inlined from @creditas-ui/themes standard:
 *
 *   colors.neutral.0    = #ffffff
 *   colors.neutral.15   = #d6dcd9   (accordion divider)
 *   colors.neutral.darker = #3b4540 (title label + title divider)
 *   colors.neutral.90   = #292929   (body text)
 *   colors.primary.60   = #4f9e00   (bottom link)
 *
 *   breakpoints.2xl     = 600px
 *   breakpoints.5xl     = 1024px
 *
 *   title label            → 14px / 20px / 1.5px / Helvetica Now Display / 700 (Figma 4974:2722)
 *   typography.body.lg     → 18px / 26px / 0.3px / Helvetica Now Display / 400
 *   typography.body.md     → 16px / 24px / 0.3px / Helvetica Now Display / 400
 */

.faq,
.faq *,
.faq *::before,
.faq *::after {
  box-sizing: border-box;
}

.faq {
  position: relative;
  background: #ffffff;
  padding: 64px 0;
  font-family: 'Helvetica Now Display', 'Helveticanowdisplay', sans-serif;
  color: #292929;

  @media (min-width: 1024px) {
    padding: 164px 0;
  }

  .container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
  }

  .title {
    /* Figma node 4974:2722 — the title is a small bold label, NOT a large
     * heading: Helvetica Now Display Bold 14/20, +1.5px tracking, uppercase,
     * Neutral/Darker (#3b4540), over a 4px #3b4540 divider. (Was previously a
     * 32px Maison Neue Extended heading, which rendered much larger than the
     * design.) The Bold weight is also set as the `titleWeight` default. */
    margin: 0 0 32px;
    padding-bottom: 16px;
    border-bottom: 4px solid #3b4540; /* neutral.darker */
    font-family: 'Helvetica Now Display', 'Helveticanowdisplay', sans-serif;
    font-weight: 700;
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 1.5px;
    color: #3b4540; /* neutral.darker */
    text-transform: uppercase;

    @media (min-width: 1024px) {
      margin-bottom: 48px;
    }
  }

  .list {
    display: flex;
    flex-direction: column;

    /* Flatten Webflow's slot wrapper so each FaqQuestion code-island
     * becomes a direct child of the list and the dividers between items
     * lay out correctly. */
    ::slotted(*) {
      display: contents;
    }
  }

  /* ----- bottom "view all" link ----------------------------------- */

  .link {
    display: inline-flex;
    align-items: center;
    margin-top: 32px;
    color: #4f9e00;
    font-weight: 500;
    font-size: 18px;
    line-height: 26px;
    letter-spacing: 0.3px;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s ease;

    &:hover {
      opacity: 0.75;
    }

    &:focus-visible {
      outline: 2px solid #8edb00;
      outline-offset: 2px;
    }

    .link-icon {
      width: 20px;
      height: 20px;
      margin-left: 8px;
    }
  }
}

