{% load static %}
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>{% block title %}{{ project_name|default:"ReliefSignal" }}{% endblock %}</title>
  <meta name="description" content="{% block meta_description %}{{ meta_description|default:project_description|default:'Real-time tax relief call intake pilot for transcription, structured extraction, completion scoring, and CRM readiness.' }}{% endblock %}">
  {% if project_image_url %}
  <meta property="og:image" content="{{ project_image_url }}">
  <meta property="twitter:image" content="{{ project_image_url }}">
  {% endif %}
  <link rel="preconnect" href="https://fonts.googleapis.com">
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
  <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Fraunces:opsz,wght@9..144,700&display=swap" rel="stylesheet">
  <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
  <link rel="stylesheet" href="{% static 'css/custom.css' %}?v={{ deployment_timestamp }}">
  {% block head %}{% endblock %}
</head>

<body>
  <a class="skip-link" href="#main-content">Skip to content</a>
  <nav class="navbar navbar-expand-lg app-nav sticky-top" aria-label="Primary navigation">
    <div class="container py-2">
      <a class="navbar-brand brand-mark" href="{% url 'home' %}">
        <span class="brand-icon">RS</span>
        <span>ReliefSignal</span>
      </a>
      <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#mainNav" aria-controls="mainNav" aria-expanded="false" aria-label="Toggle navigation">
        <span class="navbar-toggler-icon"></span>
      </button>
      <div class="collapse navbar-collapse" id="mainNav">
        <ul class="navbar-nav ms-auto align-items-lg-center gap-lg-2">
          <li class="nav-item"><a class="nav-link" href="{% url 'home' %}#workflow">Workflow</a></li>
          <li class="nav-item"><a class="nav-link" href="{% url 'call_list' %}">History</a></li>
          <li class="nav-item"><a class="nav-link" href="{% url 'audio_capture' %}">Audio</a></li>
          <li class="nav-item"><a class="nav-link" href="{% url 'webhook_list' %}">Webhooks</a></li>
          <li class="nav-item"><a class="nav-link" href="/admin/">Admin</a></li>
          <li class="nav-item"><a class="btn btn-signal ms-lg-2" href="{% url 'call_create' %}">New pilot call</a></li>
        </ul>
      </div>
    </div>
  </nav>

  {% if messages %}
  <div class="container message-stack" aria-live="polite">
    {% for message in messages %}
    <div class="alert alert-{{ message.tags|default:'info' }} shadow-sm mb-2" role="alert">{{ message }}</div>
    {% endfor %}
  </div>
  {% endif %}

  <main id="main-content">
    {% block content %}{% endblock %}
  </main>

  <footer class="site-footer">
    <div class="container d-flex flex-column flex-md-row justify-content-between gap-3">
      <span>ReliefSignal pilot console for tax relief call intake.</span>
      <span>Real-time audio first · CRM sync ready · Completion scored</span>
    </div>
  </footer>
  <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
</body>

</html>
