:root {
    --header-height: clamp(3.75rem, 4vw, 4.75rem);
    --page-padding: clamp(1rem, 5vw, 5rem);
    --content-padding: clamp(1rem, 5vw, 5rem);
    --game-height: clamp(10rem, 8.45vw, 10.2rem);
    --game-gap: 0.5rem;
    --game-grid-width: 52rem;
    --content-width: 65rem;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    width: 100%;
    min-height: 100%;
    margin: 0;
    padding: 0;
    background: #1d2e4d;
}

body {
    width: 100%;
    min-width: 320px;
    min-height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    color: #252525;
    background: #1d2e4d;
}

[hidden] {
    display: none !important;
}

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

pre {
    margin: 0;
    font: inherit;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.site-header {
    width: 100%;
    min-height: var(--header-height);
    padding: 0 var(--page-padding);
    display: flex;
    align-items: center;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 10;
    background: #1d3452 url("images/header_background.webp") center / cover no-repeat;
}

.site-logo {
    width: min(18rem, 34vw);
    flex: 0 1 auto;
    display: block;
}

.site-logo img {
    width: 100%;
    height: auto;
}

.site-nav {
    min-width: 0;
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: clamp(0.75rem, 3vw, 2.75rem);
}

.site-nav-link {
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    color: #fff;
    font-size: clamp(0.75rem, 1.2vw, 1rem);
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.site-nav-link:hover,
.site-nav-link.is-active {
    color: #b7e6ff;
    border-bottom-color: #b7e6ff;
}

.site-main,
.page {
    width: 100%;
}

.hero-media {
    width: 100%;
    line-height: 0;
    overflow: hidden;
}

.hero-media img {
    width: 100%;
    height: auto;
}

.page-home {
    padding-bottom: 0;
    background: #fff;
}

.home-games {
    width: min(var(--game-grid-width), calc(100% - (2 * var(--content-padding))));
    height: 0;
    margin: 0 auto;
    position: relative;
    top: calc(-1 * (var(--game-height) + var(--game-gap)));
    z-index: 1;
}

.game-grid {
    width: 100%;
    aspect-ratio: 808 / 158;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.game-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.content-section {
    width: 100%;
    padding: clamp(2rem, 5vw, 4rem) var(--content-padding);
    background: #e9f0f6 url("images/background.webp") center top / cover no-repeat;
}

.content-column {
    width: min(55rem, 100%);
    margin: 0 auto;
}

.content-column h1 {
    margin: 0 0 1rem;
    color: #252525;
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    line-height: 1.2;
    text-align: center;
}

.content-column pre {
    color: #494848;
    font-size: clamp(0.8rem, 1.2vw, 1rem);
    line-height: 1.7;
}

.content-art {
    width: min(55rem, 100%);
    margin: 0 auto;
    padding-top: clamp(1.5rem, 4vw, 2.5rem);
}

.content-art img {
    width: 100%;
    height: auto;
}

.game-detail {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(14rem, 30rem);
    gap: clamp(1.5rem, 5vw, 5rem);
    align-items: center;
}

.game-detail .content-column {
    width: 100%;
}

.store-link {
    width: min(14rem, 100%);
    display: block;
    margin-top: 1.5rem;
}

.store-link img {
    width: 100%;
    height: auto;
}

.product-art {
    width: min(30rem, 100%);
    margin: 0 auto;
}

.product-art img {
    width: 100%;
    height: auto;
}

.page-join .content-column {
    width: min(var(--content-width), 100%);
}

.site-footer {
    width: 100%;
    padding: 0 var(--content-padding) clamp(0.75rem, 2vw, 1.25rem);
    color: #b9b9b9;
    text-align: center;
}

.footer-logo {
    width: min(16rem, 32vw);
    height: auto;
    margin: 0.5rem auto 0.5rem;
}

.site-footer pre {
    width: min(var(--content-width), 100%);
    margin: 0 auto;
    font-size: clamp(0.65rem, 0.9vw, 0.75rem);
    line-height: 1.35;
}

.site-footer a {
    color: rgb(49, 170, 226);
    text-decoration: none;
}

@media (max-width: 700px) {
    :root {
        --header-height: 3.5rem;
        --page-padding: 1rem;
        --content-padding: 1rem;
        --game-height: clamp(17.5rem, 74.5vw, 33rem);
    }

    .site-header {
        gap: 0.5rem;
    }

    .site-logo {
        width: min(8.5rem, 34vw);
    }

    .site-nav {
        gap: clamp(0.25rem, 1.5vw, 0.75rem);
    }

    .site-nav-link {
        font-size: clamp(0.625rem, 2.5vw, 0.85rem);
    }

    .game-grid {
        aspect-ratio: 404 / 316;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .game-detail {
        grid-template-columns: 1fr;
    }

    .game-detail .content-column {
        text-align: center;
    }

    .game-detail .content-column pre {
        text-align: left;
    }

    .store-link {
        margin-right: auto;
        margin-left: auto;
    }
}

@media (max-width: 420px) {
    .site-header {
        padding-right: 0.75rem;
        padding-left: 0.75rem;
    }

    .site-logo {
        width: min(7rem, 31vw);
    }

    .site-nav {
        gap: 0.2rem;
    }

    .site-nav-link {
        font-size: 0.625rem;
    }
}
