/*
 * Floating pill navigation.
 */

.nav {
    position: fixed;
    top: 22px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 8px;
    width: fit-content;
    max-width: calc(100vw - 32px);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    transition: background .4s ease, border-color .4s ease, box-shadow .4s ease;
}

.nav--scrolled {
    background: rgba(7, 26, 51, 0.94);
    border-color: rgba(255, 255, 255, 0.06);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.nav__logo {
    display: flex;
    align-items: center;
    padding: 6px 12px;
}

.nav__logo img {
    height: 24px;
    width: auto;
}

.nav__links {
    display: flex;
    align-items: center;
    gap: 2px;
}

.nav__link {
    padding: 8px 16px;
    color: rgba(255, 255, 255, 0.8);
    font-size: .875rem;
    font-weight: 500;
    border-radius: 50px;
    transition: color .25s ease, background .25s ease;
}

.nav__link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.nav__actions {
    display: flex;
    align-items: center;
    gap: 2px;
}

.nav__cta {
    padding: 8px 18px;
    background: var(--red-600);
    color: #fff;
    font-size: .85rem;
    font-weight: 600;
    border-radius: 50px;
    transition: background .25s ease, transform .25s ease;
}

.nav__cta:hover {
    background: var(--red-700);
    transform: scale(1.03);
}

.nav__burger {
    display: none;
    background: none;
    border: none;
    padding: 6px 10px;
    cursor: pointer;
    color: #fff;
}

.nav__burger svg {
    display: block;
}

/* Mobile */
@media (max-width: 768px) {
    .nav__links,
    .nav__cta {
        display: none;
    }
    .nav__burger {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 34px;
        height: 34px;
    }
}

/* Full-screen panel */
.nav__panel {
    position: fixed;
    inset: 0;
    z-index: 99;
    background: var(--blue-950);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .35s ease, visibility .35s ease;
}

.nav__panel.is-open {
    opacity: 1;
    visibility: visible;
}

.nav__panel a {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: -.02em;
    opacity: .7;
    transition: opacity .25s ease;
}

.nav__panel a:hover {
    opacity: 1;
}

.nav__panel-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 1.3rem;
    cursor: pointer;
}

@supports not (backdrop-filter: blur(1px)) {
    .nav {
        background: rgba(7, 26, 51, 0.6);
    }
    .nav--scrolled {
        background: rgba(7, 26, 51, 0.98);
    }
}
