.amiantix-header,
.amiantix-hero {
    position: relative;
    z-index: 1;
}

.amiantix-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 90;
    padding-block: 1.125rem;
    background: transparent;
    transition: background-color .22s ease, backdrop-filter .22s ease, border-color .22s ease, padding .22s ease;
}

.amiantix-hero {
    padding-top: calc(2rem + 5rem);
}

.amiantix-header.is-scrolled {
    background: rgba(15, 23, 42, .85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, .1);
    padding-block: .875rem;
}

.amiantix-header__inner {
    display: grid;
    grid-template-columns: auto auto 1fr auto;
    align-items: center;
    column-gap: 1.5rem;
}

.amiantix-header__logo-link {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    overflow: visible;
    min-width: 170px;
}

.amiantix-header .amiantix-logo {
    height: 2.35rem;
    width: auto;
    max-width: none;
    transform: scale(3);
    transform-origin: left center;
    margin-left: 0;
}

/* Nav desktop */
.amiantix-nav {
    display: flex;
    align-items: center;
    justify-self: start;
    margin-left: 2rem;
    gap: 2.5rem;
    font-size: .9375rem;
    font-weight: 500;
    color: rgba(255, 255, 255, .82);
}

.amiantix-nav a:not(.amiantix-btn):hover {
    color: #fff;
}

.amiantix-nav__mobile-cta { display: none; }
.amiantix-nav__mobile-connexion { display: none; }

.amiantix-header__desktop-cta {
    justify-self: end;
}

@media (min-width: 769px) {
    .amiantix-header__inner {
        display: flex;
        align-items: center;
        justify-content: flex-start;
    }

    .amiantix-nav {
        justify-self: auto;
        margin-left: 3.25rem;
        margin-right: auto;
    }

    .amiantix-header .amiantix-logo {
        transform: scale(3) !important;
    }
}

/* Burger */
.amiantix-burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: .375rem;
    z-index: 101;
    flex-shrink: 0;
}

.amiantix-burger span {
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: transform .25s ease, opacity .25s ease;
    transform-origin: center;
}

.amiantix-burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.amiantix-burger.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.amiantix-burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile */
@media (max-width: 768px) {
    .amiantix-header__inner {
        grid-template-columns: minmax(0, 1fr) auto;
        justify-content: space-between;
        column-gap: .75rem;
        padding-inline: .25rem;
    }

    .amiantix-header {
        background: rgba(15, 23, 42, .92);
        backdrop-filter: blur(10px);
        padding-block: .75rem;
    }

    .amiantix-burger { display: flex; }
    .amiantix-header__desktop-cta { display: none; }
    .amiantix-header__actions { display: none !important; }
    .amiantix-header .amiantix-logo {
        height: 2.1rem;
        max-width: 9.25rem;
        transform: none;
    }

    .amiantix-nav {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: min(100vw, 22rem);
        max-width: 100vw;
        height: 100dvh;
        background: var(--z-hero);
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        gap: .65rem;
        padding: 5.5rem max(1rem, env(safe-area-inset-right)) 2rem max(1rem, env(safe-area-inset-left));
        font-size: 1rem;
        font-weight: 600;
        overflow-y: auto;
        overflow-x: hidden;
        box-shadow: -24px 0 48px rgba(2, 8, 23, .45);
        transform: translateX(100%);
        transition: transform .28s cubic-bezier(.22, 1, .36, 1);
        z-index: 100;
        display: flex;
    }

    .amiantix-nav.is-open {
        transform: translateX(0);
    }

    .amiantix-nav a:not(.amiantix-btn) {
        color: rgba(255, 255, 255, .75);
        padding: .8rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, .08);
        width: 100%;
        text-align: left;
        overflow-wrap: anywhere;
    }

    .amiantix-nav a:not(.amiantix-btn):hover {
        color: #fff;
        border-bottom-color: var(--z-green);
    }

    .amiantix-nav__mobile-connexion {
        display: block !important;
    }

    .amiantix-nav__mobile-cta {
        display: inline-flex !important;
        margin-top: .9rem;
        font-size: .9rem;
        width: 100%;
        max-width: 100%;
        justify-content: center;
        white-space: normal;
        text-align: center;
        line-height: 1.25;
        min-height: 2.75rem;
    }

    .amiantix-burger {
        width: 2.4rem;
        height: 2.4rem;
        justify-self: end;
        padding: 0;
        margin-right: 0;
    }
}

@media (max-width: 380px) {
    .amiantix-header {
        padding-block: .65rem;
    }

    .amiantix-header .amiantix-logo {
        max-width: 8rem;
        transform: scale(2)
    }

    .amiantix-nav {
        width: 100vw;
        padding-top: 5rem;
    }
}
