/* ==========================================================================
   4. HERO SECTION
   ========================================================================== */
.hero {
    /* Set a minimum height so the hero fills the viewport */
    min-height: 100vh;
    /* Takes up 100% of the screen height */

    background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('images/hero.jpg');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;

    /* Centering controls */
    display: flex;
    justify-content: center;
    /* Centers horizontally */
    align-items: center;
    /* Centers vertically */
    text-align: center;

    isolation: isolate;
}

.hero-content {
    max-width: 1100px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 0 1.5rem;
    /* Adds small padding for mobile screens */
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 150px;
    /* Adjust height of the fade area */
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, #000000 100%);
    pointer-events: none;
    /* Allows clicks through the overlay */
}

/* ==========================================================================
   2. TYPOGRAPHY & UTILITIES
   ========================================================================== */
h1 {
    max-width: 100%;
    /* Prevents artificial line breaking on narrow screens */
    font-family: 'Rajdhani', sans-serif;
    font-size: clamp(1.8rem, 6.5vw, 5.2rem);
    /* Lowered minimum so it fits mobile displays */
    line-height: 0.95;
    font-weight: 400;
    text-align: center;
    text-transform: uppercase;
    margin: 0 auto;
}

.text {
    color: #ffffff;
    /* Bright white text */
    text-shadow:
        0 0 6px rgba(255, 255, 255, 0.25),
        /* Soft, dim inner glow */
        0 0 20px rgba(0, 0, 0, 0.8);
    /* Subtle dark drop shadow for contrast */
}

/* Container holds the whole phrase and runs the slow-to-fast 5s flicker */
h1 span.accent {
    color: #ccffcc;
    /* Bright core color */
    text-shadow:
        0 0 4px #39FF14,
        0 0 12px #39FF14,
        0 0 25px #39FF14,
        0 0 45px rgba(57, 255, 20, 0.5);
    font-size: inherit;
    mix-blend-mode: normal;
    display: inline-block;
    white-space: nowrap;

    opacity: 0;
    /* 5-second duration with step transitions */
    animation: neonSignFlicker 2s steps(1, end) forwards;
    animation-delay: 2.5s;
}

/* Individual letters maintain tight spacing */
h1 span.accent span {
    display: inline-block;
    font-weight: 500;
}

/* ==========================================================================
   5-SECOND SLOW-TO-FAST BACKSTREET NEON STARTUP
   ========================================================================== */
@keyframes neonSignFlicker {
    0% {
        opacity: 0;
        text-shadow: none;
    }

    /* --- PHASE 1: SLOW, HEAVY STUTTERS (0s to ~3.5s) --- */
    15% {
        opacity: 0.2;
        text-shadow: 0 0 2px rgba(57, 255, 20, 0.3);
    }

    22% {
        opacity: 0.0;
        text-shadow: none;
    }

    35% {
        opacity: 0.5;
        text-shadow: 0 0 6px #39FF14, 0 0 15px #39FF14;
    }

    42% {
        opacity: 0.05;
        text-shadow: none;
    }

    58% {
        opacity: 0.4;
        text-shadow: 0 0 3px #39FF14;
    }

    65% {
        opacity: 0.1;
        text-shadow: none;
    }

    /* --- PHASE 2: RAPID-FIRE SPEED-UP (~3.5s to 5s) --- */
    72% {
        opacity: 0.8;
        text-shadow: 0 0 5px #39FF14, 0 0 12px #39FF14;
    }

    76% {
        opacity: 0.3;
        text-shadow: 0 0 2px #39FF14;
    }

    80% {
        opacity: 0.95;
        text-shadow: 0 0 4px #39FF14, 0 0 15px #39FF14;
    }

    83% {
        opacity: 0.5;
        text-shadow: 0 0 3px #39FF14;
    }

    86% {
        opacity: 1;
        text-shadow: 0 0 4px #39FF14, 0 0 12px #39FF14, 0 0 25px #39FF14;
    }

    89% {
        opacity: 0.7;
        text-shadow: 0 0 3px #39FF14;
    }

    92% {
        opacity: 1;
        text-shadow: 0 0 4px #39FF14, 0 0 12px #39FF14, 0 0 25px #39FF14, 0 0 45px rgba(57, 255, 20, 0.5);
    }

    95% {
        opacity: 0.9;
        text-shadow: 0 0 4px #39FF14;
    }

    /* --- STABLE ON --- */
    100% {
        opacity: 1;
        text-shadow: 0 0 4px #39FF14, 0 0 12px #39FF14, 0 0 25px #39FF14, 0 0 45px rgba(57, 255, 20, 0.5);
    }
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.125rem);
    line-height: 1.6;
    color: #dee1e4;
    text-align: center;
    max-width: 700px;
    margin: -3rem auto 0 auto;
    /* Reduced from 1.5rem to 0.5rem */
    font-weight: 400;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}

@keyframes fadeIn {
    to {
        opacity: 0.9;
    }
}