/* BIN-BOI — shared navigation styles.
   Mobile hamburger overlay + desktop horizontal links. */

/* ---- base nav ---- */
.site-nav {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 50;
    background: rgba(26, 26, 27, 0.7);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* ---- hamburger button (mobile only) ---- */
.nav-hamburger {
    display: flex; flex-direction: column; gap: 5px;
    padding: 8px; cursor: pointer; background: none; border: none;
    z-index: 110; position: relative;
}
.nav-hamburger-line {
    display: block; width: 22px; height: 2px;
    background: #f5f5f5; border-radius: 1px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-hamburger[aria-expanded="true"] .nav-hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.nav-hamburger[aria-expanded="true"] .nav-hamburger-line:nth-child(2) {
    opacity: 0;
}
.nav-hamburger[aria-expanded="true"] .nav-hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ---- overlay container ---- */
.nav-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 100;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none;
    transition: opacity 0.35s cubic-bezier(0.25, 1, 0.5, 1);
    overflow-y: auto;          /* if menu is taller than viewport, let it scroll instead of clipping */
    padding: 1.25rem;          /* keeps panel clear of edges when centered */
}
.nav-overlay-open {
    opacity: 1; pointer-events: auto;
}

/* ---- backdrop ---- */
.nav-overlay-backdrop {
    position: absolute; inset: 0;
    background: rgba(10, 10, 11, 0.85);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    cursor: pointer;
}

/* ---- centered panel ---- */
.nav-overlay-panel {
    position: relative; z-index: 1;
    width: min(90vw, 28rem);
    max-height: 100%;          /* never exceed viewport so it can't clip */
    overflow-y: auto;          /* internal scroll for long menus */
    background: #1a1a1b;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.25rem;
    padding: 1.5rem;
    transform: scale(0.95) translateY(10px);
    transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}
.nav-overlay-open .nav-overlay-panel {
    transform: scale(1) translateY(0);
}

/* ---- panel header ---- */
.nav-overlay-header {
    display: flex; justify-content: space-between; align-items: center;
    padding-bottom: 1rem; margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.nav-overlay-close {
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem; color: #f5f5f5; font-size: 1.25rem;
    cursor: pointer; transition: background 0.2s ease, border-color 0.2s ease;
}
.nav-overlay-close:hover {
    background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.2);
}

/* ---- menu links ---- */
.nav-overlay-menu {
    display: flex; flex-direction: column; gap: 0.25rem;
}
.nav-overlay-link {
    display: flex; flex-direction: column;
    padding: 0.75rem 0.75rem;
    font-family: 'Fira Code', monospace; font-size: 0.875rem;
    letter-spacing: 0.1em; color: rgba(245, 245, 245, 0.5);
    text-decoration: none; border-radius: 0.5rem;
    transition: color 0.2s ease, background 0.2s ease;
}
.nav-overlay-link:hover {
    color: #f5f5f5; background: rgba(255, 255, 255, 0.04);
}
.nav-overlay-link-sub {
    font-size: 0.625rem;
    letter-spacing: 0.14em;
    color: rgba(245, 245, 245, 0.35);
    margin-top: 2px;
}
.nav-overlay-link:hover .nav-overlay-link-sub {
    color: rgba(245, 245, 245, 0.6);
}
.nav-link-active {
    color: #f5f5f5 !important;
}
.nav-link-active .nav-overlay-link-sub {
    color: rgba(245, 245, 245, 0.6);
}

/* ---- desktop two-line links (symbol + subtitle) ---- */
.nav-desktop-link {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.25;
    text-decoration: none;
}
.nav-desktop-label {
    letter-spacing: 0.15em;
}
.nav-desktop-sub {
    font-size: 8px;
    letter-spacing: 0.16em;
    color: rgba(255, 255, 255, 0.32);
    white-space: nowrap;
    margin-top: 1px;
}
.nav-desktop-link:hover .nav-desktop-sub {
    color: rgba(255, 255, 255, 0.6);
}
.nav-link-active .nav-desktop-sub {
    color: rgba(255, 255, 255, 0.55);
}

/* ---- wings accordion ---- */
.nav-overlay-group {
    margin-bottom: 0.25rem;
}
.nav-overlay-accordion {
    display: flex; justify-content: space-between; align-items: center;
    width: 100%; padding: 0.75rem 0.75rem;
    font-family: 'Fira Code', monospace; font-size: 0.875rem;
    letter-spacing: 0.1em; color: rgba(245, 245, 245, 0.5);
    background: none; border: none; border-radius: 0.5rem;
    cursor: pointer; text-align: left;
    transition: color 0.2s ease, background 0.2s ease;
}
.nav-overlay-accordion:hover {
    color: #f5f5f5; background: rgba(255, 255, 255, 0.04);
}
.nav-acc-arrow {
    transition: transform 0.3s ease; font-size: 0.75rem;
}
.nav-acc-open .nav-acc-arrow {
    transform: rotate(90deg);
}

/* ---- sub-links (wings children) ---- */
.nav-overlay-sublinks {
    max-height: 0; overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.25, 1, 0.5, 1),
                opacity 0.25s ease;
    opacity: 0;
    padding-left: 0.75rem;
}
.nav-sub-open {
    max-height: 200px; opacity: 1;
}
.nav-overlay-sublinks .nav-overlay-link {
    font-size: 0.8125rem; padding: 0.625rem 0.75rem;
    border-left: 2px solid rgba(255, 255, 255, 0.06);
}

/* ---- hide desktop links on mobile ---- */
@media (max-width: 767px) {
    .nav-desktop-links { display: none !important; }
}

/* desk subtitles need room — collapse to symbols-only on smaller screens */
@media (min-width: 768px) and (max-width: 1023px) {
    .nav-desktop-sub { display: none; }
}

/* ---- show hamburger on mobile, hide on desktop ---- */
@media (min-width: 768px) {
    .nav-hamburger { display: none !important; }
    .nav-overlay { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
    .nav-overlay,
    .nav-overlay-panel,
    .nav-hamburger-line,
    .nav-acc-arrow,
    .nav-overlay-sublinks,
    .nav-overlay-link {
        transition-duration: 0.01ms !important;
    }
}
