@font-face {
    font-family: 'Minecraftia';
    src: url('assets/Minecraftia.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg-dark: #05050a;
    --text-main: #f0f2f5;
    --text-muted: #a0a5b1;
    --color-red: #ea4335; /* Google Red */
    --color-blue: #4285f4; /* Google Blue */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

html {
    scroll-behavior: smooth;
}

/* Protezione Immagini */
img {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-select: none;
    -webkit-user-select: none;
    pointer-events: none;
}

/* Background Animations */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.glow {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.4;
    animation: float 20s infinite alternate ease-in-out;
}

.red-glow {
    background: radial-gradient(circle, var(--color-red) 0%, transparent 70%);
    top: -20%;
    left: -10%;
}

.blue-glow {
    background: radial-gradient(circle, var(--color-blue) 0%, transparent 70%);
    bottom: -20%;
    right: -10%;
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(10%, 15%) scale(1.1); }
}

/* Typography & Utilities */
.text-gradient {
    background: linear-gradient(90deg, var(--color-red), var(--color-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.section-title {
    font-size: 3rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 3rem;
    letter-spacing: -1px;
}

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1200px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    z-index: 1000;
    border-radius: 50px;
    flex-wrap: wrap;
}

.logo, .logo a {
    font-family: 'Minecraftia', sans-serif;
    font-size: 1.2rem;
    font-weight: normal;
    letter-spacing: 1px;
    color: var(--text-main);
    text-decoration: none;
}

.logo span {
    color: inherit;
}

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

.menu-toggle {
    display: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-main);
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 400;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--color-blue);
}

.btn-contact {
    background: linear-gradient(90deg, var(--color-red), var(--color-blue));
    padding: 0.6rem 1.5rem;
    border-radius: 30px;
    font-weight: 600 !important;
}

.btn-contact:hover {
    box-shadow: 0 0 20px rgba(66, 133, 244, 0.4);
    color: white !important;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8rem 5% 4rem;
    max-width: 1400px;
    margin: 0 auto;
    gap: 4rem;
}

.hero-content {
    flex: 1;
}

.hero h1 {
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -2px;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-main);
}

.btn-primary {
    background: var(--text-main);
    color: var(--bg-dark);
}

.btn-primary:hover {
    background: var(--color-blue);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(66, 133, 244, 0.3);
}

.btn-secondary {
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.3);
}

.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    position: relative;
    align-items: center;
}

.mockup {
    width: 100%;
    aspect-ratio: 9/16;
    padding: 10px;
    display: flex;
    flex-direction: column;
    position: absolute;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.mockup-center {
    position: relative;
    z-index: 3;
    transform: rotate(2deg);
    max-width: 320px;
}

.mockup-left {
    z-index: 1;
    transform: translateX(-40%) scale(0.85) rotate(-6deg);
    opacity: 0.6;
    filter: blur(2px);
    max-width: 320px;
}

.mockup-right {
    z-index: 2;
    transform: translateX(40%) scale(0.9) rotate(8deg);
    opacity: 0.8;
    filter: blur(1px);
    max-width: 320px;
}

.hero-visual:hover .mockup-left {
    transform: translateX(-60%) scale(0.9) rotate(-8deg);
    opacity: 0.8;
    filter: blur(1px);
}

.hero-visual:hover .mockup-right {
    transform: translateX(60%) scale(0.95) rotate(10deg);
    opacity: 0.9;
    filter: blur(0px);
}

.hero-visual:hover .mockup-center {
    transform: rotate(0deg) scale(1.02);
    border-color: var(--color-blue);
}

.mockup-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
}

.placeholder-img {
    background: linear-gradient(135deg, #1a1c23 0%, #0d0f14 100%);
    border-radius: 16px;
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.placeholder-img::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
    animation: shine 3s infinite;
}

@keyframes shine {
    100% { left: 200%; }
}

.mockup-info {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(0,0,0,0.7);
    padding: 12px;
    border-radius: 12px;
    backdrop-filter: blur(8px);
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    transition: var(--transition);
    border: 1px solid transparent;
}

.mockup-info:hover {
    background: rgba(66, 133, 244, 0.2);
    transform: translateY(-3px);
    border-color: var(--color-blue);
}

.mockup-info i {
    font-size: 1.6rem;
    color: var(--color-red);
}

/* Sections Global */
section {
    padding: 5rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}

/* About Section */
.about-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    padding: 4rem;
    align-items: center;
}

