:root {
    --paper: #fbf5ef;
    --ink: #2b1748;
    --purple: #482075;
    --coral: #ff655d;
    --lilac: #e7d9fa;
    --mint: #dcecd9;
    --yellow: #ffcc65;
    --line: #e7ded8
}

* {
    box-sizing: border-box
}

html {
    scroll-behavior: smooth
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
    -webkit-font-smoothing: antialiased
}

a {
    color: inherit;
    text-decoration: none
}

a:focus-visible {
    outline: 3px solid var(--coral);
    outline-offset: 5px
}

.wrap {
    max-width: 1140px;
    width: 88%;
    margin: auto
}

/* Header stays at the top while scrolling (not on phones, see below) */
.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--paper);
    border-bottom: 1px solid var(--line)
}

/* Menu links land below the sticky header instead of under it */
[id] {
    scroll-margin-top: 112px
}

.header-inner {
    height: 96px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0
}

.mark {
    width: 46px;
    height: 40px
}

.brandword {
    width: 161px;
    height: auto;
    display: block
}

.brand small {
    display: block;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 6px;
    margin-top: 2px;
    padding-left: 2px
}

nav {
    display: flex;
    align-items: center;
    gap: 32px;
    font-size: 14px;
    font-weight: 700
}

nav a:hover {
    color: #b43748
}

.langs {
    display: flex;
    gap: 2px;
    background: var(--lilac);
    border-radius: 8px;
    padding: 3px
}

.langs a {
    display: block;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1px;
    border: 0;
    background: none;
    color: var(--purple);
    padding: 7px 9px;
    border-radius: 6px;
    cursor: pointer
}

.langs a:hover {
    background: #d8c4f5
}

.langs a[aria-current="page"] {
    background: var(--purple);
    color: var(--paper)
}

.langs a:focus-visible {
    outline: 3px solid var(--coral);
    outline-offset: 2px
}

.contactnav {
    white-space: nowrap;
    background: var(--coral);
    color: var(--ink);
    padding: 12px 17px;
    border-radius: 8px
}

.hero {
    overflow: hidden;
    /* Breathing room between the header line and the hero image */
    padding-top: 40px
}

.hero .wrap {
    position: relative;
    min-height: 490px;
    display: flex;
    align-items: center
}

.hero-copy {
    position: relative;
    z-index: 1;
    width: 47%;
    padding: 38px 0 48px
}

.eyebrow {
    font-size: 11px;
    letter-spacing: 2.1px;
    text-transform: uppercase;
    font-weight: 800
}

.hero .eyebrow {
    display: inline-block;
    background: var(--lilac);
    color: var(--purple);
    padding: 8px 13px;
    border-radius: 30px
}

h1 {
    margin: 24px 0 20px;
    line-height: 1
}

.headline {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 72px;
    margin-bottom: 7px
}

.headline.accent {
    color: var(--coral)
}

.hero p {
    font-size: 18px;
    line-height: 1.55;
    max-width: 400px;
    margin: 0
}

.btn {
    display: inline-block;
    background: var(--purple);
    color: white;
    padding: 15px 21px;
    margin-top: 24px;
    font-size: 14px;
    font-weight: 700;
    border-radius: 10px
}

.btn:hover {
    background: #632f93
}

/* ---------------------------------------------------------------
   Pixel motion: hero particles, headline entrance, button hover.
   Stepped timing keeps movement chunky like pixel art.
   All of it is switched off for "reduce motion" (see bottom).
   --------------------------------------------------------------- */

/* Headline lines appear one after another on load */
@keyframes line-in {
    from {
        opacity: 0;
        transform: translateY(12px)
    }

    to {
        opacity: 1;
        transform: none
    }
}

h1 .headline {
    animation: line-in .45s steps(3) both
}

h1 .headline:nth-child(3) {
    animation-delay: .15s
}

h1 .headline:nth-child(4) {
    animation-delay: .3s
}

/* Floating pixels and twinkling stars over the hero image */
.hero-fx {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none
}

@keyframes px-rise {
    0% {
        opacity: 0;
        transform: translateY(0)
    }

    10%,
    75% {
        opacity: 1
    }

    100% {
        opacity: 0;
        transform: translateY(-168px)
    }
}

