/* Squishy Labs — studio site pages. One stylesheet and one script of our own (site.js), no fonts or files from other hosts.
   Every animation is CSS only and stops under prefers-reduced-motion. */

:root {
    color-scheme: dark;
    --bg: #080e1c;
    --bg-raised: #0e172b;
    --surface: rgba(255, 255, 255, 0.04);
    --surface-hover: rgba(255, 255, 255, 0.07);
    --line: rgba(159, 192, 230, 0.18);
    --line-hot: rgba(255, 194, 74, 0.55);
    --text: #e2ecfa;
    --muted: #9fb3cc;
    --accent: #ffc24a;
    --accent-ink: #1c1405;
    --link: #8fe3ff;
    --todo: #ffc21a;
    --radius: 1.25rem;
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

/* The hero's blobs reach past the page edge; the viewport cuts them off instead of scrolling sideways.
   On html only: with body too, body would become its own scroll container and break #anchor links. */
html {
    overflow-x: hidden;
}

body {
    margin: 0;
    min-height: 100vh;
    background-color: var(--bg);
    background-image:
        radial-gradient(60rem 32rem at 12% -8%, rgba(60, 120, 255, 0.18), transparent 60%),
        radial-gradient(52rem 30rem at 100% 0%, rgba(150, 70, 240, 0.20), transparent 62%);
    background-repeat: no-repeat;
    color: var(--text);
    font: 400 1.0625rem/1.7 var(--font);
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
}

.page {
    max-width: 44rem;
    margin: 0 auto;
    padding: 1.5rem 1.25rem 4rem;
}

/* Every page uses the same width, so the header and footer sit in the same place everywhere. */
.page.wide {
    max-width: 68rem;
}

/* Documents (privacy, legal notice) keep a readable line length inside that width. */
main.doc {
    max-width: 48rem;
}

/* Header */

.top {
    position: relative;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.25rem;
    padding-bottom: 3.5rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    text-decoration: none;
}

.brand:hover {
    color: #fff;
}

/* The mark keeps its own shape whatever width and height the page gives it. */
.brand svg,
.brand img {
    width: auto;
    height: 2.25rem;
    object-fit: contain;
}

.top nav {
    display: flex;
    gap: 1.25rem;
    font-size: 0.9375rem;
}

.top nav a {
    color: var(--muted);
    text-decoration: none;
}

.top nav a:hover,
.top nav a[aria-current="page"] {
    color: var(--text);
}

/* Type */

.eyebrow {
    margin: 0 0 0.75rem;
    color: var(--accent);
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

h1 {
    margin: 0;
    font-size: clamp(2.25rem, 7vw, 3.25rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.08;
}

.lead {
    margin: 1rem 0 0;
    max-width: 36rem;
    color: var(--muted);
    font-size: 1.125rem;
}

h2 {
    margin: 3rem 0 0.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--line);
    font-size: 1.3125rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    line-height: 1.3;
}

h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    line-height: 1.25;
}

p,
ul,
address {
    margin: 0.75rem 0 0;
}

ul {
    padding-left: 1.25rem;
}

li + li {
    margin-top: 0.35rem;
}

li::marker {
    color: var(--accent);
}

address {
    font-style: normal;
}

a {
    color: var(--link);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
}

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

a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 0.25rem;
}

strong {
    font-weight: 700;
}

/* The start page's hero: the studio name over two slowly squishing blobs of light */

.hero {
    position: relative;
    isolation: isolate;
    padding: 3rem 0 1.5rem;
}

.hero h1 {
    font-size: clamp(3rem, 11vw, 5.5rem);
    letter-spacing: -0.045em;
    line-height: 1;
}

.hero .lead {
    font-size: clamp(1.125rem, 2.4vw, 1.3125rem);
}

/* The studio's logo as the start page's title */
.hero-logo {
    margin: 0;
    line-height: 0;
}

.hero-logo img {
    display: block;
    width: min(100%, 40rem);
    margin: 0 auto;
    animation: float 7s ease-in-out 1s infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-0.5rem); }
}

.blob {
    position: absolute;
    z-index: -1;
    width: clamp(14rem, 40vw, 24rem);
    aspect-ratio: 1;
    border-radius: 42% 58% 63% 37% / 41% 44% 56% 59%;
    filter: blur(56px);
    opacity: 0.5;
    pointer-events: none;
    animation: squish 18s ease-in-out infinite alternate;
}

