/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    overflow: hidden;
    height: 100vh;
    background: linear-gradient(135deg, #0a0e0d 0%, #1a2e1a 50%, #2d4a2d 100%);
    position: relative;
    color: #fff;
}

body.loaded .landing-container {
    opacity: 1;
    transform: translateY(0);
}

/* Particles Background */
.particles-container {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    top: 0;
    left: 0;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(139, 195, 74, 0.6);
    border-radius: 50%;
    animation: float 20s infinite ease-in-out;
    box-shadow: 0 0 10px rgba(139, 195, 74, 0.8);
}

.particle:nth-child(1) { left: 10%; top: 20%; animation-delay: 0s; }
.particle:nth-child(2) { left: 20%; top: 80%; animation-delay: 2s; }
.particle:nth-child(3) { left: 30%; top: 40%; animation-delay: 4s; }
.particle:nth-child(4) { left: 40%; top: 90%; animation-delay: 1s; }
.particle:nth-child(5) { left: 60%; top: 10%; animation-delay: 3s; }
.particle:nth-child(6) { left: 70%; top: 60%; animation-delay: 5s; }
.particle:nth-child(7) { left: 80%; top: 30%; animation-delay: 2.5s; }
.particle:nth-child(8) { left: 85%; top: 70%; animation-delay: 1.5s; }
.particle:nth-child(9) { left: 15%; top: 50%; animation-delay: 3.5s; }
.particle:nth-child(10) { left: 50%; top: 20%; animation-delay: 4.5s; }

@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0) scale(1);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    50% {
        transform: translateY(-100px) translateX(50px) scale(1.5);
        opacity: 0.8;
    }
    90% {
        opacity: 1;
    }
}

/* Main Container */
.landing-container {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    text-align: center;
    opacity: 0;
    transform: translateY(30px);
    transition: all 1.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Logo Section */
.logo-wrapper {
    position: relative;
    margin-bottom: 35px;
    animation: logoEntrance 1.5s ease-out forwards;
}

@keyframes logoEntrance {
    0% {
        opacity: 0;
        transform: scale(0.5) rotateY(180deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotateY(0deg);
    }
}

.logo-glow {
    position: absolute;
    width: 380px;
    height: 380px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(139, 195, 74, 0.35) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulse 3s ease-in-out infinite;
    z-index: -1;
}

@keyframes pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.8;
    }
}

.main-logo {
    width: 320px;
    height: auto;
    filter: drop-shadow(0 10px 30px rgba(139, 195, 74, 0.4));
    transition: transform 0.3s ease;
}

/* Content */
.content-wrapper {
    margin-bottom: 45px;
    animation: textEntrance 1.5s ease-out 0.3s forwards;
    opacity: 0;
}

@keyframes textEntrance {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.main-title {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #fff 0%, #8BC34A 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(139, 195, 74, 0.5);
}

.title-line {
    display: block;
    animation: slideInLeft 1s ease-out forwards;
    opacity: 0;
}

.title-line:nth-child(1) {
    animation-delay: 0.5s;
}

.title-line:nth-child(2) {
    animation-delay: 0.7s;
}

@keyframes slideInLeft {
    0% {
        opacity: 0;
        transform: translateX(-50px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.subtitle {
    font-size: 1.2rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 1px;
    animation: fadeIn 1.5s ease-out 1s forwards;
    opacity: 0;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* CTA Button */
.cta-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #3d913b 0%, #4CAF50 100%);
    border: none;
    border-radius: 50px;
    text-decoration: none;
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(61, 145, 59, 0.5);
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    animation: buttonEntrance 1.5s ease-out 0.6s forwards;
    opacity: 0;
}

@keyframes buttonEntrance {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 50px rgba(61, 145, 59, 0.7);
}

.cta-button:active {
    transform: translateY(-2px) scale(1.02);
}

.button-text {
    position: relative;
    z-index: 2;
}

.button-icon {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.4s ease;
}

.cta-button:hover .button-icon {
    transform: translateX(8px);
}

/* Decorative Leaves */
.leaf {
    position: absolute;
    font-size: 3rem;
    opacity: 0.15;
    animation: leafFloat 8s ease-in-out infinite;
    pointer-events: none;
    transition: transform 0.3s ease;
}

.leaf-1 {
    top: 10%;
    left: 15%;
    animation-delay: 0s;
}

.leaf-2 {
    top: 20%;
    right: 10%;
    animation-delay: 2s;
}

.leaf-3 {
    bottom: 15%;
    left: 10%;
    animation-delay: 4s;
}

.leaf-4 {
    bottom: 25%;
    right: 15%;
    animation-delay: 6s;
}

@keyframes leafFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-20px) rotate(5deg);
    }
    75% {
        transform: translateY(20px) rotate(-5deg);
    }
}

/* Bottom Text */
.bottom-text {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
    opacity: 0;
    transition: opacity 1s ease-out;
    text-align: center;
    padding-bottom: max(30px, env(safe-area-inset-bottom, 30px));
    padding-left: 20px;
    padding-right: 20px;
}

.bottom-text.visible {
    opacity: 1;
}

.bottom-text p {
    font-size: 0.95rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 1.5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-logo {
        width: 280px;
    }

    .main-title {
        font-size: 2.8rem;
    }

    .subtitle {
        font-size: 1.1rem;
        padding: 0 20px;
    }

    .cta-button {
        padding: 18px 40px;
        font-size: 1.1rem;
    }

    .leaf {
        font-size: 2rem;
    }

    .bottom-text p {
        font-size: 0.8rem;
        padding: 0 20px;
        letter-spacing: 0.5px;
        white-space: normal;
        line-height: 1.5;
    }

    .logo-glow {
        width: 350px;
        height: 350px;
    }
}

@media (max-width: 480px) {
    .main-logo {
        width: 220px;
    }

    .main-title {
        font-size: 2.2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .cta-button {
        padding: 15px 35px;
        font-size: 1rem;
        gap: 10px;
    }

    .button-icon {
        font-size: 1.5rem;
    }

    .logo-glow {
        width: 280px;
        height: 280px;
    }
}

/* Accessibilità */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
