<section class="provenance-timeline" data-reveal>
  <div class="container">
    {%- if section.settings.eyebrow != blank -%}
      <span class="section-eyebrow">{{ section.settings.eyebrow }}</span>
    {%- endif -%}
    {%- if section.settings.heading != blank -%}
      <h2 class="section-heading section-heading--center"><em>{{ section.settings.heading }}</em></h2>
    {%- endif -%}

    <div class="provenance-timeline__track">
      <div class="provenance-timeline__line" aria-hidden="true"></div>
      {%- for block in section.blocks -%}
        <div class="provenance-timeline__step" {{ block.shopify_attributes }} data-reveal style="--index: {{ forloop.index }}">
          <span class="provenance-timeline__number">{{ block.settings.number }}</span>
          <span class="provenance-timeline__label">{{ block.settings.label }}</span>
          {%- if block.settings.description != blank -%}
            <p class="provenance-timeline__desc">{{ block.settings.description }}</p>
          {%- endif -%}
        </div>
      {%- endfor -%}
    </div>
  </div>
</section>

{% schema %}
{
  "name": "Provenance Timeline",
  "class": "section-provenance-timeline",
  "settings": [
    { "type": "text", "id": "eyebrow", "label": "Eyebrow", "default": "THE PROCESS" },
    { "type": "text", "id": "heading", "label": "Heading", "default": "How It's Made" }
  ],
  "blocks": [
    {
      "type": "step",
      "name": "Step",
      "settings": [
        { "type": "text", "id": "number", "label": "Step number", "default": "01" },
        { "type": "text", "id": "label", "label": "Label", "default": "Step" },
        { "type": "textarea", "id": "description", "label": "Description" }
      ]
    }
  ],
  "presets": [{ "name": "Provenance Timeline", "blocks": [{ "type": "step" }, { "type": "step" }, { "type": "step" }, { "type": "step" }, { "type": "step" }] }]
}
{% endschema %}