/* assets/styles/front/21-cosmos-type-navigation.css */

.cosmos-type-navigation {
    position: sticky;
    z-index: 80;
    top: 70px;
    width: 100%;
    border-bottom:
        1px solid
        rgb(66 245 230 / 12%);
    background:
        rgb(8 5 20 / 94%);
    backdrop-filter: blur(16px);
}

.cosmos-type-navigation__inner {
    display: flex;
    width: min(100%, 1920px);
    margin: 0 auto;
    padding:
        0.75rem
        1.125rem;
    overflow-x: auto;
    gap: 0.5rem;
    scrollbar-width: none;
}

.cosmos-type-navigation__inner::-webkit-scrollbar {
    display: none;
}

.cosmos-type-navigation__link {
    --cosmos-type-color:
        var(--codex-cyan);

    display: inline-flex;
    min-width: max-content;
    min-height: 44px;
    padding:
        0.65rem
        0.85rem;
    border:
        1px solid
        color-mix(
            in srgb,
            var(--cosmos-type-color) 28%,
            transparent
        );
    align-items: center;
    gap: 0.55rem;
    background:
        color-mix(
            in srgb,
            var(--cosmos-type-color) 4%,
            var(--codex-ink)
        );
    color: var(--codex-muted);
    font-family: var(--codex-font-display);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    line-height: 1;
    text-decoration: none;
    text-transform: uppercase;
    transition:
        border-color 160ms ease,
        background-color 160ms ease,
        color 160ms ease,
        transform 160ms ease;
}

.cosmos-type-navigation__link--solar {
    --cosmos-type-color:
        var(--cosmos-solar);
}

.cosmos-type-navigation__link--lunar {
    --cosmos-type-color:
        var(--cosmos-lunar);
}

.cosmos-type-navigation__link--stellar {
    --cosmos-type-color:
        var(--cosmos-stellar);
}

.cosmos-type-navigation__link--legendary {
    --cosmos-type-color:
        var(--cosmos-legendary);
}

.cosmos-type-navigation__marker {
    display: grid;
    width: 1.65rem;
    height: 1.65rem;
    flex: 0 0 auto;
    border:
        1px solid
        color-mix(
            in srgb,
            var(--cosmos-type-color) 48%,
            transparent
        );
    border-radius: 50%;
    place-items: center;
    background:
        color-mix(
            in srgb,
            var(--cosmos-type-color) 8%,
            transparent
        );
    color: var(--cosmos-type-color);
    font-size: 0.8rem;
    line-height: 1;
    box-shadow:
        0 0 0.85rem
        color-mix(
            in srgb,
            var(--cosmos-type-color) 8%,
            transparent
        );
}

.cosmos-type-navigation__link:hover,
.cosmos-type-navigation__link:focus-visible {
    border-color:
        var(--cosmos-type-color);
    background:
        color-mix(
            in srgb,
            var(--cosmos-type-color) 10%,
            var(--codex-ink)
        );
    color:
        var(--cosmos-type-color);
    transform: translateY(-1px);
}

.cosmos-type-navigation__link:focus-visible {
    outline:
        2px solid
        var(--cosmos-type-color);
    outline-offset: 3px;
}

@media (min-width: 48rem) {
    .cosmos-type-navigation {
        top: 78px;
    }

    .cosmos-type-navigation__inner {
        padding:
            0.9rem
            4vw;
        justify-content: center;
        gap: 0.65rem;
    }

    .cosmos-type-navigation__link {
        padding:
            0.7rem
            1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cosmos-type-navigation__link {
        transition: none;
    }

    .cosmos-type-navigation__link:hover,
    .cosmos-type-navigation__link:focus-visible {
        transform: none;
    }
}