@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap");

[hidden] {
    display: none !important;
}

:where(dialog, [popover]) {
    margin: 0;
    padding: 0;
    position: fixed;
    inset: 0;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    background-color: transparent;
    color: inherit;
    overflow: unset;
    border-width: 0;

    &::backdrop {
        opacity: 0;
    }
}

.header {
    margin: 0 auto;
    padding: 0 1.5rem;
    background-color: rgb(35 39 50);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

@media (min-width: 1024px) {
    .header {
        padding: 1rem 2rem;
    }
}

.mob-nav-toggler {
    appearance: none;
    border: none;
    background: transparent;
    padding: 1rem;
    margin-right: -1rem;
    cursor: pointer;
}

.mob-nav-toggler svg {
    width: 1.25rem;
    fill: black;
    stroke: black;
}

@media (min-width: 1024px) {
    .mob-nav-toggler {
        display: none;
    }
}

.logo {
    font-weight: bold;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-right: auto;
    display: block;
}

@media (min-width: 1024px) {
    .logo {
        margin-right: 0;
    }
}

.nav-menu {
    font-weight: 300;
    /* text-transform: uppercase; */
    font-size: 1rem;
    font-weight: 400;
    line-height: 160%;
}

:is(.nav-menu, .nav-submenu) a {
    padding: 0.6rem 1rem;
    display: block;
}

@media (min-width: 1024px) {
    :is(.nav-menu, .nav-submenu) a {
        padding: 0.5rem 1rem;
    }
}

.nav-submenu {
    background: #fff;
    color: #1a2e48;
    border-radius: 0;
    font-weight: 300;
    font-size: calc(15 / 16 * 0.9rem);
    margin-left: 8px;
}

.nav-submenu:not(.ui-shown) {
    display: none;
}

.nav ul>li>a:not(:only-child)::after {
    content: "";
    background-image: url("data:image/svg+xml,%3Csvg width='13' height='23' viewBox='0 0 13 23' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1.5025 22.7625C1.1225 22.7625 0.7325 22.6125 0.4425 22.3225C-0.1475 21.7325 -0.1475 20.7825 0.4425 20.2025L9.2625 11.3825L0.4425 2.5625C-0.1475 1.9825 -0.1475 1.0225 0.4425 0.4425C1.0325 -0.1475 1.9725 -0.1475 2.5625 0.4425L12.4425 10.3225C13.0325 10.9125 13.0325 11.8625 12.4425 12.4425L2.5625 22.3225C2.2725 22.6125 1.8825 22.7625 1.5025 22.7625Z' fill='white'/%3E%3C/svg%3E%0A");
    display: block;
    width: 0.7rem;
    background-size: contain;
    aspect-ratio: 1;
    background-position: center;
    background-repeat: no-repeat;
    color: #fff;
    /* opacity: 0.75; */
}

@media (min-width: 1024px) {
    .nav ul>li>a:not(:only-child)::after {
        background-image: url("data:image/svg+xml,%3Csvg width='13' height='23' viewBox='0 0 13 23' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1.5025 22.7625C1.1225 22.7625 0.7325 22.6125 0.4425 22.3225C-0.1475 21.7325 -0.1475 20.7825 0.4425 20.2025L9.2625 11.3825L0.4425 2.5625C-0.1475 1.9825 -0.1475 1.0225 0.4425 0.4425C1.0325 -0.1475 1.9725 -0.1475 2.5625 0.4425L12.4425 10.3225C13.0325 10.9125 13.0325 11.8625 12.4425 12.4425L2.5625 22.3225C2.2725 22.6125 1.8825 22.7625 1.5025 22.7625Z' fill='black'/%3E%3C/svg%3E%0A");
    }
}

@media (max-width: 1023px) {
    .nav a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem;
        color: #fff;
        font-weight: 300;
    }

    .nav ul>li>a:not(:only-child)::after {
        rotate: 90deg;
        transition: scale 0.2s;
    }

    .nav ul>li>a.ui-active:not(:only-child)::after {
        scale: -1 1;
    }

    .mob-nav {
        position: fixed;
        inset: 0;
        z-index: 20;
        display: block;
    }

    .mob-nav-backdrop {
        position: absolute;
        inset: 0;
        z-index: -1;
        background-color: rgba(0, 0, 0, 0.5);
        transition-duration: 0.2s;
        transition-property: opacity, translate;
        transition-timing-function: cubic-bezier(0.39, 0.575, 0.565, 1);
        opacity: 0;
    }

    .mob-nav-backdrop.ui-active {
        opacity: 1;
    }

    .mob-nav-close {
        all: unset;
        position: absolute;
        top: 0.5rem;
        right: 0.5rem;
        /* translate: 100%; */
        padding: 0.6rem;
        cursor: pointer;
        /* background-color: rgb(35 39 50 / 0.1); */
    }

    .mob-nav-close svg {
        fill: none;
        width: 1.75rem;
        aspect-ratio: 1;
        stroke: #fff;
        display: block;
        cursor: pointer;
    }

    .mob-nav-content {
        background-color: #1f1f1f;
        width: 290px;
        height: 100%;
        padding: 1.5rem 0.5rem;
        min-width: 14rem;
        position: relative;
        overflow: auto;
    }

    .mob-nav-content.ui-enter-active,
    .mob-nav-content.ui-leave-active {
        transition-duration: 0.2s;
        transition-property: opacity, translate;
        transition-timing-function: cubic-bezier(0.39, 0.575, 0.565, 1);
    }

    .mob-nav-content.ui-enter-from,
    .mob-nav-content.ui-leave-to {
        opacity: 0;
        translate: -100% 0;
    }

    .mob-nav-content.ui-enter-to,
    .mob-nav-content.ui-leave-from {
        opacity: 1;
        translate: 0%;
    }

    .logo--mob {
        margin-bottom: 2rem;
        padding-left: 1rem;
    }

    .nav-submenu {
        padding-left: 0.5rem;
        background: #001533;
    }

    .nav-submenu::before,
    .nav-submenu::after {
        content: "";
        height: 0.25rem;
        display: block;
    }

    .nav-submenu::after {
        height: 0.5rem;
    }

    .nav-submenu.ui-enter-active,
    .nav-submenu.ui-leave-active {
        transition-duration: 0.2s;
        transition-property: opacity, height;
        transition-timing-function: ease-in-out;
        overflow: hidden;
    }

    .nav-submenu.ui-enter-from,
    .nav-submenu.ui-leave-to {
        opacity: 0;
        height: 0;
    }

    .nav-submenu.ui-enter-to,
    .nav-submenu.ui-leave-from {
        opacity: 1;
        height: var(--ui-transition-height);
    }
}

