/* ========================================
   HERO SECTION
   Hero content, CTA button, stats
======================================== */

.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    overflow: hidden;
    z-index: 1;
    padding-top: 6vh;
}

.hero-overlay {
    display: none;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: left;
    padding: 0 2em 0 3.5rem;
    max-width: 50%;
    box-sizing: border-box;
}

.hero-headline {
    font-size: clamp(2rem, 5vw + 1rem, 4rem); /* Fluid typography */
    white-space: normal; /* Allow wrap for long headlines */
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    line-height: 1.1;
}

.hero-headline .accent-text {
    display: inline-block;
    background: linear-gradient(90deg, #f1a817 0%, #c1840b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: var(--accent-color);
    /* Fallback */
}

.hero-subheadline {
    text-align: justify;
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1.2rem;
    line-height: 1.6;
    font-weight: 300;
}

/* CTA Button */
.hero-cta,
a.hero-cta,
a.hero-cta:link,
a.hero-cta:visited,
a.hero-cta:hover,
a.hero-cta:active {
    background: #ffffff;
    background-color: #ffffff;
    background-image: none;
    color: #000000;
    -webkit-text-fill-color: #000000;
    border: none;
    padding: 16px 48px;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 30px rgba(255, 255, 255, 0.3);
    isolation: isolate;
    text-decoration: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    color-scheme: light only;
    forced-color-adjust: none;
}

.hero-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle 150px at var(--btn-mouse-x, 50%) var(--btn-mouse-y, 50%),
            rgba(255, 255, 247, 1) 0%,
            rgba(255, 250, 205, 1) 25%,
            rgba(244, 210, 191, 0.5) 50%,
            rgba(244, 210, 191, 0.2) 70%,
            transparent 100%);
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: -1;
    pointer-events: none;
    filter: blur(10px);
}

.hero-cta:hover::before {
    opacity: 1;
}

/* Hero Stats */
.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
    padding: 2rem 3rem;
    border: none;
    border-radius: 20px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
    position: relative;
    z-index: 0;
    overflow: visible;
}

/* Background layer - glassmorphism */
.hero-stats::after {
    content: "";
    z-index: -1;
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(0deg, rgb(30, 30, 30), rgb(20, 20, 20));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    left: 0;
    top: 0;
    border-radius: 20px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Glow layer - animated border */
.hero-stats::before {
    content: "";
    background: linear-gradient(45deg,
            var(--accent-color),
            var(--text-light),
            var(--accent-color),
            var(--text-light),
            var(--accent-color),
            var(--text-light),
            var(--accent-color));
    position: absolute;
    top: -2px;
    left: -2px;
    background-size: 400%;
    z-index: -1;
    width: calc(100% + 4px);
    height: calc(100% + 4px);
    filter: blur(8px);
    animation: glowing 15s linear infinite;
    border-radius: 20px;
}

@keyframes glowing {
    0% {
        background-position: 0 0;
    }

    50% {
        background-position: 400% 0;
    }

    100% {
        background-position: 0 0;
    }
}

.stat-item {
    text-align: center;
    position: relative;
    z-index: 1;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent-color);
    font-family: 'Do Hyeon', sans-serif;
    line-height: 1;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 20px rgba(241, 168, 23, 0.5);
}

.stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
}

.stat-divider {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom,
            transparent,
            rgba(255, 255, 255, 0.3),
            transparent);
    position: relative;
    z-index: 1;
}

/* Animations */
@keyframes cyberGlow {

    0%,
    100% {
        text-shadow: 0 0 20px var(--text-light);
    }

    50% {
        text-shadow: 0 0 30px var(--text-light), 0 0 40px var(--text-light);
    }
}

/* Hero Image (Right Side) */
.hero-image-container {
    position: absolute;
    right: 2%;
    top: 0;
    bottom: 0;
    width: 45%;
    max-width: 700px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    pointer-events: none;
    padding-bottom: 120px;
}

.hero-roblox-img {
    width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 50px rgba(241, 168, 23, 0.15));
    animation: floatImage 6s ease-in-out infinite;
}

@keyframes floatImage {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-30px);
    }
}

/* Responsive adjustments for Hero Image */
@media (max-width: 1200px) {
    .hero-image-container {
        right: -5%;
        opacity: 0.8;
    }
}

@media (max-width: 992px) {
    .hero-section {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding-top: 100px;
        padding-bottom: 40px;
        min-height: auto;
    }

    .hero-content {
        max-width: 100%;
        padding: 0 2rem 2rem;
        text-align: center;
    }

    .hero-image-container {
        position: relative;
        width: 100%;
        height: auto;
        min-height: 300px;
        right: auto;
        bottom: auto;
        top: auto;
        margin-top: 2rem;
        opacity: 1;
        z-index: 1;
        /* order: -1; Removed to keep content (CTA) first for better UX */
    }

    .hero-roblox-img {
        max-width: 80%;
        margin: 0 auto;
    }

    .hero-stats {
        padding: 1.5rem;
        gap: 2rem;
        margin-top: 2rem;
        flex-direction: row; /* Keep row on tablet */
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding-top: 110px;
        padding-bottom: 30px;
    }

    .hero-content {
        padding: 0 1.5rem;
    }

    .hero-headline {
        font-size: 2.5rem;
    }

    .hero-subheadline {
        font-size: 1rem;
        margin-bottom: 2rem;
        padding: 0; /* Removed 5% padding to maximize width */
    }

    .hero-image-container {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 100%;
        height: 100%;
        margin-top: 0;
        opacity: 0.15; /* Dang mo */
        z-index: 0; /* Behind content */
        pointer-events: none;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .hero-roblox-img {
        max-width: 100%; /* Make it larger to fill background */
        height: 100%;
        object-fit: contain;
        filter: blur(2px); /* Optional: slight blur for background effect */
    }

    .hero-stats {
        position: relative;
        z-index: 2; /* On top of image */
        flex-direction: column;
        gap: 1.5rem;
        max-width: 100%; 
        padding: 1.2rem;
        background: rgba(30, 30, 30, 0.6); /* Ensure text is readable */
        backdrop-filter: blur(10px);
    }

    .hero-content {
        position: relative;
        z-index: 2;
    }

    .stat-divider {
        width: 100px;
        height: 1px;
        background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.3), transparent);
    }

    .hero-cta {
        width: 100%;
        max-width: 300px;
        display: block;
        margin: 0 auto;
        position: relative;
        z-index: 2;
    }
}

@media (max-width: 480px) {
    .hero-headline {
        font-size: clamp(1.8rem, 8vw, 2.2rem); /* Fluid scaling */
        line-height: 1.2;
    }

    .hero-subheadline {
        padding: 0;
        font-size: 0.95rem; /* Slightly smaller */
    }

    .hero-stats {
        max-width: 100%;
        width: 100%;
        gap: 1rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
}
/* ========================================
   HERO ENTRY ANIMATIONS
======================================== */
.hero-headline,
.hero-subheadline,
.hero-cta,
.hero-stats,
.hero-image-container {
    opacity: 0;
    transform: translateY(30px);
    transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
}

.hero-image-container {
    transform: translateX(50px) translateY(0);
}

.hero-active .hero-headline {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.1s;
}

.hero-active .hero-subheadline {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.3s;
}

.hero-active .hero-cta {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.5s;
}

.hero-active .hero-stats {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.7s;
}

.hero-active .hero-image-container {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.9s;
}

