---
/**
 * GuaranteeBand Component
 *
 * Risk-reversal band that sits BETWEEN the PricingTimelineBand and the
 * InlineLeadForm on the homepage. Its single job is to remove last-mile
 * objections ("how do I know this won't blow up in my face?") right before
 * the visitor fills in the lead form below.
 *
 * Layout:
 *   - 3-up icon + claim row on md+
 *   - Items stack vertically (1 column) on mobile (<md)
 *   - Each item is a single visual unit: icon → headline → short subtext
 *
 * Design tokens:
 *   - Uses existing tailwind primitives (`primary-*`, `secondary-*`,
 *     `accent-*`, `rounded-2xl`). No new colours introduced.
 *   - Dark-mode pairs are taken from the .agents/security-auditor/
 *     THEME_ACCESSIBILITY_AUDIT.md verified-passing list (e.g.
 *     `primary-300` on `primary-900/30`, `secondary-200` on
 *     `secondary-800` — all ≥ AA 4.5:1).
 *
 * CLS guard:
 *   - Each item card has an explicit `min-h-[...]` so the band reserves
 *     its vertical footprint at first paint, even before icons render.
 *
 * The component is intentionally prop-less. The three claims are part of
 * the brand promise and shouldn't vary across pages; if a future variant
 * needs different copy, refactor to a `claims` prop then.
 */

interface ClaimEntry {
  title: string;
  body: string;
  /**
   * Inline SVG path data (already wrapped in <path>). Kept inline so the
   * component has no extra HTTP requests and the icons can ride along with
   * the document's currentColor — no FOUC.
   */
  icon: string;
}

const claims: ClaimEntry[] = [
  {
    title: '30-day satisfaction guarantee',
    body: 'Not happy in the first 30 days post-launch? We rework it on us or refund the engagement fee.',
    // Shield-check icon
    icon:
      '<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M12 3 4.5 6v6c0 4.5 3 8.5 7.5 9.5 4.5-1 7.5-5 7.5-9.5V6L12 3Z"/><path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="m9 12 2 2 4-4"/>',
  },
  {
    title: 'No long-term contracts',
    body: 'Month-to-month after delivery. Pause, extend, or wind down — you stay in control of the engagement.',
    // Document-minus icon
    icon:
      '<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M9 12h6M7 21h10a2 2 0 0 0 2-2V7l-5-5H7a2 2 0 0 0-2 2v15a2 2 0 0 0 2 2Z"/><path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M13 2v5h5"/>',
  },
  {
    title: 'Fixed-price quotes',
    body: 'Scope-locked proposals with a clear deliverable and a clear number — no surprise change-orders.',
    // Currency / receipt icon
    icon:
      '<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M12 6v12M8 9h6.5a2.5 2.5 0 0 1 0 5h-5a2.5 2.5 0 0 0 0 5H16"/><circle cx="12" cy="12" r="9" stroke-width="1.8" fill="none"/>',
  },
];
---

<!--
  Risk-reversal band. Anchor `#guarantees` lets nav / sticky CTA deep-link
  visitors straight to the promises right above the lead form.
-->
<section
  id="guarantees"
  class="pt-6 sm:pt-8 pb-14 sm:pb-20 bg-white dark:bg-secondary-900"
  aria-labelledby="guarantees-heading"
>
  <div class="container-wrapper">
    <div class="max-w-5xl mx-auto">
      <!-- Visually hidden heading. The three claim titles each read as their
           own heading inside the cards, so a wrapper heading would be
           redundant in the visible flow but is still useful for screen
           readers to anchor the landmark. -->
      <h2 id="guarantees-heading" class="sr-only">Our guarantees</h2>

      <!--
        3-up grid.
        Mobile (<md): single column, items stack with consistent vertical
          rhythm via `gap-4`.
        md+        : three equal columns, evenly spaced.
      -->
      <ul
        class="grid grid-cols-1 md:grid-cols-3 gap-4 sm:gap-6"
        role="list"
      >
        {claims.map((claim, index) => (
          <li class="h-full">
            <article
              class="h-full min-h-[140px] sm:min-h-[160px] flex md:flex-col items-start gap-4 sm:gap-5 rounded-2xl border border-secondary-100 dark:border-secondary-700 bg-gradient-to-br from-secondary-50 to-white dark:from-secondary-800 dark:to-secondary-900 p-5 sm:p-6 shadow-sm hover:shadow-md transition-shadow duration-300"
              data-animate="fade-up"
              data-delay={String(index * 80)}
              aria-labelledby={`guarantee-${index}-title`}
            >
              <!-- Icon chip -->
              <div
                class="flex-shrink-0 w-12 h-12 rounded-xl bg-primary-100 dark:bg-primary-900/40 text-primary-700 dark:text-primary-300 flex items-center justify-center"
                aria-hidden="true"
              >
                <svg
                  class="w-6 h-6"
                  viewBox="0 0 24 24"
                  fill="none"
                  stroke="currentColor"
                  set:html={claim.icon}
                />
              </div>

              <!-- Copy block. The leading checkmark prefix communicates the
                   "✓ benefit" rhythm the brief asks for ("'✓ 30-day satisfaction
                   guarantee', '✓ No long-term contracts', '✓ Fixed-price
                   quotes'") without relying on an emoji glyph that varies
                   across platforms. -->
              <div class="min-w-0">
                <h3
                  id={`guarantee-${index}-title`}
                  class="text-base sm:text-lg font-bold text-secondary-900 dark:text-secondary-100 leading-snug"
                >
                  <span class="text-primary-600 dark:text-primary-300" aria-hidden="true">✓</span>
                  <span class="ml-1">{claim.title}</span>
                </h3>
                <p class="mt-2 text-sm sm:text-base text-secondary-600 dark:text-secondary-300 leading-relaxed">
                  {claim.body}
                </p>
              </div>
            </article>
          </li>
        ))}
      </ul>
    </div>
  </div>
</section>
