/* ===== VARIABILI CSS ===== */
:root {
    /* Colori principali basati sul logo */
    --primary-blue: #1a2942;
    --primary-cyan: #00d4ff;
    --secondary-cyan: #5ae4ff;
    --accent-blue: #0066cc;
    
    /* Gradiente principale */
    --gradient-primary: linear-gradient(135deg, #00d4ff 0%, #5ae4ff 50%, #0066cc 100%);
    --gradient-dark: linear-gradient(135deg, #1a2942 0%, #2c4a6b 100%);
    --gradient-hover: linear-gradient(135deg, #00b8e6 0%, #4dd0ff 50%, #0052a3 100%);
    
    /* Colori neutri */
    --white: #ffffff;
    --black: #000000;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', Monaco, 'Cascadia Code', monospace;
    
    /* Font sizes */
    --fs-xs: 0.75rem;    /* 12px */
    --fs-sm: 0.875rem;   /* 14px */
    --fs-base: 1rem;     /* 16px */
    --fs-lg: 1.125rem;   /* 18px */
    --fs-xl: 1.25rem;    /* 20px */
    --fs-2xl: 1.5rem;    /* 24px */
    --fs-3xl: 1.875rem;  /* 30px */
    --fs-4xl: 2.25rem;   /* 36px */
    --fs-5xl: 3rem;      /* 48px */
    --fs-6xl: 3.75rem;   /* 60px */
    --fs-7xl: 4.5rem;    /* 72px */
    
    /* Font weights */
    --fw-light: 300;
    --fw-normal: 400;
    --fw-medium: 500;
    --fw-semibold: 600;
    --fw-bold: 700;
    --fw-extrabold: 800;
    
    /* Spacing */
    --space-1: 0.25rem;   /* 4px */
    --space-2: 0.5rem;    /* 8px */
    --space-3: 0.75rem;   /* 12px */
    --space-4: 1rem;      /* 16px */
    --space-5: 1.25rem;   /* 20px */
    --space-6: 1.5rem;    /* 24px */
    --space-8: 2rem;      /* 32px */
    --space-10: 2.5rem;   /* 40px */
    --space-12: 3rem;     /* 48px */
    --space-16: 4rem;     /* 64px */
    --space-20: 5rem;     /* 80px */
    --space-24: 6rem;     /* 96px */
    --space-32: 8rem;     /* 128px */
    
    /* Border radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-glow: 0 0 20px rgba(0, 212, 255, 0.3);
    
    /* Transitions */
    --transition-fast: 150ms ease-out;
    --transition-base: 250ms ease-out;
    --transition-slow: 350ms ease-out;
    
    /* Z-index layers */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
    --z-toast: 1080;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-primary);
    font-size: var(--fs-base);
    font-weight: var(--fw-normal);
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: var(--fw-bold);
    line-height: 1.2;
    margin-bottom: var(--space-4);
    color: var(--gray-900);
}

h1 { font-size: var(--fs-6xl); }
h2 { font-size: var(--fs-4xl); }
h3 { font-size: var(--fs-3xl); }
h4 { font-size: var(--fs-2xl); }
h5 { font-size: var(--fs-xl); }
h6 { font-size: var(--fs-lg); }

p {
    margin-bottom: var(--space-4);
    line-height: 1.7;
}

a {
    color: var(--primary-cyan);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-blue);
}

/* ===== UTILITY CLASSES ===== */
.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.font-mono { font-family: var(--font-mono); }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===== CONTAINER ===== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

@media (max-width: 768px) {
    .container {
        padding: 0 var(--space-4);
    }
}

/* ===== SEZIONI ===== */
section {
    padding: var(--space-24) 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-16);
}

.section-title {
    font-size: var(--fs-4xl);
    font-weight: var(--fw-extrabold);
    margin-bottom: var(--space-4);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -var(--space-3);
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
}

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

/* ===== NAVIGATION - REINVENTED ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-fixed);
    padding: var(--space-6) var(--space-6);
    background: linear-gradient(135deg, 
        rgba(26, 41, 66, 0.95) 0%, 
        rgba(44, 74, 107, 0.90) 50%, 
        rgba(26, 41, 66, 0.95) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(0, 212, 255, 0.2);
    box-shadow: 0 4px 30px rgba(26, 41, 66, 0.3);
    transition: all var(--transition-base);
    pointer-events: none;
}

.navbar * {
    pointer-events: auto;
}

.navbar.scrolled {
    background: linear-gradient(135deg, 
        rgba(26, 41, 66, 0.98) 0%, 
        rgba(44, 74, 107, 0.95) 50%, 
        rgba(26, 41, 66, 0.98) 100%);
    box-shadow: 0 8px 40px rgba(26, 41, 66, 0.4);
    border-bottom-color: rgba(0, 212, 255, 0.3);
}

/* ===== FLOATING CONTAINER ===== */
.nav-floating-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    gap: var(--space-8);
}

