@import url('https://fonts.googleapis.com/css2?family=Limelight&display=swap');
/* Nota: Se i font Noir-et-Blanc e Icicle Country Two non sono su Google Fonts, potremmo dover usare font fallback simili per ora o caricarli localmente se li hai */

:root {
    --main-grey: #191919;
    --grey-10-white: #2F2F2F;
    --grey-30-white: #505050;
    --font-heading: 'Limelight', cursive, sans-serif;
    --font-body: monospace; /* Fallback temporaneo per i font pixel art */
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--main-grey);
    color: #ffffff;
    font-family: var(--font-body);
    overflow-x: hidden;
}

/* ==================
   HERO SECTION
   ================== */
.hero {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: flex-start; /* Allinea l'intero blocco contenuto in alto */
    justify-content: flex-start;
    padding-left: 4vw; 
    padding-top: 50px; /* Distanza fissa e più piccola dal margine superiore per tutto */
    box-sizing: border-box;
    /* Background animato inserito nei layer interni */
}

.hero__content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    z-index: 10;
}

.hero__logo {
    position: relative; /* Torna nel flusso normale assieme ai pulsanti */
    max-width: 600px;
    width: 100%;
    margin-bottom: 1.5rem; /* Spazio tra il logo e i pulsanti */
    will-change: transform;
}

.hero__logo img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: auto;
    /* Glow molto più leggero e delicato */
    filter: drop-shadow(0px 2px 5px rgba(0,0,0,0.8)) drop-shadow(0px 0px 10px rgba(255, 255, 255, 0.3));
}

.hero__links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
}

.satrapo-parallax {
    position: absolute;
    right: -20%; /* Ancora più a destra */
    bottom: -6%; /* Più in basso */
    max-height: 75vh;
    z-index: 2; /* Sotto la pioggia */
    transition: transform 0.1s ease-out, opacity 0.1s ease-out; 
    /* Sfumatura per fondere le gambe col buio */
    -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
    /* Contrasto abbassato per 'liftare' i neri (farli diventare grigi scuri) + compensazione luce */
    filter: contrast(0.80) brightness(1.1) drop-shadow(0px 0px 30px rgba(255, 255, 255, 0.5));
}

/* ==================
   BUTTONS
   ================== */
.pixel-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 280px; /* Adatta in base all'immagine big */
    height: 85px; /* Adatta in base all'immagine big */
    background: url('immagini/pulsanti/Dialogue_box_big-export.png') no-repeat center center;
    background-size: contain;
    text-decoration: none;
    color: white;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.pixel-btn:hover {
    transform: scale(1.05);
    filter: brightness(1.2);
}

.pixel-btn span {
    position: relative;
    top: -2px; /* Aggiusta per centrare visivamente il testo nel box */
}

/* ==================
   FOOTER
   ================== */
footer {
    padding: 40px;
    background-color: var(--main-grey);
    text-align: center;
    font-family: var(--font-body);
    color: #888;
}

/* ==================
   RAIN EFFECT
   ================== */
.rain-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
    background-image: url('immagini/Rain/1.png'), url('immagini/Rain/2.png');
    background-repeat: repeat;
    /* Gocce ingrandite ancora un po' */
    background-size: 900px, 1200px; 
    animation: rain-anim 0.8s linear infinite;
    opacity: 0.7;
    mix-blend-mode: screen;
}

@keyframes rain-anim {
    0% {
        background-position: 0 0, 0 0;
    }
    100% {
        background-position: 40px 800px, -20px 1000px;
    }
}

/* ==================
   PLATFORM THEMED BUTTONS
   ================== */
.pixel-btn {
    gap: 12px; /* Spazio tra icona SVG e testo */
}

.pixel-btn span, .pixel-btn svg {
    position: relative;
    top: -2px; /* Allineamento per centrare con il box pixel art */
    z-index: 2;
    transition: text-shadow 0.2s ease, filter 0.2s ease;
}

