/* --- VARIABILI CSS E IMPOSTAZIONI BASE (TEMA CHIARO) --- */
:root {
    --primary: #0f172a;
    /* Testo scuro primario e bottoni principali */
    --primary-hover: #1e293b;
    --primary-glow: rgba(37, 99, 235, 0.2);

    --accent: #2563eb;
    /* Blu come in home per CTA e dettagli */
    --accent-hover: #1d4ed8;

    --secondary: #f1f5f9;
    /* Sfondo secondario leggero per card */
    --secondary-hover: #e2e8f0;

    --bg-base: #f8fafc;
    /* Sfondo principale (chiaro come home) */
    --bg-surface: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.85);
    /* Glass chiaro */

    --border: #e2e8f0;
    /* Bordi leggeri */
    --border-hover: #cbd5e1;

    --text-main: #1e293b;
    /* Testo scuro leggibile */
    --text-muted: #64748b;
    /* Testo secondario */

    --accent-purple: #8b5cf6;
    --accent-green: #10b981;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-base);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

/* --- SFONDO ANIMATO CON ORBS --- */
.bg-animated {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.45;
    animation: drift 20s infinite alternate ease-in-out;
    transition: transform 0.3s ease-out;
}

.orb-1 {
    top: -10%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.15), transparent 70%);
}

.orb-2 {
    bottom: -20%;
    right: -10%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1), transparent 70%);
    animation-delay: -5s;
    animation-duration: 25s;
}

.orb-3 {
    top: 30%;
    left: 40%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.1), transparent 70%);
    animation-delay: -10s;
    opacity: 0.5;
}

@keyframes drift {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(150px, 100px) scale(1.1);
    }
}

/* --- GLASS HEADER --- */
.glass-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    transition: all 0.3s ease;
}

.header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.logo img {
    height: 32px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

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

.auth-buttons {
    display: flex;
    gap: 16px;
    align-items: center;
}

/* --- BOTTONI GLOBALI --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s cubic-bezier(0.22, 1, 0.36, 1);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.btn-secondary {
    background: white;
    color: var(--primary);
    border: 1px solid var(--border);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.btn-secondary:hover {
    background: var(--secondary);
    border-color: var(--border-hover);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--border);
}

.btn-outline:hover {
    background: rgba(0, 0, 0, 0.03);
    border-color: var(--primary);
}

.btn-large {
    padding: 14px 28px;
    font-size: 1.05rem;
}

.btn-glow {
    position: relative;
    overflow: hidden;
}

.btn-glow::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(to bottom right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.13) 50%, rgba(255, 255, 255, 0) 100%);
    transform: rotate(45deg);
    transition: all 0.3s;
    opacity: 0;
}

.btn-glow:hover::after {
    opacity: 1;
    animation: shine 1.5s ease;
}

@keyframes shine {
    0% {
        left: -50%;
        top: -50%;
    }

    100% {
        left: 100%;
        top: 100%;
    }
}

.icon-arrow {
    transition: transform 0.2s ease;
}

.btn-primary:hover .icon-arrow {
    transform: translateX(3px);
}

/* --- GLASS CARD GENERICA --- */
.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.08);
    /* Ombra più leggera */
}

/* --- HERO SECTION --- */
.hero {
    min-height: 100vh;
    padding-top: 100px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(37, 99, 235, 0.3);
    border-radius: 99px;
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 24px;
}

.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 10px currentColor;
    animation: blink 2s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

.hero-title {
    font-size: 4rem;
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -1.5px;
}

.text-gradient {
    background: linear-gradient(to right, #60a5fa, #c084fc);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 90%;
}

.hero-cta {
    display: flex;
    gap: 20px;
    margin-bottom: 60px;
}

.hero-stats {
    display: flex;
    gap: 40px;
    border-top: 1px solid var(--border);
    padding-top: 30px;
}

.stat-item h3 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
}

.stat-item p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* --- HERO VISUAL & MOCKUP --- */
.hero-visual {
    position: relative;
    width: 100%;
    height: 500px;
}

.visual-card {
    position: absolute;
    width: 90%;
    height: 400px;
    top: 50px;
    right: 0;
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.mockup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 16px;
}

.mockup-header .dots {
    display: flex;
    gap: 6px;
}

.mockup-header .dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-muted);
    opacity: 0.5;
}

.mockup-search {
    width: 120px;
    height: 24px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.05);
    /* Sfondo ricerca */
}

.mockup-body {
    flex: 1;
}

