/* =========================================
   MODO Digital Agency – Main Stylesheet
   Colors matched to logo: dark bg, red/coral accents, purple flow
   ========================================= */

:root {
    --primary: #8b5cf6;
    --primary-dark: #7c3aed;
    --primary-light: #a78bfa;
    --secondary: #e84545;
    --secondary-light: #ff6b6b;
    --accent: #f72585;
    --dark: #080808;
    --dark-2: #0e0e0e;
    --dark-3: #1a1a1a;
    --gray-900: #1a1a1a;
    --gray-800: #2a2a2a;
    --gray-700: #3a3a3a;
    --gray-600: #6b7280;
    --gray-500: #9ca3af;
    --gray-400: #d1d5db;
    --gray-300: #e5e7eb;
    --gray-200: #f3f4f6;
    --gray-100: #f9fafb;
    --white: #ffffff;
    --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    --gradient-text: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary-light) 100%);
    --gradient-red: linear-gradient(135deg, #e84545 0%, #ff6b6b 100%);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 40px rgba(139, 92, 246, 0.3);
    --shadow-glow-red: 0 0 40px rgba(232, 69, 69, 0.3);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Space Grotesk', 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    background-color: var(--dark);
    color: var(--gray-400);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

::selection {
    background: var(--secondary);
    color: var(--white);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
}

ul { list-style: none; }

/* =========================================
   Animated Background Lines
   ========================================= */
.bg-lines-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bg-lines-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 600%;
}

.bg-flow-line {
    stroke-dasharray: 600 400;
    animation: flowLine 10s linear infinite;
    filter: blur(0.5px);
}

.line-1  { animation-delay: 0s; }
.line-2  { animation-delay: -1.2s; }
.line-3  { animation-delay: -2.4s; }
.line-4  { animation-delay: -0.6s; }
.line-5  { animation-delay: -3.6s; }
.line-6  { animation-delay: -1.8s; }
.line-7  { animation-delay: -4.2s; }
.line-8  { animation-delay: -0.9s; }
.line-9  { animation-delay: -3s; }
.line-10 { animation-delay: -1.5s; }
.line-11 { animation-delay: -4.8s; }
.line-12 { animation-delay: -2.1s; }
.line-13 { animation-delay: -3.3s; }
.line-14 { animation-delay: -0.3s; }
.line-15 { animation-delay: -4.5s; }
.line-16 { animation-delay: -2.7s; }
.line-17 { animation-delay: -1.1s; }
.line-18 { animation-delay: -3.9s; }
.line-19 { animation-delay: -0.7s; }
.line-20 { animation-delay: -2.3s; }
.line-21 { animation-delay: -4.1s; }
.line-22 { animation-delay: -1.7s; }
.line-23 { animation-delay: -3.5s; }
.line-24 { animation-delay: -0.5s; }

@keyframes flowLine {
    0% { stroke-dashoffset: 1000; }
    100% { stroke-dashoffset: 0; }
}

/* =========================================
   Preloader
   ========================================= */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.5s, visibility 0.5s;
}

#preloader.loaded {
    opacity: 0;
    visibility: hidden;
}