/* Base outline & Thematic Glow - Bilanciato con Lift dei neri */
.pixel-btn--discord {
    filter: contrast(0.85) brightness(1.15) drop-shadow(0 0 2px #5865F2) drop-shadow(0 0 10px rgba(88, 101, 242, 0.6));
}
.pixel-btn--discord:hover {
    filter: contrast(0.85) brightness(1.3) drop-shadow(0 0 3px #5865F2) drop-shadow(0 0 15px rgba(88, 101, 242, 0.9)) drop-shadow(0 0 25px rgba(88, 101, 242, 0.5));
}
.pixel-btn--discord:hover span, .pixel-btn--discord:hover svg {
    filter: drop-shadow(0 0 5px #5865F2);
}

.pixel-btn--kickstarter {
    filter: contrast(0.85) brightness(1.15) drop-shadow(0 0 2px #05CE78) drop-shadow(0 0 10px rgba(5, 206, 120, 0.6));
}
.pixel-btn--kickstarter:hover {
    filter: contrast(0.85) brightness(1.3) drop-shadow(0 0 3px #05CE78) drop-shadow(0 0 15px rgba(5, 206, 120, 0.9)) drop-shadow(0 0 25px rgba(5, 206, 120, 0.5));
}
.pixel-btn--kickstarter:hover span, .pixel-btn--kickstarter:hover svg {
    filter: drop-shadow(0 0 5px #05CE78);
}

.pixel-btn--steam {
    filter: contrast(0.85) brightness(1.15) drop-shadow(0 0 2px #66c0f4) drop-shadow(0 0 10px rgba(102, 192, 244, 0.6));
}
.pixel-btn--steam:hover {
    filter: contrast(0.85) brightness(1.3) drop-shadow(0 0 3px #66c0f4) drop-shadow(0 0 15px rgba(102, 192, 244, 0.9)) drop-shadow(0 0 25px rgba(102, 192, 244, 0.5));
}
.pixel-btn--steam:hover span, .pixel-btn--steam:hover svg {
    filter: drop-shadow(0 0 5px #66c0f4);
}

/* ==================
   CAROUSEL SECTION
   ================== */
.carousel-section {
    padding: 60px 0 100px;
    background-color: var(--main-grey);
    position: relative;
    overflow: hidden;
}

.carousel-section::before, .carousel-section::after {
    content: "";
    position: absolute;
    top: 0;
    width: 150px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.carousel-section::before {
    left: 0;
    background: linear-gradient(to right, var(--main-grey), transparent);
}

.carousel-section::after {
    right: 0;
    background: linear-gradient(to left, var(--main-grey), transparent);
}

.carousel-track {
    display: flex;
    gap: 30px;
    width: max-content;
    animation: marquee 35s linear infinite;
}

.carousel-track:hover {
    animation-play-state: paused;
}

.carousel-slide {
    height: 220px;
    border: 3px solid var(--grey-30-white);
    border-radius: 4px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.7);
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-50% - 15px)); }
}

/* ==================
   PARALLAX MOUNTAINS BACKGROUND
   ================== */
.parallax-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0; /* Dietro a tutto (pioggia = 1, contenuto = 3) */
}

/* Sfumatura scura in alto per far risaltare il logo (resa più leggera) */
.parallax-bg::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 45%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0) 100%);
    pointer-events: none;
    z-index: 2;
}

/* Sfumatura scura in basso per fondere lo sfondo con il resto della pagina */
.parallax-bg::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(25,25,25,0) 0%, rgba(25,25,25,1) 100%);
    pointer-events: none;
    z-index: 2;
}

.parallax-bg .layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-repeat: repeat-x;
    background-size: auto 100%; /* Altezza piena, larghezza automatica per non sgranare */
    background-position: 0 bottom;
    image-rendering: pixelated;
    z-index: 1;
}

