/* ==========================
   Header - Mobile First
========================== */

.site-header {
    position: relative;
    top: 0;
    z-index: 1000;
}


/* Layout */

.header-inner {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    max-width: 1200px;
    margin: 0 auto;
}


/* ==========================
   Hamburger Button (Mobile Default)
========================== */

.nav-toggle {
    position: fixed;
    /* mobile overlay trigger */
    top: var(--space-sm);
    right: var(--space-sm);
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 10001;
    /* above nav panel */
}

.nav-toggle span {
    width: 25px;
    height: 2px;
    background: white;
    display: block;
}


/* ==========================
   Mobile Navigation (Default)
========================== */

.site-nav {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 75%;
    height: 100vh;
    background: #000;
    padding: 6rem 2rem 2rem;
    z-index: 10000;
}

.site-nav.active {
    display: block;
}

.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.site-nav a {
    text-decoration: none;
    color: white;
    font-weight: 600;
}

.site-nav.active {
    display: flex !important;
    /* prevent mobile override */
}


/* ==========================
   Tablet (481px–767px)
========================== */

@media (min-width: 481px) and (max-width: 767px) {
    .header-inner {
        justify-content: center;
    }
    .nav-toggle {
        display: none;
    }
    .site-nav {
        display: flex;
        position: static;
        width: auto;
        height: auto;
        background: none;
        padding: 0;
    }
    .nav-list {
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 20px;
        padding: 8px 0;
        margin: 0;
    }
    .nav-list li {
        min-width: 0;
        /* THIS is the key */
    }
    .nav-list a {
        font-size: clamp(0.9rem, 1.5vw, 1rem);
    }
}


/* ==========================
   Desktop (≥768px)
========================== */

@media (min-width: 768px) {
    .header-inner {
        justify-content: center;
    }
    .site-header {
        background: #000;
    }
    .nav-toggle {
        display: none;
    }
    .site-nav {
        display: flex !important;
        position: static;
        width: auto;
        height: auto;
        background: none;
        padding: 0;
    }
    .nav-list {
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: var(--space-2xl);
        padding: var(--space-xxs) 0;
        margin: 0;
    }
}


/* ==========================
   Nav Link Base (Hover Animations)
========================== */

.site-nav a {
    position: relative;
    text-decoration: none;
    color: white;
    font-weight: 600;
    transition: color 0.3s ease;
}


/* Underline animation */

.site-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0%;
    height: 2px;
    background: white;
    transition: width 0.3s ease;
}

@media (hover: hover) and (pointer: fine) {
    .site-nav a:hover {
        color: #ccc;
    }
    .site-nav a:hover::after {
        width: 100%;
    }
}