.preloader-inner {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.preloader-logo-img {
    width: min(70vw, 380px);
    height: auto;
    margin-bottom: 3rem;
    animation: preloaderPulse 2s ease-in-out infinite;
}

@keyframes preloaderPulse {
    0%, 100% { opacity: 0.6; transform: scale(0.95); }
    50% { opacity: 1; transform: scale(1.02); }
}

.preloader-bar {
    width: 200px;
    height: 3px;
    background: var(--gray-800);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.preloader-progress {
    width: 0%;
    height: 100%;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    animation: preloaderBar 1.5s ease-in-out forwards;
}

@keyframes preloaderBar {
    0% { width: 0%; }
    100% { width: 100%; }
}

/* =========================================
   Custom Cursor
   ========================================= */
.cursor-dot, .cursor-outline {
    display: none;
}

@media (hover: hover) and (pointer: fine) {
    .cursor-dot {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 8px;
        height: 8px;
        background: var(--secondary);
        border-radius: 50%;
        pointer-events: none;
        z-index: 9999;
        transform: translate(-50%, -50%);
        transition: width 0.2s, height 0.2s, background 0.2s;
    }

    .cursor-outline {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 36px;
        height: 36px;
        border: 2px solid rgba(232, 69, 69, 0.4);
        border-radius: 50%;
        pointer-events: none;
        z-index: 9998;
        transform: translate(-50%, -50%);
        transition: width 0.3s, height 0.3s, border-color 0.3s;
    }

    .cursor-hover .cursor-dot {
        width: 12px;
        height: 12px;
        background: var(--primary-light);
    }

    .cursor-hover .cursor-outline {
        width: 50px;
        height: 50px;
        border-color: rgba(139, 92, 246, 0.3);
    }
}

/* =========================================
   Container
   ========================================= */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

/* =========================================
   Navigation
   ========================================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 0.5rem 0;
    background: rgba(8, 8, 8, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(232, 69, 69, 0.08);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
}

.nav-logo-img {
    height: 60px;
    width: auto;
    transition: var(--transition);
}

.navbar.scrolled .nav-logo-img {
    height: 44px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gray-500);
    border-radius: var(--radius-full);
    transition: var(--transition);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--white);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: var(--secondary);
    border-radius: 50%;
}

.nav-cta {
    background: var(--gradient-red);
    color: var(--white) !important;
    padding: 0.6rem 1.6rem !important;
    font-weight: 600;
}

.nav-cta:hover {
    box-shadow: var(--shadow-glow-red);
    transform: translateY(-1px);
}

.nav-cta.active::after {
    display: none;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: var(--transition);
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* =========================================
   Hero
   ========================================= */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 7rem 2rem 4rem;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 50% 20%, rgba(139, 92, 246, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 80% 50%, rgba(232, 69, 69, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse 50% 40% at 20% 80%, rgba(139, 92, 246, 0.04) 0%, transparent 50%);
}

.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(139, 92, 246, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(139, 92, 246, 0.025) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 30%, transparent 80%);
}

/* Concentric Circles – inspired by logo */
.hero-circles {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 900px;
    height: 900px;
    pointer-events: none;
}

.circle {
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 50%;
    border: 1px solid rgba(232, 69, 69, 0.12);
    transform: translate(-50%, -50%);
    animation: circleExpand 8s ease-in-out infinite;
}

.circle-1 {
    width: 120px; height: 120px;
    border-color: rgba(232, 69, 69, 0.25);
    animation-delay: 0s;
}
.circle-2 {
    width: 220px; height: 220px;
    border-color: rgba(232, 69, 69, 0.2);
    animation-delay: -1s;
}
.circle-3 {
    width: 340px; height: 340px;
    border-color: rgba(139, 92, 246, 0.18);
    animation-delay: -2s;
}
.circle-4 {
    width: 480px; height: 480px;
    border-color: rgba(139, 92, 246, 0.12);
    animation-delay: -3s;
}
.circle-5 {
    width: 640px; height: 640px;
    border-color: rgba(232, 69, 69, 0.08);
    animation-delay: -4s;
}
.circle-6 {
    width: 800px; height: 800px;
    border-color: rgba(139, 92, 246, 0.06);
    animation-delay: -5s;
}
.circle-7 {
    width: 950px; height: 950px;
    border-color: rgba(232, 69, 69, 0.04);
    animation-delay: -6s;
}

@keyframes circleExpand {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.06);
        opacity: 0.5;
    }
}

.hero-particles {
    position: absolute;
    inset: 0;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary-light);
    border-radius: 50%;
    opacity: 0;
    animation: particleFloat 6s ease-in-out infinite;
}

@keyframes particleFloat {
    0% { opacity: 0; transform: translateY(100px) scale(0); }
    20% { opacity: 0.6; }
    80% { opacity: 0.3; }
    100% { opacity: 0; transform: translateY(-100px) scale(1); }
}

/* Hero Content – side by side layout */
.hero-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

.hero-main-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-bottom: 4rem;
}

.hero-text-side {
    text-align: left;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.2rem;
    background: rgba(232, 69, 69, 0.08);
    border: 1px solid rgba(232, 69, 69, 0.2);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    color: var(--secondary-light);
    margin-bottom: 2rem;
}

.hero-badge i {
    font-size: 0.75rem;
    color: var(--secondary);
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    color: var(--white);
    line-height: 1.1;
    letter-spacing: -1.5px;
    margin-bottom: 1.5rem;
}

.gradient-text {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--gray-500);
    max-width: 500px;
    margin-bottom: 2.5rem;
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* =========================================
   Code Window Animation
   ========================================= */
.hero-code-side {
    position: relative;
}

.code-window {
    background: #0d1117;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(139, 92, 246, 0.15);
    overflow: hidden;
    box-shadow:
        0 0 60px rgba(139, 92, 246, 0.1),
        0 0 120px rgba(232, 69, 69, 0.05),
        0 20px 60px rgba(0, 0, 0, 0.5);
    position: relative;
}