/* ===== BRAND CAPSULE ===== */
.nav-brand-capsule {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-5);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: var(--radius-full);
    position: relative;
    transition: all var(--transition-base);
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.nav-brand-capsule:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(0, 212, 255, 0.5);
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.3);
}

.brand-glow {
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    opacity: 0;
    z-index: -1;
    transition: opacity var(--transition-base);
}

.nav-brand-capsule:hover .brand-glow {
    opacity: 0.3;
    animation: pulse 2s infinite;
}

.nav-brand-capsule .logo {
    height: 40px;
    width: auto;
    filter: drop-shadow(0 2px 8px rgba(0, 212, 255, 0.3));
}

.brand-info {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.brand-name {
    font-size: var(--fs-lg);
    font-weight: var(--fw-extrabold);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.01em;
}

.brand-subtitle {
    font-size: var(--fs-xs);
    color: rgba(255, 255, 255, 0.8);
    font-weight: var(--fw-medium);
    letter-spacing: 0.15em;
    margin-top: 2px;
}

/* ===== MENU HUB ===== */
.nav-menu-hub {
    position: relative;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(25px) saturate(200%);
    border: 1px solid rgba(0, 212, 255, 0.25);
    border-radius: var(--radius-2xl);
    padding: var(--space-2);
    transition: all var(--transition-base);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.nav-menu-hub:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(0, 212, 255, 0.4);
    box-shadow: 0 8px 30px rgba(0, 212, 255, 0.2);
}

.hub-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: conic-gradient(from 0deg, transparent, rgba(0, 212, 255, 0.1), transparent, rgba(90, 228, 255, 0.1), transparent);
    border-radius: var(--radius-2xl);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.nav-menu-hub:hover .hub-background {
    opacity: 1;
    animation: spin 8s linear infinite;
}

.nav-items {
    display: flex;
    gap: var(--space-1);
    position: relative;
    z-index: 2;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-lg);
    text-decoration: none;
    font-weight: var(--fw-medium);
    font-size: var(--fs-sm);
    color: rgba(255, 255, 255, 0.8);
    position: relative;
    transition: all var(--transition-base);
    overflow: hidden;
}

.nav-item:hover {
    color: var(--white);
    background: rgba(0, 212, 255, 0.1);
    transform: translateY(-1px);
}

.nav-item.active {
    color: var(--white);
    background: rgba(0, 212, 255, 0.2);
    font-weight: var(--fw-semibold);
}

.item-icon {
    font-size: var(--fs-base);
    opacity: 0.9;
    filter: drop-shadow(0 0 4px rgba(0, 212, 255, 0.5));
}

.item-text {
    transition: all var(--transition-base);
}

.item-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0;
    border-radius: var(--radius-lg);
    transition: opacity var(--transition-base);
    z-index: -1;
}

.nav-item:hover .item-glow,
.nav-item.active .item-glow {
    opacity: 0.1;
}

/* ===== CTA ORB ===== */
.nav-cta-orb {
    position: relative;
}

.cta-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    text-decoration: none;
    color: var(--white);
    font-weight: var(--fw-semibold);
    font-size: var(--fs-sm);
    position: relative;
    overflow: hidden;
    transition: all var(--transition-base);
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.3);
}

.cta-button:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 30px rgba(0, 212, 255, 0.5);
    color: var(--white);
}

.orb-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
}

.cta-button:hover .orb-core {
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%) scale(1.1);
}

.orb-ring {
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 2px solid transparent;
    border-radius: var(--radius-full);
    background: conic-gradient(from 0deg, var(--primary-cyan), var(--secondary-cyan), var(--primary-cyan));
    background-clip: border-box;
    mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    mask-composite: xor;
    animation: spin 4s linear infinite;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.cta-button:hover .orb-ring {
    opacity: 0.8;
}

.orb-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.3) 0%, transparent 70%);
    border-radius: var(--radius-full);
    animation: pulse 3s infinite;
    opacity: 0;
}

.cta-button:hover .orb-pulse {
    opacity: 1;
}

.cta-text {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    position: relative;
    z-index: 2;
}

/* ===== MOBILE TOGGLE ===== */
.nav-mobile-toggle {
    display: none;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: var(--radius-lg);
    padding: var(--space-3);
    transition: all var(--transition-base);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.nav-mobile-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(0, 212, 255, 0.5);
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.2);
}

