/* ==========================================================================
   ASTROFOX · Header, nav & footer
   ========================================================================== */

/* ---- Header (Callisto floating-pill) ---- */

.site-header {
    position: fixed;
    z-index: 1000;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 1120px;
    top: 0;
    padding: 8px 0;
    border: 1px solid rgba(255, 255, 255, 0);
    border-radius: 0 0 22px 22px;
    background: transparent;
    box-shadow: none;
    transition: top 0.4s cubic-bezier(0.25,0.8,0.25,1),
                background 0.4s cubic-bezier(0.25,0.8,0.25,1),
                backdrop-filter 0.4s cubic-bezier(0.25,0.8,0.25,1),
                border-color 0.4s cubic-bezier(0.25,0.8,0.25,1),
                border-radius 0.4s cubic-bezier(0.25,0.8,0.25,1),
                box-shadow 0.4s cubic-bezier(0.25,0.8,0.25,1);
}
/* Scrolled: detached glass pill */
.site-header.scrolled {
    top: 12px;
    background: rgba(248, 250, 252, 0.05);
    backdrop-filter: blur(14px) contrast(1.1);
    -webkit-backdrop-filter: blur(14px) contrast(1.1);
    border-color: rgba(255, 255, 255, 0.12);
    border-radius: 50px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 22px;
    position: relative;
}

.brand {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}
.brand img {
    height: 40px;
    width: auto;
    transition: transform var(--transition);
    filter: drop-shadow(0 0 10px rgba(147, 130, 240, 0.4));
}
.brand:hover img { transform: scale(1.04); }

/* Centered nav links */
.nav {
    display: flex;
    align-items: center;
    gap: 1.6rem;
    list-style: none;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}
/* Nav links: text shifts to accent on hover / when active (no underline) */
.nav a {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: color 0.3s ease;
    position: relative;
    padding: 5px 0;
}
.nav a:hover { color: var(--purple); }
.nav a.active { color: var(--purple); }

.header-actions { display: flex; align-items: center; gap: 0.75rem; position: relative; z-index: 2; }
.header-actions .btn { padding: 0.5rem 1.35rem; font-size: 0.88rem; }

/* Hamburger */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 34px; height: 34px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}
.nav-toggle span {
    display: block;
    width: 22px; height: 2px;
    margin: 0 auto;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}
.nav-toggle.is-open { z-index: 1001; }
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav */
.mobile-nav {
    position: fixed;
    inset: 0;
    background: rgba(8, 8, 16, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 999;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    padding: 6rem clamp(1.5rem, 8vw, 3rem) 2rem;
    gap: 0.25rem;
}
.mobile-nav.open { transform: translateX(0); }
.mobile-nav a {
    padding: 1rem 0.5rem;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}
.mobile-nav a:hover, .mobile-nav a.active { color: var(--text-primary); }
.mobile-nav .btn { margin-top: 1.5rem; justify-content: center; }

/* ---- Footer (Callisto glass style, full-bleed band) ---- */

.site-footer {
    margin-top: var(--space-xl);
    background: var(--glass-bg);
    border-top: 1px solid var(--glass-border);
    border-left: 1px solid var(--glass-border);
    border-right: 1px solid var(--glass-border);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    padding: clamp(2.5rem, 5vw, 4rem) 0 2rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: 2.5rem;
}
.footer-brand img { height: 58px; width: auto; margin-bottom: 1.35rem; }
.footer-brand p { color: var(--text-secondary); font-size: 0.9rem; max-width: 320px; }
.footer-legal {
    margin-top: 1.1rem;
    font-size: 0.82rem;
    line-height: 1.7;
    color: var(--text-muted);
}
.footer-legal strong { color: var(--text-secondary); font-weight: 600; }

/* Social bubbles: glass circles that fill with the gradient on hover */
.footer-social { display: flex; gap: 0.75rem; margin-top: 1.35rem; }
.footer-social a {
    width: 2.5rem; height: 2.5rem;
    display: grid; place-items: center;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--text-primary);
    font-size: 1.1rem;
    transition: var(--transition);
}
.footer-social a:hover {
    background: var(--gradient-primary);
    color: #0a0a14;
    border-color: transparent;
    transform: translateY(-3px);
}
.footer-col h4 {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--purple);
    margin-bottom: 1.1rem;
    font-weight: 700;
}
.footer-col a {
    display: block;
    color: var(--text-secondary);
    font-size: 0.92rem;
    padding: 0.32rem 0;
    transition: var(--transition);
}
.footer-col a:hover { color: var(--purple-light); }
.footer-bottom {
    margin-top: var(--space-lg);
    padding-top: 1.75rem;
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Rotating slogan */
.footer-slogan {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 0.5rem 1.1rem;
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    overflow: hidden;
}
.footer-slogan:hover { border-color: var(--border-color-hover); color: var(--text-primary); }
.footer-slogan i {
    color: var(--purple);
    font-size: 0.8rem;
    flex-shrink: 0;
}
.footer-slogan-text {
    display: inline-block;
    white-space: nowrap;
    transition: opacity 0.32s ease, transform 0.32s ease;
}
.footer-slogan-text.swap-out { opacity: 0; transform: translateY(-8px); }
.footer-slogan-text.swap-in  { opacity: 0; transform: translateY(8px); }

@media (max-width: 900px) {
    .nav { display: none; }
    .nav-toggle { display: flex; }
    .header-actions .btn { display: none; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
    .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
    .footer-grid { grid-template-columns: 1fr; }
}