.code-window::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: var(--radius-lg);
    padding: 1px;
    background: linear-gradient(135deg, rgba(139,92,246,0.3), rgba(232,69,69,0.2), rgba(139,92,246,0.1));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.code-window-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.code-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.code-dot.red { background: #ff5f57; }
.code-dot.yellow { background: #febc2e; }
.code-dot.green { background: #28c840; }

.code-window-title {
    margin-left: 0.8rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--gray-600);
}

.code-body {
    padding: 1.5rem;
    min-height: 320px;
    position: relative;
    overflow: hidden;
}

.code-body pre {
    margin: 0;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    line-height: 1.9;
    white-space: pre;
    color: var(--gray-500);
}

.code-body code {
    font-family: inherit;
}

.code-cursor {
    display: inline-block;
    color: var(--secondary);
    font-family: var(--font-mono);
    font-weight: 400;
    animation: codeCursorBlink 1s step-end infinite;
    position: absolute;
    font-size: 0.9rem;
}

@keyframes codeCursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Syntax highlighting colors */
.code-keyword { color: #c678dd; }
.code-function { color: #61afef; }
.code-string { color: #98c379; }
.code-comment { color: #5c6370; font-style: italic; }
.code-variable { color: #e06c75; }
.code-property { color: #d19a66; }
.code-bracket { color: #abb2bf; }
.code-number { color: #d19a66; }
.code-operator { color: #56b6c2; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.9rem 2rem;
    font-family: var(--font-primary);
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 8px 30px rgba(139, 92, 246, 0.5);
    transform: translateY(-2px);
}

.btn-primary i {
    transition: transform 0.3s;
}

.btn-primary:hover i {
    transform: translateX(4px);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 1px solid var(--gray-700);
}

.btn-outline:hover {
    border-color: var(--secondary);
    background: rgba(232, 69, 69, 0.08);
}

.btn-white {
    background: var(--white);
    color: var(--dark);
    font-weight: 700;
}

.btn-white:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 255, 255, 0.2);
}

.btn-white i {
    transition: transform 0.3s;
}

.btn-white:hover i {
    transform: translateX(4px);
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* Hero Stats */
.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
}

.stat {
    text-align: center;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--white);
}

.stat-plus {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary);
}

.stat-label {
    display: block;
    font-size: 0.85rem;
    color: var(--gray-600);
    margin-top: 0.3rem;
}

.stat-divider {
    width: 1px;
    height: 50px;
    background: var(--gray-800);
}

/* Scroll Indicator */
.hero-scroll {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-600);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: var(--gray-700);
    position: relative;
    overflow: hidden;
}

.scroll-line::after {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
    0% { top: -100%; }
    100% { top: 100%; }
}

/* =========================================
   Sections
   ========================================= */
.section {
    padding: 7rem 0;
    position: relative;
    z-index: 1;
}

.section-grid {
    display: grid;
    gap: 4rem;
    align-items: center;
}

.section-grid.two-col {
    grid-template-columns: 1fr 1fr;
}

.section-header {
    margin-bottom: 4rem;
}

.section-header.center {
    text-align: center;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.section-tag {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(232, 69, 69, 0.08);
    border: 1px solid rgba(232, 69, 69, 0.15);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--secondary-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: var(--white);
    line-height: 1.2;
    letter-spacing: -1px;
    margin-bottom: 1.2rem;
}

.section-text {
    font-size: 1.05rem;
    color: var(--gray-500);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.section-desc {
    font-size: 1.05rem;
    color: var(--gray-500);
    line-height: 1.8;
}

/* =========================================
   Chi Siamo
   ========================================= */
.about-features {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
}

.about-feature {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.2rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.about-feature:hover {
    background: rgba(232, 69, 69, 0.04);
    border-color: rgba(232, 69, 69, 0.12);
}

.feature-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: var(--radius-sm);
    color: var(--white);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.about-feature h4 {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--white);
    margin-bottom: 0.3rem;
    font-size: 1rem;
}

.about-feature p {
    font-size: 0.9rem;
    color: var(--gray-500);
    line-height: 1.5;
}

.about-visual {
    position: relative;
}

.about-image-wrapper {
    position: relative;
}

.about-image {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 4/5;
    max-height: 550px;
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(232, 69, 69, 0.1);
}

.about-float-card {
    position: absolute;
    bottom: -1.5rem;
    right: -1.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 1.5rem;
    background: var(--dark-2);
    border: 1px solid rgba(232, 69, 69, 0.15);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    animation: floatCard 4s ease-in-out infinite;
}

@keyframes floatCard {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.float-card-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-red);
    border-radius: var(--radius-sm);
    color: var(--white);
}

.about-float-card strong {
    display: block;
    color: var(--white);
    font-family: var(--font-heading);
    font-size: 1rem;
}

.about-float-card span {
    font-size: 0.8rem;
    color: var(--gray-500);
}

/* =========================================
   Servizi
   ========================================= */
.servizi {
    background: var(--dark-2);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.service-card {
    position: relative;
    padding: 2.5rem 2rem;
    background: var(--dark);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    transition: var(--transition);
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-4px);
    border-color: rgba(232, 69, 69, 0.15);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.service-card:hover::before {
    opacity: 1;
}

.service-card.featured {
    border-color: rgba(232, 69, 69, 0.2);
    background: linear-gradient(135deg, rgba(232, 69, 69, 0.04) 0%, var(--dark) 100%);
}

.service-card.featured::before {
    opacity: 1;
}

.service-badge {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    padding: 0.3rem 0.8rem;
    background: var(--gradient-red);
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.service-icon {
    width: 56px;
    height: 56px;
    margin-bottom: 1.5rem;
    color: var(--primary-light);
    transition: var(--transition);
}

.service-card:hover .service-icon {
    color: var(--secondary);
    transform: scale(1.1);
}

.service-icon svg {
    width: 100%;
    height: 100%;
}

.service-card h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.8rem;
}

.service-card > p {
    font-size: 0.95rem;
    color: var(--gray-500);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.service-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.service-features li {
    padding: 0.3rem 0.8rem;
    background: rgba(139, 92, 246, 0.06);
    border: 1px solid rgba(139, 92, 246, 0.1);
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    color: var(--gray-400);
}

.service-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--secondary-light);
}

.service-link:hover {
    color: var(--primary-light);
}

.service-link i {
    font-size: 0.8rem;
    transition: transform 0.3s;
}

.service-link:hover i {
    transform: translateX(4px);
}

/* =========================================
   Processo
   ========================================= */
.process-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: 1rem;
}

.process-step {
    position: relative;
    text-align: center;
    padding: 2rem 1.5rem;
}

.process-number {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 800;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0.3;
    margin-bottom: 1rem;
    line-height: 1;
}

.process-content h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.8rem;
}

.process-content p {
    font-size: 0.9rem;
    color: var(--gray-500);
    line-height: 1.7;
}

.process-line {
    display: none;
}

.process-step:not(:last-child) .process-line {
    display: block;
    position: absolute;
    top: 3rem;
    right: -1rem;
    width: 2rem;
    height: 2px;
    background: linear-gradient(90deg, var(--secondary), transparent);
    opacity: 0.3;
}

/* =========================================
   Portfolio
   ========================================= */
.portfolio-filters {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1.3rem;
    background: transparent;
    border: 1px solid var(--gray-800);
    border-radius: var(--radius-full);
    font-family: var(--font-primary);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gray-500);
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover {
    border-color: var(--secondary);
    color: var(--white);
}

.filter-btn.active {
    background: var(--gradient-primary);
    border-color: transparent;
    color: var(--white);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.portfolio-item {
    opacity: 1;
    transition: var(--transition-slow);
}

.portfolio-item.hidden {
    opacity: 0;
    pointer-events: none;
    position: absolute;
    visibility: hidden;
}

.portfolio-item.large {
    grid-column: span 2;
}

.portfolio-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    height: 100%;
}

.portfolio-image {
    width: 100%;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-card:hover .portfolio-image img {
    transform: scale(1.08);
}

.portfolio-item.large .portfolio-image {
    height: 350px;
}

.portfolio-placeholder {
    font-size: 3.5rem;
    color: rgba(255, 255, 255, 0.3);
}

.portfolio-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 30%, rgba(8, 8, 8, 0.95) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    opacity: 0;
    transition: var(--transition);
}

.portfolio-card:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-card:hover .portfolio-image {
    transform: scale(1.05);
}

.portfolio-category {
    display: inline-block;
    padding: 0.3rem 0.7rem;
    background: var(--gradient-red);
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.8rem;
    width: fit-content;
}

.portfolio-overlay h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.portfolio-overlay p {
    font-size: 0.9rem;
    color: var(--gray-400);
    line-height: 1.5;
}

.portfolio-link {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border-radius: 50%;
    color: var(--dark);
    transform: translateY(10px);
    opacity: 0;
    transition: var(--transition);
}

.portfolio-card:hover .portfolio-link {
    transform: translateY(0);
    opacity: 1;
}

.portfolio-link:hover {
    background: var(--secondary);
    color: var(--white);
}

/* =========================================
   Testimonianze
   ========================================= */
.testimonianze {
    background: var(--dark-2);
}

.testimonials-slider {
    position: relative;
    overflow: hidden;
}

.testimonials-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.testimonial-card {
    min-width: 100%;
    padding: 3rem;
    background: var(--dark);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-xl);
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .testimonial-card {
        min-width: calc(50% - 1rem);
        margin: 0 0.5rem;
    }
}

.testimonial-stars {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    margin-bottom: 1.5rem;
    color: #fbbf24;
    font-size: 1rem;
}

.testimonial-card blockquote {
    font-size: 1.1rem;
    color: var(--gray-300);
    line-height: 1.8;
    font-style: italic;
    margin-bottom: 2rem;
    position: relative;
}

.testimonial-card blockquote::before {
    content: '\201C';
    font-size: 4rem;
    color: var(--secondary);
    opacity: 0.3;
    line-height: 0;
    position: relative;
    top: 1.5rem;
    margin-right: 0.3rem;
    font-family: Georgia, serif;
}

.testimonial-author {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.author-avatar {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-red);
    border-radius: 50%;
    color: var(--white);
    font-size: 1.2rem;
}

.author-info {
    text-align: left;
}

.author-info strong {
    display: block;
    color: var(--white);
    font-family: var(--font-heading);
    font-size: 1rem;
}

.author-info span {
    font-size: 0.85rem;
    color: var(--gray-500);
}

.testimonials-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2.5rem;
}

.testimonial-prev,
.testimonial-next {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--dark);
    border: 1px solid var(--gray-800);
    border-radius: 50%;
    color: var(--white);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}

.testimonial-prev:hover,
.testimonial-next:hover {
    background: var(--secondary);
    border-color: var(--secondary);
}

.testimonials-dots {
    display: flex;
    gap: 0.5rem;
}

.testimonial-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--gray-700);
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.testimonial-dot.active {
    background: var(--secondary);
    width: 30px;
    border-radius: var(--radius-full);
}

