* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    /* Always reserve the scrollbar's width: without it the short pages
       (About, Legal...) are centered 15px wider than the long home page, so
       the header's content shifted between them. */
    overflow-y: scroll;
}

/* Same palette as the portfolio (styles.css :root / body and
   navbar.css's --nav-bg), so moving between the two sites feels like one
   site. The names below (--bg1, --border, --text, --muted, --brand,
   --accent, --shadow) are the ones game-embed.css already reads for the
   overlay/popups. --accent-color (the game's own green) is only used for
   small touches: the eyebrow tag and text links. */
:root {
    --bg0: #070811;
    --bg1: #0b0f1f;
    --panel: rgba(255, 255, 255, 0.06);
    --border: rgba(255, 255, 255, 0.10);
    --text: rgba(255, 255, 255, 0.92);
    --muted: rgba(255, 255, 255, 0.70);
    --brand: #4da3ff;
    --accent: #ff8a65;
    --primary-color: #4da3ff;
    --accent-color: #b6d53c;
    --shadow: 0 18px 55px rgba(0, 0, 0, 0.55);
    --nav-bg: #0b2631;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'Inter', sans-serif;
    color: var(--text);
    line-height: 1.6;
    background:
        radial-gradient(1200px 600px at 20% 10%, rgba(77, 163, 255, 0.22), transparent 60%),
        radial-gradient(800px 500px at 50% 90%, rgba(153, 102, 255, 0.14), transparent 60%),
        linear-gradient(180deg, var(--bg0), var(--bg1));
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 48px 48px;
    opacity: 0.06;
    mix-blend-mode: overlay;
}

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

/* Same custom cursors as the portfolio (portfolio/static/css/game-ui.css). */
html {
    cursor: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48ZGVmcz48bGluZWFyR3JhZGllbnQgaWQ9ImciIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIiB4MT0iMCIgeTE9IjAiIHgyPSIyNCIgeTI9IjI0Ij48c3RvcCBvZmZzZXQ9IjAiIHN0b3AtY29sb3I9IiM0ZGEzZmYiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiM5OTY2ZmYiLz48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48cGF0aCBkPSJNMyAyIEwzIDE5IEw3LjUgMTUuMiBMMTAuNCAyMS42IEwxMyAyMC40IEwxMC4yIDE0LjIgTDE2IDE0IFoiIGZpbGw9IndoaXRlIiBzdHJva2U9InVybCgjZykiIHN0cm9rZS13aWR0aD0iMS42IiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2UtbGluZWNhcD0icm91bmQiLz48L3N2Zz4K") 2 2, auto;
}

a, button, .btn, .lang-toggle, input[type="submit"], .submit-button {
    cursor: url("../img/cursor-hand.png") 6 0, pointer;
}

/* game-embed.css gives .play-project-button its own cursor: pointer, which
   (a class selector, and loaded after this file) beats the plain "button"
   rule above - so the play buttons need their own, more specific one. */
button.play-project-button {
    cursor: url("../img/cursor-hand.png") 6 0, pointer;
}

input[type="text"], input[type="email"], input[type="search"],
input[type="tel"], input[type="url"], input[type="password"],
input:not([type]), textarea {
    cursor: text;
}

.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.studio-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 50;
}

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

.studio-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.studio-brand img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.studio-brand small {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: var(--muted);
}

.studio-nav {
    display: flex;
    align-items: center;
    gap: 18px;
}

.studio-nav a {
    color: var(--muted);
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    transition: color 0.2s ease;
}

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

.lang-toggle {
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.6px;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.lang-toggle:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.16);
}

/* Same look as the portfolio's .btn-primary (blue gradient, white text). */
.play-project-button {
    background: linear-gradient(90deg, rgba(77, 163, 255, 0.95), rgba(77, 163, 255, 0.75));
    box-shadow: 0 10px 30px rgba(77, 163, 255, 0.25);
}

.play-project-button--secondary {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    margin-top: 0;
    box-shadow: none;
}

.play-project-button--secondary svg {
    fill: currentColor;
}

/* Hero */
.hero {
    padding: 72px 0 56px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
    align-items: center;
}

