:root {
    --primary: #0a0a0b;
    --secondary: #161618;
    --accent: #d4af37; /* Gold */
    --accent-glow: rgba(212, 175, 55, 0.4);
    --text-pure: #ffffff;
    --text-dim: #a0a0a5;
    --white: #ffffff;
    --glass: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

body.velvet-theme {
    --accent: #a855f7; /* Purple Velvet */
    --accent-glow: rgba(168, 85, 247, 0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--primary);
    color: var(--text-pure);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    /* Prevenzione taglio parole lingue lunghe */
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

/* Header */
header {
    height: 90px;
    display: flex;
    align-items: center;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background: rgba(10, 10, 11, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.main-logo {
    height: 45px;
    width: auto;
    border-radius: 8px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dim);
    font-weight: 600;
    font-size: 0.8rem;
    transition: var(--transition);
    white-space: nowrap;
}

.nav-links a:hover {
    color: var(--accent);
}

/* Language Selector */
.lang-selector-header {
    display: flex;
    gap: 5px;
    margin-right: 15px;
    padding-right: 15px;
    border-right: 1px solid var(--glass-border);
    flex-wrap: wrap;
    max-width: 180px;
}

.lang-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-dim);
    font-size: 0.65rem;
    font-weight: 800;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: var(--transition);
}

.lang-btn:hover, .lang-btn.active {
    color: var(--accent);
    border-color: var(--accent);
}

/* Theme Switcher */
.header-center {
    flex: 1;
    display: flex;
    justify-content: center;
    margin-right: 20px;
    transform: translateY(-30px); /* Alzata su desktop */
}

.theme-switch-header {
    display: flex;
    gap: 10px;
    background: var(--glass);
    padding: 5px 12px;
    border-radius: 100px;
    border: 1px solid var(--glass-border);
}

.theme-btn {
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: var(--transition);
    padding: 6px 12px;
    border-radius: 100px;
}

.theme-btn.active {
    background: var(--accent);
    color: var(--primary);
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.gold-dot { background: #d4af37; }
.velvet-dot { background: #a855f7; }

.header-actions {
    display: flex;
    align-items: center;
}

.btn-cta {
    background: var(--accent);
    color: var(--primary);
    padding: 0.7rem 1.5rem;
    border-radius: 100px;
    text-decoration: none;
    font-weight: 800;
    font-size: 0.8rem;
    transition: var(--transition);
    box-shadow: 0 10px 20px rgba(212, 175, 55, 0.2);
    white-space: nowrap;
}

/* Hero */
#hero {
    position: relative;
    padding: 180px 0 100px;
    overflow: hidden;
}

.hero-bg-glow {
    position: absolute;
    top: -20%;
    right: -10%;
    width: 60%;
    height: 80%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
    z-index: -1;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

#hero h1 {
    font-size: clamp(2.5rem, 5vw, 4.8rem);
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -3px;
    margin-bottom: 2.5rem;
}

.highlight {
    color: var(--accent);
    text-shadow: 0 0 30px var(--accent-glow);
}

.tagline-badge {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    background: var(--secondary);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 2rem;
    letter-spacing: 1px;
}

#hero p {
    font-size: 1.1rem;
    color: var(--text-dim);
    margin-bottom: 3.5rem;
    max-width: 550px;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.btn-playstore {
    background: #fff;
    color: #000;
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition);
}

.btn-playstore:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(255,255,255,0.2);
}

.btn-appstore-coming {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-dim);
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--glass-border);
    cursor: default;
    position: relative;
    overflow: hidden;
}

/* Visual Phone */
.phone-mockup {
    width: 100%;
    max-width: 320px;
    aspect-ratio: 1 / 2;
    background: #000;
    border: 8px solid #1a1a1a;
    border-radius: 40px;
    margin: 0 auto;
    position: relative;
    box-shadow: 0 50px 100px -20px rgba(0,0,0,0.5), 0 0 0 2px var(--glass-border);
    overflow: hidden;
}