/* =========================================
   CTA Section
   ========================================= */
.cta-section {
    padding: 3rem 0;
}

.cta-card {
    position: relative;
    padding: 5rem 3rem;
    background: var(--gradient-primary);
    border-radius: var(--radius-xl);
    overflow: hidden;
    text-align: center;
}

.cta-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.cta-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.15;
}

.cta-shape-1 {
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.1);
    top: -150px;
    right: -100px;
}

.cta-shape-2 {
    width: 250px;
    height: 250px;
    background: rgba(255, 255, 255, 0.08);
    bottom: -80px;
    left: -50px;
}

.cta-shape-3 {
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.06);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.cta-content {
    position: relative;
    z-index: 1;
    max-width: 600px;
    margin: 0 auto;
}

.cta-content h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    color: var(--white);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.cta-content p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 2rem;
    line-height: 1.7;
}

/* =========================================
   Contatti
   ========================================= */
.contact-info {
    padding-right: 2rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.contact-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(232, 69, 69, 0.08);
    border: 1px solid rgba(232, 69, 69, 0.15);
    border-radius: var(--radius-sm);
    color: var(--secondary);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.contact-item strong {
    display: block;
    color: var(--white);
    font-family: var(--font-heading);
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
}

.contact-item p {
    font-size: 0.9rem;
    color: var(--gray-500);
    line-height: 1.5;
}

.contact-social {
    display: flex;
    gap: 0.8rem;
}

.social-link {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    color: var(--gray-400);
    font-size: 1rem;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--gradient-red);
    border-color: transparent;
    color: var(--white);
    transform: translateY(-2px);
}

