/* ═══════════════════════════════════════════
   RESET & BASE
   ═══════════════════════════════════════════ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --cyan: #00f0ff;
    --purple: #a855f7;
    --magenta: #f472b6;
    --dark: #0a0a0f;
    --dark-2: #12121a;
    --dark-3: #1a1a2e;
    --gray: #8892b0;
    --white: #e6f1ff;
    --gradient-1: linear-gradient(135deg, var(--cyan), var(--purple));
    --gradient-2: linear-gradient(135deg, var(--purple), var(--magenta));
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', sans-serif;
    background: var(--dark);
    color: var(--white);
    overflow-x: hidden;
    line-height: 1.6;
}

h1, h2, h3, h4 { font-family: 'Space Grotesk', sans-serif; }
a { color: inherit; text-decoration: none; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--dark); }
::-webkit-scrollbar-thumb { background: var(--cyan); border-radius: 3px; }

/* ═══════════════════════════════════════════
   NAVBAR
   ═══════════════════════════════════════════ */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    padding: 1.2rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.4s ease;
    background: transparent;
}

.navbar.scrolled {
    background: rgba(10, 10, 15, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 0.8rem 2rem;
    border-bottom: 1px solid rgba(0, 240, 255, 0.1);
}

.nav-logo {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 4px;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links { display: flex; gap: 2rem; align-items: center; }

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--gray);
    transition: color 0.3s;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px; left: 0;
    width: 0; height: 2px;
    background: var(--gradient-1);
    transition: width 0.3s;
}

.nav-links a:hover { color: var(--white); }
.nav-links a:hover::after { width: 100%; }

.nav-cta {
    padding: 0.6rem 1.5rem !important;
    border: 1px solid var(--cyan) !important;
    border-radius: 4px;
    color: var(--cyan) !important;
    transition: all 0.3s !important;
}

.nav-cta:hover {
    background: var(--cyan) !important;
    color: var(--dark) !important;
}

.nav-lang {
    padding: 0.4rem 0.8rem !important;
    border: 1px solid rgba(255,255,255,0.2) !important;
    border-radius: 4px;
    font-size: 0.75rem !important;
    letter-spacing: 2px !important;
}

.nav-lang:hover {
    border-color: var(--white) !important;
    color: var(--white) !important;
}

.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; z-index: 1001; }
.hamburger span { width: 28px; height: 2px; background: var(--white); transition: all 0.3s; }

/* ═══════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: url('https://images.unsplash.com/photo-1622979135225-d2ba269cf1ac?w=1920&q=80') center/cover no-repeat;
    filter: brightness(0.25);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10,10,15,0.4) 0%, rgba(10,10,15,0.7) 60%, var(--dark) 100%);
}

.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0,240,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,240,255,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: perspective(500px) rotateX(60deg) translateY(0); }
    100% { transform: perspective(500px) rotateX(60deg) translateY(60px); }
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
    padding: 0 2rem;
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    border: 1px solid rgba(0,240,255,0.3);
    border-radius: 50px;
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--cyan);
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
    background: rgba(0,240,255,0.05);
}

.hero h1 {
    font-size: clamp(2.8rem, 7vw, 5.5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.hero h1 .gradient-text,
.section-title .gradient-text,
.queue-text .gradient-text,
.cta-content .gradient-text {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--gray);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
}

.hero-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.btn-primary {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--gradient-1);
    color: var(--dark);
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 40px rgba(0,240,255,0.3); }

.btn-secondary {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: transparent;
    color: var(--white);
    font-weight: 500;
    font-size: 0.95rem;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    letter-spacing: 1px;
    text-transform: uppercase;
}

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

.scroll-indicator { position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%); z-index: 2; }

.scroll-indicator .mouse {
    width: 26px; height: 40px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 13px;
    position: relative;
}

.scroll-indicator .mouse::before {
    content: '';
    position: absolute;
    top: 8px; left: 50%;
    transform: translateX(-50%);
    width: 3px; height: 8px;
    background: var(--cyan);
    border-radius: 2px;
    animation: scrollDown 1.5s ease-in-out infinite;
}

@keyframes scrollDown {
    0% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(12px); }
}

/* ═══════════════════════════════════════════
   STATS BAR
   ═══════════════════════════════════════════ */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1px;
    background: rgba(0,240,255,0.1);
    border-top: 1px solid rgba(0,240,255,0.1);
    border-bottom: 1px solid rgba(0,240,255,0.1);
}