.about-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.profile-pic {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    border: 4px solid var(--glass-border);
    box-shadow: 0 0 20px rgba(66, 133, 244, 0.1);
    object-fit: cover;
}

.about-content {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.about-text h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.about-text p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.about-stats {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.stat-box {
    flex: 1;
    min-width: 150px;
    padding: 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    border-top: 2px solid var(--color-red);
    transition: var(--transition);
}

.stat-box-small {
    padding: 1rem 1.5rem;
    min-width: auto;
    border-radius: 16px;
}

.stat-box-small .stat-number {
    font-size: 2.2rem;
}

.stat-box-small .stat-label {
    font-size: 0.9rem;
    margin-top: 0.2rem;
}

.stat-box:nth-child(2) {
    border-top-color: var(--color-blue);
}

.stat-box:hover {
    transform: translateY(-5px);
    background: rgba(255,255,255,0.05);
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1;
}

.stat-label {
    color: var(--text-muted);
    font-size: 1rem;
    margin-top: 0.5rem;
}

/* Services */
.services-bento {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 2rem;
    min-height: 400px;
}

.service-card {
    padding: 2.5rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.service-card-main {
    grid-row: 1 / 3;
    grid-column: 1 / 2;
    justify-content: space-between;
}

.service-card-side1 {
    grid-row: 1 / 2;
    grid-column: 2 / 3;
}

/* Servizi Layout e Header */
.service-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1rem;
}

.service-icon {
    font-size: 1.8rem;
    color: var(--color-red);
}

.service-card h3 {
    font-size: 1.5rem;
    color: var(--text-main);
}

.service-card p {
    color: var(--text-muted);
    font-size: 1rem;
}

/* Servizi Carousel */
.carousel-container {
    width: 100%;
    overflow: hidden;
    margin-top: 3rem;
    position: relative;
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.carousel-track {
    display: flex;
    gap: 20px;
    width: max-content;
    animation: scrollCarousel 20s linear infinite;
}

.carousel-track img {
    height: 180px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

@keyframes scrollCarousel {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-50% - 10px)); }
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(66, 133, 244, 0.1), transparent 70%);
    opacity: 0;
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: rgba(66, 133, 244, 0.3);
}

.service-card:hover::before {
    opacity: 1;
}

/* Portfolio */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.portfolio-item {
    aspect-ratio: 16/9;
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    cursor: pointer;
    display: block;
    text-decoration: none;
    color: inherit;
}

