:root {
    --primary: #ff0037;
    --bg: #0d0d0d;
    --card-bg: #1a1a1a;
    --text: #ffffff;
    --font: 'Poppins', sans-serif;
}

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

html {
    overflow-x: hidden;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font);
    line-height: 1.6;
    overflow-x: hidden;
}


nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 8%;
}


.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.social-icons-header {
    display: flex;
    gap: 0.8rem;
    align-items: center;
}

.social-icons-header a {
    color: #ccc;
    font-size: 1.5rem;
    transition: 0.3s;
    align-items: center;
    justify-content: center;
}

.social-icons-header a:hover {
    color: var(--primary);
    transform: scale(1.1);
    text-shadow: 0 0 10px var(--primary);
}

.logo { 
    font-size: 1.8rem; 
    font-weight: 700;
    animation:MasaColore 3.5s infinite alternate;
}
@keyframes MasaColore {
    0% {
        color: #ff0044;
    }
    11% {
        color: #ff7700;
    }
    22% {
        color: #ffd500;
    }
    33% {
        color: #72ff00;
    }
    44% {
        color: #00ffee;
    }
    55% {
        color: #0048ff;
    }
    66% {
        color: #7600ff;
    }
    77% {
        color: #ff00c8;
    }
    88% {
        color: #ff4080;
    }
    100% {
        color: #00ff66;
    }
}
.nav-links { 
    display: flex; 
    list-style: none; 
    gap: 2rem; 
}

.nav-links a { 
    text-decoration: none;
    color: #ccc; 
    transition: 0.3s; 
}

.nav-links a:hover, .nav-links a.active { 
    color: var(--primary); 
    text-shadow: 0 0 10px var(--primary);
}

/* HERO SECTION */
.hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 8%;
    min-height: 80vh;
    animation: fadeInUp 1.2s ease-out;
}

.hero-content { max-width: 500px; }

.hero-content h1 { 
    font-size: 4rem; 
    line-height: 1.1; 
    animation: slideInLeft 1s ease-out 0.2s backwards;
}

.hero-content h1 span { 
    color: var(--primary);
    animation: textGlow 3s ease-in-out infinite;
    
}

.hero-content h2 { 
    font-size: 2rem; 
    margin: 10px 0; 
    color: #888;
    animation: slideInLeft 1s ease-out 0.4s backwards;
}

.hero-content p {
    animation: slideInLeft 1s ease-out 0.6s backwards;
}

.hero-btns { 
    margin-top: 2rem; 
    display: flex; 
    gap: 1rem; 
}

.btn-fill, .btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.4s;
    text-decoration: none;

}

.btn-fill { 
    background: var(--primary); 
    color: white; 
    border: none; 
    box-shadow: 0 0 20px rgba(255, 0, 55, 0.4);
    animation: slideInUp 1s ease-out 0.8s backwards;
    position: relative;
    overflow: hidden;
}

.btn-fill::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: 0.6s;
}

.btn-fill:hover::before { left: 100%; }

.btn-fill:hover { 
    transform: scale(1.05); 
    box-shadow: 0 0 40px var(--primary);
}

.btn-outline { 
    background: transparent; 
    color: rgb(250, 250, 250); 
    border: 2px solid #000000;
    animation: slideInUp 1s ease-out 0.9s backwards;
    position: relative;
}

.btn-outline:hover { 
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(255, 0, 55, 0.4);
}

/* ANIMATED VISUAL */
.hero-visual { 
    position: relative; 
    width: 450px; 
    height: 450px;
    animation: float 3s ease-in-out infinite;
}

.main-circle {
    position: relative;
    width: 100%; height: 100%;
    border-radius: 50%;
    overflow: hidden;
    z-index: 5;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 40px rgba(255, 0, 55, 0.2);
    transition: 0.4s;
}

.main-circle:hover {
    box-shadow: 0 0 60px rgba(255, 0, 55, 0.5);
}

.main-circle img { width: 100%; height: 100%; object-fit: cover; }

