/* ================================
   UFOlab - Homepage Styles
   ================================ */

/* --- CSS VARIABLES --- */
:root {
    --text-main: #ffffff;
    --text-muted: #8b9bb4;
    --accent-primary: #00d9ff;
    --accent-secondary: #7000ff;
    --bg-color: #000000;
    --glass-bg: rgba(10, 15, 25, 0.88);
    --border-glow: rgba(0, 217, 255, 0.3);
}

/* --- RESET & BASE --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Source Sans 3", sans-serif;
    background: radial-gradient(ellipse at top, #0a0f1a 0%, #000000 100%);
    color: var(--text-main);
    overflow-x: hidden;
    position: relative;
}

/* Grain Texture Overlay */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' /%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 9999;
    opacity: 0.6;
}

/* --- 3D CANVAS --- */
#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 1;
    outline: none;
    cursor: grab;
}

#canvas-container:active {
    cursor: grabbing;
}

/* --- UI OVERLAY --- */
#ui-overlay {
    position: relative;
    z-index: 10;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    text-align: center;
    padding: 20px;
    transition: opacity 0.6s ease;
}

body.menu-open #ui-overlay {
    opacity: 0.15;
}

.interactive {
    pointer-events: auto;
}

/* --- HEADER NAVIGATION --- */
.header-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 25px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.85) 0%,
        transparent 100%
    );
    backdrop-filter: blur(10px);
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    animation: slideDown 0.8s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 4px;
    color: var(--text-main);
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

/* 🚀 LOGO HEADER CON EFFETTO GLOW PULSANTE */
.logo-img {
    height: 35px;
    width: auto;
    transition: all 0.3s ease;
    animation: logoGlow 3s ease-in-out infinite;
}

@keyframes logoGlow {
    0%,
    100% {
        filter: drop-shadow(0 0 3px rgba(0, 217, 255, 0.5))
            drop-shadow(0 0 8px rgba(0, 217, 255, 0.3));
    }
    50% {
        filter: drop-shadow(0 0 8px rgba(0, 217, 255, 0.8))
            drop-shadow(0 0 15px rgba(0, 217, 255, 0.5))
            drop-shadow(0 0 25px rgba(112, 0, 255, 0.3));
    }
}

.logo:hover .logo-img {
    animation: logoHoverGlow 0.6s ease-in-out infinite;
    transform: scale(1.05);
}

@keyframes logoHoverGlow {
    0%,
    100% {
        filter: drop-shadow(0 0 10px rgba(0, 217, 255, 1))
            drop-shadow(0 0 20px rgba(0, 217, 255, 0.6))
            drop-shadow(0 0 30px rgba(112, 0, 255, 0.4));
    }
    50% {
        filter: drop-shadow(0 0 15px rgba(0, 217, 255, 1))
            drop-shadow(0 0 30px rgba(0, 217, 255, 0.8))
            drop-shadow(0 0 45px rgba(112, 0, 255, 0.6));
    }
}

/* --- HAMBURGER MENU --- */
.hamburger {
    width: 50px;
    height: 50px;
    cursor: pointer;
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 7px;
    z-index: 101;
    position: relative;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 0.4s ease;
    background: rgba(255, 255, 255, 0.02);
}

.hamburger:hover {
    border-color: var(--accent-primary);
    background: rgba(0, 217, 255, 0.05);
    transform: rotate(90deg);
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-main);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.hamburger:hover span {
    background: var(--accent-primary);
    box-shadow: 0 0 10px var(--accent-primary);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

/* --- SIDE MENU --- */
.side-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 380px;
    max-width: 90vw;
    height: 100vh;
    background: var(--glass-bg);
    backdrop-filter: blur(30px);
    border-left: 1px solid var(--border-glow);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
    z-index: 90;
    transform: translateX(100%);
    transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    padding: 120px 50px 50px;
    display: flex;
    flex-direction: column;
    pointer-events: auto;
}