.px {
    position: absolute;
    width: 8px;
    height: 8px;
    opacity: 0;
    animation: px-rise 7s steps(14) infinite
}

.px1 { left: 18%; bottom: 14%; background: #ff966a; animation-delay: 0s }
.px2 { left: 31%; bottom: 30%; background: var(--yellow); width: 6px; height: 6px; animation-delay: 2.4s; animation-duration: 8s }
.px3 { left: 44%; bottom: 10%; background: #fff; animation-delay: 1.1s; animation-duration: 6s }
.px4 { left: 57%; bottom: 36%; background: #d64270; width: 6px; height: 6px; animation-delay: 4.2s }
.px5 { left: 66%; bottom: 18%; background: var(--yellow); animation-delay: 3.3s; animation-duration: 9s }
.px6 { left: 76%; bottom: 40%; background: #fff; width: 6px; height: 6px; animation-delay: .6s; animation-duration: 8s }
.px7 { left: 85%; bottom: 12%; background: #ff655d; animation-delay: 5.1s; animation-duration: 7.5s }
.px8 { left: 93%; bottom: 28%; background: #7e36a2; width: 6px; height: 6px; animation-delay: 2s; animation-duration: 6.5s }

@keyframes twinkle {
    0%,
    100% {
        opacity: 0
    }

    40%,
    60% {
        opacity: 1
    }
}

/* A 4px pixel with four neighbours: a little "+" star */
.spark {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #fff;
    box-shadow: 4px 0 #fff, -4px 0 #fff, 0 4px #fff, 0 -4px #fff;
    opacity: 0;
    animation: twinkle 3.2s steps(4) infinite
}

.spark1 { left: 30%; top: 14%; animation-delay: .4s }
.spark2 { left: 72%; top: 9%; animation-delay: 1.6s; animation-duration: 4s }
.spark3 { left: 90%; top: 30%; animation-delay: 2.7s; animation-duration: 3.6s }

/* Buttons pop with a small pixel shadow on hover */
@media (hover: hover) {
    .btn {
        transition: transform .15s steps(2), box-shadow .15s steps(2)
    }

    .btn:hover {
        transform: translate(-2px, -2px);
        box-shadow: 4px 4px 0 var(--coral)
    }
}

.hero-art {
    position: absolute;
    right: -4%;
    bottom: 0;
    /* Fixed aspect ratio so the animated overlays stay on top of the eyes and cape */
    width: min(65%, 674px);
    aspect-ratio: 645 / 469;
    overflow: hidden;
    border-radius: 16px;
    mask-image: linear-gradient(to right, transparent, black 19%);
    -webkit-mask-image: linear-gradient(to right, transparent, black 19%)
}

.hero-img {
    display: block;
    width: 100%;
    height: 100%
}

/* Hero characters: cape waves, boy and cat blink.
   Positions are percentages of the 645x469 hero image. */
.hero-cape,
.blink {
    position: absolute;
    background-repeat: no-repeat
}

@keyframes cape-wave {
    0% { background-position: 0% 0 }
    16.667% { background-position: 20% 0 }
    33.333% { background-position: 40% 0 }
    50% { background-position: 60% 0 }
    66.667% { background-position: 80% 0 }
    83.333%, 100% { background-position: 100% 0 }
}

.hero-cape {
    left: 67.907%;
    top: 34.968%;
    width: 18.295%;
    height: 17.058%;
    background-image: url(assets/hero-cape.png);
    background-size: 600% 100%;
    animation: cape-wave .9s steps(1, end) infinite
}

@keyframes blink {
    0% { opacity: 0 }
    92% { opacity: 1 }
    95%, 100% { opacity: 0 }
}

.blink {
    opacity: 0;
    background-size: 100% 100%;
    animation: blink 5s steps(1, end) infinite
}

.blink-boy {
    left: 52.868%;
    top: 42.857%;
    width: 8.372%;
    height: 6.183%;
    background-image: url(assets/hero-blink-boy.png)
}

.blink-cat {
    left: 73.333%;
    top: 56.716%;
    width: 5.891%;
    height: 3.625%;
    background-image: url(assets/hero-blink-cat.png);
    animation-duration: 6.5s;
    animation-delay: 1.8s
}

.studio {
    border-top: 1px solid var(--line);
    padding: 46px 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 55px;
    align-items: center
}

.studio .eyebrow {
    color: var(--purple)
}

h2 {
    font-size: clamp(29px, 3.7vw, 43px);
    letter-spacing: -1.6px;
    line-height: 1.08;
    margin: 12px 0;
    font-weight: 850
}

.studio p {
    font-size: 16px;
    line-height: 1.7;
    margin: 0;
    max-width: 470px
}

.tiles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding-bottom: 38px
}

.tile {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    padding: 30px;
    min-height: 237px;
    display: flex;
    flex-direction: column;
    justify-content: space-between
}

.tile h2 {
    max-width: 350px;
    font-size: 34px
}

.tile p {
    font-size: 15px;
    line-height: 1.5;
    margin: 0 0 18px;
    max-width: 330px
}

.games {
    background: var(--purple);
    color: var(--paper)
}

.contact {
    background: var(--mint)
}

.tile .content {
    z-index: 1;
    position: relative
}

.tag {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    background: var(--lilac);
    color: var(--purple);
    border-radius: 5px;
    padding: 8px 12px;
    display: inline-block;
    width: fit-content
}

.mail {
    font-size: 14px;
    font-weight: 750;
    border-bottom: 1px solid currentColor;
    padding-bottom: 4px;
    width: fit-content;
    overflow-wrap: anywhere
}

.tile-art {
    object-fit: contain;
    position: absolute;
    right: 22px;
    bottom: 25px;
    width: 92px;
    height: 92px;
    opacity: .95
}

.contact .tile-art {
    width: 70px;
    height: 70px;
    bottom: 31px
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0
}

footer {
    border-top: 1px solid var(--line);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 16px;
    padding: 23px 0 28px;
    font-size: 12px;
    color: #584b64
}

/* Community card: full width under the other two cards */
.community {
    grid-column: 1 / -1;
    background: var(--lilac);
    min-height: 0;
    flex-direction: row;
    align-items: center;
    gap: 28px
}

.community .content {
    flex: 1
}

.community .eyebrow {
    color: var(--purple)
}

.community h2 {
    margin-bottom: 8px
}

.community p {
    margin: 0;
    max-width: 520px
}

.community-art {
    width: 84px;
    height: 60px;
    flex-shrink: 0
}

.btn-discord {
    margin-top: 0;
    flex-shrink: 0;
    background: #5865f2
}

.btn-discord:hover {
    background: #4752c4
}

/* Social links: own row above the copyright line */
.social {
    flex-basis: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    padding-bottom: 14px;
    margin-bottom: 2px;
    border-bottom: 1px dashed var(--line)
}

.social a {
    font-size: 13px;
    font-weight: 700;
    color: var(--ink)
}

.social a:hover {
    color: #b43748
}

@media(max-width:850px) {
    .wrap {
        width: 90%
    }

    nav {
        gap: 12px
    }

    .contactnav {
        padding: 10px 14px
    }

    .hero-copy {
        width: 55%
    }

    .hero .wrap {
        min-height: 420px
    }

    .headline {
        max-height: 58px
    }

    .hero-art {
        right: 0;
        width: min(65%, 578px)
    }

    .tile-art {
        width: 65px;
        height: 65px;
        right: 12px;
        bottom: 20px;
        opacity: .48
    }

    .tile h2 {
        font-size: 30px
    }

    .tile {
        padding: 25px
    }
}

/* 404 page */
.notfound {
    padding-block: 64px 88px
}

.notfound-head {
    display: flex;
    align-items: flex-end;
    gap: 28px;
    margin-bottom: 40px
}

.notfound-head h1 {
    margin: 0
}

.notfound-code {
    display: block;
    height: 120px;
    width: auto;
    max-width: 100%
}

.notfound-art {
    width: 96px;
    height: 96px
}

.notfound-langs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    border-top: 1px solid var(--line);
    padding-top: 32px
}

.notfound-langs .eyebrow {
    color: var(--purple)
}

.notfound-langs p {
    font-size: 16px;
    line-height: 1.6;
    margin: 0
}

/* Not enough room for the CTA button next to the menu; the email is in the contact card */
@media(max-width:720px) {
    .contactnav {
        display: none
    }
}

@media(max-width:600px) {
    /* On phones the header is two rows tall, so it scrolls away with the page */
    .site-header {
        position: static
    }

    [id] {
        scroll-margin-top: 0
    }

    .header-inner {
        height: auto;
        min-height: 75px;
        flex-wrap: wrap;
        gap: 15px;
        padding: 15px 0
    }

    .brandword {
        width: 124px
    }

    .brand small {
        font-size: 8px;
        letter-spacing: 4px
    }

    .mark {
        width: 33px;
        height: 29px
    }

    .brand {
        gap: 8px
    }

    nav {
        gap: 15px;
        font-size: 12px
    }

    .langs a {
        font-size: 11px;
        padding: 6px 7px
    }

    .contactnav {
        display: none
    }

    .hero {
        padding-top: 0
    }

    .hero .wrap {
        display: block;
        min-height: 0
    }

    .hero-copy {
        width: 100%;
        padding: 32px 0 8px
    }

    .headline {
        max-height: 60px
    }

    .hero p {
        font-size: 16px
    }

    .hero-art {
        position: relative;
        width: 100%;
        right: auto;
        bottom: auto;
        mask-image: none;
        -webkit-mask-image: none;
        margin-top: 8px
    }

    .studio {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 32px 0
    }

    .tiles {
        grid-template-columns: 1fr;
        gap: 14px
    }

    .community {
        flex-direction: column;
        align-items: flex-start;
        gap: 18px
    }

    .tile {
        min-height: 215px
    }

    /* On phones the icon sits below the text so it never covers it */
    .tile-art {
        position: static;
        align-self: flex-end;
        width: 56px;
        height: 56px;
        opacity: .9
    }

    footer {
        flex-wrap: wrap;
        font-size: 11px
    }

    .notfound {
        padding-block: 40px 56px
    }

    .notfound-head {
        gap: 18px;
        margin-bottom: 28px
    }

    .notfound-code {
        height: 80px
    }

    .notfound-art {
        width: 64px;
        height: 64px
    }

    .notfound-langs {
        grid-template-columns: 1fr;
        gap: 32px
    }
}

/* Press kit page */
.press {
    padding-block: 56px 80px
}

.press-intro {
    padding-bottom: 40px
}

.press-intro .eyebrow,
.press-heading {
    color: var(--purple)
}

.press-title {
    font-size: clamp(38px, 6vw, 64px);
    letter-spacing: -2px;
    font-weight: 850;
    margin: 14px 0 18px
}

.press-intro p {
    font-size: 17px;
    line-height: 1.6;
    max-width: 560px;
    margin: 0
}

.press-row {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 16px 48px;
    border-top: 1px solid var(--line);
    padding: 32px 0
}

.press-heading {
    font-size: 11px;
    letter-spacing: 2.1px;
    text-transform: uppercase;
    font-weight: 800;
    margin: 4px 0 0
}

.facts {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 12px 24px;
    margin: 0;
    font-size: 15px
}

.facts dt {
    font-weight: 800
}

.facts dd {
    margin: 0
}

.facts a,
.press-text a {
    border-bottom: 1px solid currentColor
}

.facts a:hover,
.press-assets a:hover strong {
    color: #b43748
}

.facts-social {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px
}

.press-text p {
    font-size: 16px;
    line-height: 1.7;
    margin: 0 0 12px;
    max-width: 620px
}

.press-assets {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 20px
}

.press-assets a {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px
}

.press-assets a span:last-child {
    color: #584b64
}

.asset-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 4 / 3;
    background: var(--lilac);
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 8px;
    overflow: hidden
}

.press-assets li {
    min-width: 0
}

.asset-preview img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: contain;
    image-rendering: pixelated
}

.press-note {
    grid-column: 2;
    font-size: 13px;
    color: #584b64;
    margin: 8px 0 0
}

.footer-link {
    font-weight: 700;
    color: var(--ink)
}

.footer-link:hover {
    color: #b43748
}

@media(max-width:720px) {
    .press-row {
        grid-template-columns: 1fr
    }

    .press-note {
        grid-column: auto
    }
}

@media(max-width:600px) {
    .press {
        padding-block: 32px 56px
    }

    .facts {
        grid-template-columns: 1fr;
        gap: 2px
    }

    .facts dd {
        margin-bottom: 12px
    }

    .press-assets {
        grid-template-columns: 1fr 1fr;
        gap: 14px
    }
}

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

    .hero-fx {
        display: none
    }

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