.glow-ring {
    position: absolute;
    top: -5%; left: -5%;
    width: 110%; height: 110%;
    border-radius: 50%;
    background: conic-gradient(from 0deg, var(--primary), #ff6b9d, var(--primary), transparent);
    animation: rotateGlow 3s linear infinite, pulseGlow 2.5s ease-in-out infinite;
    filter: blur(20px);
    z-index: 4;
}

@keyframes rotateGlow { to { transform: rotate(360deg); } }

@keyframes pulseGlow {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

/* ICONE CHE GIRANO */
.orbit {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    animation: rotate 20s linear infinite;
}

.orbit-icon {
    position: absolute;
    width: 50px; height: 50px;
    background: var(--card-bg);
    border: 1px solid var(--primary);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    top: 50%;
    left: 50%;
    margin: -25px 0 0 -25px;
    transition: 0.4s;
}

.orbit-icon a {
    color: var(--primary);
    font-size: 1.5rem;
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.orbit-icon:hover {
    background: var(--primary);
    box-shadow: 0 0 20px var(--primary);
}

.orbit-icon:hover a {
    color: #000;
}

.orbit-icon:nth-child(1) {
    transform: rotate(0deg) translateX(250px) rotate(0deg);
}

.orbit-icon:nth-child(2) {
    transform: rotate(90deg) translateX(250px) rotate(-90deg);
}

.orbit-icon:nth-child(3) {
    transform: rotate(180deg) translateX(250px) rotate(-180deg);
}

.orbit-icon:nth-child(4) {
    transform: rotate(270deg) translateX(250px) rotate(-270deg);
}

@keyframes rotate { to { transform: rotate(360deg); } }

/* KEYFRAMES ANIMATIONS */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-60px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes textGlow {
    0%, 100% {
        text-shadow: 0 0 10px var(--primary), 0 0 20px rgba(255, 0, 55, 0.5);
    }
    50% {
        text-shadow: 0 0 20px var(--primary), 0 0 40px rgba(255, 0, 55, 0.8);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-30px);
    }
}

@keyframes expandWidth {
    from {
        width: 0;
    }
}

/* ABOUT US SECTION */
.about {
    padding: 5rem 8%;
    background: linear-gradient(135deg, rgba(255, 0, 55, 0.05), rgba(255, 107, 157, 0.05));
}

.section-title { 
    font-size: 3rem; 
    text-align: center; 
    margin-bottom: 3rem;
    animation: fadeInDown 1s ease-out;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 100px;
    height: 4px;
    background: var(--primary);
    margin: 1rem auto 0;
    border-radius: 2px;
    animation: expandWidth 1s ease-out 0.3s backwards;
}

.about-intro {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 3rem;
    color: #ccc;
    font-size: 1.1rem;
    animation: fadeInUp 1s ease-out 0.3s backwards;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
}

.team-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid #333;
    text-align: center;
    transition: 0.4s;
    animation: fadeInUp 1s ease-out 0.4s backwards;
    position: relative;
    overflow: hidden;
}

.team-card::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(255, 0, 55, 0.1), transparent);
    transition: 0.6s;
    opacity: 0;
}

.team-card:hover::before {
    opacity: 1;
    top: -25%; left: -25%;
}

.team-card:hover {
    border-color: var(--primary);
    transform: translateY(-20px);
    box-shadow: 0 20px 50px rgba(255, 0, 55, 0.3);
}

.team-avatar {
    font-size: 4rem;
    color: var(--primary);
    margin-bottom: 1rem;
    animation: float 3s ease-in-out infinite;
}

.team-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.role {
    color: var(--primary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

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

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 0, 55, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
    border: 1px solid var(--primary);
    text-decoration: none;
    font-size: 1.2rem;
}

.social-links a:hover {
    background: var(--primary);
    color: #000;
    transform: scale(1.2);
    box-shadow: 0 0 20px var(--primary);
}

/* FEATURED PROJECTS SECTION */
.featured-projects {
    padding: 5rem 8%;
    background: linear-gradient(135deg, rgba(255, 0, 55, 0.05), rgba(255, 107, 157, 0.05));
}

.section-subtitle {
    text-align: center;
    color: #888;
    font-size: 1.1rem;
    margin-bottom: 3rem;
    animation: fadeInUp 1s ease-out 0.2s backwards;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.featured-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 2rem;
    border: 2px solid #333;
    transition: 0.4s;
    animation: fadeInUp 1s ease-out 0.3s backwards;
    position: relative;
    overflow: hidden;
}

.featured-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 0, 55, 0.15), transparent);
    transition: 0.6s;
}

.featured-card:hover::before {
    left: 100%;
}

.featured-card:hover {
    border-color: var(--primary);
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(255, 0, 55, 0.3);
}

.featured-badge {
    display: inline-block;
    background: var(--primary);
    color: #000;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.featured-header {
    margin-bottom: 1rem;
}

.featured-header h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.featured-header .creator {
    color: #888;
    font-size: 0.9rem;
}

.featured-description {
    color: #ccc;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.featured-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.featured-tags .tag {
    font-size: 0.8rem;
    background: rgba(255, 0, 55, 0.2);
    padding: 4px 10px;
    border-radius: 5px;
    color: var(--primary);
    display: inline-block;
    border: 1px solid rgba(255, 0, 55, 0.3);
}

