@import url('https://fonts.googleapis.com/css2?family=Noto+Serif:ital,wght@0,400;0,700;1,400&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;500&display=swap');

/* RESET & BASE */
* { box-sizing: border-box; margin: 0; padding: 0; cursor: crosshair; scroll-behavior: smooth; }

body {
    background-color: #050505;
    color: #E0E0E0;
    font-family: 'Noto Serif', serif;
    height: 100vh;
    overflow: hidden; 
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* --- HEADER DI NAVIGAZIONE DESKTOP --- */
nav {
    position: fixed; top: 0; left: 0; width: 100%; padding: 30px 50px;
    display: flex; justify-content: space-between; align-items: center;
    z-index: 1000; mix-blend-mode: difference; 
}

/* Logo e Navigazione allineati */
.logo { 
    font-family: 'Noto Serif', serif; 
    font-weight: 700; 
    letter-spacing: 2px; 
    text-transform: uppercase; 
    font-size: 1.2rem; 
}

.nav-right { 
    display: flex; 
    align-items: center; 
    gap: 40px; 
    height: 100%; 
} 

.menu { 
    display: flex; 
    gap: 40px; 
    font-family: 'Inter', sans-serif; 
    text-transform: uppercase; 
    font-size: 0.8rem; 
    letter-spacing: 2px; 
    margin: 0; 
    padding-top: 4px; 
}

.menu-item { text-decoration: none; color: #fff; position: relative; padding: 5px 0; opacity: 0.6; transition: opacity 0.3s; cursor: pointer; }
.menu-item:hover, .menu-item.active { opacity: 1; }
.menu-item::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0%; height: 1px; background-color: #fff; transition: width 0.3s ease; }
.menu-item:hover::after, .menu-item.active::after { width: 100%; }

/* Bandierine Desktop */
.lang-switch { display: flex; gap: 10px; border-left: 1px solid rgba(255,255,255,0.3); padding-left: 20px; align-items: center; }
.flag-btn {
    background: none; border: none; cursor: pointer; opacity: 1; 
    padding: 0; width: 20px; height: 14px; 
    overflow: hidden; display: flex; align-items: center; justify-content: center;
    border-radius: 1px; transition: transform 0.2s;
}
.flag-btn img { width: 100%; height: 100%; object-fit: cover; display: block; }
.flag-btn:hover { transform: scale(1.1); }
.flag-btn.active { transform: scale(1.1); box-shadow: 0 0 0 1px #fff; } 

/* --- MENU HAMBURGER (MOBILE) --- */
.hamburger { display: none; cursor: pointer; flex-direction: column; gap: 6px; z-index: 1001; }
.hamburger span { width: 25px; height: 2px; background-color: #fff; transition: 0.3s; }

/* Menu Mobile Dropdown (Glassmorphism) */
.mobile-menu {
    position: absolute; 
    top: 80px; right: 20px; width: 200px; 
    background-color: rgba(20, 20, 20, 0.6); 
    backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    display: flex; flex-direction: column; 
    padding: 20px;
    gap: 20px;
    transform: translateY(-20px); 
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease; 
    z-index: 999;
    border-radius: 8px;
}

.mobile-menu.open { opacity: 1; pointer-events: all; transform: translateY(0); }
.mobile-menu .menu-item { font-size: 1rem; opacity: 0.8; text-align: right; }
.mobile-menu .menu-item:hover { opacity: 1; }

/* Lingue Mobile (Testuali) */
.mobile-lang-row {
    display: flex; 
    justify-content: flex-end; gap: 15px; 
    border-top: 1px solid rgba(255,255,255,0.2); 
    padding-top: 15px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    text-transform: uppercase;
    color: #fff;
}

.mob-lang-opt { cursor: pointer; opacity: 0.5; transition: opacity 0.3s; }
.mob-lang-opt.active { opacity: 1; font-weight: bold; text-decoration: underline; }


/* --- SFONDO DINAMICO SEAMLESS --- */
.bg-container { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: -2; overflow: hidden; }
.bg-layer {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover; background-position: center;
    opacity: 0; filter: blur(15px) grayscale(100%);
    transform: scale(1.0); 
    transition: opacity 2.5s ease-in-out;
    will-change: opacity, transform;
}
.bg-layer.visible { opacity: 0.4; }
.bg-layer.zooming { animation: forwardZoom 8s linear forwards; }
@keyframes forwardZoom { 0% { transform: scale(1.0); } 100% { transform: scale(1.20); } }

/* GRANA */
.grain {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: -1;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.05'/%3E%3C/svg%3E");
    pointer-events: none;
}

/* --- EASTER EGG JUMPSCARE --- */
.ghost-layer {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: url('assets/DAYD_B_Glitch.jpg') no-repeat center center/cover;
    opacity: 0; z-index: 2000; pointer-events: none;
    mix-blend-mode: normal; transform: scale(0.8); filter: blur(10px) grayscale(100%); 
    will-change: opacity, transform;
}
.ghost-layer.jumpscare { animation: jumpScareAnim 0.2s cubic-bezier(0.1, 0.7, 1.0, 0.1) forwards; }
@keyframes jumpScareAnim { 0% { transform: scale(0.8); opacity: 0; filter: blur(10px) grayscale(100%); } 100% { transform: scale(1.4); opacity: 0.6; filter: blur(5px) grayscale(100%) contrast(1.5); } }

/* CONTENUTO */
.section {
    position: absolute; width: 100%; height: 100%;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    transition: opacity 0.8s ease, transform 0.8s ease; opacity: 0; pointer-events: none;
}
.section.active { opacity: 1; pointer-events: all; transform: translateY(0); }

/* Sezione Contatti Full Screen con Glass */
#contact-section { 
    transform: translateY(0); 
    background: rgba(0, 0, 0, 0.85); 
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    z-index: 900; padding-top: 80px; 
}

h1 { font-size: 5rem; text-transform: uppercase; letter-spacing: 10px; position: relative; mix-blend-mode: difference; text-align: center; }

.logline { font-style: italic; margin-top: 20px; font-size: 1.2rem; min-height: 1.5em; transition: opacity 0.5s; }

.btn-group { margin-top: 40px; display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }
.btn {
    padding: 15px 30px; border: 1px solid #fff; color: #fff; text-decoration: none;
    font-family: 'Inter', sans-serif; text-transform: uppercase; font-size: 0.8rem;
    letter-spacing: 2px; transition: all 0.3s; background: rgba(0,0,0,0.3); cursor: pointer;
}
.btn:hover { background: #fff; color: #000; }

.contact-form { display: flex; flex-direction: column; gap: 15px; width: 100%; max-width: 400px; margin-top: 30px; }
input, textarea {
    background: transparent; border: none; border-bottom: 1px solid #555; padding: 10px;
    color: #fff; font-family: 'Inter', sans-serif; font-size: 1rem; outline: none; transition: border-color 0.3s;
}
input:focus, textarea:focus { border-bottom-color: #fff; }

.footer { position: absolute; bottom: 30px; font-family: 'Inter', sans-serif; font-size: 0.8rem; opacity: 0.6; text-align: center; width: 100%; z-index: 10; }
.footer a { color: inherit; border-bottom: 1px dotted #777; text-decoration: none; transition: opacity 0.3s; cursor: pointer; }
.footer a:hover { opacity: 1; border-bottom: 1px solid #fff; }

/* RESPONSIVE */
@media (max-width: 768px) { 
    h1 { font-size: 2.5rem; letter-spacing: 5px; } 
    nav { padding: 20px; } 
    .nav-right { display: none; }
    .hamburger { display: flex; }
}