/* Contact Form */
.contact-form-wrapper {
    padding: 2.5rem;
    background: var(--dark-2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-xl);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-300);
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    background: var(--dark);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    font-family: var(--font-primary);
    font-size: 0.95rem;
    color: var(--white);
    transition: var(--transition);
    outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--gray-600);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(232, 69, 69, 0.1);
}

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%239ca3af' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
    cursor: pointer;
}

.form-group select option {
    background: var(--dark);
    color: var(--white);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-privacy {
    margin-bottom: 1.5rem;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--gray-500);
    line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--gray-700);
    border-radius: 4px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    margin-top: 2px;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: var(--gradient-red);
    border-color: transparent;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '\2713';
    color: var(--white);
    font-size: 0.7rem;
    font-weight: 700;
}

.checkbox-label a {
    color: var(--secondary-light);
}

.checkbox-label a:hover {
    text-decoration: underline;
}

/* =========================================
   Footer
   ========================================= */
.footer {
    padding: 5rem 0 0;
    background: var(--dark-2);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    z-index: 1;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 3rem;
    padding-bottom: 3rem;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    margin-bottom: 1rem;
}

.footer-logo-img {
    height: 70px;
    width: auto;
}

.footer-brand p {
    font-size: 0.95rem;
    color: var(--gray-500);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.footer-social {
    display: flex;
    gap: 0.6rem;
}

.footer-social a {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    color: var(--gray-500);
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--gradient-red);
    color: var(--white);
}

