/* ==========================================
   Space Soccer Showdown - Main Stylesheet
   ========================================== */

:root {
    --color-bg: #0a0a0f;
    --color-bg-secondary: #12121a;
    --color-accent: #d68abf;
    --color-accent-light: #e8a8d4;
    --color-accent-dark: #a85d91;
    --color-text: #e8e8ec;
    --color-text-muted: #9898a8;
    --color-border: rgba(214, 138, 191, 0.2);
    --font-heading: 'Chakra Petch', sans-serif;
    --font-body: 'Chakra Petch', sans-serif;
    --glow-accent: 0 0 20px rgba(214, 138, 191, 0.4), 0 0 40px rgba(214, 138, 191, 0.2);
    --glow-accent-strong: 0 0 30px rgba(214, 138, 191, 0.6), 0 0 60px rgba(214, 138, 191, 0.3);
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    overflow-x: hidden;
    position: relative;
}

/* Starfield Background */
.stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 200%;
    pointer-events: none;
    background-image:
        radial-gradient(1px 1px at 20px 30px, white, transparent),
        radial-gradient(1px 1px at 40px 70px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 50px 160px, rgba(255,255,255,0.6), transparent),
        radial-gradient(1px 1px at 90px 40px, white, transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.7), transparent),
        radial-gradient(1px 1px at 160px 120px, white, transparent);
    background-size: 200px 200px;
    animation: twinkle 4s ease-in-out infinite;
    opacity: 0.5;
    z-index: 0;
}

.stars--medium {
    background-image:
        radial-gradient(1.5px 1.5px at 150px 50px, var(--color-accent-light), transparent),
        radial-gradient(1.5px 1.5px at 80px 120px, white, transparent),
        radial-gradient(1.5px 1.5px at 200px 180px, rgba(255,255,255,0.9), transparent);
    background-size: 300px 300px;
    animation: twinkle 6s ease-in-out infinite reverse;
    opacity: 0.4;
}

.stars--large {
    background-image:
        radial-gradient(2px 2px at 100px 100px, var(--color-accent), transparent),
        radial-gradient(2px 2px at 250px 50px, white, transparent);
    background-size: 400px 400px;
    animation: twinkle 8s ease-in-out infinite;
    opacity: 0.3;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

/* Header */
.header {
    padding: 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 0;
    line-height: 0;
}

.header--hidden {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.logo-link {
    display: block;
    transition: filter 0.3s ease;
}

.logo-link:hover {
    filter: brightness(1.1);
}

.logo {
    width: 100%;
    height: auto;
    display: block;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 2rem 1rem 4rem;
    position: relative;
    z-index: 10;
}

/* Steam Button */
.steam-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
    color: white;
    text-decoration: none;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    padding: 1rem 2rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: var(--glow-accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.steam-button--large {
    font-size: 1.4rem;
    padding: 1.25rem 3rem;
}

.steam-button:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: var(--glow-accent-strong);
    background: linear-gradient(135deg, var(--color-accent-light) 0%, var(--color-accent) 100%);
}

.steam-button:active {
    transform: translateY(-1px);
}

.steam-icon {
    width: 28px;
    height: 28px;
}

/* Trailer Section */
.trailer {
    padding: 2rem 1rem 4rem;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

.trailer-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 0 40px rgba(214, 138, 191, 0.3), 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 2px solid var(--color-border);
}

.trailer-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Features Section */
.features {
    padding: 4rem 1rem;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

.feature {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-bottom: 6rem;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.feature.visible {
    opacity: 1;
    transform: translateY(0);
}

.feature--right {
    direction: rtl;
}

.feature--right > * {
    direction: ltr;
}

.feature__image-container {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    border: 2px solid var(--color-border);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.feature__image-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(214, 138, 191, 0.1) 100%);
    pointer-events: none;
    z-index: 1;
}

.feature__image-container:hover {
    transform: scale(1.02);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5), var(--glow-accent);
}

.feature__image {
    width: 100%;
    height: auto;
    display: block;
}

.feature__content {
    padding: 2rem;
}

.feature__title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--color-accent);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1.2;
    text-shadow: 0 0 20px rgba(214, 138, 191, 0.3);
}

.feature__text {
    font-size: 1.15rem;
    color: var(--color-text);
    line-height: 1.8;
}

/* CTA Section */
.cta {
    text-align: center;
    padding: 6rem 1rem;
    background: linear-gradient(180deg, transparent 0%, rgba(214, 138, 191, 0.05) 50%, transparent 100%);
    position: relative;
    z-index: 10;
}

.cta__title {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 900;
    color: var(--color-accent);
    margin-bottom: 2rem;
    text-transform: uppercase;
    text-shadow: var(--glow-accent);
}

.cta__buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.cta__buttons .steam-button {
    flex: 1 1 0;
    max-width: 460px;
    justify-content: center;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .feature {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .feature--right {
        direction: ltr;
    }

    .feature__title {
        font-size: 1.8rem;
    }

    .cta__title {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 16px;
    }

    .steam-button--large {
        font-size: 1.1rem;
        padding: 1rem 2rem;
    }

    .feature__content {
        padding: 1rem;
    }

    .feature__title {
        font-size: 1.5rem;
    }

    .feature__text {
        font-size: 1rem;
    }

    .cta__title {
        font-size: 1.8rem;
    }

}

@media (max-width: 480px) {
    .steam-button--large {
        font-size: 1rem;
        padding: 0.875rem 1.5rem;
    }

    .trailer {
        padding: 1rem;
    }

    .features {
        padding: 2rem 1rem;
    }

    .feature {
        margin-bottom: 4rem;
    }

    .cta {
        padding: 4rem 1rem;
    }
}

/* Page Content Wrapper (sits above reveal footer) */
.page-content {
    position: relative;
    z-index: 1;
    background-color: var(--color-bg);
    overflow: hidden;
}

/* Reveal Footer */
.reveal-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: -1;
    line-height: 0;
}

.reveal-footer__img {
    width: 100%;
    height: auto;
    display: block;
}

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

    html {
        scroll-behavior: auto;
    }
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 3px;
}
