{# contact-form override — server-driven; block-id resolution, {% form %} wiring, honeypot, and field loop copied verbatim from the builtin, reskinned with sc-form primitives. #}
{% with bid=_block_id|default:context.blockId %}
{% if form.submitted %}
{{ form.message|default:successMessage|default:"Thanks — your message has been sent." }}
{% else %}
{% if heading %}
{{ heading }}
{% endif %}
{% if description %}
{{ description }}
{% endif %}
{% if form.errors._form %}
{{ form.errors._form }}
{% endif %}
{% with formAction="/api/blocks/"|add:bid|add:"/submit" formTarget="#contact-form-"|add:bid %}
{% form action=formAction hx_target=formTarget hx_swap="outerHTML" class="sc-form-grid" %}
{% for field in fields %}