.footer{
    text-align: center;
}

.featured-footer {
    padding-top: 1.5rem;
    border-top: 1px solid #333;
}

.featured-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: 0.3s;
}

.featured-link:hover {
    color: #ff6b9d;
    transform: translateX(5px);
}

.no-link {
    color: #666;
    font-size: 0.9rem;
}

.projects-cta {
    text-align: center;
    padding: 2rem;
    background: rgba(255, 0, 55, 0.05);
    border-radius: 15px;
    border: 2px solid #333;
}

.projects-cta p {
    margin-bottom: 1rem;
    color: #ccc;
    font-size: 1.1rem;
}

.projects-cta .btn-fill {
    animation: none;
}

.loading {
    text-align: center;
    padding: 3rem;
    color: #666;
    font-size: 1.1rem;
}

#menu-auth { 
    display: flex; 
    list-style: none; 
    gap: 2rem; 
}

#menu-auth a { 
    text-decoration: none;
    color: #ccc; 
    transition: 0.3s; 
}

#menu-auth a:hover, #menu-auth a.active { 
    color: var(--primary); 
    text-shadow: 0 0 10px var(--primary);
}

/* Responsive */
@media (max-width: 992px) {
    nav {
        flex-wrap: wrap;
        padding: 2rem 4%;
    }

    .nav-links {
        flex-wrap: wrap;
        gap: 1rem;
        justify-content: center;
    }

    .hero {
        flex-direction: column;
        align-items: center;
        gap: 40px;
        padding: 0 4%;
        min-height: auto;
    }

    .hero-content {
        text-align: center;
        max-width: 100%;
    }

    .hero-content h1 {
        font-size: 3rem;
    }

    .hero-visual {
        width: 320px;
        height: 320px;
    }
    
    .orbit-icon:nth-child(1) { transform: rotate(0deg) translateX(160px) rotate(0deg); }
    .orbit-icon:nth-child(2) { transform: rotate(90deg) translateX(160px) rotate(-90deg); }
    .orbit-icon:nth-child(3) { transform: rotate(180deg) translateX(160px) rotate(-180deg); }
    .orbit-icon:nth-child(4) { transform: rotate(270deg) translateX(160px) rotate(-270deg); }
}

@media (max-width: 768px) {
    nav {
        padding: 1.5rem 4%;
        flex-direction: column;
        gap: 1rem;
    }

    .logo-container {
        justify-content: center;
    }

    .hero {
        padding: 0 3%;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content h2 {
        font-size: 1.75rem;
    }

    .hero-btns {
        flex-direction: column;
        gap: 1rem;
    }

    .hero-visual {
        width: 260px;
        height: 260px;
    }

    .orbit-icon {
        width: 42px;
        height: 42px;
    }
    
    .orbit-icon a { font-size: 1.2rem; }
    
    .orbit-icon:nth-child(1) { transform: rotate(0deg) translateX(130px) rotate(0deg); }
    .orbit-icon:nth-child(2) { transform: rotate(90deg) translateX(130px) rotate(-90deg); }
    .orbit-icon:nth-child(3) { transform: rotate(180deg) translateX(130px) rotate(-180deg); }
    .orbit-icon:nth-child(4) { transform: rotate(270deg) translateX(130px) rotate(-270deg); }
    
    .team-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .featured-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .logo {
        font-size: 1.5rem;
    }
    
    .social-icons-header a {
        font-size: 1.2rem;
    }

    .btn-fill, .btn-outline {
        width: 100%;
        justify-content: center;
    }

    .hero-visual {
        width: 220px;
        height: 220px;
    }
    
    .orbit-icon:nth-child(1) { transform: rotate(0deg) translateX(110px) rotate(0deg); }
    .orbit-icon:nth-child(2) { transform: rotate(90deg) translateX(110px) rotate(-90deg); }
    .orbit-icon:nth-child(3) { transform: rotate(180deg) translateX(110px) rotate(-180deg); }
    .orbit-icon:nth-child(4) { transform: rotate(270deg) translateX(110px) rotate(-270deg); }

    .section-title {
        font-size: 2.2rem;
    }
}
.btn-fill {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

btn-fill {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-fill::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 200%;
    height: 200%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: rotate(25deg);
    animation: btnShine 3s infinite;
}

@keyframes btnShine {
    0% { transform: translateX(-100%) rotate(25deg); }
    20% { transform: translateX(100%) rotate(25deg); }
    100% { transform: translateX(100%) rotate(25deg); }
}

/* 2. PULSAZIONE SOTTILE LOGO */
.logo {
    animation: MasaColore 3.5s infinite alternate;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

/* 3. EFFETTO BRILLO TITOLO SEZIONE (gradiente morbido) */
.section-title {
    position: relative;
    display: inline-block;
    width: 100%;
}

.section-title::after {
    content: '';
    display: block;
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), #ff6b9d, var(--primary));
    margin: 1rem auto 0;
    border-radius: 2px;
    animation: linePulse 2s ease-in-out infinite;
}

@keyframes linePulse {
    0%, 100% { width: 100px; opacity: 0.7; }
    50% { width: 150px; opacity: 1; }
}


.social-links a {
    position: relative;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--primary);
    color: #000;
    transform: scale(1.2) rotate(360deg);
    box-shadow: 0 0 20px var(--primary);
}


.team-card, .featured-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.team-card:hover, .featured-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(255, 0, 55, 0.2);
}


