/* ========================================
   SIDERIS LAB - Custom Styles
   Cyber-Minimalism / Futuristic High-Tech
   ======================================== */

/* Base & Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: linear-gradient(135deg, #0a0a0f 0%, #0d1117 100%);
    min-height: 100vh;
}

/* Selection */
::selection {
    background: rgba(0, 255, 245, 0.3);
    color: #fff;
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes glow-pulse {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(0, 255, 245, 0.5),
            0 0 40px rgba(0, 255, 245, 0.3),
            0 0 60px rgba(0, 255, 245, 0.1);
    }

    50% {
        box-shadow: 0 0 30px rgba(0, 255, 245, 0.7),
            0 0 60px rgba(0, 255, 245, 0.5),
            0 0 90px rgba(0, 255, 245, 0.3);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes border-glow {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

/* ========================================
   GLASSMORPHISM CARDS
   ======================================== */

.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(0, 255, 245, 0.2);
    box-shadow: 0 8px 32px rgba(0, 255, 245, 0.1);
}

/* ========================================
   GRADIENT TEXT
   ======================================== */

.gradient-text {
    background: linear-gradient(135deg, #00fff5 0%, #a855f7 50%, #00fff5 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-shift 8s ease infinite;
}

.animate-gradient-text {
    background: linear-gradient(90deg, #00fff5, #ffffff, #a855f7, #ffffff, #00fff5);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-shift 6s ease infinite;
}

/* ========================================
   CTA BUTTON - Hero
   ======================================== */

.cta-button {
    background: linear-gradient(135deg, #00fff5 0%, #00d4c8 100%);
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(0, 255, 245, 0.4),
        0 0 60px rgba(0, 255, 245, 0.2);
    animation: glow-pulse 3s ease-in-out infinite;
}

.cta-button::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.cta-button:hover::before {
    transform: translateX(100%);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 40px rgba(0, 255, 245, 0.6),
        0 0 80px rgba(0, 255, 245, 0.4),
        0 0 120px rgba(0, 255, 245, 0.2);
}

/* ========================================
   STAT CARDS
   ======================================== */

.stat-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(0, 255, 245, 0.3);
    transform: translateY(-4px);
}

/* ========================================
   FORBIX SECTION - Featured
   ======================================== */

.forbix-grid-bg {
    background-image:
        linear-gradient(rgba(168, 85, 247, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(168, 85, 247, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: float 10s ease-in-out infinite;
}

.forbix-card {
    background: linear-gradient(135deg, #a855f7 0%, #00fff5 50%, #a855f7 100%);
    background-size: 200% 200%;
    animation: gradient-shift 6s ease infinite;
    position: relative;
}

.forbix-card::before {
    content: '';
    position: absolute;
    inset: 2px;
    background: #0d1117;
    border-radius: 1.5rem;
    z-index: 0;
}

.forbix-card>* {
    position: relative;
    z-index: 1;
}

.forbix-logo {
    background: linear-gradient(135deg, #a855f7 0%, #00fff5 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 60px rgba(168, 85, 247, 0.5);
}

.forbix-cta {
    background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%);
    color: white;
    box-shadow: 0 0 30px rgba(168, 85, 247, 0.4);
    position: relative;
    overflow: hidden;
}

.forbix-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.forbix-cta:hover::before {
    transform: translateX(100%);
}

.forbix-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 50px rgba(168, 85, 247, 0.6);
}

.forbix-visual {
    animation: float 8s ease-in-out infinite;
}

/* ========================================
   SERVICE CARDS
   ======================================== */

.service-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(0, 255, 245, 0.3);
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 30px rgba(0, 255, 245, 0.1);
}

/* ========================================
   CONTACT LINKS
   ======================================== */

.contact-link {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
}

.contact-link:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateX(8px);
    box-shadow: -4px 0 20px rgba(0, 255, 245, 0.2);
}

/* ========================================
   NAVBAR
   ======================================== */

nav.scrolled {
    background: rgba(10, 10, 15, 0.95);
    border-bottom-color: rgba(0, 255, 245, 0.1);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #00fff5, #a855f7);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* ========================================
   SCROLLBAR
   ======================================== */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0a0a0f;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #00fff5, #a855f7);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #00d4c8, #9333ea);
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .glass-card {
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }

    .forbix-card::before {
        inset: 1px;
    }

    .contact-link:hover {
        transform: translateX(4px);
    }
}

/* ========================================
   ENHANCED RESPONSIVE - All Devices
   ======================================== */

/* Extra Small Devices (phones, 320px - 480px) */
@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

    /* Hero Section Mobile */
    #hero {
        min-height: 100svh;
        /* Use small viewport height for mobile */
        padding-top: 5rem;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    #hero h1 {
        font-size: 2.25rem;
        line-height: 1.1;
    }

    #hero h1 span:last-child {
        font-size: 1.25rem;
    }

    #hero p {
        font-size: 1rem;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .cta-button {
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
        width: 100%;
        justify-content: center;
    }

    /* Stats Grid Mobile */
    .stat-card {
        padding: 1rem;
    }

    .stat-card>div:first-child {
        font-size: 1.5rem;
    }

    /* Forbix Section Mobile */
    .forbix-logo {
        font-size: 2.5rem !important;
    }

    #forbix .grid {
        display: flex;
        flex-direction: column;
    }

    .forbix-cta {
        width: 100%;
        justify-content: center;
    }

    /* Services Grid Mobile */
    .service-card {
        padding: 1.5rem;
    }

    .service-card h3 {
        font-size: 1.125rem;
    }

    /* Footer Mobile */
    #contatti .grid {
        gap: 2rem;
    }

    .contact-link {
        padding: 0.75rem;
    }

    /* Navigation Mobile */
    nav {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Scroll indicator - hide on very small */
    #hero>div>div:last-child {
        display: none;
    }
}