.side-menu.active {
    transform: translateX(0);
}

.menu-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.menu-list li {
    transform: translateX(30px);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

.side-menu.active .menu-list li {
    transform: translateX(0);
    opacity: 1;
}

.side-menu.active .menu-list li:nth-child(1) {
    transition-delay: 0.1s;
}
.side-menu.active .menu-list li:nth-child(2) {
    transition-delay: 0.15s;
}
.side-menu.active .menu-list li:nth-child(3) {
    transition-delay: 0.2s;
}
.side-menu.active .menu-list li:nth-child(4) {
    transition-delay: 0.25s;
}
.side-menu.active .menu-list li:nth-child(5) {
    transition-delay: 0.3s;
}
.side-menu.active .menu-list li:nth-child(6) {
    transition-delay: 0.35s;
}
.side-menu.active .menu-list li:nth-child(7) {
    transition-delay: 0.4s;
}
.side-menu.active .menu-list li:nth-child(8) {
    transition-delay: 0.45s;
}

.menu-link {
    color: var(--text-main);
    text-decoration: none;
    font-size: 1.3rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: block;
    padding: 12px 0;
    position: relative;
    font-family: "Orbitron", sans-serif;
}

.menu-link::before {
    content: "";
    position: absolute;
    left: -30px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 2px;
    background: var(--accent-primary);
    transition: width 0.3s ease;
    box-shadow: 0 0 10px var(--accent-primary);
}

.menu-link:hover {
    color: var(--accent-primary);
    text-shadow: 0 0 20px rgba(0, 217, 255, 0.5);
    padding-left: 20px;
}

.menu-link:hover::before {
    width: 15px;
}

.menu-link.highlight {
    color: var(--accent-primary);
}

.close-btn {
    margin-top: auto;
    font-size: 4rem;
    line-height: 0.5;
    color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    text-align: right;
    transition: all 0.3s ease;
    font-weight: 100;
}

.close-btn:hover {
    color: var(--accent-primary);
    text-shadow: 0 0 20px var(--accent-primary);
    transform: rotate(90deg);
}

/* --- MAIN TITLE --- */
main {
    animation: fadeInUp 1.2s ease-out 0.3s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 🌌 LOGO HOMEPAGE CON EFFETTO SPAZIALE */
.home-logo {
    text-align: center;
    margin-bottom: 50px;
    animation: logoEntrance 1.5s ease-out;
}

.home-logo-img {
    width: 400px;
    max-width: 85vw;
    height: auto;
    filter: drop-shadow(0 0 20px rgba(0, 217, 255, 0.8))
        drop-shadow(0 0 40px rgba(112, 0, 255, 0.5))
        drop-shadow(0 0 60px rgba(55, 16, 86, 0.3));
    animation: homeLogoGlow 3s ease-in-out infinite;
}

@keyframes logoEntrance {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.8);
        filter: blur(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

@keyframes homeLogoGlow {
    0%,
    100% {
        filter: drop-shadow(0 0 20px rgba(0, 217, 255, 0.8))
            drop-shadow(0 0 40px rgba(112, 0, 255, 0.5))
            drop-shadow(0 0 60px rgba(0, 217, 255, 0.3));
    }
    50% {
        filter: drop-shadow(0 0 35px rgba(0, 217, 255, 1))
            drop-shadow(0 0 70px rgba(112, 0, 255, 0.8))
            drop-shadow(0 0 100px rgba(0, 217, 255, 0.5));
    }
}

/* 🎨 TITOLO PRINCIPALE - Cambia qui il font! */
h1 {
    font-family:
        "Syncopate", sans-serif; /* <-- Cambia questo per modificare il font */
    font-weight: 700;
    text-transform: uppercase;
    font-size: clamp(2.5rem, 8vw, 6rem);
    line-height: 1;
    margin-bottom: 30px;
    letter-spacing: 15px;
    background: linear-gradient(135deg, #ffffff 0%, var(--accent-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 30px rgba(0, 217, 255, 0.4));
    pointer-events: none;
}

/* --- CLAIM --- */
.claim {
    font-family: "Source Sans 3", sans-serif;
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    max-width: 700px;
    margin: 0 auto 50px;
    line-height: 1.6;
    color: #c6252f;
    font-weight: 300;
    pointer-events: none;
    padding: 0 20px;
    font-style: italic;
    text-shadow:
        0 2px 10px rgba(100, 100, 100, 0.8),
        0 4px 20px rgba(100, 100, 100, 0.8),
        0 8px 40px rgba(100, 100, 100, 0.8);
}

.claim span {
    display: block;
    font-family: "Orbitron", sans-serif;
    font-size: 0.75rem;
    color: #fe0202;
    margin-top: 20px;
    font-style: normal;
    text-transform: uppercase;
    letter-spacing: 3px;
    opacity: 0.95;
    text-shadow:
        0 2px 10px rgba(100, 100, 100, 0.8),
        0 4px 20px rgba(100, 100, 100, 0.8),
        0 8px 40px rgba(100, 100, 100, 0.8);
}

/* --- MARKER LABELS --- */
.marker-label {
    position: fixed;
    background: rgba(0, 10, 20, 0.92);
    padding: 14px 22px;
    border-radius: 6px;
    color: white;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, -100%) translateY(-15px);
    transition:
        opacity 0.3s ease,
        transform 0.3s ease;
    backdrop-filter: blur(10px);
    white-space: nowrap;
    border: 1px solid;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
    z-index: 100;
    font-family: "Orbitron", sans-serif;
}

.marker-label::after {
    content: "";
    position: absolute;
    bottom: -7px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 7px 7px 0;
    border-style: solid;
    border-color: inherit;
    border-left-color: transparent;
    border-right-color: transparent;
}

.marker-label.visible {
    opacity: 1;
    transform: translate(-50%, -100%) translateY(-10px);
}

/* --- INTERACTION HINT --- */
.interaction-hint {
    position: fixed;
    bottom: 50px;
    right: 50px;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 5.4);
    pointer-events: none;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-family: "Orbitron", sans-serif;
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%,
    100% {
        opacity: 0.4;
    }
    50% {
        opacity: 0.7;
    }
}

/* --- FOOTER --- */
.main-footer {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 10;
    pointer-events: none;
}

.copyright {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
    background: rgba(0, 0, 0, 0.5);
    display: inline-block;
    padding: 12px 24px;
    border-radius: 30px;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-family: "Orbitron", sans-serif;
}

.privacy-link {
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 12px;
    transition: color 0.3s ease;
    pointer-events: auto;
    display: inline-block;
    font-family: "Orbitron", sans-serif;
}

.privacy-link:hover {
    color: var(--accent-primary);
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .header-nav {
        padding: 20px 25px;
    }

    .logo {
        font-size: 1.3rem;
        letter-spacing: 2px;
    }

    .logo-img {
        height: 30px;
    }

    .hamburger {
        width: 45px;
        height: 45px;
    }

    .home-logo-img {
        width: 250px;
    }

    .home-logo {
        margin-bottom: 40px;
    }

    h1 {
        letter-spacing: 8px;
        margin-bottom: 20px;
    }

    .claim {
        font-size: 1rem;
        padding: 0 15px;
    }

    .interaction-hint {
        bottom: 35px;
        right: 25px;
        font-size: 0.6rem;
    }

    .main-footer {
        bottom: 20px;
    }

    .copyright {
        font-size: 0.65rem;
        padding: 10px 20px;
    }

    .side-menu {
        width: 100%;
        max-width: 100vw;
        padding: 100px 35px 35px;
    }

    .menu-link {
        font-size: 1.1rem;
    }
}

/* --- LOADING SCREEN --- */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #000000;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease;
}

.loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(0, 217, 255, 0.1);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
