@import url('https://fonts.googleapis.com/css2?family=Syncopate:wght@700&family=Plus+Jakarta+Sans:wght@300;500;800&display=swap');

:root {
    --cyan: #00e5ff;
    --deep-blue: #020617;
    --text-dim: #94a3b8;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* FIX SCROLL: Permettiamo lo scroll verticale ma blocchiamo quello orizzontale */
body { 
    background: var(--deep-blue); 
    color: #fff; 
    font-family: 'Plus Jakarta Sans', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto; 
}

#loader {
    position: fixed; inset: 0; background: #000; z-index: 10000;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    transition: transform 0.8s cubic-bezier(0.85, 0, 0.15, 1);
}
#loader.hidden { transform: translateY(-100%); pointer-events: none; }
.loader-logo { font-family: 'Syncopate', sans-serif; font-size: clamp(1.5rem, 5vw, 3rem); letter-spacing: 5px; }
.loader-logo span { color: var(--cyan); }
.progress-bar { width: 200px; height: 2px; background: rgba(255,255,255,0.1); margin-top: 20px; overflow: hidden; }
.progress-fill { width: 0%; height: 100%; background: var(--cyan); animation: load 2.3s forwards; }
@keyframes load { to { width: 100%; } }

#app { opacity: 0; transition: opacity 1s ease; width: 100%; position: relative; }
#app.visible { opacity: 1; }

.bg-glow {
    position: absolute; top: 0; right: -10%; width: 70vw; height: 70vw;
    background: radial-gradient(circle, rgba(0,229,255,0.08) 0%, transparent 70%);
    filter: blur(80px); z-index: -1; pointer-events: none;
}

header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 30px 5%; width: 100%; max-width: 1600px; margin: 0 auto;
}
.main-logo { font-family: 'Syncopate', sans-serif; font-size: 1rem; letter-spacing: 4px; }
.main-logo span { color: var(--cyan); }
.nav-links span { margin-left: 20px; font-size: 0.7rem; text-transform: uppercase; color: var(--text-dim); }

.hero {
    display: grid; grid-template-columns: 1fr 1fr;
    max-width: 1600px; min-height: calc(100vh - 100px); margin: 0 auto; padding: 40px 5%;
    align-items: center; gap: 40px;
}

/* TEXT SIDE */
.hero-title { 
    font-family: 'Syncopate', sans-serif; 
    font-size: clamp(2.5rem, 7vw, 6rem); 
    line-height: 0.9; margin-bottom: 15px;
}
.hero-title span { color: var(--cyan); }
.artwork-name { font-size: 1.2rem; font-weight: 300; letter-spacing: 6px; color: var(--text-dim); margin-bottom: 25px; }
.description { max-width: 450px; line-height: 1.7; color: #cbd5e1; margin-bottom: 35px; }

.price-box .price { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; }

/* BOTTONE LIQUIDO */
.liquid-btn {
    position: relative; width: 100%; max-width: 300px; height: 65px; background: var(--cyan);
    border: none; border-radius: 12px; cursor: pointer; overflow: hidden;
}
.liquid-btn span { position: relative; z-index: 5; font-weight: 800; text-transform: uppercase; color: #000; letter-spacing: 1px; }
.liquid-btn .liquid {
    position: absolute; top: -100%; left: 0; width: 100%; height: 400%;
    background: #fff; transition: 0.6s cubic-bezier(0.4, 0, 0.2, 1); z-index: 1;
}
.liquid-btn .liquid::after {
    content: ''; position: absolute; top: 0; left: 50%; width: 200%; height: 100%;
    background: var(--deep-blue); transform: translate(-50%, -75%);
    border-radius: 40%; animation: rotLiquid 7s linear infinite;
}
.liquid-btn:hover .liquid { top: -160%; }
.liquid-btn:hover span { color: #fff; }
@keyframes rotLiquid { from { transform: translate(-50%, -75%) rotate(0deg); } to { transform: translate(-50%, -75%) rotate(360deg); } }

/* VISUAL SIDE */
.visual-side { display: flex; flex-direction: column; align-items: center; position: relative; }
.scene { 
    width: clamp(260px, 35vw, 380px); 
    height: clamp(340px, 45vw, 480px); 
    perspective: 2000px; 
    touch-action: pan-y; /* Permette lo scroll verticale se non si "grabba" attivamente */
}
.painting-card { width: 100%; height: 100%; position: relative; transform-style: preserve-3d; will-change: transform; }

.side { position: absolute; width: 100%; height: 100%; background: #000; }
.front { transform: translateZ(15px); border: 8px solid #fff; }
.front img { width: 100%; height: 100%; object-fit: cover; }
.left, .right { width: 30px; left: -15px; transform: rotateY(90deg); background: #080808; }
.right { left: auto; right: -15px; }
.top, .bottom { height: 30px; top: -15px; transform: rotateX(90deg); background: #111; }
.bottom { top: auto; bottom: -15px; }

.floor-shadow { width: 250px; height: 15px; background: rgba(0, 229, 255, 0.15); filter: blur(25px); margin-top: 30px; border-radius: 50%; }
.hint-tap { margin-top: 15px; font-size: 0.6rem; text-transform: uppercase; color: #475569; letter-spacing: 2px; }

/* RESPONSIVE */
@media (max-width: 1024px) {
    .hero { grid-template-columns: 1fr; text-align: center; padding-top: 20px; }
    .content-side { order: 2; display: flex; justify-content: center; }
    .visual-side { order: 1; padding: 40px 0; }
    .description { margin: 0 auto 30px; }
    .liquid-btn { margin: 0 auto; }
}