{% set brand_variant = brand_variant|default('header') %}
{% set is_footer = brand_variant == 'footer' %}
{% set mark_w = is_footer ? 28 : 40 %}
{% set mark_h = is_footer ? 28 : 40 %}
{% set logo_src = brand_logo_url|default('/assets/img/latch-logo.svg?v=' ~ asset_version) %}
{% set logo_dark_src = brand.logo_dark_url|default(null) %}
<a href="/" class="{% if is_footer %}footer-brand-link footer-brand-link-custom{% else %}header-brand header-brand-custom{% endif %}">
    <span class="{% if is_footer %}footer-brand-mark{% else %}header-brand-mark{% endif %}" aria-hidden="true">
        <img class="{% if is_footer %}footer-brand-mark-img{% else %}header-brand-mark-img{% endif %}{% if logo_dark_src %} brand-logo-img--light{% endif %}" src="{{ logo_src }}" width="{{ mark_w }}" height="{{ mark_h }}" alt="">
        {% if logo_dark_src %}
            <img class="{% if is_footer %}footer-brand-mark-img{% else %}header-brand-mark-img{% endif %} brand-logo-img--dark" src="{{ logo_dark_src }}" width="{{ mark_w }}" height="{{ mark_h }}" alt="">
        {% endif %}
    </span>
    <span class="header-brand-text">
        <span class="header-brand-name">{{ site.name }}</span>
        {% if site.tagline and not is_footer %}<span class="header-brand-tag">{{ site.tagline }}</span>{% endif %}
    </span>
</a>