@font-face {
    font-family: "ThaleahFat";
    src: url("../src/fonts/ThaleahFat.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}


/* ==================== VARIABLES ==================== */

:root {

    --background: #162319;
    --background-2: #243526;

    --text: #C9A85C;
    --link: #A4C978;
    --header: #E8E4D0;
    --button: #9FCB78;

    --border: #435046;

    --max-width: 1200px;

    --pixel-font: "ThaleahFat", monospace;
    --body-font: Arial, Helvetica, sans-serif;
}


/* ==================== RESET ==================== */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}


html {
    scroll-behavior: smooth;
}


body {
    background: var(--background);
    color: var(--text);
    font-family: var(--body-font);
    font-size: 16px;
    line-height: 1.7;
}


img {
    display: block;
    max-width: 100%;
}


a {
    color: var(--link);
    text-decoration: none;
}


a:hover {
    color: var(--header);
}


/* ==================== CONTAINER ==================== */

.container {
    width: min(100% - 40px, var(--max-width));
    margin: 0 auto;
}


/* ==================== HEADER ==================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;

    background: var(--background);
    border-bottom: 2px solid var(--border);
}


.nav-container {
    min-height: 76px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}


.site-logo {
    color: var(--header);

    font-family: var(--pixel-font);
    font-size: 2rem;

    letter-spacing: 1px;
}


.site-logo:hover {
    color: var(--button);
}


/* ==================== NAVIGATION ==================== */

.main-nav {
    display: flex;
    align-items: center;
    gap: 35px;
}


.main-nav a {
    color: var(--header);

    font-family: var(--pixel-font);
    font-size: 1.3rem;

    transition:
        color 0.2s ease,
        transform 0.2s ease;
}


.main-nav a:hover {
    color: var(--button);
    transform: translateY(-2px);
}


/* ==================== MOBILE MENU ==================== */

.menu-toggle {
    display: none;

    background: transparent;
    border: 0;

    color: var(--header);

    font-size: 1.8rem;
    cursor: pointer;
}


/* ==================== HERO ==================== */

.hero {
    position: relative;

    min-height: 650px;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    background:
        linear-gradient(
            rgba(22, 35, 25, 0.92),
            rgba(22, 35, 25, 0.92)
        );
}


/* Pixel-style background grid */

.hero::before {
    content: "";

    position: absolute;
    inset: 0;

    opacity: 0.12;

    background-image:
        linear-gradient(
            var(--border) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            var(--border) 1px,
            transparent 1px
        );

    background-size: 32px 32px;

    pointer-events: none;
}


/* ==================== HERO NINJAS ==================== */

.hero-ninjas {
    position: absolute;
    inset: 0;

    overflow: hidden;

    pointer-events: none;
}


.hero-ninja {
    position: absolute;

    max-width: none;

    image-rendering: pixelated;

    opacity: 0.9;

    transition:
        transform 0.3s ease,
        opacity 0.3s ease;
}


.hero-ninja-left {
    left: 5%;
    bottom: 5%;

    height: 300px;

    transform: scaleX(-1);
}


.hero-ninja-right {
    right: 5%;
    bottom: 5%;

    height: 300px;
}


/* ==================== HERO CONTENT ==================== */

.hero-content {
    position: relative;

    z-index: 2;

    text-align: center;

    max-width: 800px;

    padding: 80px 0;
}


.hero-eyebrow,
.section-eyebrow {
    color: var(--link);

    font-family: var(--pixel-font);

    font-size: 1.15rem;

    letter-spacing: 2px;

    text-transform: uppercase;
}


.hero h1 {
    margin: 15px 0 20px;

    color: var(--header);

    font-family: var(--pixel-font);

    font-size: clamp(4rem, 10vw, 8rem);

    line-height: 0.9;

    letter-spacing: 3px;

    text-shadow:
        4px 4px 0 var(--border);
}


.hero-tagline {
    max-width: 650px;

    margin: 0 auto 35px;

    color: var(--text);

    font-size: 1.1rem;
}


/* ==================== BUTTONS ==================== */

.hero-buttons,
.game-actions {
    display: flex;

    flex-wrap: wrap;

    gap: 15px;

    margin-top: 25px;
}


.hero-buttons {
    justify-content: center;
}


.button {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-height: 48px;

    padding: 10px 24px;

    background: var(--button);

    border: 2px solid var(--button);

    color: var(--background);

    font-family: var(--pixel-font);

    font-size: 1.15rem;

    letter-spacing: 1px;

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}


.button:hover {
    background: var(--header);

    border-color: var(--header);

    color: var(--background);

    transform: translateY(-2px);
}


.button-secondary {
    background: transparent;

    color: var(--button);

    border-color: var(--button);
}


.button-secondary:hover {
    background: var(--button);

    color: var(--background);
}


/* ==================== GAMES ==================== */

.featured-game {
    padding: 100px 0;

    background: var(--background-2);
}


.section-heading {
    max-width: 800px;

    margin: 0 auto 70px;

    text-align: center;
}


.section-heading h2 {
    margin: 10px 0 15px;

    color: var(--header);

    font-family: var(--pixel-font);

    font-size: clamp(2.5rem, 6vw, 4.5rem);

    line-height: 1;

    letter-spacing: 2px;
}


.section-heading > p:last-child {
    font-size: 1.05rem;
}


/* ==================== INDIVIDUAL GAMES ==================== */

.game-entry {
    padding: 70px 0;

    border-top: 2px solid var(--border);
}


.game-entry:first-of-type {
    border-top: none;
    padding-top: 0;
}


.game-entry + .game-entry {
    margin-top: 20px;
}


/* ==================== GAME LAYOUT ==================== */

.game-layout {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr);

    gap: 70px;

    align-items: center;
}


