/* Yep, AI was used in the creation of this file, curated/tamed by Jon though ;) */

@font-face {
    font-family: "Jersey 20";
    src: local("Jersey 20"), local("Jersey20-Regular"),
         url("Jersey20-Regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    /* base scale; change at different breakpoints to make the whole pixel-canvas larger/smaller */
    --pixel-scale: 2;
}

* {
    image-rendering: pixelated;
}

html {
    background: #241F24;
    overflow-x: hidden;
    width: 384px;
}

body {
    margin: 0;
    font-family: "Jersey 20", sans-serif;
    font-weight: 400;
    font-style: normal;
}

/* Pixel-perfect placement system
   - .pixel-canvas acts like your original pixel art document (use its raw pixel width/height)
   - scale the whole canvas with --pixel-scale so children keep integer pixel offsets
   - children (.sprite) use top/left/width/height in raw pixels (no scaling). */
.pixel-canvas {
    overflow-x: hidden;
    position: relative;
    left: calc((100vw / 2) - 384px);
    transform-origin: 0 0; /* top-left origin so placements align to canvas pixels */
    transform: scale(var(--pixel-scale));
    /* update background image path to new location */
    background: url('default/BackgroundUnderground.png');
    image-rendering: pixelated; /* ensure scaled images stay crisp */
    /* Optional: add a thin outline during development to verify alignment */
    /* outline: 1px dashed rgba(0,0,0,0.08); */
}

/* absolutely positioned sprites inside the canvas — set left/top/width/height in px */
.pixel-canvas .sprite {
    position: absolute;
    image-rendering: pixelated;
    transform-origin: 0 0;
    user-select: none;
    /* prefer controlling size with width/height in px that match the original artwork */
}

.pixel-canvas .backgroundSkyClip {
    position: absolute;
    top: 0;
    left: 0;
    width: 384px;
    height: 140px;
    overflow: hidden;
}

.ignore-clicks {
  pointer-events: none;
}

#logo,
.clickable {
    cursor: pointer;
}

.canTint {
  transition: filter 0.5s linear;
}

.night .canTint {
  filter: brightness(0.6) contrast(0.9) saturate(0.5);
}

.img-hover {
    display: none;
}
nav a:hover .img-hover {
    display: block;
    position: absolute;
    top: 0;
}
nav a:hover .img-default {
    display: none;
}
nav a {
    font-size: 0rem;
}

main {
    position: absolute;
    top: 106px;
    left: calc((100vw / 2) - 220px);
    width: 437px;
    border: 1px solid #A59991;
    background: #D3C3B8;
    color: #9A7D46;
}

main h1 {
    color: #614207;
    padding: 0.5rem 0.5rem 0;
    margin: 0.5rem -1px;
    background: #241f24;
}

main h2 {
    color: #614207;
    margin: 0.5rem 0;
}

.release-date {
    font-size: 1rem;
    color: #7f7f7f;
    margin-left: 0.5rem;
    font-family: sans-serif;
    float: right;
}

.section {
    width: calc(100% - 1rem);
    margin: 0.5rem 0.5rem;
    padding-bottom: 2rem;
}

.section p {
    margin: 0;
}

.section p + p {
    margin-top: 0.5rem;
}

.section .left {
    width: calc(50% - 0.3rem);
    float: left;
}

.section .right {
    width: calc(50% - 0.3rem);
    float: right;
}

.section .actions {
    width: 100%;
    text-align: center;
    clear: both;
    padding-top: 0.5rem;
}

.section img {
    width: 100%;
    border-radius: 0.5rem;
}

.section .left img {
    margin: 0px 8px 0 0 !important;
}

.section .right img {
    margin: 0px 0 0 8px !important;
}

.section .actions .store-badge.steam {
    height: 30px;
    padding: 0.5em 1em;
    background: black;
}

.section .actions .store-badge {
    height: 50px;
    width: auto;
    image-rendering: auto;
}
.section .actions img {
    height: 40px;
    margin-right: 10px;
}
.section .actions img {
    width: 100%;
    border-radius: 8px;
    image-rendering: auto;
}

.playButton {
    background: black;
    border: 2px solid white;
    border-radius: 8px;
    color: white;
    padding: 0.5rem 1rem;
    font-size: 1.5rem;
    display: inline-block;
}

.about-highlight {
    color: #614207;
}

.footer {
    background: #241f24;
    margin: -1px;
    width: calc(100% + 2px);
    color: #7f7f7f;
    padding: 5rem 0 2rem;
}
.footer a {
    color: #7f7f7f;
}
.footer a:hover {
    color: #525252;
}

.cloud {
    opacity: 0.75;
}

.game-blurb::after { content:""; display:block; clear:both; }

.wrap { display:block; max-width:100%; height:auto; }
.wrap.left  { float:left;  margin:0 16px 12px 0; }
.wrap.right { float:right; margin:0 0 12px 16px; }

/* Optional: stack on small screens */
@media (max-width: 520px) {
    .wrap.left,
    .wrap.right {
        float:none; margin:0 0 12px 0;
        width: 100%;
    }
}

/* Responsive example: increase scale on larger screens */
@media (min-width: 1024px) {
    :root {
        --pixel-scale: 3;
        font-size: 1.2rem;
    }
    .pixel-canvas {
        left: calc((100vw / 2) - (384px * 1.5));
    }
    main {
        top: 159px;
        left: calc((100vw / 2) - (220px * 1.5));
        width: 656px;
    }
}

@media (min-width: 1600px) {
    :root {
        --pixel-scale: 4;
        font-size: 1.7rem;
    }
    .pixel-canvas {
        left: calc((100vw / 2) - (384px * 2.0));
    }
    main {
        top: 212px;
        left: calc((100vw / 2) - (220px * 2.0));
        width: 874px;
    }
    .section .actions .store-badge.steam {
        padding: 0.35em 1em;
    }
}

@media (max-width: 499px) {
    :root {
        --pixel-scale: 1.3;
        font-size: 1rem;
    }
    .pixel-canvas {
        left: -98px;
    }
    main {
        top: 68px;
        left: 8px;
        width: 340px;
        border-top-right-radius: 32px;
    }
    main #games + h1 {
        border-top-right-radius: 24px;
        border-right: 5px solid #d3c3b8;
    }
    .section .actions .store-badge {
        height: 40px;
    }
}
