/**
 * Game Foundry - Pages Stylesheet
 * 
 * Page-specific layouts and section styles.
 * 
 * @author Game Foundry
 * @version 2.0.0
 */


/* =============================================================================
   0. SECTION BASE
   Shared foundation for all content sections that stack above the hero video.
   Apply .section alongside each section's own class.
   ============================================================================= */

.section {
    position: relative;
    z-index: 1;
    padding: var(--space-xl) 0;
}


/* =============================================================================
   1. SITE HEADER
   Sticky navigation with transparent-to-blurred background on scroll
   ============================================================================= */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: var(--space-lg) 0;
    isolation: isolate;
}

.site-header::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--gradient-fade);
    pointer-events: none;
    z-index: -1;
}

.header-inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo */
.header-logo-link {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.header-logo {
    height: 40px;
    width: auto;
}

/* Shared logo hover effect (header + footer) */
.header-logo,
.footer-association-logo {
    opacity: 1;
    transition: opacity var(--transition-base);
}

.header-logo-link:hover .header-logo,
.footer-association-logo:hover {
    opacity: 0.8;
}

/* Navigation - fullscreen overlay on mobile, inline on desktop */
.header-nav {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-lg);
    background-color: var(--color-black-fade);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-slow), visibility var(--transition-slow);
    z-index: 99;
}

.header-nav.is-open {
    opacity: 1;
    visibility: visible;
}

.header-nav-link {
    color: var(--color-gold);
    text-decoration: none;
    font-size: 1.6rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transition: color var(--transition-fast);
}

.header-nav-link:hover {
    color: var(--color-gold);
}

/* Hamburger toggle - shown on mobile, hidden on desktop */
.nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    padding: 6px;
    background: none;
    border: none;
    z-index: 101;
    flex-shrink: 0;
}

.nav-toggle__bar {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--color-white);
    border-radius: 1px;
    transition: transform var(--transition-base), opacity var(--transition-base);
    transform-origin: center;
}

/* Animated X when open */
.nav-toggle.is-open .nav-toggle__bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-open .nav-toggle__bar:nth-child(2) {
    opacity: 0;
}

.nav-toggle.is-open .nav-toggle__bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}


/* =============================================================================
   2. HERO SECTION
   Full-screen landing section with video background
   ============================================================================= */

.hero {
    position: relative;
    overflow: hidden;
}

.hero-inner {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

/* Background video - fixed position for parallax scroll effect.
   Uses width/height: 100% + object-fit: cover instead of min-width/min-height
   to keep the element exactly viewport-sized (no horizontal overflow).
   html/body overflow-x: hidden acts as a safety net. */
.hero-video {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.5; /* Dimmed to not overpower content */
    filter: blur(4px);
    pointer-events: none;
    z-index: -2;
    will-change: transform;
}

/* Radial gradient overlay for depth and focus on center content */
.hero-overlay {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at top, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, .9));
    z-index: -1;
}

.hero-content {
    text-align: center;
    padding: var(--space-xl) 32px 32px;
}

.hero-logo {
    width: clamp(160px, 40vw, 300px);
    height: auto;
    margin: 0 auto var(--space-lg);
    display: block;
    filter: drop-shadow(0 0 30px rgb(var(--color-gold) / 0.5));
}

/* Scroll indicator - animated triangle */
.hero-scroll-indicator {
    position: absolute;
    bottom: var(--space-lg);
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.5rem;
    color: var(--color-gold);
    opacity: 1;
    animation: scroll-bounce 2.0s ease-in-out infinite;
    cursor: url("/assets/hammer.cur"), pointer;
    transition: opacity var(--transition-slow);
}

.hero-scroll-indicator:hover {
    color: var(--color-red);
}

.hero-scroll-indicator.hidden {
    opacity: 0;
    pointer-events: none;
}

@keyframes scroll-bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(30px); }
}

.hero-headline {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 auto;
    line-height: var(--leading-loose);
}

.hero-subline {
    font-size: 0.9rem;
    max-width: var(--content-sub);
    margin: var(--space-sm) auto 0;
}

.hero-cta-group {
    margin-top: var(--space-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    justify-content: center;
}


/* =============================================================================
   3. GAMES SECTION
   Curated grid of in-house and published games
   ============================================================================= */

.games {
    text-align: center;
    background: var(--gradient-gold);
}

.games__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md);
    justify-content: center;
}

/* See All CTA */
.games__cta {
    margin-top: var(--space-lg);
}

.games__see-all {
    font-size: var(--text-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-decoration: underline;
    text-underline-offset: 0.3em;
    text-decoration-thickness: 1px;
    transition: color var(--transition-base), text-decoration-color var(--transition-base);
}

.games__see-all:hover {
    color: var(--color-gold);
    text-decoration-color: var(--color-gold);
}


/* =============================================================================
   4. WHAT WE DO SECTION
   Three-column layout: Create, Publish, Support
   ============================================================================= */

.what-we-do {
    padding: 0 0 var(--space-xl);
    text-align: center;
}

.what-we-do__columns {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-lg);
    justify-content: center;
}