.glow-ring {
    animation: rotateGlow 8s linear infinite, glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.4; filter: blur(20px); }
    50% { opacity: 0.8; filter: blur(25px); }
}


@keyframes gentleFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.team-card {
    animation: gentleFloat 4s ease-in-out infinite;
    animation-delay: calc(var(--order, 0) * 0.2s);
}

.btn-outline {
    animation: buttonBreath 2s ease-in-out infinite;
}

@keyframes buttonBreath {
    0%,100% { border-color: #00ff00; }

    50%  {
        color: #ff1e00;
    }
    100%{
        color:#00ff00
    }
    
}




@keyframes softReveal {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}


.tag {
    transition: all 0.3s ease;
}

.tag:hover {
    background: var(--primary);
    color: #000;
    transform: translateY(-2px);
}


.nav-links a {
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}



.hero-btns .btn-fill, .hero-btns .btn-outline {
    transition: all 0.3s ease;
}

.hero-btns .btn-fill:hover, .hero-btns .btn-outline:hover {
    transform: translateY(-2px);
}

.social-icons-header a {
    transition: all 0.3s ease;
}

.social-icons-header a:hover {
    transform: scale(1.2) rotate(10deg);
}


.btn-fill, .team-card, .featured-card {
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.footer {
    animation: footerBreath 3s ease-in-out infinite;
}

@keyframes footerBreath {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}
/*caricamento*/
body {
    overflow: hidden;
    animation: unlockScroll 0s forwards 4.05s;
}

@keyframes unlockScroll {
    to { overflow-x: hidden; overflow-y: auto; }
}

.masa-final-loader {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999999;
    background: transparent; 
    animation: killLoader 0s forwards 4.05s;
}

.circle-reveal {
    position: absolute;
    width: 1px;
    height: 1px;
    background: transparent;
    border-radius: 50%;
    box-shadow: 0 0 0 200vw #000; 
    z-index: -1;
    animation: circleExpand 1.8s cubic-bezier(0.8, 0, 0.2, 1) forwards 2.25s;
}

@keyframes circleExpand {
    0%,40% {
        transform: scale(1);
        box-shadow: 0 0 0 200vw #000000;
    }
    100% {
       
        transform: scale(3200); 
        
        visibility: hidden;
    }
}

.text-wrapper {
    display: flex;
    gap: 10px;
    animation: fadeOutText 0.5s forwards 3s;
}

.m-letter {
    font-family: 'Poppins', sans-serif;
    font-weight: 900;
    font-size: clamp(2rem, 10vw, 6rem);
    color: #fff;
    opacity: 0;
    transform: translateY(20px);
    filter: blur(10px);
    animation: showLetter 0.6s ease-out forwards;
}

.m-letter.red {
    color: #ff0037;
    text-shadow: 0 0 20px rgba(255, 0, 55, 0.5);
}

/* Ritardi lettere */
.m-letter:nth-child(1) { animation-delay: 0.3s; }
.m-letter:nth-child(2) { animation-delay: 0.4s; }
.m-letter:nth-child(3) { animation-delay: 0.5s; }
.m-letter:nth-child(4) { animation-delay: 0.6s; }
.m-letter:nth-child(5) { animation-delay: 0.7s; }
.m-letter:nth-child(6) { animation-delay: 0.8s; }
.m-letter:nth-child(7) { animation-delay: 0.9s; }
.m-letter:nth-child(8) { animation-delay: 1s; }
.m-letter:nth-child(9) { animation-delay: 1.1s; }

@keyframes showLetter {
    to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

@keyframes fadeOutText {
    to { opacity: 0; transform: scale(1.5); filter: blur(20px); }
}

@keyframes killLoader {
    to { 
        visibility: hidden; 
        pointer-events: none; 
        display: none;
    }
}


