/* ===== CSS VARIABLES ===== */
:root {
    --primary-glow: rgba(138, 43, 226, 0.3);
    --secondary-glow: rgba(0, 191, 255, 0.25);
    --accent-color: #8a2be2;
    --text-primary: #ffffff;
    --text-secondary: #bbbbbb;
    --bg-dark: #000000;
    --grid-color: rgba(255, 255, 255, 0.05);
    --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== RESET & BASE STYLES ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Bebas Neue', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    position: relative;
}

/* ===== ANIMATED BACKGROUND ===== */
.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.grid-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(to right, var(--grid-color) 1px, transparent 1px), linear-gradient(to bottom, var(--grid-color) 1px, transparent 1px);
    background-size: 40px 40px;
}
.vignette {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 40%, rgba(0, 0, 0, 0.85) 100%);
}

/* Particle canvas */
#particles {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0.4;
}

/* ===== MAIN CONTAINER ===== */
.container {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem 1.5rem;
    text-align: center;
}

/* ===== LOGO / TITLE SECTION ===== */
.logo-section {
    margin-bottom: 0;
}

.main-logo {
    display: block;
    margin: 0 auto 2rem;
    width: clamp(100px, 15vw, 150px);
    height: auto;
    opacity: 0;
    animation: fadeInUp 1s ease forwards, glowPulse 3s ease-in-out infinite alternate;
    animation-delay: 0.2s, 0s;
}

h1 {
    font-size: clamp(4rem, 10vw, 5rem);
    font-weight: 400;
    line-height: 1.1;
    margin: 0;
    position: relative;
    display: inline-block;
    letter-spacing: 0;
    color: var(--text-primary);
    animation: glowPulse 3s ease-in-out infinite alternate;
}

@keyframes glowPulse {
    from {
        filter: drop-shadow(0 0 10px var(--primary-glow)) drop-shadow(0 0 20px var(--secondary-glow));
    }
    to {
        filter: drop-shadow(0 0 20px var(--primary-glow)) drop-shadow(0 0 40px var(--secondary-glow));
    }
}

/* Title lines animation - FadeInUp */
.title-line {
    display: block;
    margin: 0;
    opacity: 0;
    animation: fadeInUp 1s ease forwards;
}

/* First line - "BENVENUTO IN" */
.title-line:nth-child(1) {
    animation-delay: 0.5s;
}

/* Second line - "OLD CLASS MEMES!" */
.title-line:nth-child(2) {
    animation-delay: 1.0s;
}

/* Enhanced glitch effect on hover */
h1 {
    transition: transform 0.3s var(--transition-smooth);
}

/* ===== SUBTITLE ===== */
h2 {
    font-family: 'Inter', sans-serif;
    font-size: clamp(1rem, 4vw, 1.5rem);
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-secondary);
    margin-top: 2.5rem;
    opacity: 0;
    animation: fadeInUp 1s ease forwards;
    animation-delay: 1.5s;
    text-shadow: 0 0 10px rgba(138, 43, 226, 0.2);
}

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

/* ===== DESCRIPTION ===== */
.description {
    font-family: 'Inter', sans-serif;
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    font-weight: 300;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 2.5rem auto 4rem;
    line-height: 1.6;
    opacity: 0;
    animation: fadeInUp 1s ease forwards;
    animation-delay: 2.0s;
}


/* ===== RESPONSIVE DESIGN ===== */
@media(max-width: 768px) {
    .container {
        padding: 2rem 1.5rem;
    }


}

@media(max-width: 480px) {
    .title-line {
        display: block;
        white-space: normal;
    }

    h2 {
        margin-top: 0.5rem;
    }

    .description {
        margin: 1.5rem auto 2rem;
    }
}

/* ===== ACCESSIBILITY ===== */
@media(prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 4px;
}