.parallax-bg .layer-1 { background-image: url('immagini/sfondi/Mountains_01/1.png'); background-size: cover; }
.parallax-bg .layer-2 { background-image: url('immagini/sfondi/Mountains_01/2.png'); animation: move-bg 25s linear infinite; }
.parallax-bg .layer-3 { background-image: url('immagini/sfondi/Mountains_01/3.png'); animation: move-bg-opp 800s linear infinite; }
.parallax-bg .layer-4 { background-image: url('immagini/sfondi/Mountains_01/4.png'); animation: move-bg 150s linear infinite; }
.parallax-bg .layer-5 { background-image: url('immagini/sfondi/Mountains_01/5.png'); animation: move-bg-opp 120s linear infinite; }
.parallax-bg .layer-6 { background-image: url('immagini/sfondi/Mountains_01/6.png'); animation: move-bg 80s linear infinite; }
.parallax-bg .layer-trees { background-image: url('immagini/sfondi/Mountains_01/trees_front.png'); animation: move-bg 40s linear infinite; }

@keyframes move-bg {
    from { background-position: 0 bottom; }
    to { background-position: -2000px bottom; }
}
@keyframes move-bg-opp {
    from { background-position: 0 bottom; }
    to { background-position: 2000px bottom; }
}

/* ==================
   CRT SCANLINES OVERLAY
   ================== */
.crt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999; /* Sta sopra a tutto il sito */
    pointer-events: none; /* Lascia passare i click a pulsanti e bottoni */
    /* Crea le linee di scansione orizzontali (molto più leggere) */
    background: linear-gradient(
        rgba(18, 16, 16, 0) 50%,
        rgba(0, 0, 0, 0.08) 50%
    );
    background-size: 100% 4px; /* Altezza di ogni riga */
    /* Crea la vignettatura scura sui bordi (meno marcata) */
    box-shadow: inset 0 0 60px rgba(0,0,0,0.3);
    opacity: 0.4; /* Reso molto più trasparente per non oscurare lo sfondo */
    
    /* Leggerissimo sfarfallio per renderlo vivo */
    animation: flicker 0.15s infinite;
}

@keyframes flicker {
    0% { opacity: 0.35; }
    50% { opacity: 0.45; }
    100% { opacity: 0.35; }
}


/* Sfasamento orizzontale asimmetrico per i pulsanti della Hero */
.hero__links .pixel-btn:nth-child(2) {
    margin-left: 45px;
}
.hero__links .pixel-btn:nth-child(3) {
    margin-left: 10px;
}

/* Animazione di ingresso a cascata per i pulsanti */
@keyframes btn-enter {
    0% { 
        opacity: 0; 
        left: -50px; 
    }
    100% { 
        opacity: 1; 
        left: 0; 
    }
}

.hero__links .pixel-btn {
    /* Il cubic-bezier crea un piccolo effetto "rimbalzo" (overshoot) alla fine */
    animation: btn-enter 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) backwards;
}

/* Ritardi sfalsati per farli comparire uno dopo l'altro */
.hero__links .pixel-btn:nth-child(1) {
    animation-delay: 0.4s;
}
.hero__links .pixel-btn:nth-child(2) {
    animation-delay: 0.6s;
}
.hero__links .pixel-btn:nth-child(3) {
    animation-delay: 0.8s;
}

/* ==================
   CUSTOM DOT LOGOS (Pallocchi colorati)
   ================== */
.custom-logo {
    display: inline-block;
    border-radius: 50%; /* Questo li rende "pallocchi" (cerchi perfetti) */
    width: 18px;
    height: 18px;
    box-shadow: inset 0 2px 4px rgba(255,255,255,0.4), 0 2px 4px rgba(0,0,0,0.6); /* Leggero effetto 3D per farli sembrare bottoncini luminosi */
}

/* Discord */
.logo-discord {
    background-color: #5865F2;
}

/* Kickstarter */
.logo-kickstarter {
    background-color: #05CE78;
}

/* Steam */
.logo-steam {
    background-color: #66c0f4;
}

/* Fix per far "gloware" anche i nuovi loghi testuali in hover */
.pixel-btn:hover .custom-logo {
    filter: drop-shadow(0 0 5px currentColor);
}

/* Fade scuro piccolino al margine superiore, sopra tutto (dopo il background) */
.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 12vh;
    background: linear-gradient(to bottom, rgba(0,0,0,0.8) 0%, transparent 100%);
    z-index: 20;
    pointer-events: none;
}