.stat-item { padding: 2rem; text-align: center; background: var(--dark-2); }

.stat-number {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--gray);
    margin-top: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ═══════════════════════════════════════════
   COMMON SECTION
   ═══════════════════════════════════════════ */
section { padding: 6rem 2rem; }

.section-header { text-align: center; margin-bottom: 4rem; }

.section-tag {
    display: inline-block;
    font-size: 0.75rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--cyan);
    margin-bottom: 1rem;
    font-weight: 500;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--gray);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

.container { max-width: 1200px; margin: 0 auto; }

/* ═══════════════════════════════════════════
   SERVIZI
   ═══════════════════════════════════════════ */
#servizi { background: var(--dark); }

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--dark-2);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.4s ease;
}

.service-card:hover {
    transform: translateY(-8px);
    border-color: rgba(0,240,255,0.2);
    box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 40px rgba(0,240,255,0.05);
}

.service-card-img { width: 100%; height: 220px; object-fit: cover; display: block; }

.service-card-body { padding: 2rem; }

.service-icon {
    width: 50px; height: 50px;
    border-radius: 10px;
    background: rgba(0,240,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.2rem;
}

.service-card h3 { font-size: 1.3rem; margin-bottom: 0.8rem; font-weight: 600; }
.service-card p { color: var(--gray); font-size: 0.95rem; line-height: 1.7; }

.service-tag {
    display: inline-block;
    margin-top: 1.2rem;
    padding: 0.4rem 0.8rem;
    border: 1px solid rgba(0,240,255,0.2);
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--cyan);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ═══════════════════════════════════════════
   QUEUE / SOCIAL PROOF
   ═══════════════════════════════════════════ */
.queue-section {
    background: var(--dark-2);
    padding: 6rem 2rem;
    overflow: hidden;
}

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

.queue-image {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(0,240,255,0.1);
    position: relative;
}

.queue-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    min-height: 350px;
}

.queue-text .section-tag { text-align: left; }

.queue-text .section-title {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    text-align: left;
    margin-bottom: 1.5rem;
}

.queue-text p {
    color: var(--gray);
    font-size: 1.05rem;
    line-height: 1.8;
}

/* ═══════════════════════════════════════════
   PORTFOLIO / PROGETTI
   ═══════════════════════════════════════════ */
#progetti { background: var(--dark); }

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.5rem;
}

.portfolio-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 16/10;
    cursor: pointer;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.portfolio-item:hover img { transform: scale(1.08); }

.portfolio-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 30%, rgba(10,10,15,0.9) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
    opacity: 1;
    transition: background 0.4s ease;
}

.portfolio-item:hover .portfolio-overlay {
    background: linear-gradient(180deg, transparent 10%, rgba(10,10,15,0.95) 100%);
}

.portfolio-overlay h4 { font-size: 1.2rem; margin-bottom: 0.3rem; }
.portfolio-overlay p { font-size: 0.85rem; color: var(--cyan); }

/* ═══════════════════════════════════════════
   HIGHLIGHT BAND
   ═══════════════════════════════════════════ */
.highlight-band {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    padding: 1.5rem 2rem;
    background: var(--dark-3);
    border-bottom: 1px solid rgba(0,240,255,0.08);
}

.highlight-band span {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.highlight-dot {
    width: 6px !important;
    height: 6px;
    min-width: 6px;
    border-radius: 50%;
    background: var(--cyan) !important;
    -webkit-text-fill-color: initial !important;
    display: inline-block;
}

/* ═══════════════════════════════════════════
   PORTFOLIO OVERLAY BADGES (concept items)
   ═══════════════════════════════════════════ */
.portfolio-overlay.has-badge {
    opacity: 1;
    background: linear-gradient(180deg, transparent 10%, rgba(10,10,15,0.85) 100%);
}

.item-badge {
    position: absolute;
    top: 1rem; right: 1rem;
    padding: 0.3rem 0.8rem;
    background: rgba(168, 85, 247, 0.25);
    border: 1px solid rgba(168, 85, 247, 0.5);
    border-radius: 4px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--purple);
    font-weight: 600;
}

/* ═══════════════════════════════════════════
   LIGHTBOX
   ═══════════════════════════════════════════ */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
    padding: 2rem;
}

.lightbox.active { display: flex; }

.lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 60px rgba(0, 240, 255, 0.1);
    animation: lightboxIn 0.3s ease;
}

.lightbox-caption {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    max-width: 600px;
}

