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

:root {
    --header-height: 88px;
    --logo-height: 52px;
}

.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: #060606;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.header-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: var(--spacing-10);
    height: var(--header-height);
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 var(--spacing-8);
}

.nav-left {
    grid-column: 1;
}

.header .logo {
    grid-column: 2;
    display: block;
    line-height: 0;
}

.header-right {
    grid-column: 3;
    min-width: 0;
}

.logo svg {
    display: block;
    height: var(--logo-height);
    width: auto;
    overflow: visible;
}

.nav-left > a,
.nav-right > a,
.nav-left > div > button,
.nav-right > div > button {
    position: relative;
    padding: var(--spacing-2) 0;
    background: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #ffffff;
}

.nav-left > a::after,
.nav-right > a::after,
.nav-left > div > button::after,
.nav-right > div > button::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 2px;
    width: 0;
    height: 2px;
    background: var(--c-accent, #d10000);
    transition: width 0.25s ease, left 0.25s ease;
}

.nav-left > a:hover,
.nav-right > a:hover,
.nav-left > div > button:hover,
.nav-right > div > button:hover {
    background: none;
    color: #ffffff;
}

.nav-left > a:hover::after,
.nav-right > a:hover::after,
.nav-left > div > button:hover::after,
.nav-right > div > button:hover::after {
    left: 0;
    width: 100%;
}

.tools {
    margin-left: auto;
}

.header .tools .btn-icon {
    justify-content: center;
    align-items: center;
    width: 40px;
    padding: 0;
    border-radius: 50%;
    color: #ffffff;
}

.header .tools .btn-icon i {
    margin: 0;
}

.header .tools .btn-icon:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.header .menu a,
.header .menu .btn-link {
    color: var(--c-text-primary);
}

.header a:focus-visible,
.header button:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 3px;
}

body:has(.hero-page) .header {
    position: fixed;
    left: 0;
    right: 0;
    background-color: transparent;
    border-bottom-color: transparent;
}

body:has(.hero-page) .nav-left,
body:has(.hero-page) .nav-right,
body:has(.hero-page) .logo svg {
    filter: drop-shadow(0 1px 10px rgba(0, 0, 0, 0.45));
}

@supports (animation-timeline: scroll()) {
    body:has(.hero-page) .header {
        animation: header-solid linear both;
        animation-timeline: scroll(root);
        animation-range: 0 160px;
    }

    body:has(.hero-page) .logo svg {
        animation: logo-shrink linear both;
        animation-timeline: scroll(root);
        animation-range: 0 160px;
    }
}

@keyframes header-solid {
    to {
        background-color: rgba(6, 6, 6, 0.88);
        border-bottom-color: rgba(255, 255, 255, 0.08);
        backdrop-filter: blur(14px);
    }
}

@keyframes logo-shrink {
    to {
        height: 40px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .nav-left > a::after,
    .nav-right > a::after,
    .nav-left > div > button::after,
    .nav-right > div > button::after {
        transition: none;
    }
}

@media (max-width: 1199px) {
    :root {
        --header-height: 72px;
        --logo-height: 40px;
    }
}

@media (max-width: 600px) {
    .header-bar {
        gap: var(--spacing-2);
        padding: 0 var(--spacing-4);
    }
}

.nav-left:has(> :nth-child(1):last-child) > :nth-child(n + 2),
.nav-right:has(> :nth-child(1):last-child) > :nth-child(-n + 1) {
    display: none;
}

.nav-left:has(> :nth-child(2):last-child) > :nth-child(n + 2),
.nav-right:has(> :nth-child(2):last-child) > :nth-child(-n + 1) {
    display: none;
}

.nav-left:has(> :nth-child(3):last-child) > :nth-child(n + 3),
.nav-right:has(> :nth-child(3):last-child) > :nth-child(-n + 2) {
    display: none;
}

.nav-left:has(> :nth-child(4):last-child) > :nth-child(n + 3),
.nav-right:has(> :nth-child(4):last-child) > :nth-child(-n + 2) {
    display: none;
}

.nav-left:has(> :nth-child(5):last-child) > :nth-child(n + 4),
.nav-right:has(> :nth-child(5):last-child) > :nth-child(-n + 3) {
    display: none;
}

.nav-left:has(> :nth-child(6):last-child) > :nth-child(n + 4),
.nav-right:has(> :nth-child(6):last-child) > :nth-child(-n + 3) {
    display: none;
}

.nav-left:has(> :nth-child(7):last-child) > :nth-child(n + 5),
.nav-right:has(> :nth-child(7):last-child) > :nth-child(-n + 4) {
    display: none;
}

.nav-left:has(> :nth-child(8):last-child) > :nth-child(n + 5),
.nav-right:has(> :nth-child(8):last-child) > :nth-child(-n + 4) {
    display: none;
}

.nav-left:has(> :nth-child(9):last-child) > :nth-child(n + 6),
.nav-right:has(> :nth-child(9):last-child) > :nth-child(-n + 5) {
    display: none;
}

.nav-left:has(> :nth-child(10):last-child) > :nth-child(n + 6),
.nav-right:has(> :nth-child(10):last-child) > :nth-child(-n + 5) {
    display: none;
}

.nav-left:has(> :nth-child(11):last-child) > :nth-child(n + 7),
.nav-right:has(> :nth-child(11):last-child) > :nth-child(-n + 6) {
    display: none;
}

.nav-left:has(> :nth-child(12):last-child) > :nth-child(n + 7),
.nav-right:has(> :nth-child(12):last-child) > :nth-child(-n + 6) {
    display: none;
}

