/* Homepage CSS */

.hero {
    position: relative;
    height: calc(55vh + var(--navbar-height));
    width: 100%;
    display: flex;
    margin-top: var(--navbar-height);
    overflow: hidden;
}

#hero-container {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

#hero-video-container {
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: 0;
    animation: fadeVideo 1.8s var(--transition-smooth) forwards;
    animation-delay: 0.2s;
}

#hero-video-container::after {
    content: "";
    position: absolute;
    width: 100%;
    height: 25%;
    left: 0;
    bottom: 0;
    background:
            linear-gradient(
                    to bottom,
                    transparent 0%,
                    var(--bg-primary) 85%,
                    var(--bg-primary) 100%
            );
}

#hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 700px;
}

.hero-logo img {
    width: 300px;
    opacity: 0;
    transform: translateY(24px);
    animation: fadeUp 0.9s var(--transition-smooth) forwards;
    animation-delay: 0.5s;
}

.hero-tagline {
    width: fit-content;
    max-width: 700px;
    font-size: 20px;
    line-height: 1.1;
    letter-spacing: 0.03em;
    text-align: center;
    opacity: 0;
    transform: translateY(24px);
    animation: fadeUp 0.9s ease forwards;
    animation-delay: 0.75s;
}

.hero-tagline span {
    color: var(--accent);
}

/* Games Section */

.featured-games {
    height: auto;
    align-items: flex-start;
    position: relative;
    display: flex;
    padding: 100px 30px 120px 30px;
    justify-content: center;
    background: var(--bg-primary);
}

#game-container {
    width: 100%;
    height: 100%;
    max-width: 1300px;
    box-sizing: border-box;
}

#game-content {
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 0 auto;
    gap: 30px;
    flex-wrap: nowrap;
}

.game-card {
    opacity: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 1 1 240px;
    max-width: 300px;
    min-width: 0;
    transition: all 0.2s ease;
    transform: translateY(30px);
    animation: fadeUp 0.9s var(--transition-smooth) forwards;
}

.game-card:nth-child(1) {
    animation-delay: 1s;
}

.game-card:nth-child(2) {
    animation-delay: 1.15s;
}

.game-card:nth-child(3) {
    animation-delay: 1.3s;
}

.game-card:nth-child(4) {
    animation-delay: 1.45s;
}

.game-poster {
    width: 100%;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 12px;
    position: relative;
}

.game-poster a {
    display: block;
    width: 100%;
    height: 100%;
}

.game-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1);
    transition:
            transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
            filter 0.4s ease;
}

.game-poster:hover img {
    transform: scale(1.05);
}

.game-content {
    margin-top: 40px;
}

.game-content h3 {
    font-size: 1.3rem;
    letter-spacing: 0.05em;
}

.game-content h3 a {
    text-decoration: none;
    color: white;
    transition: color 0.2s ease;
}

.game-content h3 a:hover {
    color: var(--accent-hover);
}

.game-description {
    font-size: 1rem;
    opacity: 0.6;
    line-height: 1.4;
    margin-top: 12px;
}

/* Animations */

@keyframes fadeVideo {
    from {
        opacity: 0;
        transform: scale(1.05);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Media Queries */

@media (max-width: 700px) {
    .hero {
        height: calc(50vh + var(--navbar-height));
    }

    .hero-logo img {
        width: 260px;
    }

    .hero-tagline {
        font-size: 16px;
        line-height: 1;
    }

    .featured-games {
        padding: 70px 20px 70px 20px;
    }

    #game-content {
        flex-direction: column;
        align-items: center;
        gap: 48px;
    }

    .game-card {
        width: 100%;
        max-width: 400px;
        flex: none;
    }

    .game-content {
        margin-top: 20px;
    }
}