.what-we-do__column {
    flex: 1;
    text-align: center;
}

.what-we-do__title {
    margin-bottom: var(--space-sm);
}

.what-we-do__description {
    margin-bottom: var(--space-lg);
}

.what-we-do__proof {
    font-size: var(--text-sm);
    color: var(--color-smoke);
}


/* =============================================================================
   5. PAGE TITLE SECTION
   Centered h1 title for page headers
   ============================================================================= */

.page-title-section {
    padding: calc(var(--header-height) + var(--space-xl)) 0 var(--space-lg);
    text-align: center;
}


/* =============================================================================
   6. COMMUNITY SECTION
   Two-column layout: content left, newsletter right
   ============================================================================= */


/* =============================================================================
   8. SITE FOOTER
   Three-column layout: Game Foundry | Association | Contact
   ============================================================================= */

.site-footer {
    background: var(--gradient-coal);
    padding: var(--space-xl) 0 0;
}

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-lg);
}

.footer-column {
    width: 100%;
    min-width: 0;
}

/* Content elements */
.footer-label {
    display: block;
    margin-bottom: var(--space-md);
    text-align: inherit;
}

.footer-text {
    margin-bottom: var(--space-md);
}

.footer-association-logo {
    max-width: 100%;
    height: auto;
    display: inline-block;
}

/* Bottom bar */
.footer-bottom {
    margin-top: var(--space-md);
    padding: var(--space-md) 0 var(--space-md);
    text-align: center;
    font-size: var(--text-sm);
    border-top: 1px solid var(--color-smoke);
    color: var(--color-smoke);
}

.footer-bottom p {
    margin-bottom: 0;
}

.footer-bottom a {
    color: var(--color-smoke);
    text-decoration: none;
}

.footer-bottom a:hover {
    color: var(--color-gold);
}


/* =============================================================================
   9. SPLIT SECTION
   Reusable two-column layout: image + content
   Use .split-section--reversed for content left, image right
   ============================================================================= */

.split-section {
    padding: var(--space-xl) 0;
}

.split-section__tagline {
    color: var(--color-gold);
    font-style: italic;
    margin-bottom: var(--space-md);
}

/* =============================================================================
   10. CONTACT PAGE
   Contact form with intent selector for business inquiries
   ============================================================================= */



/* =============================================================================
   11. ABOUT PAGE
   Full viewport placeholder page
   ============================================================================= */

.about-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-page .container {
    text-align: center;
}

.about-page__title {
    font-size: var(--text-xl);
    margin-bottom: var(--space-lg);
}

.about-page__content {
    max-width: var(--content-sub);
    margin: 0 auto;
}



/* =============================================================================
   14. MEDIA QUERIES
   Mobile-first: base styles above are mobile. Desktop enhancements below.
   ============================================================================= */

/* -----------------------------------------------------------------------------
   14.1 Desktop (≥769px)
   Enhancements for larger screens
   ----------------------------------------------------------------------------- */

@media (min-width: 769px) {

    /* Header — inline nav, hide hamburger */
    .nav-toggle {
        display: none;
    }

    .header-nav {
        position: static;
        flex-direction: row;
        background-color: transparent;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        opacity: 1;
        visibility: visible;
        transition: none;
        margin-left: auto;
        z-index: auto;
    }

    .header-nav-link {
        font-size: var(--text-sm);
    }

    /* Hero — wider layout */
    .hero-content {
        padding: var(--space-xl) 0 48px;
    }

    .hero-headline {
        font-size: 1.5rem;
        max-width: var(--content-wide);
    }

    .hero-subline {
        font-size: var(--text-base);
    }

    .hero-cta-group {
        flex-direction: row;
        flex-wrap: wrap;
    }

    /* What We Do — three columns */
    .what-we-do__columns {
        flex-direction: row;
    }

    .what-we-do__column {
        max-width: var(--column-max);
    }

    /* Games — multi-column grid */
    .games__grid {
        grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 340px));
    }

    /* Community section — desktop layout */

    .footer-inner {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
        text-align: left;
    }

    .footer-column {
        width: auto;
        flex: 1;
    }

    .footer-column:nth-child(2) { text-align: center; }
    .footer-column:nth-child(3) { text-align: right; }

    .footer-association-logo {
        max-width: 240px;
    }

    /* About page — desktop size */
    .about-page__title {
        font-size: var(--text-3xl);
    }
}


/* -----------------------------------------------------------------------------
   14.2 Small phones (≤480px)
   Tighter spacing for the smallest screens
   ----------------------------------------------------------------------------- */

@media (max-width: 480px) {

    /* B3: Tighter container padding to reclaim content space */
    .container {
        padding: 0 16px;
    }
}