.blob.one {
    top: -7rem;
    left: -6rem;
    /* The logo's colours: cyan into blue on the left, purple into magenta on the right. */
    background: radial-gradient(circle at 35% 35%, #2ec8ff, #3f5cff 55%, transparent 72%);
}

.blob.two {
    top: -4rem;
    right: -8rem;
    background: radial-gradient(circle at 60% 40%, #8a4dff, #d04fe6 55%, transparent 72%);
    animation-duration: 23s;
    animation-delay: -8s;
}

@keyframes squish {
    0% {
        border-radius: 42% 58% 63% 37% / 41% 44% 56% 59%;
        transform: translate(0, 0) rotate(0deg) scale(1);
    }
    50% {
        border-radius: 63% 37% 41% 59% / 58% 62% 38% 42%;
        transform: translate(2.5rem, 1.5rem) rotate(50deg) scale(1.1);
    }
    100% {
        border-radius: 37% 63% 52% 48% / 46% 38% 62% 54%;
        transform: translate(-1.5rem, 2.5rem) rotate(100deg) scale(0.94);
    }
}

/* Entrance: things rise into place once, one after another */

.rise {
    animation: rise 0.8s var(--ease-out) both;
}

.delay-1 { animation-delay: 0.08s; }
.delay-2 { animation-delay: 0.16s; }
.delay-3 { animation-delay: 0.24s; }
.delay-4 { animation-delay: 0.32s; }

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(1.25rem);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

/* A section title on the wide pages */

.section-title {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    margin: 4rem 0 0;
    padding: 0;
    border: 0;
    font-size: 1.5rem;
}

.section-title small {
    color: var(--muted);
    font-family: var(--font);
    font-size: 0.9375rem;
    font-weight: 500;
}

/* The game cards of the start page */

.games {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.games > * {
    animation: rise 0.8s var(--ease-out) both;
    animation-delay: 0.3s;
}

.games > :nth-child(2) { animation-delay: 0.38s; }
.games > :nth-child(3) { animation-delay: 0.46s; }
.games > :nth-child(4) { animation-delay: 0.54s; }
.games > :nth-child(5) { animation-delay: 0.62s; }
.games > :nth-child(n + 6) { animation-delay: 0.7s; }

.game {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-raised);
    transition: transform 0.35s var(--ease-out), border-color 0.25s ease, box-shadow 0.35s var(--ease-out);
}

.game:hover,
.game:focus-within {
    border-color: var(--line-hot);
    box-shadow: 0 1.5rem 3rem -1.5rem rgba(255, 170, 60, 0.35);
    transform: translateY(-4px);
}

.game-art {
    display: block;
    width: 100%;
    aspect-ratio: 1024 / 500;
    object-fit: cover;
    background: var(--surface);
    transition: transform 0.6s var(--ease-out);
}

.game:hover .game-art {
    transform: scale(1.04);
}

.game-body {
    position: relative;
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 0 1.25rem 1.25rem;
    background: var(--bg-raised);
}

.game-icon {
    display: block;
    width: 4.5rem;
    height: 4.5rem;
    margin: -2.25rem 0 0.9rem;
    border: 3px solid var(--bg-raised);
    border-radius: 22%;
    background: var(--bg-raised);
    box-shadow: 0 0.75rem 1.5rem -0.75rem rgba(0, 0, 0, 0.7);
}

.game h3 a {
    color: var(--text);
    text-decoration: none;
}

/* The whole card opens the game's page; the store links sit above that link. */
.game h3 a::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
}

.game h3 a:focus-visible {
    outline: none;
}

.game p {
    margin: 0.4rem 0 0;
    color: var(--muted);
    font-size: 0.9688rem;
    line-height: 1.55;
}

.game .stores {
    position: relative;
    z-index: 1;
    margin-top: auto;
    padding-top: 1.1rem;
}

/* Store links: pills on cards, buttons on game pages */

.stores {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1.5rem 0 0;
    padding: 0;
    list-style: none;
}

.stores li + li {
    margin: 0;
}

.store {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.7rem 1.2rem;
    border-radius: 999px;
    background: var(--accent);
    color: var(--accent-ink);
    font-weight: 700;
    font-size: 0.9375rem;
    line-height: 1.2;
    text-decoration: none;
    transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out), background-color 0.2s ease;
}

.store::before {
    content: "";
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0.32em 0 0.32em 0.52em;
    border-color: transparent transparent transparent currentColor;
}

.store:hover {
    color: var(--accent-ink);
    background: #ffd276;
    box-shadow: 0 0.75rem 1.5rem -0.75rem rgba(255, 194, 74, 0.8);
    transform: translateY(-2px);
}

.store.alt {
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
}

.store.alt:hover {
    border-color: var(--line-hot);
    background: var(--surface-hover);
    color: var(--text);
    box-shadow: none;
}

.game .store {
    padding: 0.4rem 0.85rem;
    font-size: 0.8125rem;
}

/* While no game is out yet: a friendly placeholder with a bobbing mascot */

.soon {
    grid-column: 1 / -1;
    display: grid;
    justify-items: center;
    gap: 0.25rem;
    padding: 3.5rem 1.5rem;
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    text-align: center;
}

.soon p {
    max-width: 28rem;
    margin: 0.35rem 0 0;
    color: var(--muted);
}