@media (min-width: 1024px) {

    .mob-nav-close,
    .logo--mob {
        display: none;
    }

    .nav-menu>li>a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem;
        color: #A3A3A3;
        font-weight: 400;
        text-transform: uppercase;
        font-family: "Space Grotesk", sans-serif;
    }

    .nav-menu>li>a::after {
        width: 0.5rem;
        rotate: 90deg;
        filter: invert(0.5);
    }

    .nav-menu {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .nav-submenu {
        --ui-dropdown-arrow-offset: 0rem;
        --ui-dropdown-arrow-padding: 0.8rem;
        --ui-dropdown-arrow-width: 0.4rem;
        --ui-dropdown-arrow-height: 0.4rem;
        --ui-dropdown-placement: bottom-start;
        padding: 0.5rem 0.25rem;
        box-shadow: rgba(0, 0, 0, 0.05) 0px 0px 0px 1px,
            rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.1) 0px 4px 6px -4px;
        width: 200px;
    }

    .nav-submenu>li {
        position: relative;
    }

    .nav-submenu>li>a {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 0.5rem;
        padding: 0.5rem 0.75rem 0.5rem 0.75rem;
        border-radius: 0.3rem;
        outline: none;
        color: #A3A3A3;
        font-weight: 400;
        text-transform: uppercase;
        font-family: "Space Grotesk", sans-serif;
    }

    .nav-submenu>li>a:is(:hover, :focus-visible) {
        background-color: rgba(0, 0, 0, 0.05);
    }

    .nav-submenu>li>a::after {
        opacity: 0.75;
    }

    .nav-submenu .nav-submenu {
        --ui-dropdown-placement: right-start;
        --ui-dropdown-padding: -0.25rem;
        --ui-dropdown-offset: -0.25rem;
        --ui-dropdown-flip: false;
        --ui-dropdown-sticky: true;
    }

    .nav-submenu.ui-enter-active,
    .nav-submenu.ui-leave-active {
        transition-duration: 0.2s;
        transition-property: opacity, scale;
        transition-timing-function: ease-in-out;
        transform-origin: var(--ui-dropdown-transform-origin);
    }

    .nav-submenu.ui-enter-from,
    .nav-submenu.ui-leave-to {
        opacity: 0;
        scale: 0.95;
    }

    [data-ui-floating="dropdown"]::backdrop {
        transition: all 0.15s ease-in-out;
        background-color: rgb(17 24 38 / 0.05);
        opacity: 0;
    }

    [data-ui-floating="dropdown"]:has(> .ui-active)::backdrop {
        opacity: 1;
    }
}