.header{
    position: fixed;
    width: 100%;
    height: 120px;
    mask-image: linear-gradient(180deg, #000 40%, rgba(0, 0, 0, 0.00) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.01);
    backdrop-filter: blur(10px);
    color: var(--bacground);
    transition:color .35s;
    z-index: 9999;
    /* mix-blend-mode:difference; */
}
.header.over-dark{
    color: var(--text-main);
}
.menu{
    width: 100%;
    height: 72px;
}
.menu__inner{
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 72px;
    padding: 0 32px;
}
.logo{
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--bacground);
    font-family: 'AbyssinicaSIL';
    font-weight: 400;
    font-size: 26px;
    line-height: 16px;
    letter-spacing: -0.5px;
    transition:color .35s;
}
.logo.over-dark{
    color: var(--text-main);
}

.video-like-image {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    margin-right: 9px;
    background-image: url("../img/im-sphere-sprite.svg?v=2");
    background-repeat: no-repeat;
    background-size: 4700% 100%;
    background-position: 0% 0%;
    filter: grayscale(1) invert(1); 
    animation: imsim-logo-frames 3s steps(47, jump-none) infinite;
}

.video-like-image.over-dark {
    filter: grayscale(1) ;
}

@keyframes imsim-logo-frames {
    from { background-position: 0% 0%; }
    to   { background-position: 100% 0%; }
}

@media (prefers-reduced-motion: reduce) {
    .video-like-image {
        animation: none;
        background-position: 0% 0%;
    }
}


.nav-list{
    display: block;
    margin-left: -298px;
    ul{
        list-style: none;
        li{
            display: inline;
            margin-right: 26px;
            .menu-link{
                color: var(--bacground);
                font-feature-settings: 'ss02' on, 'ss03' on, 'liga' off;
                font-family: 'Satoshi';
                font-size: 15px;
                font-weight: 500;
                line-height: 19.6px;
                text-decoration: none;
                transition: all .3s ease-in-out;
            }
            .menu-link:hover{
                color: var(--text-placeholder);
            }
            .menu-link.over-dark{
                color: var(--text-main);
            }
            .menu-link.over-dark:hover{
                color: var(--text-placeholder);
            }
        }
    }
}
.nav-button{
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    width: auto;
    height: auto;
}
.signup{
    width: auto;
    min-width: 79px;
    height: auto;
    font-feature-settings: 'ss02' on, 'ss03' on, 'liga' off;
    font-family: Satoshi;
    font-size: 15px;
    font-style: normal;
    font-weight: 500;
    line-height: 19.6px;
    padding: 5px 14px 7px 14px;
    border-radius: 16px;
    background-color: var(--menu-btn);
    color: var(--bacground);
    transition: all .3s;
    &:hover{
        background-color: var(--text-main);
        color: var(--bacground);
        transition: all .3s;
    }
}
.signup.over-dark{
    color: var(--text-main);
    &:hover{
        color: var(--bacground);
    }
}
.login{
    width: auto;
    min-width: 79px;
    height: auto;
    font-feature-settings: 'ss02' on, 'ss03' on, 'liga' off;
    font-family: Satoshi;
    font-size: 15px;
    font-style: normal;
    font-weight: 500;
    line-height: 19.6px;
    padding: 5px 14px 7px 14px;
    border-radius: 16px;
    background-color: transparent;
    color: var(--bacground);
    transition: all .3s;
    &:hover{
        background-color: var(--menu-btn);
        transition: all .3s;
    }
}
.login.over-dark{
    color: var(--text-main);
}

/* ================= Mobile menu ================= */
.mobile-btn{
    display: none;
    filter: invert(1);
    .menu-close{
        width: 42px;
        height: 24px;
        background-image: url(../img/mm-c.svg);
        background-repeat: no-repeat;
        background-position: center;
        background-size: cover;
        cursor: pointer;
        animation: changeicon .4s ease-in-out;
    }
    .menu-open{
        width: 42px;
        height: 24px;
        background-image: url(../img/mm-o.svg);
        background-repeat: no-repeat;
        background-position: center;
        background-size: cover;
        cursor: pointer;
        animation: changeicon .4s ease-in-out;
    }
}
/* .menu-overlay{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--overlay);
} */
.nav-list-open{
    position: fixed;
    display: block;
    background-color: var(--bacground);
    width: 100%;
    height: 500px;
    top: 0;
    left: 0;
    padding: 90px 0 0 22px;
    animation: openmenu .5s ease-in-out;
    z-index: 999;
    ul{
        list-style: none;
        li{
            display: block;
            margin: 18px 28px 16px 0px;
            padding-bottom: 16px;
            border-bottom: 1px dashed var(--border-hero);
            .menu-link{
                color: var(--text-main);
                font-feature-settings: 'salt' on, 'ss01' on, 'ss02' on, 'ss03' on, 'ss04' on, 'ss05' on;
                font-family: "SpaceGrotesk";
                font-size: 20px;
                font-weight: 400;
                line-height: 28.8px;
                letter-spacing: -1.1px;
                text-decoration: none;
                transition: color .3s ease-in-out;
                &:hover{
                    color: var(--text-placeholder);
                    text-decoration: none;
                }
            }
        }
    }
}
.btn-mmenu{
    position: relative;
    width: 100%;
    margin: 20px 0 0 0;
    .loginm{
        width: auto;
        min-width: 79px;
        height: 32px;
        border-radius: 16px;
        background-color: var(--border-hero);
        color: var(--text-buttons);
        font-feature-settings: 'ss02' on, 'ss03' on, 'liga' off;
        font-family: 'Satoshi';
        font-size: var(--font-size-xs-s, 15px);
        font-weight: 500;
        line-height: 19.6px;
        margin-right: 10px;
    }
    .signupm{
        width: auto;
        min-width: 79px;
        height: 32px;
        border-radius: 16px;
        background-color: var(--card-bg);
        color: var(--bacground);
        font-feature-settings: 'ss02' on, 'ss03' on, 'liga' off;
        font-family: 'Satoshi';
        font-size: var(--font-size-xs-s, 15px);
        font-weight: 500;
        line-height: 19.6px;
    }
}