.mascot {
    width: auto;
    height: 4.5rem;
    margin-bottom: 1rem;
    transform-origin: 50% 100%;
    animation: bob 2.8s ease-in-out infinite;
}

@keyframes bob {
    0%, 100% { transform: translateY(0) scale(1, 1); }
    40% { transform: translateY(-0.6rem) scale(0.96, 1.05); }
    55% { transform: translateY(0) scale(1.08, 0.92); }
    70% { transform: translateY(0) scale(0.98, 1.02); }
}

/* A game's own page */

.game-hero {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 1.75rem;
    padding-top: 1rem;
}

.game-hero .game-icon {
    width: 7.5rem;
    height: 7.5rem;
    margin: 0;
    border: 0;
    box-shadow: 0 1.5rem 3rem -1.25rem rgba(255, 170, 60, 0.45);
}

.game-hero .lead {
    margin-top: 0.75rem;
}

.feature {
    display: block;
    width: 100%;
    margin-top: 3rem;
    aspect-ratio: 1024 / 500;
    object-fit: cover;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 2rem 4rem -2rem rgba(70, 120, 220, 0.45);
}

.shots {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-bottom: 0.75rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: var(--line) transparent;
}

.shots img {
    flex: none;
    height: clamp(20rem, 52vw, 30rem);
    width: auto;
    border: 1px solid var(--line);
    border-radius: 1rem;
    scroll-snap-align: start;
}

/* The chevrons beside the screenshots. site.js shows them only while the strip is wider than the page, and hides
   each one at its own end; without the script they stay hidden and the strip scrolls by swiping. */
.shots-frame {
    position: relative;
}

.shots-arrow {
    position: absolute;
    top: 0;
    bottom: 0.75rem;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 3rem;
    height: 4rem;
    margin: auto 0;
    padding: 0;
    border: 0;
    border-radius: 0.75rem;
    background: none;
    color: rgba(255, 255, 255, 0.72);
    cursor: pointer;
    filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.75)) drop-shadow(0 2px 12px rgba(0, 0, 0, 0.55));
    transition: opacity 0.25s ease, color 0.2s ease, transform 0.25s var(--ease-out);
}

.shots-arrow[hidden] {
    display: none;
}

.shots-arrow.prev {
    left: 0.25rem;
}

.shots-arrow.next {
    right: 0.25rem;
}

.shots-arrow svg {
    width: 1.5rem;
    height: 2.6rem;
}

.shots-arrow:hover {
    color: #fff;
}

.shots-arrow.prev:hover {
    transform: translateX(-2px);
}

.shots-arrow.next:hover {
    transform: translateX(2px);
}

.shots-arrow:disabled {
    opacity: 0;
    pointer-events: none;
}

.shots-arrow:focus-visible {
    outline: 2px solid var(--link);
    outline-offset: -2px;
}

/* The water under the mouse (site.js): a canvas over the whole window that never takes a click. */
.water {
    position: fixed;
    inset: 0;
    z-index: 5;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

@media (max-width: 34rem) {
    .game-hero {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .game-hero .game-icon {
        width: 5.5rem;
        height: 5.5rem;
    }

    .feature {
        margin-top: 2rem;
    }
}

/* The summary at the head of a page, and link cards */

.card {
    margin-top: 2.5rem;
    padding: 1.5rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}

.card h2 {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 1.0625rem;
}

.card ul {
    padding: 0;
    list-style: none;
}

.card li {
    position: relative;
    padding-left: 1.6rem;
}

.card li::before {
    content: "";
    position: absolute;
    left: 0.1rem;
    top: 0.62em;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 0.12rem;
    background: var(--accent);
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr));
    gap: 1rem;
    margin-top: 2.5rem;
}

a.card {
    display: block;
    margin: 0;
    color: var(--text);
    text-decoration: none;
    transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.3s var(--ease-out);
}

a.card:hover {
    border-color: var(--line-hot);
    background: var(--surface-hover);
    transform: translateY(-2px);
}

a.card span {
    display: block;
    color: var(--muted);
    font-size: 0.9375rem;
}

a.card b {
    display: block;
    font-size: 1.1875rem;
    font-weight: 700;
    letter-spacing: -0.015em;
}

/* What is still to be filled in. Nothing on a finished page carries this. */

.todo {
    padding: 0.05em 0.4em;
    border: 1px dashed var(--todo);
    border-radius: 0.35rem;
    color: var(--todo);
}

/* Footer */

footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem 1.5rem;
    margin-top: 4rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.875rem;
}

footer p {
    margin: 0;
}

footer .changed {
    font-style: italic;
}

/* The links always sit on the right, also when they are the footer's only line. */
footer p:last-child {
    margin-left: auto;
}

footer a {
    color: var(--muted);
}

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

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

    .game:hover,
    .game:focus-within,
    .game:hover .game-art,
    a.card:hover,
    .store:hover {
        transform: none;
    }
}