.mockup-skeleton {
    background: rgba(0, 0, 0, 0.05);
    /* Sfondo righe finte */
    border-radius: 8px;
    margin-bottom: 12px;
}

.skeleton-title {
    height: 30px;
    width: 60%;
    margin-bottom: 20px;
}

.skeleton-text {
    height: 16px;
    width: 100%;
}

.skeleton-text.short {
    width: 40%;
    margin-bottom: 30px;
}

.mockup-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.mockup-box {
    height: 100px;
    background: rgba(0, 0, 0, 0.02);
    /* Sfondo box grid */
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.floating-element {
    position: absolute;
    bottom: 20px;
    left: -20px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.95);
    /* Chiara per la floating-card */
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border);
}

.floating-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(16, 185, 129, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-element h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary);
    /* Testo primario visibile sul chiaro */
}

.floating-element p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* --- SEZIONE FEATURES --- */
.features-section {
    max-width: 1280px;
    margin: 100px auto;
    padding: 0 24px;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.2;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.feature-card {
    background: rgba(255, 255, 255, 0.6);
    /* Sfondo chiaro leggermente trasparente per features */
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 32px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.03);
}

.feature-card:hover {
    background: white;
    border-color: var(--border-hover);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
    /* Ombra al passaggio del mouse nel tema chiaro */
}

.feature-icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.blue-glow {
    background: rgba(59, 130, 246, 0.1);
    /* Leggero glow e testo colorato nei wrapper in tema chiaro */
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: var(--accent);
}

.purple-glow {
    background: rgba(168, 85, 247, 0.1);
    border: 1px solid rgba(168, 85, 247, 0.2);
    color: var(--accent-purple);
}

.green-glow {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: var(--accent-green);
}

.feature-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* --- BOTTOM CTA --- */
.bottom-cta {
    max-width: 1000px;
    margin: 120px auto;
    padding: 0 24px;
}

.bottom-cta-content {
    padding: 60px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.bottom-cta-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at top, rgba(37, 99, 235, 0.08) 0%, transparent 70%);
    /* Gradient blu trasparente leggero */
    pointer-events: none;
}

.bottom-cta-content h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--primary);
    /* Titolo importante testuale */
}

.bottom-cta-content p {
    color: var(--text-muted);
    margin-bottom: 32px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* --- FOOTER --- */
.main-footer {
    border-top: 1px solid var(--border);
    padding-top: 60px;
    background: white;
    /* Footer coerente col tema chiaro */
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px 60px;
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 60px;
}

.logo-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    /* Colore solido e visibile in tema light */
    margin-bottom: 16px;
}

.footer-brand p {
    color: var(--text-muted);
    max-width: 300px;
}

.footer-links {
    display: flex;
    justify-content: space-between;
}

.link-col h4 {
    color: var(--primary);
    /* Più scuro al posto del bianco in tema light */
    font-weight: 600;
    margin-bottom: 20px;
}

.link-col a {
    display: block;
    color: var(--text-muted);
    margin-bottom: 12px;
    transition: color 0.2s;
    font-size: 0.95rem;
}

.link-col a:hover {
    color: var(--accent);
    /* Uso l'accent blu al passaggio del mouse sull'anchor per consistenza */
}

.footer-bottom {
    text-align: center;
    padding: 24px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* --- ANIMAZIONI --- */
.fade-in-up {
    animation: fadeInUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    opacity: 0;
    transform: translateY(30px);
}

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

.pulse-anim {
    animation: pulse 3s infinite ease-in-out;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}

.float-anim {
    animation: floatUpDown 6s infinite ease-in-out;
}

.float-anim-delayed {
    animation: floatUpDown 6s infinite ease-in-out;
    animation-delay: -3s;
}

@keyframes floatUpDown {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

/* Classi usate per gli observer scroll */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-on-scroll.active {
    opacity: 1;
    transform: translateY(0);
}

.banner-reveal {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.banner-reveal.active {
    opacity: 1;
    transform: scale(1);
}

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero-subtitle {
        margin: 0 auto 30px;
    }

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

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

    .hero-visual {
        display: none;
    }

    /* Su tablet piccoli/mobile eliminiamo per pulizia o riadattiamo */
    .features-grid {
        grid-template-columns: 1fr;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-links {
        flex-direction: column;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    /* Hamburger menu in futuro */
    .hero {
        padding-top: 120px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-cta {
        flex-direction: column;
    }

    .hero-stats {
        flex-wrap: wrap;
    }
}