.portfolio-img {
    background: linear-gradient(45deg, #12141a, #1a1e28);
    transition: var(--transition);
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.portfolio-overlay {
    position: absolute;
    bottom: -100%;
    left: 0;
    width: 100%;
    padding: 2rem;
    background: linear-gradient(to top, rgba(5,5,10,0.9), transparent);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.portfolio-item:hover .portfolio-overlay {
    bottom: 0;
}

.portfolio-overlay h3 {
    font-size: 1.5rem;
    margin-bottom: 0.2rem;
}

.portfolio-overlay p {
    color: var(--color-blue);
    font-weight: 600;
}

/* Contact */
.contact-box {
    text-align: center;
    padding: 5rem 3rem;
}

.contact-box h2 {
    margin-bottom: 1rem;
}

.contact-box p {
    color: var(--text-muted);
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.discord-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding: 1rem 2rem;
    background: rgba(88, 101, 242, 0.1);
    border: 1px solid rgba(88, 101, 242, 0.3);
    border-radius: 12px;
    margin: 0 auto 3rem auto;
    max-width: 450px;
    font-size: 1.1rem;
}

.discord-bar .discord-icon {
    font-size: 1.8rem;
    color: #5865F2;
}

.discord-bar a {
    color: #5865F2;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.discord-bar a:hover {
    text-shadow: 0 0 10px rgba(88, 101, 242, 0.5);
    color: #7289da;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.glass-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 1rem 2rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.glass-btn:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-3px);
    border-color: var(--color-blue);
}

.glass-btn i {
    font-size: 1.5rem;
    color: var(--color-red);
}

/* Footer */
footer {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
    border-top: 1px solid var(--glass-border);
}

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

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }
.delay-3 { transition-delay: 0.6s; }

/* Project Page Styles */
.project-header {
    padding: 12rem 5% 4rem;
    text-align: center;
}

.project-header h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.project-header p {
    font-size: 1.2rem;
    color: var(--color-blue);
    font-weight: 600;
}

.project-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto 4rem;
    padding: 0 5%;
}

.project-media {
    width: 100%;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border: 1px solid var(--glass-border);
}

.project-media img, .project-media video {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.project-content {
    font-size: 1.15rem;
    color: var(--text-muted);
    line-height: 1.8;
}

.project-content h2 {
    color: var(--text-main);
    margin-bottom: 1rem;
    font-size: 2.2rem;
}

.project-nav {
    display: flex;
    justify-content: flex-start;
    margin-top: 3rem;
}

/* Project Clients List */
.project-clients {
    max-width: 1000px;
    margin: 0 auto 6rem;
    padding: 0 5%;
}

.clients-intro {
    text-align: center;
    color: var(--text-muted);
    font-size: 1.15rem;
    margin-bottom: 3rem;
}

.client-group {
    margin-bottom: 2rem;
    padding: 2.5rem;
}

.client-group h3 {
    color: var(--color-blue);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.client-group ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.client-group a {
    color: var(--text-main);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition);
    font-size: 1.1rem;
}

.client-group a i {
    font-size: 1.6rem;
    color: var(--color-red);
}

.client-group a:hover {
    color: var(--color-blue);
    transform: translateX(10px);
}

/* Video Grid and Wrapper */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    border: 1px solid var(--glass-border);
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Responsive */
@media (max-width: 992px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 120px;
    }
    
    .hero-content {
        padding-right: 0;
        margin-bottom: 1rem;
    }
    
    .hero-visual {
        width: 100%;
        padding-top: 0;
    }

    .mockup-center {
        max-width: 260px;
    }

    .mockup-left, .mockup-right {
        max-width: 220px;
        display: flex;
    }
    
    .mockup-left {
        transform: translateX(-40%) scale(0.85) rotate(-6deg);
    }
    
    .mockup-right {
        transform: translateX(40%) scale(0.9) rotate(8deg);
    }

    .hero h1 { font-size: 3.5rem; }
    .hero p { margin: 0 auto 2.5rem; }
    .hero-buttons { justify-content: center; }
    .about-container { grid-template-columns: 1fr; padding: 2rem; }
    .about-stats { flex-direction: row; }
    .project-details { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 768px) {
    .navbar {
        justify-content: space-between;
        padding: 0.6rem 1.5rem;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .nav-links {
        display: flex;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: calc(100% + 10px);
        left: 0;
        background: rgba(5, 5, 10, 0.98);
        backdrop-filter: blur(10px);
        padding: 0;
        text-align: center;
        box-shadow: none;
        border: 1px solid transparent;
        border-radius: 24px;
        overflow: hidden;
        max-height: 0;
        opacity: 0;
        pointer-events: none;
        transition: max-height 0.4s ease, padding 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease, opacity 0.4s ease;
    }

    .nav-links.active {
        max-height: 500px;
        padding: 2rem 0;
        border-color: var(--glass-border);
        box-shadow: 0 10px 30px rgba(0,0,0,0.5);
        opacity: 1;
        pointer-events: auto;
    }

    .nav-links li {
        margin: 1rem 0;
        opacity: 0;
        transform: translateY(-10px);
        transition: opacity 0.4s ease, transform 0.4s ease;
    }

    .nav-links.active li {
        opacity: 1;
        transform: translateY(0);
    }
    
    .nav-links .btn-contact {
        background: transparent;
        color: var(--text-main);
        padding: 0;
        box-shadow: none;
        font-weight: normal;
        border: none;
    }
    
    .hero h1 { font-size: 2.5rem; }
    .section-title { font-size: 2.5rem; }
    .about-stats { flex-direction: column; }
    .contact-box { padding: 3rem 1.5rem; }
    .about-content { flex-direction: column; text-align: center; }
    .profile-img-wrapper { margin: 0 auto; }
    
    .services-bento {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
    .service-card-main, .service-card-side1, .service-card-side2 {
        grid-column: auto;
        grid-row: auto;
    }
}

/* Utils */
