/*
 * HandRecorder Website - Site Header & Hamburger Navigation
 * CSS-only toggle (checkbox hack), progressive keyboard/close enhancements in js/main.js
 */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(13, 10, 20, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 20px;
    position: relative;
}

.site-brand {
    font-size: 1.25rem;
    font-weight: 800;
    text-decoration: none;
    background: linear-gradient(45deg, #ff6b6b, #ff8e53, #ffd93d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
}

.site-header nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.site-header nav a {
    display: inline-block;
    padding: 8px 14px;
    color: #f2f2f2;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: 8px;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.site-header nav a:hover,
.site-header nav a:focus-visible {
    color: #ff8e53;
    background-color: rgba(255, 255, 255, 0.06);
}

.site-header nav a[aria-current="page"] {
    color: #ff8e53;
    font-weight: 700;
}

.site-header nav a.nav-cta {
    background: linear-gradient(45deg, #ff6b6b, #ff8e53);
    color: #1a142b;
    font-weight: 700;
}

.site-header nav a.nav-cta:hover,
.site-header nav a.nav-cta:focus-visible {
    color: #1a142b;
    filter: brightness(1.08);
}

/* Hamburger toggle (checkbox hack) */
.menu-toggle-checkbox {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.menu-toggle-label {
    display: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
}

.menu-toggle-label:focus-visible {
    outline: 2px solid #ff8e53;
    outline-offset: 2px;
}

.hamburger-icon {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 24px;
    height: 18px;
}

.hamburger-icon span {
    display: block;
    height: 2px;
    width: 100%;
    background: #f2f2f2;
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.menu-toggle-checkbox:checked ~ .menu-toggle-label .hamburger-icon span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-toggle-checkbox:checked ~ .menu-toggle-label .hamburger-icon span:nth-child(2) {
    opacity: 0;
}

.menu-toggle-checkbox:checked ~ .menu-toggle-label .hamburger-icon span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 768px) {
    .menu-toggle-label {
        display: block;
    }

    .site-header nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
    }

    .site-header nav ul {
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        background: rgba(13, 10, 20, 0.97);
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        padding: 10px 20px 16px;
    }

    .menu-toggle-checkbox:checked ~ nav ul {
        display: flex;
    }

    .site-header nav li {
        width: 100%;
    }

    .site-header nav a {
        display: block;
        width: 100%;
    }

    .site-header nav a.nav-cta {
        margin-top: 6px;
        text-align: center;
    }
}