.lightbox-caption h4 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.3rem;
    margin-bottom: 0.3rem;
}

.lightbox-caption p {
    font-size: 0.9rem;
    color: var(--cyan);
}

.lightbox-close {
    position: absolute;
    top: 1.5rem; right: 2rem;
    font-size: 2rem;
    color: var(--white);
    cursor: pointer;
    width: 40px; height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s;
    background: rgba(255,255,255,0.05);
    border: none;
    font-family: inherit;
}

.lightbox-close:hover { background: rgba(255,255,255,0.15); }

@keyframes lightboxIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* ═══════════════════════════════════════════
   PROCESSO
   ═══════════════════════════════════════════ */
#processo { background: var(--dark); }

.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.process-step {
    text-align: center;
    padding: 2rem 1.5rem;
}

.step-number {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 3.5rem;
    font-weight: 700;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0.3;
    line-height: 1;
    margin-bottom: 1rem;
}

.process-step h3 { font-size: 1.15rem; margin-bottom: 0.8rem; font-weight: 600; }
.process-step p { color: var(--gray); font-size: 0.9rem; line-height: 1.7; }

/* ═══════════════════════════════════════════
   TECH BAR (pipeline)
   ═══════════════════════════════════════════ */
.tech-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
    flex-wrap: wrap;
    padding: 3rem 2rem;
    background: var(--dark-2);
    border-top: 1px solid rgba(255,255,255,0.03);
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.tech-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--gray);
    font-size: 0.85rem;
    font-weight: 500;
}

.tech-item svg { width: 22px; height: 22px; opacity: 0.7; }

/* ═══════════════════════════════════════════
   CTA / CONTATTI
   ═══════════════════════════════════════════ */
.cta-section {
    background: var(--dark);
    position: relative;
    overflow: hidden;
}

.cta-glow {
    position: absolute;
    width: 500px; height: 500px;
    border-radius: 50%;
    filter: blur(150px);
    opacity: 0.15;
}

.cta-glow-1 { background: var(--cyan); top: -200px; left: -100px; }
.cta-glow-2 { background: var(--purple); bottom: -200px; right: -100px; }

.cta-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.cta-content h2 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 1rem; }
.cta-content p { color: var(--gray); font-size: 1.1rem; margin-bottom: 2.5rem; line-height: 1.7; }

.cta-email {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 2rem;
    background: rgba(0,240,255,0.08);
    border: 1px solid rgba(0,240,255,0.2);
    border-radius: 8px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.2rem;
    color: var(--cyan);
    transition: all 0.3s;
}

.cta-email:hover {
    background: rgba(0,240,255,0.15);
    border-color: var(--cyan);
}

.cta-email svg { width: 20px; height: 20px; }

/* ═══════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════ */
footer {
    padding: 2rem;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.05);
    color: var(--gray);
    font-size: 0.85rem;
    background: var(--dark);
}

footer .footer-logo {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 3px;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

/* ═══════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════ */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible { opacity: 1; transform: translateY(0); }
.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }

/* PARTICLES */
.particles { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }

.particle {
    position: absolute;
    width: 2px; height: 2px;
    background: var(--cyan);
    border-radius: 50%;
    opacity: 0;
    animation: float 8s ease-in-out infinite;
}

@keyframes float {
    0% { opacity: 0; transform: translateY(100vh) scale(0); }
    10% { opacity: 0.6; }
    90% { opacity: 0.6; }
    100% { opacity: 0; transform: translateY(-10vh) scale(1); }
}

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(10,10,15,0.98);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2rem;
    }
    .nav-links.open { display: flex; }
    .hamburger { display: flex; }

    .hero h1 { font-size: 2.4rem; }
    .services-grid { grid-template-columns: 1fr; }
    .portfolio-grid { grid-template-columns: 1fr; }
    .concept-grid { grid-template-columns: 1fr 1fr; }
    .queue-container { grid-template-columns: 1fr; gap: 2rem; }
    .process-steps { grid-template-columns: 1fr 1fr; }
    section { padding: 4rem 1.5rem; }
    .highlight-band { gap: 1rem; flex-wrap: wrap; }
    .highlight-band span { font-size: 0.9rem; }
}

@media (max-width: 480px) {
    .process-steps { grid-template-columns: 1fr; }
    .stats-bar { grid-template-columns: 1fr 1fr; }
    .concept-grid { grid-template-columns: 1fr; }
}