.toggle-core {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.toggle-line {
    width: 24px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toggle-label {
    font-size: var(--fs-xs);
    color: rgba(255, 255, 255, 0.8);
    font-weight: var(--fw-medium);
    letter-spacing: 0.1em;
    margin-top: var(--space-1);
}

.nav-mobile-toggle.active .toggle-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.nav-mobile-toggle.active .toggle-line:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px);
}

.nav-mobile-toggle.active .toggle-line:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

/* ===== PROGRESS INDICATOR ===== */
.nav-progress-indicator {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
}

.progress-track {
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    width: 0%;
    transition: width var(--transition-fast);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

/* ===== MOBILE OVERLAY ===== */
.nav-mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(26, 41, 66, 0.95), rgba(44, 74, 107, 0.95));
    backdrop-filter: blur(20px);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
    z-index: var(--z-modal);
    pointer-events: none;
}

.nav-mobile-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.mobile-menu-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: var(--space-8) var(--space-6);
}

.mobile-menu-header {
    margin-bottom: var(--space-8);
}

.mobile-brand {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    color: var(--white);
}

.mobile-brand img {
    height: 50px;
    filter: drop-shadow(0 2px 8px rgba(0, 212, 255, 0.3));
}

.mobile-brand span {
    font-size: var(--fs-xl);
    font-weight: var(--fw-extrabold);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mobile-menu-items {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.mobile-item {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-5) var(--space-6);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 212, 255, 0.1);
    border-radius: var(--radius-xl);
    color: var(--white);
    text-decoration: none;
    font-weight: var(--fw-medium);
    font-size: var(--fs-lg);
    transition: all var(--transition-base);
}

.mobile-item:hover {
    background: rgba(0, 212, 255, 0.1);
    border-color: rgba(0, 212, 255, 0.3);
    transform: translateX(10px);
    color: var(--white);
}

.mobile-icon {
    font-size: var(--fs-xl);
    opacity: 0.9;
}

.mobile-text {
    flex: 1;
}

.mobile-arrow {
    font-size: var(--fs-lg);
    opacity: 0.6;
    transition: all var(--transition-base);
}

.mobile-item:hover .mobile-arrow {
    opacity: 1;
    transform: translateX(5px);
}

.mobile-cta {
    margin-top: var(--space-8);
}

.mobile-cta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    width: 100%;
    padding: var(--space-5);
    background: var(--gradient-primary);
    color: var(--white);
    text-decoration: none;
    font-weight: var(--fw-semibold);
    font-size: var(--fs-lg);
    border-radius: var(--radius-xl);
    transition: all var(--transition-base);
    box-shadow: 0 8px 30px rgba(0, 212, 255, 0.3);
}

.mobile-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 212, 255, 0.4);
    color: var(--white);
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    border: 2px solid transparent;
    border-radius: var(--radius-lg);
    font-weight: var(--fw-semibold);
    font-size: var(--fs-base);
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: var(--shadow-lg);
}

.btn-primary:hover {
    background: var(--gradient-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
    color: var(--white);
}

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

.btn-outline:hover {
    background: var(--primary-cyan);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
    .nav-menu-hub {
        display: none;
    }
    
    .nav-mobile-toggle {
        display: flex;
    }
    
    .nav-cta-orb {
        display: none;
    }
}

@media (max-width: 768px) {
    :root {
        --fs-6xl: 2.5rem;
        --fs-4xl: 1.875rem;
        --fs-3xl: 1.5rem;
        --space-24: 4rem;
        --space-16: 3rem;
    }
    
    .navbar {
        padding: var(--space-4) var(--space-4);
    }
    
    .nav-floating-container {
        gap: var(--space-4);
    }
    
    .nav-brand-capsule {
        padding: var(--space-2) var(--space-4);
    }
    
    .nav-brand-capsule .logo {
        height: 35px;
    }
    
    .brand-name {
        font-size: var(--fs-base);
    }
    
    .brand-subtitle {
        font-size: 0.7rem;
        letter-spacing: 0.1em;
    }
    
    .nav-mobile-toggle {
        padding: var(--space-2);
    }
    
    .toggle-line {
        width: 20px;
        height: 2px;
    }
    
    .toggle-label {
        font-size: 0.65rem;
    }
    
    .section-header {
        margin-bottom: var(--space-12);
    }
    
    .container {
        padding: 0 var(--space-4);
    }
}

/* ===== SCROLLBAR PERSONALIZZATO ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gradient-hover);
}

/* ===== SELEZIONE TESTO ===== */
::selection {
    background: var(--primary-cyan);
    color: var(--white);
}

::-moz-selection {
    background: var(--primary-cyan);
    color: var(--white);
} 