/* =========================
   TOPNAV
========================= */

.topnav {
    position: absolute;
    top: 30px;
    left: 0;
    width: 100%;
    z-index: 200;
}

.topnav__container {

    position: relative;

    width: min(1180px, 92%);
    margin: auto;

    height: 72px;

    background: rgba(255, 255, 255, .92);

    backdrop-filter: blur(12px);

    border-radius: 24px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 18px;

    box-shadow: 0 10px 30px rgba(0, 0, 0, .15);
}

.topnav__logo img {
    height: 44px;
}

.topnav__menu {
    display: flex;
    align-items: center;
    gap: 40px;
}

.topnav__link {
    position: relative;
    font-weight: 600;
    color: var(--black-800);
    transition: var(--transition);
}

.topnav__link:hover,
.topnav__link--active {
    color: var(--gold-500);
}

.topnav__link--active::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 100%;
    height: 3px;
    border-radius: 3px;
    background: var(--gold-400);
}

.topnav__button {

    height: 48px;
    padding: 0 28px;

    border-radius: 999px;

    background: var(--gold-400);

    display: inline-flex;
    align-items: center;

    color: var(--black-900);
    font-weight: 700;

    transition: var(--transition);
}

.topnav__button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(249, 180, 16, .45);
}

.topnav__toggle,
.topnav__close {
    display: none;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--black-800);
}

.topnav__backdrop {
    display: none;
}

/* =========================
   MOBILE NAV
========================= */

@media (max-width: 991px) {

    .topnav__toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 46px;
        height: 46px;
        font-size: 22px;
        border-radius: 12px;
        transition: var(--transition);
    }

    .topnav__toggle:hover {
        background: var(--black-50);
    }

    .topnav__menu {

        position: fixed;
        top: 0;
        right: 0;

        height: 100dvh;
        width: min(320px, 82%);

        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 6px;

        padding: 90px 28px 32px;

        background: var(--white);

        box-shadow: -20px 0 60px rgba(0, 0, 0, .25);

        transform: translateX(110%);
        transition: transform .35s cubic-bezier(.4, 0, .2, 1),
                    visibility 0s linear .35s;
        visibility: hidden;

        z-index: 210;
    }

    .topnav__menu--open {
        transform: translateX(0);
        visibility: visible;
        transition: transform .35s cubic-bezier(.4, 0, .2, 1);
    }

    .topnav__link {
        width: 100%;
        padding: 14px 4px;
        font-size: 1.05rem;
        border-bottom: 1px solid var(--black-50);
    }

    .topnav__link--active::after {
        display: none;
    }

    .topnav__button {
        width: 100%;
        justify-content: center;
        margin-top: 18px;
        height: 52px;
    }

    .topnav__close {
        display: inline-flex;
        align-items: center;
        justify-content: center;

        position: absolute;
        top: 22px;
        right: 22px;

        width: 42px;
        height: 42px;

        font-size: 22px;
        border-radius: 12px;
    }

    .topnav__close:hover {
        background: var(--black-50);
    }

    .topnav__backdrop {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, .5);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
        z-index: 205;
    }

    .topnav__backdrop--show {
        display: block;
        opacity: 1;
        visibility: visible;
    }

    body.nav-open {
        overflow: hidden;
    }
}

@media (max-width: 576px) {

    .topnav {
        top: 14px;
    }

    .topnav__container {
        height: 64px;
        padding: 0 14px;
    }

    .topnav__logo img {
        height: 38px;
    }
}
