@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter/InterVariable.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

/* Eliminiamo il cursore di default SOLTANTO sui dispositivi desktop (con mouse vero) */
        @media (hover: hover) and (pointer: fine) {
            body.cursor-ready, body.cursor-ready * {
                cursor: none !important;
            }
        }

        body {
            font-family: 'Inter', sans-serif;
            background-color: #000000;
            color: #ffffff;
            overflow-x: hidden;
            margin: 0;
            padding: 0;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
        }

        /* ----- CUSTOM DRONE CURSOR ----- */
        #custom-cursor {
            position: fixed;
            top: 0;
            left: 0;
            width: 50px;
            height: 50px;
            pointer-events: none;
            z-index: 99999;
            will-change: transform;
            /* Nascondiamo di default (sarà attivato dallo JS solo su desktop) */
            opacity: 0;
            display: none;
        }

        /* Mostriamo il custom cursor in formato blocco solo se siamo su device non touch */
        @media (hover: hover) and (pointer: fine) {
            #custom-cursor {
                display: block;
            }
        }

        #drone-svg {
            width: 100%;
            height: 100%;
            filter: drop-shadow(0px 8px 12px rgba(0, 0, 0, 0.8));
            transition: filter 0.3s ease;
        }

        /* Colori e transizioni SVG */
        #drone-svg path,
        #drone-svg rect,
        #drone-svg ellipse,
        #drone-svg circle {
            transition: fill 0.3s ease, stroke 0.3s ease;
        }

        /* Eliche */
        .propeller {
            fill: rgba(255, 255, 255, 0.85);
        }

        .prop-left {
            transform-origin: 18px 23px;
        }

        .prop-right {
            transform-origin: 82px 23px;
        }

        @keyframes spin-prop {
            0% {
                transform: rotateY(0deg);
            }

            100% {
                transform: rotateY(360deg);
            }
        }

        /* Drone a riposo: animazione molto lenta */
        .prop-idle {
            animation: spin-prop 1.5s linear infinite;
        }

        /* Drone in azione (hover): rotazione frenetica per sfocatura da movimento */
        .prop-fast {
            animation: spin-prop 0.05s linear infinite;
        }

        /* Effetto scia / glow durante l'hover */
        .drone-hovered {
            filter: drop-shadow(0px 0px 15px rgba(0, 102, 255, 0.9)) !important;
        }

        .drone-hovered [fill="white"] {
            fill: #0066FF !important;
        }

        .drone-hovered [stroke="white"] {
            stroke: #0066FF !important;
        }

        .drone-hovered .propeller {
            fill: rgba(255, 255, 255, 0.95) !important;
        }

        .drone-hovered .cam-lens {
            fill: white !important;
        }

        /* Video Background */
        .video-bg-container {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100vh;
            overflow: hidden;
            z-index: -1;
            background-color: #000;
        }

        .video-bg {
            width: 100%;
            height: 100%;
            object-fit: cover;
            opacity: 1;
            filter: brightness(1.1);
            /* Leggero boost di luce globale */
        }

        .card-media {
            filter: brightness(1.15) contrast(1.05);
            /* Rende i video DJI più brillanti e nitidi */
        }

        .glow-btn {
            box-shadow: 0 0 0 rgba(0, 102, 255, 0);
        }

        .glow-btn:hover {
            box-shadow: 0 0 25px rgba(0, 102, 255, 0.4);
            background-color: #1a75ff;
        }

        .glow-card {
            transition: border-color 0.4s ease, box-shadow 0.4s ease, transform 0.4s ease;
        }

        .glow-card:hover {
            border-color: rgba(0, 102, 255, 0.6);
            box-shadow: 0 10px 40px rgba(0, 102, 255, 0.1);
            transform: translateY(-5px);
        }

        /* Initial states for GSAP animations to prevent FOUC */
        .hero-anim,
        .scroll-anim {
            opacity: 0;
            visibility: hidden;
        }

        /* Prevent navbar FOUC */
        nav {
            opacity: 0;
            visibility: hidden;
            transform: translateY(-50px);
        }

        /* Utility for transparent borders */
        .border-subtle {
            border-color: rgba(255, 255, 255, 0.08);
        }

        /* Custom scrollbar */
        ::-webkit-scrollbar {
            width: 8px;
        }

        ::-webkit-scrollbar-track {
            background: #000;
        }

        ::-webkit-scrollbar-thumb {
            background: #1a1a1a;
            border-radius: 10px;
        }

        ::-webkit-scrollbar-thumb:hover {
            background: #333;
        }
    
