:root {
    --mint: #7ee6d5;
    --navy: #4B6180;
    --navy-deep: #1d2838;
    --cream: #F3EFD8;
    --peach: #f7cbab;
    --gold: #FFC000;
    --ink: #1a1a1a;
    --ink-soft: #4a4f5c;
    --radius: 28px;
    --gutter: clamp(16px, 4vw, 48px);
    --max: 1560px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--cream);
    color: var(--ink);
    font-family: "Rubik", system-ui, sans-serif;
    font-size: 17px;
    line-height: 1.55;
    overflow-x: hidden;
}

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

a {
    color: inherit;
}

:focus-visible {
    outline: 3px solid var(--navy);
    outline-offset: 3px;
}

/* ---------- Top bar ---------- */

.topbar {
    max-width: var(--max);
    margin: 0 auto;
    padding: 20px var(--gutter);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    display: inline-block;
    font-family: "Chango", cursive;
    font-size: 22px;
    letter-spacing: 0.02em;
    line-height: 1;
    text-decoration: none;
    color: var(--navy-deep);
}

/* ---------- Hero ---------- */

.hero {
    max-width: var(--max);
    margin: 0 auto;
    padding: clamp(24px, 6vw, 72px) var(--gutter) clamp(40px, 7vw, 96px);
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    align-items: center;
    gap: clamp(16px, 4vw, 56px);
}

.eyebrow {
    margin: 0 0 14px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--navy);
}

.hero h1 {
    margin: 0;
    font-family: "Luckiest Guy", cursive;
    font-weight: 400;
    font-size: clamp(46px, 7.4vw, 96px);
    line-height: 0.98;
    letter-spacing: 0.01em;
    color: var(--navy-deep);
}

.boom {
    display: inline-block;
    color: var(--gold);
    -webkit-text-stroke: 0.035em var(--navy-deep);
    paint-order: stroke fill;
    text-shadow: 0.05em 0.06em 0 var(--navy-deep);
    transform: rotate(-4deg);
    animation: shake 4s ease-in-out 1s infinite;
}

@keyframes shake {
    0%, 86%, 100% { transform: rotate(-4deg) scale(1); }
    88% { transform: rotate(-7deg) scale(1.08); }
    90% { transform: rotate(-1deg) scale(1.1); }
    92% { transform: rotate(-6deg) scale(1.04); }
    94% { transform: rotate(-3deg) scale(1); }
}

.lede {
    max-width: 34em;
    margin: 22px 0 30px;
    font-size: clamp(17px, 1.6vw, 20px);
    color: var(--ink-soft);
}

.hero-art {
    position: relative;
    aspect-ratio: 1;
    max-width: 520px;
    width: 100%;
    transform: translateY(clamp(-72px, -5vw, -32px));
    justify-self: center;
    /* the clip's rock is cropped flat at the bottom: dissolve it into the page */
    -webkit-mask-image: linear-gradient(to bottom, #000 86%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 86%, transparent 100%);
}

.hero-art .cannon {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* mirrored so it aims back at the headline */
    transform: scaleX(-1);
    filter: drop-shadow(0 24px 24px rgba(29, 40, 56, 0.18));
}

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 22px;
    border-radius: 999px;
    border: 2px solid var(--navy-deep);
    font-weight: 700;
    font-size: 16px;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.btn-solid {
    background: var(--gold);
    color: var(--navy-deep);
    box-shadow: 0 4px 0 var(--navy-deep);
}

.btn-solid:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 var(--navy-deep);
}

.btn-solid:active {
    transform: translateY(3px);
    box-shadow: 0 1px 0 var(--navy-deep);
}

.btn-ghost {
    background: transparent;
    color: var(--navy-deep);
}

.btn-ghost:hover {
    background: rgba(29, 40, 56, 0.07);
}

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* ---------- Games ---------- */

/* every row matches the tallest card */
.games {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 var(--gutter) clamp(56px, 8vw, 112px);
    display: grid;
    grid-auto-rows: 1fr;
    gap: clamp(24px, 4vw, 40px);
    scroll-margin-top: 16px;
}

.game {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    border-radius: var(--radius);
    overflow: hidden;
    border: 2px solid var(--navy-deep);
    box-shadow: 0 8px 0 var(--navy-deep);
    scroll-margin-top: 24px;
    /* taller as the window widens, so the clip stays close to 16:9 */
    min-height: clamp(440px, 33vw, 540px);
}

.game-feature {
    background: var(--mint);
}

.game-alt {
    grid-template-columns: 1fr 1.35fr;
    background: var(--peach);
}

.game-alt .game-media {
    order: 2;
}

.game-media {
    position: relative;
    display: block;
    min-width: 0;
    overflow: hidden;
    background: var(--navy-deep);
}

.game-media img,
.game-media video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.game:hover .game-media img,
.game:hover .game-media video {
    transform: scale(1.04);
}

.game-body {
    padding: clamp(24px, 4vw, 48px);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

.game h2 {
    margin: 0;
    font-family: "Luckiest Guy", cursive;
    font-weight: 400;
    font-size: clamp(40px, 5vw, 64px);
    line-height: 1;
    letter-spacing: 0.03em;
    color: var(--navy-deep);
}

.tagline {
    margin: 8px 0 16px;
    font-family: "Mouse Memoirs", sans-serif;
    font-size: clamp(24px, 2.4vw, 32px);
    line-height: 1.1;
    letter-spacing: 0.03em;
    color: var(--navy);
}

.game-body > p:not(.tagline) {
    margin: 0 0 20px;
    color: #263142;
}

.badge {
    display: inline-block;
    margin-bottom: 16px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
}

.badge-gold {
    background: var(--navy-deep);
    color: var(--gold);
}

a.badge {
    text-decoration: none;
    transition: opacity 0.15s;
}

a.badge:hover,
a.badge:focus-visible {
    opacity: 0.85;
}

.platforms {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 26px;
    padding: 0;
    list-style: none;
}

.platforms li {
    padding: 5px 12px;
    border-radius: 999px;
    border: 1.5px solid rgba(29, 40, 56, 0.35);
    background: rgba(255, 255, 255, 0.4);
    font-size: 14px;
    font-weight: 500;
    color: var(--navy-deep);
}

/* ---------- Footer ---------- */

.footer {
    background: var(--navy-deep);
    color: #c7cfdb;
}

.footer-inner {
    max-width: var(--max);
    margin: 0 auto;
    padding: 32px var(--gutter);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 28px;
    font-size: 15px;
}

.footer .brand {
    color: var(--cream);
    font-size: 18px;
}

.footer p {
    margin: 0;
    flex: 1;
    text-align: right;
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: left;
    }

    .hero-art {
        max-width: 340px;
        order: -1;
        transform: none;
        margin-bottom: -12px;
    }

    .game,
    .game-alt {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .game-alt .game-media {
        order: 0;
    }

    .game-media {
        aspect-ratio: 16 / 9;
    }

    .footer p {
        flex-basis: 100%;
        text-align: left;
    }
}

@media (max-width: 480px) {
    .brand {
        font-size: 19px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}
