@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,300;0,400;0,500&family=Press+Start+2P&display=swap');

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

:root {
    --plum: #4a2d5e;
    --plum-dark: #2e1a3c;
    --plum-mid: #3d2450;
    --plum-light: #6a4580;
    --white: #ffffff;
    --white-dim: rgba(255,255,255,0.6);
    --white-faint: rgba(255,255,255,0.12);
    --border: rgba(255,255,255,0.18);
    --cyan: #00d4ff;
    --purple: #7b2fff;

    /* Shared type scale */
    --font-heading: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
    --font-body:    'Inter', sans-serif;
    --font-pixel:   'Press Start 2P', monospace;
    --text-fine:   0.68rem;
    --text-sm:     0.85rem;
    --text-base:   1rem;
    --text-h3:     clamp(1rem, 2.8vw, 1.3rem);
    --text-h2:     clamp(1.4rem, 4vw, 2rem);
    --text-h1:     clamp(2.2rem, 7vw, 3.5rem);
    --text-hero:   clamp(2.8rem, 9vw, 6.5rem);
    --text-nav:    0.68rem;
    --text-label:  0.7rem;
    --lead-tight:  1.2;
    --lead-body:   1.75;
    --lead-loose:  1.9;
}

html {
    overflow-x: hidden;
    overflow-y: auto;
}

body {
    width: 100%;
    min-height: 100%;
    background-color: var(--plum-dark);
    background-image: url('../img/bg_tile.png');
    background-repeat: repeat;
    background-size: 32px 32px;
    image-rendering: pixelated;
    font-family: var(--font-body);
    font-size: var(--text-base);
    color: var(--white);
    line-height: var(--lead-body);
}

/* Semantic defaults (outside panel) */
p {
    font-size: var(--text-base);
    line-height: var(--lead-body);
    color: var(--white-dim);
}

h1 {
    font-family: var(--font-heading);
    font-size: var(--text-hero);
    font-weight: 900;
    line-height: var(--lead-tight);
    letter-spacing: 0.04em;
}

h2 {
    font-family: var(--font-heading);
    font-size: var(--text-h2);
    font-weight: 700;
    line-height: var(--lead-tight);
    letter-spacing: 0.04em;
}

h3 {
    font-family: var(--font-heading);
    font-size: var(--text-h3);
    font-weight: 700;
    line-height: var(--lead-tight);
    letter-spacing: 0.04em;
}

canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    image-rendering: pixelated;
}

/* ── Main layout ── */
main {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding: 4rem 1rem 6rem;
    gap: 2rem;
}

/* ── Panel — pixel font scoped here ── */
.panel {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: min(420px, 92vw);
    border: 2px solid var(--border);
    box-shadow: 0 8px 0 rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.1);
    font-family: var(--font-pixel);
}

.panel * {
    font-family: var(--font-pixel);
}

.panel-header {
    height: 12px;
    background: var(--plum-light);
    border-bottom: 2px solid rgba(0,0,0,0.3);
}

.panel-content {
    background: var(--plum-mid);
    padding: 2rem 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0;
}

.panel-footer {
    height: 8px;
    background: var(--plum-dark);
    border-top: 2px solid rgba(0,0,0,0.4);
}

/* ── Washer ── */
.washer-wrap { margin-bottom: 1.5rem; }

#washer {
    width: 96px;
    height: 96px;
    image-rendering: pixelated;
    filter: drop-shadow(0 4px 0 rgba(0,0,0,0.5));
    animation: bobble 1.8s ease-in-out infinite;
}

@keyframes bobble {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-5px); }
}

/* ── Panel typography (pixel font) ── */
.title {
    font-size: clamp(0.9rem, 4vw, 1.5rem);
    color: var(--white);
    text-shadow: 3px 3px 0 rgba(0,0,0,0.5);
    margin-bottom: 1.4rem;
    line-height: 1.5;
    letter-spacing: 0.05em;
}

.divider {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin-bottom: 1.4rem;
}

.divider-line {
    flex: 1;
    height: 2px;
    background: var(--white-faint);
}

.divider-sparkle {
    width: 16px;
    height: 16px;
    image-rendering: pixelated;
    animation: spin 4s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.coming-soon {
    font-size: clamp(0.45rem, 2vw, 0.65rem);
    letter-spacing: 0.25em;
    color: var(--white);
    text-shadow: 2px 2px 0 rgba(0,0,0,0.4);
    margin-bottom: 0.8rem;
}

.tagline {
    font-size: clamp(0.38rem, 1.5vw, 0.52rem);
    color: var(--white-dim);
    letter-spacing: 0.1em;
    line-height: 2;
}

.game-desc {
    font-size: clamp(0.32rem, 1.3vw, 0.44rem);
    color: var(--white-dim);
    letter-spacing: 0.05em;
    line-height: 2.2;
    margin-top: 1rem;
    opacity: 0.75;
}

.studio-byline {
    font-size: clamp(0.28rem, 1.1vw, 0.38rem);
    color: var(--white-dim);
    letter-spacing: 0.08em;
    margin-top: 0.75rem;
    opacity: 0.55;
}

.screenshots-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    width: min(1296px, 96vw);
}

.section-title {
    font-family: var(--font-heading);
    font-size: var(--text-label);
    font-weight: 700;
    letter-spacing: 0.38em;
    color: var(--cyan);
    text-shadow: 0 0 18px rgba(0, 212, 255, 0.4);
    text-transform: uppercase;
}

/* ── Gallery ── */
.gallery-row {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.gallery-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.gallery-col img {
    width: 220px;
    image-rendering: pixelated;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: border-color 0.2s, transform 0.2s;
}

.gallery-col img:hover {
    border-color: var(--cyan);
    transform: scale(1.03);
}

.screenshot-placeholder {
    width: 220px;
    aspect-ratio: 440 / 410;
    border: 1px dashed rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.02);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.placeholder-label {
    font-family: var(--font-heading);
    font-size: var(--text-fine);
    letter-spacing: 0.15em;
    color: rgba(255,255,255,0.18);
    text-align: center;
    padding: 0 0.5rem;
    text-transform: uppercase;
}

.gallery-caption {
    font-family: var(--font-heading);
    font-size: var(--text-fine);
    letter-spacing: 0.2em;
    color: rgba(255,255,255,0.35);
    text-transform: uppercase;
}

/* ── Lightbox ── */
#lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(0,0,0,0.85);
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

#lightbox.open { display: flex; }

#lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    border: 2px solid var(--border);
    box-shadow: 0 0 40px rgba(0,212,255,0.2);
    background-color: var(--plum-mid);
}

/* ── Music button ── */
.music-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 20;
    background: var(--plum-mid);
    border: 2px solid var(--border);
    padding: 8px;
    cursor: pointer;
    line-height: 0;
    box-shadow: 2px 2px 0 rgba(0,0,0,0.4);
}

.music-btn img {
    width: 20px;
    height: 20px;
    image-rendering: pixelated;
    opacity: 0.8;
}

.music-btn:hover img { opacity: 1; }
.music-btn.muted img { opacity: 0.35; }

@media (max-width: 768px) {
    main {
        padding-top: 10rem;
    }
}

