/* =========================================================================
   Yolo Games — Landing page styles (2025 refactor)
   Core goals
   1. Logo top, game icons centered vertically, social/footer pinned bottom
   2. Easily tweak layout through CSS custom properties
   3. Separate desktop / mobile variables for quick design‑tokens
   =========================================================================*/

/* ---------- Design tokens (desktop defaults) ---------- */
:root {
    /* Palette */
    --color-bg:      #0E0E0E;
    --color-text:    #FFFFFF;

    /* Layout spacing */
    --gap-logo-top:      5vh;                /* distance from viewport top to logo */
    --gap-icons:         max(4vw, 40px);     /* gap between game icons */
    --icons-offset:      -30vh;               /* vertical shift for game icons (+down, –up) */
    --gap-social-bottom: 2vh;                /* distance from viewport bottom to social row */

    /* Sizing */
    --logo-width:        20vw;
    --logo-min-width:    500px;
    --game-icon-size:    120px;
    --game-icon-wrapper: 150px;

    /* Typography */
    --fs-game-title:     1.2rem;
    --fs-location:       0.9rem;
}

/* ---------- Mobile overrides (< 768 px) ---------- */
@media (max-width: 767px) {
    :root {
        --gap-logo-top:      5vh;
        --gap-icons:         10vw;
        --icons-offset:      -30vh;

        --logo-width:        75vw;
        --logo-min-width:    160px;
        --game-icon-size:    80px;

        --fs-game-title:     0.8rem;
    }
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body            { margin: 0; padding: 0; width: 100%; height: 100%; overflow: hidden; }

/* ---------- Global ---------- */
body{
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: "SF Pro Display", sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
}

/* =========================================================================
   Layout — three rows: logo / icons / social
   =========================================================================*/
.content{
    display: grid;
    grid-template-rows: auto 1fr auto;
    align-items: center;      /* vertical centering for middle row */
    justify-items: center;
    width: 100%;
    height: 100vh;
    text-align: center;
}

/* ---------- Logo ---------- */
.main-logo{
    width: var(--logo-width);
    min-width: var(--logo-min-width);
    margin-top: var(--gap-logo-top);
    filter: brightness(1);
}

/* ---------- Game icons grid ---------- */
.game-icons{
    display: grid;
    grid-template-columns: repeat(3, max-content);
    gap: var(--gap-icons);
    justify-content: center;
    margin-top: var(--icons-offset);

    /* fade‑in */
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .5s ease, transform .5s ease;
}
.game-icons.show { opacity: 1; transform: translateY(0); }

/* game icon wrapper */
.game-icon-wrapper{
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: var(--game-icon-wrapper);
    position: relative;
    transition: transform .3s ease;
}
.game-icon-wrapper:hover { transform: scale(1.05); }

/* game icon image */
.game-icon{
    width: var(--logo-width);            /* scales with logo variable */
    max-width: var(--game-icon-size);    /* clamp */
    height: auto;
}

/* game title */
.game-title{
    margin: .74vh 0 1.2vh;
    font-size: var(--fs-game-title);
    font-weight: 500;
    line-height: 1.05;
}
.game-title p { margin: 0; }

/* store links (hidden until hover / mobile tap) */
.store-links{
    position: absolute;
    top: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;

    opacity: 0;
    transform: translateY(-20px);
    transition: opacity .5s ease, transform .5s ease;
}
.game-icon-wrapper:hover .store-links { opacity: 1; transform: translateY(0); }
.store-icon{
    width: 6vw;
    min-width: 100px;
    cursor: pointer;
}

/* ---------- Social/footer ---------- */
.social{
    position: fixed;
    left: 0;
    right: 0;
    bottom: var(--gap-social-bottom);
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .5s ease, transform .5s ease;
}
.social.show { opacity: 1; transform: translateY(0); }

.social-icons{
    display: flex;
    gap: 24px;
    justify-content: center;
    margin-bottom: 12px;
}
.social-icon{
    width: 1.2vw;
    min-width: 24px;
    transition: transform .3s ease, opacity .3s ease;
}
.social-icon:hover { transform: scale(1.1); opacity: .8; cursor: pointer; }
.location { font-size: var(--fs-location); }

/* ---------- Invisible navigation zones ---------- */
.hidden-button{
    position: absolute;
    width: 30vw;
    height: 30vh;
}
#top-left-button  { top: 0; left: 0; }
#top-right-button { top: 0; right: 0; }

/* ---------- Mobile tweaks ---------- */
@media (max-width: 767px){
    /* game icons grid uses equal-width columns */
    .game-icons{
        grid-template-columns: repeat(3, 1fr);
    }

    .store-icon { min-width: 90px; }
}