.game-info h3,
.itch-widget h3 {
    margin: 10px 0 20px;

    color: var(--header);

    font-family: var(--pixel-font);

    font-size: 2.4rem;

    line-height: 1;
}


.game-info p {
    margin-bottom: 18px;
}


.game-info .section-eyebrow {
    margin-bottom: 5px;
}


/* ==================== ITCH ==================== */

.itch-widget {
    width: 100%;
}


.itch-widget h3 {
    text-align: center;
}


.itch-frame {
    width: 100%;

    overflow: hidden;

    border: 2px solid var(--border);

    background: var(--background);
}


.itch-frame iframe {
    display: block;

    width: 100%;

    max-width: 560px;

    margin: 0 auto;

    border: 0;
}


/* ==================== ABOUT ==================== */

.about {
    padding: 100px 0;

    background: var(--background);
}


.about-content {
    max-width: 800px;

    margin: 0 auto;

    text-align: center;
}


.about-content p {
    margin-bottom: 25px;

    font-size: 1.05rem;
}


.about-content p:last-child {
    margin-bottom: 0;
}


/* ==================== COMMUNITY ==================== */

.community {
    padding: 110px 0;

    background: var(--background-2);

    border-top: 2px solid var(--border);
}


.community-content {
    max-width: 800px;

    text-align: center;
}


.community-content h2 {
    margin: 10px 0 20px;

    color: var(--header);

    font-family: var(--pixel-font);

    font-size: clamp(2.5rem, 6vw, 4rem);

    line-height: 1;
}


.community-content p:not(.section-eyebrow) {
    margin-bottom: 30px;
}


/* ==================== FOOTER ==================== */

.site-footer {
    padding: 30px 0;

    background: var(--background);

    border-top: 2px solid var(--border);
}


.footer-content {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 20px;
}


.footer-links {
    display: flex;

    gap: 25px;
}


.footer-links a {
    font-family: var(--pixel-font);

    font-size: 1.1rem;
}


.footer-links a:hover {
    color: var(--header);
}


/* ==================== TABLET ==================== */

@media (max-width: 900px) {

    .hero-ninja-left {
        left: -40px;
        height: 220px;

        opacity: 0.45;
    }


    .hero-ninja-right {
        right: -40px;
        height: 220px;

        opacity: 0.45;
    }


    .game-layout {
        grid-template-columns: 1fr;

        gap: 50px;
    }


    .game-info {
        max-width: 800px;

        margin: 0 auto;
    }


    .itch-widget {
        max-width: 800px;

        margin: 0 auto;
    }

}


/* ==================== MOBILE ==================== */

@media (max-width: 700px) {

    .container {
        width: min(100% - 30px, var(--max-width));
    }


    .nav-container {
        min-height: 65px;
    }


    .menu-toggle {
        display: block;
    }


    .main-nav {
        display: none;

        position: absolute;

        top: 65px;
        left: 0;
        right: 0;

        flex-direction: column;

        gap: 0;

        padding: 15px 0;

        background: var(--background);

        border-bottom: 2px solid var(--border);
    }


    .main-nav.active {
        display: flex;
    }


    .main-nav a {
        width: 100%;

        padding: 12px 20px;

        text-align: center;
    }


    .hero {
        min-height: 600px;
    }


    .hero-content {
        padding: 60px 0;
    }


    .hero-ninja-left {
        left: -80px;

        height: 180px;

        opacity: 0.25;
    }


    .hero-ninja-right {
        right: -80px;

        height: 180px;

        opacity: 0.25;
    }


    .hero h1 {
        font-size: clamp(3.5rem, 16vw, 5rem);
    }


    .hero-tagline {
        font-size: 1rem;

        padding: 0 15px;
    }


    .hero-buttons,
    .game-actions {
        flex-direction: column;

        align-items: stretch;
    }


    .hero-buttons .button,
    .game-actions .button {
        width: 100%;
    }


    .featured-game,
    .about {
        padding: 70px 0;
    }


    .community {
        padding: 80px 0;
    }


    .section-heading {
        margin-bottom: 40px;
    }


    .section-heading h2 {
        font-size: clamp(2.3rem, 11vw, 3.5rem);
    }


    .game-entry {
        padding: 50px 0;
    }


    .game-info h3,
    .itch-widget h3 {
        font-size: 2rem;
    }


    .footer-content {
        flex-direction: column;

        text-align: center;
    }


    .footer-links {
        justify-content: center;
    }

}


