/* ================================================================
   TOPBAR — Shared across all pages
   Extracted from landing.css to reduce bundle size on non-home pages
   ================================================================ */

/* ── CSS Variables (topbar dependencies) ──────────────────────── */
:root {
    --topbar-h: 60px;
    --container-width: 1200px;
}

/* ── Topbar ─────────────────────────────────────────────────── */
.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(3, 7, 6, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(16, 185, 129, 0.08);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.4), 0 4px 16px rgba(0, 0, 0, 0.25);
}

.topbar-inner {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
    height: var(--topbar-h);
    display: flex;
    align-items: center;
    gap: 16px;
}

/* ── Brand ──────────────────────────────────────────────────── */
.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #E8F5EC;
    font-family: 'Fraunces', 'IBM Plex Sans', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
}
.brand:hover { color: #10B981; }
.brand-logo {
    width: 32px; height: 32px;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid rgba(16, 185, 129, 0.08);
}
.brand-name {
    white-space: nowrap;
}

/* ── Topnav ─────────────────────────────────────────────────── */
.topnav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
    margin-right: 8px;
}
.topnav a {
    color: #8BA89A;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 6px;
    text-decoration: none;
    transition: all .2s;
}
.topnav a:hover {
    color: #34D399;
    background: rgba(9, 171, 208, 0.08);
}
.topnav a.active { color: #10B981; }
.topnav a.active .topnav-icon { color: #10B981; }

.topnav-icon { display: none; }
.topnav-label { display: inline; }

/* ── Topbar actions ─────────────────────────────────────────── */
.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}
.topbar-social {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.topbar-social .social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(16, 185, 129, 0.08);
    transition: transform .2s, background .2s, border-color .2s;
}
.topbar-social .social-icon:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.08);
    border-color: #34D399;
}
.topbar-social .social-icon svg,
.topbar-social .social-icon img {
    width: 20px; height: 20px;
}

/* ── Auth section ───────────────────────────────────────────── */
.topbar-auth {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: 4px;
}
.topbar-auth-link {
    color: #E8F5EC;
    text-decoration: none;
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: background .15s, color .15s, border-color .15s;
    white-space: nowrap;
}
.topbar-username {
    color: #10B981;
    font-weight: 600;
    font-family: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
    font-size: 0.85rem;
}
.topbar-pro-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    background: linear-gradient(135deg, #34D399, #10B981);
    color: #030706;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-left: 4px;
}

/* ── Button base ────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all .15s;
    text-decoration: none;
    white-space: nowrap;
}
.btn-sm {
    padding: 7px 14px;
    font-size: 0.82rem;
}
.btn-primary {
    background: linear-gradient(135deg, #34D399, #10B981);
    color: #030706;
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.15);
}

/* ── Hamburger + mobile menu ────────────────────────────────── */
.topbar-hamburger {
    display: none;
    flex-shrink: 0;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px; height: 36px;
    padding: 6px;
    margin-left: auto;
    background: none;
    border: 1px solid rgba(16, 185, 129, 0.08);
    border-radius: 8px;
    cursor: pointer;
    z-index: 60;
    transition: border-color .2s;
}
.topbar-hamburger:hover { border-color: #34D399; }
.topbar-hamburger span {
    display: block;
    width: 100%; height: 2px;
    background: #8BA89A;
    border-radius: 2px;
    transition: transform .25s, opacity .2s;
}
.topbar-hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.topbar-hamburger.is-open span:nth-child(2) { opacity: 0; }
.topbar-hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
    display: none;
}

/* ── Responsive: mobile (≤ 639px) ──────────────────────────── */
@media (max-width: 639px) {
    .topnav { display: none !important; }
    .topbar-social { display: none !important; }
    .brand-name { display: none; }
    .topbar-hamburger { display: flex; }

    .mobile-menu {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: var(--topbar-h);
        left: 0; right: 0;
        background: rgba(10, 14, 21, 0.97);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-bottom: 1px solid rgba(36, 46, 64, 0.5);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
        z-index: 55;
        padding: 12px 20px;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: opacity .2s, visibility .2s, transform .2s;
    }
    .mobile-menu.is-open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    .mobile-menu-nav {
        display: flex;
        flex-direction: column;
        gap: 2px;
    }
    .mobile-menu-link {
        display: flex;
        align-items: center;
        gap: 10px;
        color: #8BA89A;
        text-decoration: none;
        font-size: 0.95rem;
        font-weight: 500;
        padding: 10px 12px;
        border-radius: 8px;
        transition: color .15s, background .15s;
    }
    .mobile-menu-link:hover,
    .mobile-menu-link.active {
        color: #34D399;
        background: rgba(9, 171, 208, 0.08);
    }
    .mobile-menu-icon { width: 20px; height: 20px; flex-shrink: 0; }
}

@media (max-width: 480px) {
    .topbar-auth-link { padding: 6px 10px; font-size: 0.78rem; }
}
