/* ── SPACE HEADER ───────────────────────────────────────────────────────────── */

.space-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0 50px;
    height: 64px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    pointer-events: none;
    transition: background 0.5s ease, backdrop-filter 0.5s ease, border-color 0.5s ease;
}

/* Fondo semi-trasparente che appare dopo lo scroll */
.space-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 8, 0);
    backdrop-filter: blur(0px);
    border-bottom: 1px solid rgba(255, 255, 255, 0);
    transition: background 0.5s ease, backdrop-filter 0.5s ease, border-color 0.5s ease;
    z-index: -1;
}

.space-header.scrolled::before {
    background: rgba(0, 0, 8, 0.72);
    backdrop-filter: blur(18px) saturate(1.4);
    border-color: rgba(255, 255, 255, 0.055);
}

/* ── LOGO (colonna sinistra) ────────────────────────── */
.space-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    pointer-events: all;
    text-decoration: none;
    flex-shrink: 0;
    justify-self: start;
}

.space-logo-mark {
    width: 28px;
    height: 28px;
    position: relative;
    flex-shrink: 0;
}

.space-logo-mark svg {
    width: 100%;
    height: 100%;
}

.space-logo-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.88);
}

/* ── NAV LINKS (colonna centrale) ───────────────────── */
.space-nav {
    display: flex;
    align-items: center;
    gap: 38px;
    pointer-events: all;
    justify-self: center;
}

.space-nav-link {
    font-family: 'Exo 2', sans-serif;
    font-size: 0.65rem;
    font-weight: 300;
    letter-spacing: 3.5px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.32);
    text-decoration: none;
    position: relative;
    padding: 4px 0;
    transition: color 0.25s ease;
}

.space-nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.5);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.space-nav-link:hover {
    color: rgba(255, 255, 255, 0.8);
}

.space-nav-link:hover::after {
    width: 100%;
}

.space-nav-link.active {
    color: rgba(255, 255, 255, 0.9);
}

.space-nav-link.active::after {
    width: 100%;
    background: rgba(255, 255, 255, 0.35);
}

/* ── CONTATTACI — solo testo, nessuna cornice ─────── */
.space-nav-cta {
    font-family: 'Exo 2', sans-serif;
    font-size: 0.65rem;
    font-weight: 300;
    letter-spacing: 3.5px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.32);
    text-decoration: none;
    position: relative;
    padding: 4px 0;
    border: none;
    background: none;
    transition: color 0.25s ease;
    white-space: nowrap;
}

.space-nav-cta::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.5);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.space-nav-cta:hover {
    color: rgba(255, 255, 255, 0.8);
}

.space-nav-cta:hover::after {
    width: 100%;
}

/* ── LOGIN (colonna destra) ─────────────────────────── */
.space-header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    pointer-events: all;
    justify-self: end;
}

.space-login-btn {
    font-family: 'Exo 2', sans-serif;
    font-size: 0.62rem;
    font-weight: 400;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: color 0.25s ease;
    white-space: nowrap;
}

.space-login-btn:hover {
    color: rgba(255, 255, 255, 0.85);
}

/* ── RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 900px) {
    .space-header { padding: 0 24px; }
    .space-nav { gap: 22px; }
}

@media (max-width: 700px) {
    .space-header { grid-template-columns: auto 1fr auto; }
    .space-nav { gap: 16px; }
    .space-nav-link { display: none; }
    .space-nav-cta { display: block; }
}

@media (max-width: 480px) {
    .space-header-right { display: none; }
}