.screen-content {
    width: 100%;
    height: 100%;
    background: #0a0a0b;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.ui-screen {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Sections */
#theme-selector, #modes, #geofencing, #features, #trusted-network {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 5rem;
}

.section-title h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; letter-spacing: -1px; }

/* Grids */
.modes-grid, .theme-grid, .premium-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.mode-card, .theme-card, .tier {
    background: var(--primary);
    padding: 3rem 2rem;
    border-radius: 32px;
    border: 1px solid var(--glass-border);
    transition: var(--transition);
}

.mode-card:hover, .theme-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent);
}

.theme-preview {
    width: 100%;
    height: 400px;
    border-radius: 24px;
    overflow: hidden;
    margin-bottom: 2rem;
    border: 1px solid var(--glass-border);
}

.theme-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Tech Rows */
.tech-row {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.tech-row.reverse { flex-direction: row-reverse; }
.tech-content, .tech-image { flex: 1; }

/* Footer */
footer {
    padding: 80px 0 40px;
    border-top: 1px solid var(--glass-border);
}

.footer-logo {
    height: 60px;
    width: auto;
    margin-bottom: 1.5rem;
    border-radius: 12px;
}

.footer-top { display: flex; justify-content: space-between; gap: 3rem; }
.footer-nav { display: flex; gap: 4rem; }
.footer-col h4 { margin-bottom: 1rem; }
.footer-col a { display: block; color: var(--text-dim); text-decoration: none; margin-bottom: 0.5rem; font-size: 0.9rem; }

/* RESPONSIVE - SMARTPHONE PREMIUM */
@media (max-width: 1024px) {
    /* Header Fix: No overlap */
    header {
        position: relative; /* Cambia a relative per non sovrastare il contenuto su mobile */
        height: auto;
        padding: 20px 0;
    }

    .header-flex {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .nav-links { display: none; }

    .header-center {
        order: 1;
        margin: 0;
        transform: none; /* Rimuove lo spostamento verso l'alto su mobile */
    }

    .theme-switch-header {
        background: rgba(255, 255, 255, 0.05);
        padding: 8px;
        border-radius: 100px;
    }

    .lang-selector-header {
        order: 2;
        border: none;
        margin: 0;
        padding: 0;
        max-width: none;
        width: 100%;
        justify-content: center;
    }

    .header-actions {
        order: 3;
        width: 100%;
        justify-content: center;
    }

    /* Hero Fix */
    #hero {
        padding: 40px 0 60px; /* Ridotto perché l'header non è più fisso */
    }

    .hero-grid {
        grid-template-columns: 1fr !important;
        text-align: center;
        gap: 3rem;
    }

    .hero-buttons { justify-content: center; }

    /* Cards Fix: One below the other */
    .modes-grid, .theme-grid, .premium-grid {
        grid-template-columns: 1fr !important;
        max-width: 450px;
        margin: 0 auto;
    }

    .tech-row, .tech-row.reverse {
        flex-direction: column !important;
        text-align: center;
        gap: 3rem;
    }

    .tech-image { order: -1; }

    .theme-preview {
        height: 300px;
    }

    /* Footer Fix */
    .footer-top {
        flex-direction: column;
        text-align: center;
    }

    .footer-nav {
        justify-content: center;
        flex-direction: column;
        gap: 2rem;
    }
}

@media (max-width: 480px) {
    .container { padding: 0 1.5rem; }

    #hero h1 { font-size: 2.4rem; letter-spacing: -1.5px; }
    #hero p { font-size: 1rem; }

    .theme-btn {
        padding: 8px 12px;
        font-size: 0.6rem;
    }

    .phone-mockup {
        max-width: 260px;
        border-width: 6px;
    }

    .section-title h2 { font-size: 1.8rem; }

    /* Previene il taglio chirurgico delle parole in tutte le lingue */
    h1, h2, h3, p, span, b, a {
        word-break: break-word !important;
    }

    .btn-cta {
        width: 100%;
        text-align: center;
    }
}