a:focus-visible, button:focus-visible { outline: 3px solid #80b3ff; outline-offset: 5px; }
html { scroll-padding-top: 110px; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto !important; }
    .prop-idle, .prop-fast { animation: none; }
    .glow-card:hover { transform: none; }
}



/* Responsive spacing: retain desktop service-card geometry and media assets. */
.home-hero .hero-copy { margin-top: 2rem; }
.home-hero h1 { font-size: clamp(3rem, 4vw, 3.75rem); line-height: 1.08; margin-bottom: 1.5rem; }
.home-hero .hero-copy > p { margin-bottom: 2rem; }
.home-hero .video-bg-container { height: 100%; }
.home-hero .hero-shade { background: linear-gradient(to bottom, rgba(0,0,0,.24), rgba(0,0,0,.38) 55%, #000); }
#contatti { scroll-margin-top: 11px; }
/* Allow the contact anchor to reach the header even on tall desktop viewports. */
@media (min-width: 1024px) {
    #collaborazioni { min-height: calc(100svh - 1.5rem); }
}
@media (max-width: 767px) {
    main .home-section, #servizi, main .service-section { padding-top: 3.5rem; padding-bottom: 3.5rem; }
    .home-section h2, #servizi > div > div:first-child, .service-section h2 { margin-bottom: 1.5rem; }
    .home-section .space-y-6 > :not([hidden]) ~ :not([hidden]) { margin-top: 1rem; }
    .home-section .text-lg { font-size: 1rem; }
    .home-section ol { gap: 1rem; }
    .home-section ol li, .service-section .glow-card { padding: 1.5rem; }
    .home-section ol h3, .service-section article h3 { margin-bottom: .75rem; }
    #servizi .home-services-grid { gap: 1.25rem; }
    #servizi .service-card { min-height: 0; height: auto; }
    #servizi .home-services-grid > .h-full { height: auto; }
    .service-card .service-card-media { position: relative; flex: none; width: 100%; aspect-ratio: 8 / 3; }
    .service-card .service-card-media > video { position: absolute; inset: 0; width: 100%; height: 100%; }
    .service-card .service-card-content { padding: 1.25rem; }
    .service-card .service-card-content h3 { font-size: 1.125rem; line-height: 1.25; margin-bottom: .625rem; }
    .service-card .service-card-content > p { line-height: 1.5; margin-bottom: 1rem; }
    .service-card ul > :not([hidden]) ~ :not([hidden]) { margin-top: .5rem; }
    .custom-service > .glow-card > div:first-child { height: 10rem; }
    .custom-service > .glow-card > div:last-child { padding: 1.5rem; }
    .custom-service h3 { margin-bottom: 1rem; }
    .custom-service p { font-size: 1rem; margin-bottom: 0; }
    main .home-hero { min-height: 100svh; padding: 7rem 1.25rem 5rem; }
    .home-hero .hero-copy { margin-top: 0; padding: 0; }
    .home-hero h1 { font-size: 2rem; line-height: 1.12; margin-bottom: 1.5rem; }
    .home-hero .hero-copy > p { font-size: 1rem; line-height: 1.5; padding: 0; margin-bottom: 1.5rem; }
    .home-hero .hero-copy > div { padding-top: 0; gap: .75rem; }
    .home-hero .hero-copy a { min-height: 3rem; padding: .875rem 1.25rem; width: 100%; max-width: 20rem; }
    .home-hero > div:last-child { bottom: 1.5rem; }
    #collaborazioni { padding-top: 3.5rem; padding-bottom: 2rem; }
    #contatti > div:first-child { gap: 1.5rem; margin-bottom: 2rem; }
    #contatti > div:first-child > div:first-child h2 { margin-bottom: 1rem; }
    #contatti > div:first-child > div:first-child p { margin-bottom: 0; font-size: 1rem; }
    #contatti .rounded-2xl { padding: 1.5rem; }
    #contatti .rounded-2xl h2 { font-size: 1.75rem; margin-bottom: 1rem; }
    #contatti .rounded-2xl .text-lg { font-size: 1rem; }
    #contatti .rounded-2xl .mb-8 { margin-bottom: 1.5rem; }
    #contatti .rounded-2xl .mb-6 { margin-bottom: 1.25rem; }
    #contatti .space-y-6 > :not([hidden]) ~ :not([hidden]) { margin-top: 1.25rem; }
    #contatti .w-12 { width: 2.5rem; height: 2.5rem; margin-right: .75rem; }
    #contatti .text-xl { font-size: 1.125rem; }
    #contatti .truncate { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
    #contatti a[href^="mailto:"], #contatti a[href^="tel:"] { min-height: 2.75rem; display: inline-flex; align-items: center; }
    #contatti > div:last-child { padding-top: 1.5rem; }
    main .service-hero { min-height: 0; padding-top: 7.5rem; padding-bottom: 3.5rem; }
    .service-hero h1 { font-size: 2rem; line-height: 1.15; margin-bottom: 1.5rem; }
    .service-hero p { margin-bottom: 1.5rem; }
    .service-section .grid { gap: 1.5rem; }
    .service-process article > p:first-child { margin-bottom: .5rem; }
    main .panorama-section { padding-top: 7.5rem; padding-bottom: 3.5rem; }
    .panorama-section h1 { font-size: 2rem; margin-top: 1.5rem; }
    .panorama-section p { margin-bottom: 1.5rem; }
}
@media (prefers-reduced-motion: reduce) {
    .hero-anim, .scroll-anim { opacity: 1 !important; visibility: visible !important; transform: none !important; }
}

/* Compact contact layout for phones; desktop geometry stays unchanged. */
@media (max-width: 767px) {
    #collaborazioni { padding: 2rem 1rem 1.5rem; }
    #contatti > div:first-child { gap: 1rem; margin-bottom: 1.5rem; }
    #contatti > div:first-child > div:first-child h2 { font-size: 1.5rem; line-height: 1.2; margin-bottom: .75rem; }
    #contatti > div:first-child > div:first-child p { line-height: 1.45; }
    #contatti .rounded-2xl { padding: 1rem; }
    #contatti .rounded-2xl h2 { font-size: 1.375rem; line-height: 1.25; margin-bottom: .75rem; }
    #contatti .rounded-2xl .mb-8 { margin-bottom: 1rem; }
    #contatti .rounded-2xl .mb-6 { margin-bottom: 1rem; }
    #contatti .rounded-2xl p.text-lg { line-height: 1.45; }
    #contatti .glow-btn { min-height: 3rem; padding: .75rem 1rem; }
    #contatti .space-y-6 > :not([hidden]) ~ :not([hidden]) { margin-top: .75rem; }
    #contatti .w-12 { width: 2rem; height: 2rem; margin-right: .625rem; }
    #contatti .text-xs { font-size: .625rem; letter-spacing: .1em; margin-bottom: 0; }
    #contatti .text-xl { font-size: 1rem; line-height: 1.4; }
    #contatti a.truncate { font-size: .9375rem; }
    #contatti .space-y-6 > div:last-child { padding-top: .75rem; }
    #contatti a[href^="https://wa.me/"] { min-height: 3rem; padding: .75rem 1rem; }
    #contatti > div:last-child { padding-top: 1rem; }
}

/* Shared business details, separate from the contact card and legal links. */
#contatti .activity-data { border-top: 1px solid rgba(255,255,255,.05); padding: 1.25rem 0; color: #e5e7eb; font-size: .875rem; line-height: 1.5; }
#contatti .activity-data h2 { font-size: 1rem; font-weight: 600; color: #fff; margin: 0 0 .75rem; }
#contatti .activity-data-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
#contatti .activity-data p { margin: 0; }
#contatti .activity-data a { display: flex; align-items: center; min-height: 2.75rem; overflow-wrap: anywhere; }
#contatti .activity-data a:hover { color: #80b3ff; }
@media (max-width: 767px) {
    #contatti .activity-data { padding: 1rem 0; }
    #contatti .activity-data-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
    #contatti .activity-data-address { grid-column: 1 / -1; }
}

/* Original thermography colours; soft gradients without text panels. */
video.thermography-video { filter: none; opacity: 1; mix-blend-mode: normal; }
.service-card .thermography-card-shade { top: auto; height: 64%; background: linear-gradient(to top, rgba(0,0,0,.93), rgba(0,0,0,.65) 65%, transparent); }
.thermography-hero-shade { background: linear-gradient(to top, #000, transparent 60%), linear-gradient(to right, rgba(0,0,0,.78), rgba(0,0,0,.48) 55%, rgba(0,0,0,.12)); }
@media (max-width: 767px) {
    .thermography-card-shade { display: none; }
    .thermography-hero-shade { background: linear-gradient(to bottom, rgba(0,0,0,.5), rgba(0,0,0,.62) 35%, rgba(0,0,0,.72) 75%, #000); }
}