/* Small Devices (large phones, 481px - 640px) */
@media (min-width: 481px) and (max-width: 640px) {
    #hero h1 {
        font-size: 2.75rem;
    }

    .forbix-logo {
        font-size: 3rem !important;
    }

    .cta-button {
        width: auto;
    }
}

/* Medium Devices (tablets, 641px - 1024px) */
@media (min-width: 641px) and (max-width: 1024px) {
    #hero {
        padding-top: 6rem;
    }

    #hero h1 {
        font-size: 4rem;
    }

    .forbix-logo {
        font-size: 4rem !important;
    }

    /* Two column grid on tablets */
    .service-card {
        padding: 1.5rem;
    }
}

/* Large Devices (laptops/desktops, 1025px - 1280px) */
@media (min-width: 1025px) and (max-width: 1280px) {
    .max-w-7xl {
        max-width: 1100px;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {

    /* Larger touch targets */
    .nav-link {
        padding: 0.5rem 0;
    }

    .contact-link {
        min-height: 60px;
    }

    /* Disable hover transforms on touch */
    .service-card:hover,
    .stat-card:hover {
        transform: none;
    }

    .contact-link:hover {
        transform: none;
    }

    /* CTA button mobile optimization */
    .cta-button:hover {
        transform: none;
    }

    .forbix-cta:hover {
        transform: none;
    }
}

/* Landscape Mode on Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    #hero {
        min-height: auto;
        padding-top: 4rem;
        padding-bottom: 2rem;
    }

    #hero>div>div:last-child {
        display: none;
    }
}

/* High DPI Screens */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {

    .glass-card,
    .service-card,
    .stat-card {
        border-width: 0.5px;
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .forbix-visual,
    .animate-float,
    .animate-bounce {
        animation: none !important;
    }
}

/* ========================================
   PARTICLE CANVAS OVERLAY
   ======================================== */

#particles {
    opacity: 0.6;
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

.text-glow-cyan {
    text-shadow: 0 0 20px rgba(0, 255, 245, 0.5);
}

.text-glow-violet {
    text-shadow: 0 0 20px rgba(168, 85, 247, 0.5);
}

.border-glow {
    animation: border-glow 3s ease-in-out infinite;
}