---
import '../styles/global.css';

interface Props {
  title?: string;
  description?: string;
}

const {
  title = 'Aryx — A Desktop Workspace for Copilot-Powered Work',
  description = 'Aryx is a desktop workspace for Copilot-powered work across real projects. Orchestrate agents, connect local repos, and keep AI sessions organized.',
} = Astro.props;
---

<!doctype html>
<html lang="en" class="scroll-smooth">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <meta name="description" content={description} />
    <meta name="theme-color" content="#09090b" />

    <!-- Open Graph -->
    <meta property="og:type" content="website" />
    <meta property="og:title" content={title} />
    <meta property="og:description" content={description} />
    <meta property="og:image" content="/images/logo.png" />

    <!-- Twitter -->
    <meta name="twitter:card" content="summary_large_image" />
    <meta name="twitter:title" content={title} />
    <meta name="twitter:description" content={description} />

    <link rel="icon" type="image/png" href="/favicon.png" />
    <title>{title}</title>
  </head>
  <body class="min-h-screen bg-zinc-950 text-zinc-100 antialiased">
    <!-- Navigation -->
    <nav class="fixed top-0 z-50 w-full border-b border-zinc-800/80 bg-zinc-950/80 backdrop-blur-xl">
      <div class="mx-auto flex h-16 max-w-6xl items-center justify-between px-6">
        <a href="#" class="flex items-center gap-3">
          <img src="/images/logo.png" alt="Aryx" class="size-8 rounded-lg" />
          <span class="text-lg font-bold tracking-tight">Aryx</span>
        </a>
        <div class="hidden items-center gap-8 md:flex">
          <a href="#features" class="text-sm text-zinc-400 transition hover:text-zinc-100">Features</a>
          <a href="#patterns" class="text-sm text-zinc-400 transition hover:text-zinc-100">Patterns</a>
          <a href="#get-started" class="text-sm text-zinc-400 transition hover:text-zinc-100">Get Started</a>
          <a
            href="https://github.com/davidkaya/eryx"
            target="_blank"
            rel="noopener noreferrer"
            class="inline-flex items-center gap-2 rounded-lg bg-zinc-800 px-4 py-2 text-sm font-medium text-zinc-100 transition hover:bg-zinc-700"
          >
            <svg class="size-4" viewBox="0 0 24 24" fill="currentColor">
              <path d="M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0024 12c0-6.63-5.37-12-12-12z" />
            </svg>
            GitHub
          </a>
        </div>
        <!-- Mobile menu button -->
        <button
          class="rounded-lg p-2 text-zinc-400 transition hover:bg-zinc-800 hover:text-zinc-100 md:hidden"
          onclick="document.getElementById('mobile-menu')?.classList.toggle('hidden')"
          aria-label="Toggle menu"
        >
          <svg class="size-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
            <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16" />
          </svg>
        </button>
      </div>
      <!-- Mobile menu -->
      <div id="mobile-menu" class="hidden border-t border-zinc-800 px-6 py-4 md:hidden">
        <div class="flex flex-col gap-4">
          <a href="#features" class="text-sm text-zinc-400 transition hover:text-zinc-100">Features</a>
          <a href="#patterns" class="text-sm text-zinc-400 transition hover:text-zinc-100">Patterns</a>
          <a href="#get-started" class="text-sm text-zinc-400 transition hover:text-zinc-100">Get Started</a>
          <a
            href="https://github.com/davidkaya/eryx"
            target="_blank"
            rel="noopener noreferrer"
            class="text-sm text-zinc-400 transition hover:text-zinc-100"
          >
            GitHub
          </a>
        </div>
      </div>
    </nav>

    <main class="pt-16">
      <slot />
    </main>

    <!-- Footer -->
    <footer class="border-t border-zinc-800/80 bg-zinc-950">
      <div class="mx-auto max-w-6xl px-6 py-12">
        <div class="flex flex-col items-center justify-between gap-6 md:flex-row">
          <div class="flex items-center gap-3">
            <img src="/images/logo.png" alt="Aryx" class="size-6 rounded-md" />
            <span class="text-sm font-semibold">Aryx</span>
            <span class="text-sm text-zinc-600">·</span>
            <span class="text-sm text-zinc-500">A desktop workspace for Copilot-powered work</span>
          </div>
          <div class="flex items-center gap-6">
            <a
              href="https://github.com/davidkaya/eryx"
              target="_blank"
              rel="noopener noreferrer"
              class="text-sm text-zinc-500 transition hover:text-zinc-300"
            >
              GitHub
            </a>
            <a
              href="https://github.com/davidkaya/eryx/releases"
              target="_blank"
              rel="noopener noreferrer"
              class="text-sm text-zinc-500 transition hover:text-zinc-300"
            >
              Releases
            </a>
            <a
              href="https://github.com/davidkaya/eryx/issues"
              target="_blank"
              rel="noopener noreferrer"
              class="text-sm text-zinc-500 transition hover:text-zinc-300"
            >
              Issues
            </a>
          </div>
        </div>
        <div class="mt-8 text-center text-xs text-zinc-700">
          &copy; {new Date().getFullYear()} David Kaya. Built with GitHub Copilot.
        </div>
      </div>
    </footer>
  </body>
</html>
