/* The home page (Pages/Index.cshtml). The same colours and lettering as the
   builder (builder/style.css), so the three pages look like one site. */
:root{
  --stone:#15120f; --panel:#221d18; --line:#3a322a; --ink:#f0e7d8; --muted:#ab9f8c;
  --gold:#e3a72a; --teal:#2fa89e;
  --display:"Silkscreen","Courier New",monospace; --body:"Atkinson Hyperlegible",system-ui,sans-serif;
  color-scheme:dark;
}
*{box-sizing:border-box}
html,body{margin:0;background:var(--stone);color:var(--ink);font-family:var(--body);font-size:16px;line-height:1.45}

/* One column, centred, never wider than the picture looks good at. The
   padding is at least what a phone says its notch and corners need. */
main{max-width:640px;margin:0 auto;min-height:100vh;min-height:100dvh;display:flex;flex-direction:column;align-items:center;gap:16px;text-align:center;
  padding:max(28px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(40px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left))}

h1{font-family:var(--display);font-weight:700;color:var(--gold);letter-spacing:1px;margin:0;
  font-size:clamp(26px, 8vw, 44px)}   /* as large as the screen's width allows, between 26 and 44 pixels */
.line{margin:0;color:var(--muted)}

/* THE BANNER (Jon, 23 November 2026): his painting, the page's heading,
   across the column's full width. A painting, not pixel art, so it is
   smoothed as it is enlarged or shrunk. */
h1:has(.banner){width:100%}
.banner{display:block;width:100%;height:auto}

/* The sub heading sits one character's height under the title (Jon, 22
   November 2026): the title's line is made no taller than its letters, the
   column's 16-pixel gap is about one character of the sub heading, and the
   sub heading's own spare space above its letters is taken back. */
h1{line-height:1}
h1 + .line{margin-top:calc(-0.225em - 6px)}

/* The pictures of the first three levels, in a strip under the title:
   three across, and two on a phone, where the third is left out. Pixel art,
   so they are enlarged with hard edges ("pixelated"), not smoothed. Each is
   a link to the game. */
.screens{display:grid;grid-template-columns:repeat(3, 1fr);gap:10px;width:100%}
@media (max-width: 520px){
  .screens{grid-template-columns:repeat(2, 1fr)}
  .screens .screen:nth-child(3){display:none}
}
.screen{display:block;width:100%;border:1px solid var(--line);border-radius:8px;overflow:hidden;background:#0b0a12}

/* THE PARADE, straight under the picture: the star of the page. The game's
   own 256 pixels across, enlarged to the column's full width with hard
   edges. */
#parade{display:block;width:100%;height:auto;image-rendering:pixelated;margin-top:-12px}
.screen img{display:block;width:100%;height:auto;image-rendering:pixelated}

/* The parade, the buttons and the wiki link sit at the bottom of the
   window: the column is at least as tall as the window (min-height on main),
   and "margin-top:auto" gives this group all the spare space above it. A page
   taller than the window simply scrolls, with nothing pinned. */
.bottom{margin-top:auto;width:100%;display:flex;flex-direction:column;align-items:center;gap:16px}

/* The two ways in: side by side, or one above the other where there is no room. */
nav{display:flex;flex-wrap:wrap;gap:12px;justify-content:center;width:100%}
.go{flex:1 1 220px;padding:16px 18px;border-radius:10px;border:1px solid var(--line);
  font-family:var(--display);font-size:16px;text-decoration:none;text-align:center}
.go.play{background:var(--teal);border-color:var(--teal);color:#06211f}
.go.build{background:var(--panel);border-color:var(--gold);color:var(--gold)}
.go:focus-visible,.screen:focus-visible{outline:2px solid var(--gold);outline-offset:3px}

/* The way into the wiki: a plain link under the two buttons. */
.more{margin:4px 0 0}
.more a{color:var(--teal)}
.more a:focus-visible{outline:2px solid var(--gold);outline-offset:3px}