@keyframes openmenu {
    0%{
        top: -500px;
    }
    100%{
        top: 0px;
    }
}

@keyframes changeicon {
    0%{
        transform: rotate(0deg);
        opacity: 0;
    }
    100%{
        transform: rotate(180deg);
        opacity: 1;
    }
}

/* ================= Authentication modals ================= */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.auth-modal {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 16px;
    visibility: hidden;
    opacity: 0;
    transition: opacity .2s ease, visibility .2s ease;
    z-index: 10000;
}

.auth-modal.is-open {
    visibility: visible;
    opacity: 1;
}

.auth-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(13, 16, 30, .64);
    backdrop-filter: blur(6px);
}

.auth-modal__dialog {
    position: relative;
    width: min(100%, 420px);
    padding: 32px;
    color: var(--text-main);
    /* background: var(--buscard-bg); */
    background: var(--border-hero);
    backdrop-filter: blur(8px); 
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 24px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, .28);
    transform: translateY(8px) scale(.98);
    transition: transform .2s ease;
}

.auth-modal.is-open .auth-modal__dialog {
    transform: translateY(0) scale(1);
}

.auth-modal__heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}

.auth-modal__heading h2 {
    width: auto;
    height: auto;
    color: var(--text-buttons);
    font-family: 'SpaceGrotesk';
    font-size: 32px;
    font-weight: 400;
    line-height: 1;
    letter-spacing: -1.8px;
}

.auth-modal__close {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    margin: -4px -4px -4px 0;
    color: var(--text-placeholder);
    background: transparent;
    border-radius: 50%;
    font-family: Arial, sans-serif;
    font-size: 30px;
    font-weight: 200;
    line-height: 1;
    cursor: pointer;
    transition: color .2s ease, background-color .2s ease;
}

.auth-modal__close:hover,
.auth-modal__close:focus-visible {
    color: var(--text-buttons);
    background: var(--menu-btn);
}

.auth-form {
    display: grid;
    gap: 16px;
}

.auth-form input {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    color: var(--text-buttons);
    background: rgba(180, 183, 200, .08);
    border: 1px solid rgba(180, 183, 200, .25);
    border-radius: 12px;
    font-family: 'Satoshi';
    font-size: 15px;
    font-weight: 500;
    line-height: 19.6px;
    outline: none;
    transition: border-color .2s ease, background-color .2s ease;
}

.auth-form input::placeholder {
    color: var(--text-placeholder);
    opacity: 1;
}

.auth-form input:focus {
    background: rgba(180, 183, 200, .12);
    border-color: var(--btn-primary);
}

.auth-form__password {
    position: relative;
}

.auth-form__password input {
    padding-right: 56px;
}

.auth-form__toggle-password {
    position: absolute;
    top: 50%;
    right: 12px;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    padding: 0;
    color: var(--text-placeholder);
    background: transparent;
    cursor: pointer;
}

.auth-form__toggle-password:hover,
.auth-form__toggle-password:focus-visible {
    color: var(--text-buttons);
}

.auth-form__toggle-password svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
}

.auth-form__submit {
    width: 100%;
    height: 48px;
    margin-top: 0;
    color: #fff;
    background: var(--btn-primary);
    border-radius: 24px;
    font-family: 'Satoshi';
    font-size: 15px;
    font-weight: 500;
    line-height: 19.6px;
    cursor: pointer;
    transition: background-color .2s ease, transform .2s ease;
}

.auth-form__submit:hover,
.auth-form__submit:focus-visible {
    background: #2d6fd9;
}

.auth-form__submit:active {
    transform: scale(.98);
}

.auth-form__links {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: -2px;
}

.auth-form__links a {
    color: var(--text-placeholder);
    font-family: 'Satoshi';
    font-size: 14px;
    font-weight: 500;
    line-height: 19.6px;
    text-decoration: none;
}

.auth-form__links a:hover,
.auth-form__links a:focus-visible {
    color: var(--text-buttons);
    text-decoration: underline;
    text-underline-offset: 3px;
}

body.auth-modal-open {
    overflow: hidden;
}

@media (max-width: 440px) {
    .auth-modal__dialog {
        padding: 32px;
        border-radius: 24px;
    }

    .auth-modal__heading h2 {
        font-size: 30px;
    }
}
