/* ==========================================================================
   1. Global Reset & Base Styles*/

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: system-ui, Arial, sans-serif;
    background: #111;
    color: #fff;
}

/* Pixel art rendering for all images */
img {
    max-width: none;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

/* ==========================================================================
   Header*/

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #111;
  border-bottom: 2px solid #222;
  width: 100%;
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-logo .logo-img {
  height: 50px;
  width: auto;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
}

.nav-item {
  color: rgb(255, 255, 255);
  text-decoration: none;
  font-family: "Jersey 10", system-ui, sans-serif;
  font-size: 1.6rem;
  text-transform: uppercase;
  padding: 0.5rem 1rem;
  transition: color 0.2s;
}

.nav-item:hover,
.nav-item:focus {
  color: #cfcfcf;
}

.hamburger-btn {
  display: none;
  cursor: pointer;
}

.hamburger-img {
  height: 24px;
  width: auto;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* Mobile */
@media (max-width: 768px) {

  .header-inner {
    justify-content: center;
    position: relative;
    padding: 1rem;
  }

  .header-logo {
    margin: 0;
  }

  .hamburger-btn {
    display: block;
    position: absolute;
    right: 1rem;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #111;
    border-bottom: 2px solid #222;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 0;
    transform: scaleY(0);
    transform-origin: top;
    opacity: 0;
    pointer-events: none;
    transition: all 0.25s ease;
  }

  #menu-check:checked ~ .nav-links {
    transform: scaleY(1);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-item {
    font-size: 1.8rem;
    padding: 0.8rem 2rem;
    display: block;
  }
}

/* Desktop*/
@media (min-width: 769px) {
  .nav-links {
    transform: none;
    opacity: 1;
    pointer-events: auto;
    position: static;
  }
}



/* ==========================================================================
   2. Hero Section*/

.hero {
    width: 100%;
    height: 100vh;
    position: relative;
    overflow: hidden;
}

.hero-sky,
.hero-land {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

.hero-sky { z-index: 1; }
.hero-land { 
    z-index: 3;
    object-position: center bottom;
}

.hero-logo {
    position: absolute;
    top: 50%;
    left: 48%;
    transform: translate(-50%, -50%);
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-img {
    width: 90%;
    height: auto;
    display: block;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    transform: translateY(-17%);
}

/* ==========================================================================
   3. In Progress Section*/

.in-progress {
    width: 100%;
    background: rgb(0, 0, 0);
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    overflow: hidden;
    padding-top: 40px;
    margin-bottom: 1px;
    position: relative;
    z-index: 1;
}

.in-progress h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    text-align: center;
}

.carousel {
    width: 100%;
    overflow: hidden;
    margin: 15px 0;
}

.carousel-track {
    display: flex;
    width: max-content;
}

.carousel-track img {
    width: 300px;
    height: 169px;
    object-fit: cover;
    margin: 0 8px;
    border-radius: 10px;
}

.carousel-track.left {
    animation: scroll-left 30s linear infinite;
}

.carousel-track.right {
    animation: scroll-right 30s linear infinite;
}

@keyframes scroll-left {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes scroll-right {
    0%   { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}

/* ==========================================================================
   4. Games Section*/

.games {
    width: 100%;
    height: 300vh;
    display: flex;
    flex-direction: column;
}

.game {
    overflow: hidden;
    width: 100%;
    height: 33.3333%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    position: relative;
}

#game1 { background-image: url('img/game1_bg.png'); }
#game2 { background-image: url('img/game2_bg.png'); }
#game3 { background-image: url('img/game3_bg.png'); }

.game-logo,
.game-logo-reverse {
    position: absolute;
    top: 10%;
    width: 45%;
    height: auto;
    z-index: 3;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

.game-logo        { right: 2%; }
.game-logo-reverse { left: 2%; }

.mascot-group,
.mascot-group-reverse {
    position: absolute;
    width: 33.3333%;
    height: 100%;
    z-index: 2;
}

.mascot-group        { left: 3%; }
.mascot-group-reverse { right: 3%; }

.mascot-back,
.mascot,
.mascot-front {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    height: 100%;
    width: auto;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

.mascot-back  { z-index: 1; }
.mascot       { z-index: 2; }
.mascot-front { z-index: 3; }

/* Game buttons (shared styles) */
.game-button,
.small-button,
.game-button-reverse {
	text-decoration: none;
    background-color: #ffffff;
    color: #000000;
    border: 4px solid #000000;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
    font-family: "Jersey 10", sans-serif;
    font-weight: 400;
    text-transform: uppercase;
    margin-bottom: 1vh;
}

.game-button:hover,
.small-button:hover,
.game-button-reverse:hover {
    background-color: #000000;
    color: #ffffff;
    border-color: #ffffff;
}

/* ==========================================================================
   5. Follow Journey Section*/

.section.follow {
    background: #111;
    padding: 4rem 2rem;
    text-align: center;
}

.section.follow h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
}

.carousel-portrait {
    display: flex;
    overflow: hidden;
    justify-content: center;
    max-width: 100vw;
}

.carousel-track-portrait {
    display: flex;
    animation: scroll 25s linear infinite;
    gap: 1rem;
}

.portrait {
    width: 180px;
    height: 320px;
    background: #555;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
    border-radius: 10px;
}

.tiktok-btn {
    margin-top: 2rem;
    padding: 1rem 2rem;
    background: #111;
    color: white;
    border: 2px solid white;
    cursor: pointer;
    border-radius: 10px;
}

/* ==========================================================================
   6. Footer*/

footer {
    background: #000;
    color: white;
    padding: 3rem 2rem;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    width: 100%;
    box-sizing: border-box;
}

footer .logo {
    font-size: 1.5rem;
    font-weight: bold;
}

footer .links {
    display: flex;
    gap: 4rem;
}

footer .col h4 {
    margin-bottom: 1rem;
}

footer .col a {
    display: block;
    color: white;
    text-decoration: none;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    border-radius: 10px;
    padding: 0.5rem 1rem;
    transition: background-color 0.3s;
}

footer .col a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

footer .socials {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
}

.socials a {
    width: 32px;
    height: 32px;
    display: inline-block;
    border-radius: 10px;
    overflow: hidden;
    vertical-align: middle;
}

.socials a img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* ==========================================================================
   7. Media Queries (ordered from small → large)*/

@media (max-width: 768px) {

    /* Hero */
    .hero {
        height: 30vh;
    }
    .hero-logo .logo-img {
        max-width: 220%;
    }

    /* In Progress */
    .in-progress {
        height: 65vh;
    }

    /* Games – mobile layout */
    .game-logo,
    .game-logo-reverse {
        top: 10%;
        left: 50%;
        transform: translateX(-50%);
        width: 90%;
        right: auto !important;
        z-index: 3;
    }

    .mascot-group,
    .mascot-group-reverse {
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 70%;
        height: 78%;
        right: auto !important;
        z-index: 2;
    }

    /* Force center + bottom positioning for buttons on mobile */
    .game-button,
    .small-button,
    .game-button-reverse {
        position: absolute !important;
        bottom: 10% !important;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        top: auto !important;
        padding: 12px 20vw;
        font-size: 1.8rem;
        z-index: 4;
    }

    .small-button {
        bottom: 4% !important;
        padding: 8px 15vw;
        font-size: 1.4rem;
    }

    /* Footer */
    footer {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    footer .logo {
        margin-bottom: 3rem;
    }

    footer .links {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
        width: 100%;
        max-width: 500px;
        margin-bottom: 2rem;
    }

    footer .links .col:nth-child(3) {
        grid-column: 1 / -1;
    }

    footer .socials {
        justify-content: center;
        margin-top: 1rem;
    }
}

@media (min-width: 769px) {

    /* In Progress */
    .in-progress {
        height: 70vh;
    }

    /* Games – desktop layout */
    .game-button {
        position: absolute;
        top: 75%;
        right: 5%;
        left: auto !important;
        bottom: auto !important;
        transform: none !important;
        padding: 12px 5vw;
        font-size: 2.5rem;
        z-index: 4;
        image-rendering: auto;
    }

    .small-button {
        position: absolute;
        top: 85%;
        right: 5%;
        left: auto !important;
        bottom: auto !important;
        transform: none !important;
        padding: 6px 2vw;
        font-size: 1.2rem;
        z-index: 4;
        image-rendering: auto;
    }

    .game-button-reverse {
        position: absolute;
        top: 75%;
        left: 5%;
        right: auto !important;
        bottom: auto !important;
        transform: none !important;
        padding: 12px 5vw;
        font-size: 2.5rem;
        z-index: 4;
        image-rendering: auto;
    }
}