:root {
    --topbar-height: 60px;
}

.topbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--topbar-height);
    background: #000;
    z-index: 5000;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    padding: 0 12px;
}

.header-spacer {
    height: var(--topbar-height);
}

.topbar__logo img {
    width: 80px;
    height: auto;
    display: block;
}

.topbar__middle {
    display: flex;
    justify-content: center;
}

.topbar__cta {
    background: var(--accent);
    color: #000;
    padding: 10px 22px;
    border-radius: 4px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
    text-decoration: none;
    white-space: nowrap;
}

.topbar__right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding-right: 16px;
}

.topbar__menu {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    margin-left: 12px;
    position: relative;
    z-index: 5102;
}

.topbar__menu span {
    display: block;
    width: 26px;
    height: 3px;
    background: #fff;
    margin: 4px 0;
    transition: transform 0.22s ease, opacity 0.22s ease;
}

.topbar__menu.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.topbar__menu.is-open span:nth-child(2) {
    opacity: 0;
}

.topbar__menu.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.topbar__mobile-backdrop {
    position: fixed;
    inset: var(--topbar-height) 0 0 0;
    background: rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(6px);
    z-index: 5098;
}

.topbar__mobile-menu {
    position: fixed;
    top: var(--topbar-height);
    right: 12px;
    left: 12px;
    z-index: 5101;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    max-height: calc(100svh - var(--topbar-height) - 24px);
    overflow: auto;
    scrollbar-width: none;
    background: rgba(12, 12, 14, 0.98);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 18px;
    box-shadow: 0 18px 48px rgba(0,0,0,0.35);
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.topbar__mobile-menu.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.topbar__mobile-menu::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

.topbar__mobile-group {
    display: grid;
    gap: 8px;
}

.topbar__mobile-heading {
    margin: 4px 2px 0;
    color: rgba(255,255,255,0.52);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.topbar__mobile-link {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 0 14px;
    border-radius: 12px;
    color: #fff;
    text-decoration: none;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    font-weight: 800;
    letter-spacing: 0.02em;
}

.topbar__mobile-link.is-current {
    border-color: rgba(255, 210, 0, 0.35);
    background: rgba(255, 210, 0, 0.08);
}

.topbar__mobile-link--cta {
    justify-content: center;
    background: var(--accent);
    color: #000;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

body.topbar-menu-open {
    overflow: hidden;
}

@media (min-width: 700px) {
    :root {
        --topbar-height: 65px;
    }

    .topbar {
        height: var(--topbar-height);
        padding: 0 18px;
    }

    .topbar__logo img {
        width: 95px;
    }

    .topbar__cta {
        padding: 10px 22px;
        font-size: 0.95rem;
    }

    .topbar__right {
        padding-right: 20px;
    }

    .topbar__mobile-menu {
        left: auto;
        width: min(360px, calc(100vw - 36px));
        right: 18px;
    }
}

@media (min-width: 1024px) {
    :root {
        --topbar-height: 70px;
    }

    .topbar {
        height: var(--topbar-height);
        padding: 0 22px;
    }

    .topbar__logo img {
        width: 120px;
    }

    .topbar__cta {
        padding: 12px 26px;
        font-size: 1rem;
    }

    .topbar__right {
        padding-right: 26px;
    }

    .topbar__mobile-menu {
        right: 22px;
    }
}