.footer-links h4,
.footer-contact h4 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 1.2rem;
}

.footer-links ul li {
    margin-bottom: 0.7rem;
}

.footer-links ul li a {
    font-size: 0.9rem;
    color: var(--gray-500);
    transition: var(--transition);
}

.footer-links ul li a:hover {
    color: var(--secondary-light);
    padding-left: 5px;
}

.footer-contact p {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.9rem;
    color: var(--gray-500);
    margin-bottom: 0.8rem;
}

.footer-contact p i {
    color: var(--secondary);
    margin-top: 3px;
    flex-shrink: 0;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.85rem;
    color: var(--gray-600);
}

.footer-legal {
    display: flex;
    gap: 1.5rem;
}

.footer-legal a {
    color: var(--gray-600);
}

.footer-legal a:hover {
    color: var(--secondary-light);
}

/* =========================================
   Back to Top
   ========================================= */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-red);
    border: none;
    border-radius: 50%;
    color: var(--white);
    font-size: 1rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition);
    z-index: 999;
    box-shadow: 0 4px 20px rgba(232, 69, 69, 0.4);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(232, 69, 69, 0.5);
}

/* =========================================
   Animations
   ========================================= */
[data-animate] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-animate="fade-left"] {
    transform: translateX(40px);
}

[data-animate].animated {
    opacity: 1;
    transform: translate(0);
}

/* =========================================
   Responsive
   ========================================= */
@media (max-width: 1024px) {
    .hero-main-layout {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .hero-text-side {
        text-align: center;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-code-side {
        max-width: 550px;
        margin: 0 auto;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .process-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .process-step:not(:last-child) .process-line {
        display: none;
    }

    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .portfolio-item.large {
        grid-column: span 1;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .hero-circles {
        width: 600px;
        height: 600px;
    }
}

@media (max-width: 768px) {
    .bg-lines-container {
        display: none;
    }

    .hero-circles {
        display: none;
    }

    .hero-particles {
        display: none;
    }

    .about-float-card {
        animation: none;
    }

    .hero-grid {
        display: none;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 360px;
        height: 100vh;
        background: var(--dark-2);
        flex-direction: column;
        align-items: flex-start;
        padding: 6rem 2rem 2rem;
        gap: 0.5rem;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        border-left: 1px solid rgba(232, 69, 69, 0.1);
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-link {
        font-size: 1.1rem;
        padding: 0.8rem 1rem;
        width: 100%;
    }

    .nav-cta {
        margin-top: 1rem;
        text-align: center;
    }

    .nav-toggle {
        display: flex;
    }

    .section-grid.two-col {
        grid-template-columns: 1fr;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }

    .stat-divider {
        width: 50px;
        height: 1px;
    }

    .hero-title {
        font-size: clamp(2rem, 8vw, 3rem);
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .process-grid {
        grid-template-columns: 1fr;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .about-float-card {
        right: 0;
        bottom: -1rem;
    }

    .contact-info {
        padding-right: 0;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .cta-card {
        padding: 3rem 1.5rem;
    }

    .testimonial-card {
        padding: 2rem 1.5rem;
        min-width: 100%;
    }

    .about-visual {
        order: -1;
    }

    .about-image {
        max-height: 350px;
    }

    .hero-circles {
        width: 400px;
        height: 400px;
    }

    .hero-code-side {
        display: none;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1.2rem;
    }

    .hero {
        padding: 6rem 1.2rem 3rem;
    }

    .section {
        padding: 4rem 0;
    }

    .hero-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .contact-form-wrapper {
        padding: 1.5rem;
    }

    .hero-circles {
        width: 300px;
        height: 300px;
    }
}