.eyebrow {
    display: inline-block;
    padding: 5px 12px;
    margin-bottom: 18px;
    border-radius: 999px;
    border: 1px solid rgba(182, 213, 60, 0.35);
    color: var(--accent-color);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1 {
    font-size: clamp(40px, 6vw, 64px);
    line-height: 1.05;
    margin-bottom: 18px;
}

.hero-lead {
    max-width: 520px;
    font-size: 17px;
    color: var(--muted);
    margin-bottom: 28px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* The key art doubles as a play trigger - same behavior as the portfolio's
   featured project image (see portfolio/styles.css .featured-media): a light
   zoom that follows the mouse (game-embed.js drives --zoom-x/--zoom-y), and
   a play badge on hover. */
.hero-art {
    position: relative;
    display: block;
    width: 100%;
    max-width: 440px;
    aspect-ratio: 1 / 1;
    margin-left: auto;
    padding: 0;
    overflow: hidden;
    border-radius: 22px;
    border: 1px solid var(--border);
    background: none;
    box-shadow: var(--shadow), 0 0 60px -18px rgba(77, 163, 255, 0.35);
    font: inherit;
    color: inherit;
}

.hero-art img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: pixelated;
    /* transform-origin deliberately not transitioned: it has to snap to the
       cursor on every mousemove (see .is-recentering for the one moment it
       should glide). */
    transition: transform 0.35s ease;
    transform-origin: var(--zoom-x, 50%) var(--zoom-y, 50%);
}

.hero-art.is-recentering img {
    transition: transform 0.35s ease, transform-origin 0.35s ease;
}

.hero-art:hover img {
    transform: scale(1.15);
}

.play-badge {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.hero-art:hover .play-badge,
.hero-art:focus-visible .play-badge {
    opacity: 1;
}

@media (pointer: coarse), (max-width: 640px) {
    .play-badge {
        opacity: 1;
    }

    .hero-art img {
        transform: scale(1.15);
    }
}

.play-circle {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: rgba(10, 12, 20, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 0 rgba(77, 163, 255, 0.55);
    animation: play-pulse 2.2s ease-out infinite;
    transition: transform 0.25s ease, background 0.25s ease;
}

.hero-art:hover .play-circle {
    background: var(--brand);
    transform: scale(1.08);
    animation-play-state: paused;
}

.play-circle svg {
    width: 26px;
    height: 26px;
    margin-left: 4px;
    fill: #fff;
}

.play-text {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 5px 14px;
    border-radius: 999px;
    background: rgba(10, 12, 20, 0.55);
    backdrop-filter: blur(3px);
    color: var(--text);
}

@keyframes play-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(77, 163, 255, 0.45); }
    70%  { box-shadow: 0 0 0 18px rgba(77, 163, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(77, 163, 255, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .play-circle {
        animation: none;
    }
}

/* Sections */
.section {
    padding: 48px 0;
}

.section h2 {
    font-size: 26px;
    margin-bottom: 24px;
}

.platform-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.platform-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 22px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: var(--panel);
}

.platform-card h3 {
    font-size: 18px;
}

.platform-price {
    color: var(--accent-color);
    font-weight: 700;
    font-size: 15px;
}

.platform-card p {
    color: var(--muted);
    font-size: 14px;
    flex: 1;
}

.platform-card .platform-status {
    margin-top: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
}

.platform-card .play-project-button {
    margin-top: 8px;
    align-self: flex-start;
}

/* Text pages */
.page {
    flex: 1;
    padding: 56px 0;
    max-width: 760px;
}

.page h1 {
    font-size: 36px;
    margin-bottom: 20px;
}

.page h2 {
    font-size: 20px;
    margin: 28px 0 8px;
}

.page p {
    color: var(--muted);
    margin-bottom: 12px;
}

.page ul {
    padding-left: 22px;
    margin-bottom: 12px;
}

.page li {
    color: var(--muted);
    margin-bottom: 6px;
}

.page strong {
    color: var(--text);
}

.page code {
    padding: 1px 6px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.92em;
}

.page .date {
    font-size: 14px;
    margin-bottom: 20px;
}

/* About page */
.about-intro {
    display: flex;
    align-items: center;
    gap: 36px;
    margin-bottom: 36px;
}

.about-logo {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 1px solid var(--border);
    box-shadow: var(--shadow), 0 0 50px -16px rgba(77, 163, 255, 0.4);
}

.about-card {
    padding: 22px 24px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: var(--panel);
}

.about-card h2 {
    margin-top: 0;
}

.about-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

/* .page a would underline these in the green used for inline text links;
   as buttons they read better as outlined pills. */
.page .about-links a {
    padding: 9px 16px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.page .about-links a:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--brand);
}

@media (max-width: 640px) {
    .about-intro {
        flex-direction: column;
        align-items: flex-start;
        gap: 22px;
    }

    .about-logo {
        width: 96px;
        height: 96px;
    }
}

/* Label / value rows of the legal notice. */
.legal-list {
    display: grid;
    /* Fixed label column so the Publisher and Hosting cards line up. */
    grid-template-columns: 170px 1fr;
    gap: 10px 28px;
    padding: 20px 22px;
    margin-bottom: 8px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--panel);
}

.legal-list dt {
    font-weight: 600;
}

.legal-list dd {
    color: var(--muted);
    overflow-wrap: anywhere;
}

@media (max-width: 560px) {
    .legal-list {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .legal-list dd {
        margin-bottom: 10px;
    }
}

.page a,
.credits a {
    color: var(--accent-color);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.credits p {
    color: var(--muted);
    font-size: 14px;
}

.main-grow {
    flex: 1;
}

/* Footer */
.studio-footer {
    margin-top: 24px;
    border-top: 1px solid var(--border);
    padding: 24px 0;
    font-size: 13px;
    color: var(--muted);
}

.studio-footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
}

.studio-footer a:hover {
    color: var(--primary-color);
}

@media (max-width: 820px) {
    .hero {
        padding: 40px 0 32px;
    }

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

    .hero-art {
        margin: 0 auto;
        max-width: 320px;
        order: -1;
    }

    .platform-grid {
        grid-template-columns: 1fr;
    }
}
