/* The pages of the games (index.html, chinchon/index.html, 404.html): the green felt and the cream cards of Chinchón */
:root {
    --felt: #0f3d2a;
    --felt-dark: #0a2c1e;
    --cream: #f7f0e1;
    --cream-dark: #ece2cb;
    --ink: #1d3a2c;
    --ink-soft: #55695e;
    --gold: #e0b75a;
    --radius: 22px;
    --title: Rockwell, "Roboto Slab", "Zilla Slab", Georgia, serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(ellipse at top, #175239 0%, var(--felt) 45%, var(--felt-dark) 100%) fixed;
    color: var(--cream);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    line-height: 1.5;
}

a {
    color: inherit;
}

.page {
    max-width: 880px;
    margin: 0 auto;
    padding: 40px 16px 32px;
}

/* ---- Header */

/* Small, in a row: the logo and the name, with the games right under it */
.site-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}

.site-header .logo {
    width: 56px;
    height: 56px;
    flex: none;
}

.site-header h1 {
    font-family: var(--title);
    font-size: 1.5rem;
    margin: 0;
    line-height: 1.15;
    letter-spacing: 0.02em;
}

.site-header p {
    margin: 2px 0 0;
    font-size: 0.92rem;
    color: rgba(247, 240, 225, 0.75);
}

/* ---- The cards of the games */

/* Two columns where they fit, one on phones */
.games {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 20px;
}

/* The icon at the left of the text, and the badges centered under both */
.game {
    display: grid;
    grid-template-columns: 112px 1fr;
    column-gap: 20px;
    align-items: center;
    padding: 22px;
    background: var(--cream);
    color: var(--ink);
    border-radius: var(--radius);
    box-shadow: 0 8px 0 var(--cream-dark), 0 18px 30px rgba(0, 0, 0, 0.35);
}

.game .stores {
    grid-column: 1 / -1;
    justify-content: center;
    margin-top: 18px;
}

.game-icon {
    width: 112px;
    height: 112px;
    border-radius: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    display: block;
}

.game h2 {
    font-family: var(--title);
    font-size: 1.6rem;
    margin: 0;
    line-height: 1.2;
}

.game h2 a {
    text-decoration: none;
}

.game h2 a:hover {
    text-decoration: underline;
}

.game p {
    margin: 4px 0 0;
    color: var(--ink-soft);
}

.game .more {
    display: inline-block;
    margin-top: 6px;
    font-weight: 600;
    color: var(--felt);
}

/* ---- Store buttons */

.stores {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

/* The official badges of Google Play and the App Store, as they come (black) */
.store {
    display: inline-block;
    border-radius: 9px;
    transition: transform 0.12s ease;
}

.store:hover {
    transform: translateY(-1px);
}

.store:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 2px;
}

.store img {
    display: block;
    width: auto;
    height: 48px;
}

/* ---- The page of a game */

.hero {
    text-align: center;
    margin-bottom: 36px;
}

.hero .game-icon {
    width: 128px;
    height: 128px;
    margin: 0 auto;
    border-radius: 28px;
}

.hero h1 {
    font-family: var(--title);
    font-size: 2.6rem;
    margin: 14px 0 0;
    line-height: 1.1;
}

.hero p {
    margin: 8px auto 0;
    max-width: 520px;
    color: rgba(247, 240, 225, 0.85);
    font-size: 1.1rem;
}

.hero .stores {
    justify-content: center;
    margin-top: 22px;
}

.shots {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding: 4px 4px 14px;
    margin: 0 -4px 28px;
    scroll-snap-type: x mandatory;
}

.shots img {
    flex: none;
    width: 200px;
    height: auto;
    aspect-ratio: 9 / 16;
    border-radius: 18px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
    scroll-snap-align: center;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
}

.feature {
    padding: 20px;
    background: var(--cream);
    color: var(--ink);
    border-radius: var(--radius);
}

.feature h2 {
    font-family: var(--title);
    font-size: 1.2rem;
    margin: 0 0 6px;
}

.feature p {
    margin: 0;
    color: var(--ink-soft);
}

/* ---- Footer */

.site-footer {
    margin-top: 40px;
    text-align: center;
    font-size: 0.92rem;
    color: rgba(247, 240, 225, 0.7);
}

.site-footer nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 18px;
}

.site-footer p {
    margin: 10px 0 0;
}

/* ---- Phones */

@media (max-width: 560px) {
    .page {
        padding-top: 20px;
    }

    .site-header {
        gap: 12px;
        margin-bottom: 18px;
    }

    .site-header .logo {
        width: 44px;
        height: 44px;
    }

    .site-header h1 {
        font-size: 1.3rem;
    }

    .site-header p {
        font-size: 0.82rem;
    }

    .games {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .game {
        grid-template-columns: 72px 1fr;
        column-gap: 14px;
        padding: 16px;
        box-shadow: 0 6px 0 var(--cream-dark), 0 12px 22px rgba(0, 0, 0, 0.3);
    }

    .game-icon {
        width: 72px;
        height: 72px;
        border-radius: 16px;
    }

    .game h2 {
        font-size: 1.3rem;
    }

    .game p {
        font-size: 0.95rem;
        line-height: 1.4;
    }

    .stores {
        flex-wrap: nowrap;
        gap: 8px;
    }

    .store img {
        height: 40px;
    }

    .hero {
        margin-bottom: 26px;
    }

    .hero .game-icon {
        width: 96px;
        height: 96px;
        border-radius: 22px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .shots img {
        width: 64vw;
        max-width: 240px;
    }
}

/* ---- Narrow phones: the two badges still side by side */

@media (max-width: 360px) {
    .store img {
        height: 34px;
    }
}
