/* Horton AppWorks - Global Demo Navigation */

:root {
    --hw-bg: rgba(5, 5, 5, 0.85);
    --hw-border: rgba(255, 255, 255, 0.05);
    --hw-accent: #d4af37;
    --hw-text: #ffffff;
    --hw-text-muted: rgba(255, 255, 255, 0.5);
}

/* Base resets inside the component to prevent conflicts */
#hw-demo-nav {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background: var(--hw-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--hw-border);
    border-radius: 20px;
    z-index: 99999;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6);
    font-family: 'Inter', system-ui, sans-serif;
    color: var(--hw-text);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: hwSlideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    pointer-events: auto;
}

@keyframes hwSlideUp {
    0% { transform: translate(-50%, 100px); }
    100% { transform: translate(-50%, 0); }
}

@media (max-width: 768px) {
    #hw-demo-nav {
        bottom: 28px;
        width: calc(100% - 32px);
        justify-content: space-between;
        padding: 10px 12px;
        gap: 8px;
    }
}

/* Elements inside nav */
.hw-nav-badge {
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.2);
    color: var(--hw-accent);
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.hw-nav-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--hw-accent);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--hw-accent);
    animation: hwPulse 2s infinite;
}

@keyframes hwPulse {
    0% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
    100% { opacity: 0.5; transform: scale(1); }
}

.hw-nav-divider {
    width: 1px;
    height: 24px;
    background: var(--hw-border);
}

.hw-nav-btn {
    all: unset;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--hw-text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
}

.hw-nav-btn:hover {
    color: var(--hw-text);
    background: rgba(255, 255, 255, 0.05);
}

.hw-nav-btn.primary {
    color: var(--hw-text);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hw-nav-btn.primary:hover {
    background: var(--hw-accent);
    border-color: var(--hw-accent);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.hw-nav-btn svg {
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
}

.hw-nav-btn.primary:hover svg {
    transform: translateX(3px);
}

/* Hide elements based on screen size */
@media (max-width: 600px) {
    .hw-nav-badge span {
        display: none;
    }
    .hw-nav-badge {
        padding: 4px 8px;
    }
}

/* Transition Overlay */
#hw-transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #050507; /* Match main site dark theme */
    z-index: 999999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transform: translateY(100%);
    transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1);
    color: white;
    font-family: 'Inter', system-ui, sans-serif;
}

.title-serif {
    font-family: 'Cormorant Garamond', 'Playfair Display', serif;
    font-weight: 300;
}

#hw-transition-overlay.active {
    transform: translateY(0);
    pointer-events: all;
}

.hw-transition-logo {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease 0.4s;
    display: flex;
    align-items: center;
    gap: 12px;
}

.hw-transition-logo.visible {
    opacity: 1;
    transform: translateY(0);
}

.hw-transition-logo span.gradient {
    background: linear-gradient(135deg, #a855f7 0%, #6366f1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#hw-transition-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255,255,255,0.1);
    border-top-color: var(--hw-accent);
    border-radius: 50%;
    animation: hwSpin 1s linear infinite;
    margin-top: 32px;
    opacity: 0;
    transition: opacity 0.3s ease 0.6s;
}

#hw-transition-spinner.visible {
    opacity: 1;
}

@keyframes hwSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Portfolio Showcase Menu Overlay */
#hw-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(5, 5, 5, 0.4);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    z-index: 999999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

#hw-menu-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.hw-menu-content {
    width: 90%;
    max-width: 500px;
    background: rgba(15, 15, 15, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 32px;
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

#hw-menu-overlay.active .hw-menu-content {
    transform: translateY(0);
}

.hw-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.hw-menu-header h3 {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    color: var(--hw-text-muted);
}

#hw-menu-close {
    all: unset;
    cursor: pointer;
    font-size: 1.25rem;
    color: var(--hw-text-muted);
    transition: color 0.2s;
}

#hw-menu-close:hover {
    color: white;
}

.hw-menu-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hw-menu-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    text-decoration: none;
    color: white;
    transition: all 0.3s ease;
}

.hw-menu-item:hover, .hw-menu-item.active {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--hw-accent);
}

.hw-menu-index {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--hw-accent);
    opacity: 0.6;
}

.hw-menu-name {
    flex: 1;
    font-size: 1.1rem;
    font-weight: 500;
}

.hw-menu-arrow {
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

.hw-menu-item:hover .hw-menu-arrow {
    opacity: 1;
    transform: translateX(0);
}

#hw-menu-trigger {
    all: unset;
    cursor: pointer;
    transition: transform 0.2s;
}

#hw-menu-trigger:active {
    transform: scale(0.95);
}

@media (max-width: 600px) {
    .hw-nav-btn span { display: none; }
    .hw-nav-btn { padding: 10px; }
    .hw-nav-badge span { display: inline !important; }
}
