/* The dark twin of Angry Claudes: same pixel font and clay button, a night scene with a lava pit.
   The canvas must have no border or padding (mouse coords). */
@font-face { font-family: 'Press Start 2P'; src: url(fonts/press-start-2p.woff2) format('woff2'); font-display: swap; }
:root {
  --abyss: #160b10; --dusk: #3a1220; --ember: #ff6a2a; --blood: #c8263a; --clay: #d77757; --clay-lo: #a9553a;
  --ink: #2a1810; --bone: #f6ebdd; --ash: #b6a596; --rack: #2b2029;
  --k: 2; /* integer scale of the 720x180 scene keeps its pixels square and spans the window */
}
@media (min-width: 1441px) { :root { --k: 3; } }
@media (min-width: 2161px) { :root { --k: 4; } }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: var(--abyss); color: var(--bone); font: 11px/1.9 'Press Start 2P', monospace; }
a { color: var(--bone); }

#intro {
  position: relative; min-height: 100vh; overflow-x: clip; display: grid; grid-template-rows: auto 1fr auto auto; grid-template-columns: minmax(0, 1fr); justify-items: center;
  /* the column is the window, not the 1440+ px scene, which overflows evenly on both sides */
  background: linear-gradient(to bottom, var(--abyss) 0%, #241018 45%, #4a1620 78%, #6a2018 100%);
}
#intro::before { /* a few pixel stars */
  content: ''; position: absolute; top: 0; left: 0; width: 2px; height: 2px; background: var(--bone); opacity: 0.7;
  box-shadow: 8vw 9vh, 21vw 4vh, 33vw 15vh, 47vw 7vh, 62vw 12vh, 71vw 3vh, 84vw 17vh, 93vw 8vh, 14vw 24vh, 56vw 22vh, 78vw 27vh, 39vw 28vh;
}
.hero { position: relative; z-index: 1; display: grid; justify-items: center; gap: 22px; padding: clamp(28px, 7vh, 88px) 16px 0; text-align: center; }

/* switcher between the site's games, the same strip as on the Angry Claudes menu (src/style.css) */
.games { display: flex; gap: 6px; padding: 4px; max-width: 100%; overflow-x: auto; background: var(--rack); box-shadow: 0 0 0 3px #120a0e; }
.games a { padding: 8px 12px; font-size: 9px; color: var(--bone); text-decoration: none; white-space: nowrap; }
.games a[aria-current='page'] { background: var(--clay); color: var(--ink); }
.games a:not([aria-current]):hover { background: #3d2d38; }
.logo { margin: 0; display: grid; justify-items: center; line-height: 1; font-weight: 400; }
.angry { font-size: clamp(24px, 4.4vw, 48px); color: var(--bone); text-shadow: 3px 3px 0 #6b2a1a, 6px 6px 0 #2a0f0a; }
.doom {
  margin-top: 10px; font-size: clamp(54px, 11vw, 128px); color: var(--blood); letter-spacing: 0.04em;
  text-shadow: 4px 4px 0 #7a1424, 8px 8px 0 #3a0a12, 0 0 36px rgba(255, 106, 42, 0.45);
}
.plaque { margin: 0; padding: 10px 14px; background: var(--bone); color: var(--ink); font-size: clamp(8px, 1.1vw, 11px);
  box-shadow: 0 0 0 4px var(--ink), 6px 6px 0 4px rgba(0, 0, 0, 0.4); }
.note { max-width: 34em; margin: 0; padding: 14px; background: rgba(22, 11, 16, 0.85); box-shadow: 0 0 0 4px var(--rack); }

#load { display: grid; justify-items: center; gap: 12px; }
button { font: inherit; border: 0; cursor: pointer; }
#play {
  position: relative; min-width: 300px; padding: 18px 40px; font-size: 18px; color: var(--ink); background: var(--clay); overflow: hidden;
  box-shadow: inset 0 -6px 0 var(--clay-lo), 0 0 0 4px var(--ink), 8px 8px 0 4px rgba(0, 0, 0, 0.45);
}
#play:disabled { cursor: progress; color: var(--bone); background: #4a2a28; box-shadow: inset 0 -6px 0 #331c1b, 0 0 0 4px var(--ink), 8px 8px 0 4px rgba(0, 0, 0, 0.45); }
#play .fill { position: absolute; inset: 0 auto 0 0; width: calc(var(--p, 0) * 100%); background: var(--ember); opacity: 0.85; }
#play:not(:disabled) .fill { display: none; }
#play .label { position: relative; }
#play:not(:disabled):hover { background: #e2896a; }
#play:not(:disabled):active { transform: translate(3px, 3px); box-shadow: inset 0 -6px 0 var(--clay-lo), 0 0 0 4px var(--ink), 5px 5px 0 4px rgba(0, 0, 0, 0.45); }
button:focus-visible, a:focus-visible { outline: 3px dashed var(--bone); outline-offset: 8px; }
.ghost { padding: 10px 18px; color: var(--bone); background: var(--rack); box-shadow: 0 0 0 4px var(--ink); }
#status { margin: 0; min-height: 1.9em; color: var(--ash); font-size: 9px; }

.keys { max-width: 720px; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px; margin: 6px 0 0; padding: 0; list-style: none; color: var(--ash); font-size: 9px; }
kbd { display: inline-block; margin-right: 3px; padding: 5px 7px 3px; font: inherit; color: var(--bone); background: var(--rack); box-shadow: inset 0 -3px 0 #120a0e, 0 0 0 2px #120a0e; }

/* in the flow under the hero; its empty sky tucks under the hero's last row */
.scene {
  grid-row: 3; margin-top: calc(-40px * var(--k));
  width: calc(720px * var(--k)); height: calc(180px * var(--k));
  background: url(hero.png) center bottom / 100% 100% no-repeat; image-rendering: pixelated;
}
footer { grid-row: 4; justify-self: stretch; padding: 12px 16px 14px; text-align: center; font-size: 8px; color: var(--ash); background: #120a0e; }
footer p { margin: 2px 0; }
footer a { margin: 0 8px; }

canvas { display: block; position: fixed; inset: 0; width: 100vw; height: 100vh; object-fit: contain; background: #000; border: 0; padding: 0; outline: none; image-rendering: pixelated; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
