/* gbgrun.com: the landing page. Its colours are the game's own (the lettering's ink, yellow and lacquer red, the
   plum of the panels), its headings are drawn by the game's lettering (site.js), and it runs through the game's
   day: the sky over Lilla Bommen at the top, the night over Älvsborgsbron at the foot. */
:root {
  --ink: #0b0812;
  --plum: #19121f;
  --panel: #241a2e;
  --edge: #3a2c48;
  --yellow: #f8d820;
  --yellow-low: #9a7c08;
  --paper: #e9dcc0;
  --dim: #a79bb3;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--ink); -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--paper); font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; overflow-x: hidden; }
img, video, canvas { display: block; max-width: 100%; height: auto; }
p { margin: 0; }
a { color: #fff6a0; }
a:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }

/* Lettering. Until site.js has drawn it (or where there is no script) the words stand in a plain heavy face. */
.px { display: block; margin: 0; font: 800 1.5rem/1.15 ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: 0.04em; text-transform: uppercase; color: var(--yellow); }
.px canvas { image-rendering: crisp-edges; image-rendering: pixelated; max-width: none; }
.px .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.center .px canvas, .hero .px canvas { margin-left: auto; margin-right: auto; }

/* ---------- the top: the sky over Lilla Bommen, the name, the button and a piece of a run ---------- */
.hero {
  position: relative;
  padding: 64px 20px 0;
  text-align: center;
  background: #68a0e8 url(media/sky-0.png) 78% 100% / cover no-repeat; /* site.js sets a whole number of screen pixels to each of the picture's */
  image-rendering: crisp-edges; image-rendering: pixelated;
}
.hero h1 { font-size: 3rem; }
.hero .tagline { margin-top: 18px; color: #fff; }
.lang { position: absolute; top: 14px; right: 16px; padding: 4px 12px 5px; color: #fff; background: rgba(11, 8, 18, 0.72); border-radius: 4px; font-size: 0.9rem; text-decoration: none; }
.lang:hover { background: var(--ink); color: var(--yellow); }
.button {
  display: inline-block;
  margin: 30px 0 0;
  padding: 14px 20px 15px;
  background: var(--yellow);
  color: #120a08;
  box-shadow: 0 0 0 4px #120a08, 0 6px 0 4px var(--yellow-low), 0 6px 0 8px #120a08;
  text-decoration: none;
  max-width: 100%;
}
.button .px { color: #120a08; font-size: 1.15rem; }
.button.soon { box-shadow: 0 0 0 4px #120a08; } /* not yet a button: a sign, with no edge to press down */
a.button:hover { background: #fff6a0; }
a.button:active { transform: translateY(4px); box-shadow: 0 0 0 4px #120a08, 0 2px 0 4px var(--yellow-low), 0 2px 0 8px #120a08; }
.hero .note { margin-top: 26px; color: #fff; font-size: 0.85rem; }
/* a phone on its side, with the run on its screen. Its lower part hangs over the water's edge, into the page */
.phone {
  position: relative;
  max-width: 880px;
  margin: 34px auto -150px;
  padding: 10px;
  background: var(--ink);
  border-radius: 34px;
  box-shadow: 0 0 0 2px var(--edge), 0 26px 60px rgba(0, 0, 0, 0.5);
}
.phone video { width: 100%; aspect-ratio: 1280 / 592; border-radius: 24px; background: #000; image-rendering: auto; }

/* ---------- the page under it ---------- */
main { background: var(--ink); }
section { max-width: 1080px; margin: 0 auto; padding: 72px 20px 0; }
section > h2.px, section h2.px { margin-bottom: 24px; }
.intro { padding-top: 200px; max-width: 760px; text-align: center; }
/* a friend's challenge (gbgrun.com/c, written into the page by worker.js): their score, over the page's first words */
.challenge { position: relative; z-index: 2; margin: 0 auto; padding: 172px 20px 0; max-width: 760px; text-align: center; }
.challenge p { margin: 0; padding: 18px 20px; border: 3px solid var(--yellow); background: #120a08; color: #fcf0c0; font: 800 1.35rem/1.35 ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: 0.02em; }
.challenge b { color: var(--yellow); }
.challenge + .intro { padding-top: 28px; }
.lede { font-size: 1.35rem; line-height: 1.5; color: #fff; }
.after { color: var(--dim); max-width: 44rem; }

.moves ol { list-style: none; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.moves li { padding: 18px 16px 16px; background: var(--plum); border: 2px solid var(--edge); border-radius: 10px; }
.moves li .px { color: #fff; font-size: 1.1rem; margin-bottom: 10px; }
.moves li span { display: block; color: var(--paper); }

.shots { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px 22px; }
figure { margin: 0; }
.shots img, .scores img { width: 100%; border-radius: 12px; border: 3px solid var(--edge); background: var(--plum); }
.shots figcaption { margin-top: 10px; color: var(--paper); }

/* the eight districts as stops on a line: each picture is 320 game pixels wide, shown at one screen pixel each */
.line { max-width: 1400px; text-align: center; }
.line .after { margin: 0 auto; }
.line h2 canvas { margin: 0 auto; }
.stops { list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 22px 16px; }
.stops li { width: 320px; max-width: 100%; }
.stops img { width: 320px; border-radius: 6px; image-rendering: crisp-edges; image-rendering: pixelated; }
.stops p { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.stops i { flex: none; width: 28px; height: 28px; border-radius: 4px; font: 700 16px/28px ui-monospace, "SF Mono", Menlo, Consolas, monospace; text-align: center; box-shadow: 0 0 0 2px #000; }
.stops .px { flex: 1; text-align: left; color: #fff; font-size: 1rem; }

.scores { display: grid; grid-template-columns: 1fr 1.25fr; gap: 34px; align-items: center; }

[hidden] { display: none !important; }

/* ---------- the foot: the night over Älvsborgsbron, and under it a bar as on the game's title screen ---------- */
.foot {
  margin-top: 90px;
  padding-top: clamp(190px, 30vw, 430px);
  color: #dfe6f8;
  background: #0c1a44 url(media/sky-7.png) 22% 100% / cover no-repeat;
  image-rendering: crisp-edges; image-rendering: pixelated;
}
.foot .bar { display: flex; align-items: center; justify-content: center; gap: 18px; padding: 22px 20px 26px; background: rgba(11, 8, 18, 0.88); border-top: 2px solid var(--edge); }
.foot .icon { flex: none; width: 72px; border-radius: 16px; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2); }
.foot .links { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 4px 20px; }
.foot a { color: #fff; }

@media (max-width: 860px) {
  .moves ol { grid-template-columns: repeat(2, 1fr); }
  .scores { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero { padding-top: 58px; }
  .phone { margin-bottom: -70px; padding: 6px; border-radius: 20px; }
  .phone video { border-radius: 14px; }
  .intro { padding-top: 108px; }
  .challenge { padding-top: 92px; }
  .challenge p { font-size: 1.1rem; }
  section { padding-top: 56px; }
  .lede { font-size: 1.15rem; }
  .shots { grid-template-columns: 1fr; }
  .button { padding: 12px 14px 13px; }
}
