/* Path of the Idle landing page. Colours are the game's: boot background,
   title plate, gold title, battle-ground grass. No third-party anything. */

@font-face {
  font-family: "Game Over";
  src: url("/fonts/game-over.woff2") format("woff2");
  font-display: swap;
}

:root {
  --bg: #2c2929;
  --bg-deep: #211f1f;
  --plate: #38362e;
  --line: #403939;
  --gold: #d4a71f;
  --ember: #ae411a;
  --grass: #8b9150;
  --grass-dark: #557d55;
  --cream: #d2c1b1;
  --ink: #ece4da;
  --muted: #a39b94;
  --pixel: "Game Over", ui-monospace, monospace;
  /* 1 font pixel = 2, 3 or 4 CSS px: the pixel font stays on the grid. */
  --px2: 20px;
  --px3: 30px;
  --px4: 40px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

img { max-width: 100%; height: auto; }
.pixelated, .pixelated img { image-rendering: pixelated; image-rendering: crisp-edges; }

a { color: var(--gold); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
a:focus-visible, .btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }

.skip {
  position: absolute; left: -999px; top: 8px;
  background: var(--gold); color: #000; padding: 8px 12px;
}
.skip:focus { left: 8px; z-index: 10; }

/* ---- pixel text ---- */
.px, h1, h2, h3, .btn, .nav, .stat b {
  font-family: var(--pixel);
  font-weight: normal;
  letter-spacing: 0;
  -webkit-font-smoothing: none;
  font-smooth: never;
}
.outline {
  /* 1 font pixel black outline, like the game's outlined sheet (2 px at 20 px). */
  text-shadow: -2px 0 #000, 2px 0 #000, 0 -2px #000, 0 2px #000,
               -2px -2px #000, 2px -2px #000, -2px 2px #000, 2px 2px #000;
}

/* ---- top bar ---- */
.top {
  background: var(--bg-deep);
  border-bottom: 2px solid var(--line);
}
.top .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; min-height: 56px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none;
  font-family: var(--pixel); font-size: var(--px2); line-height: 1;
  white-space: nowrap;
}
.brand img { width: 32px; height: 32px; border: 2px solid #000; }
.nav { display: flex; gap: 18px; font-size: var(--px2); line-height: 1; }
.nav a { color: var(--cream); text-decoration: none; }
.nav a:hover { color: var(--gold); }

/* ---- hero ---- */
.hero {
  background: var(--grass);
  border-bottom: 4px solid #000;
  text-align: center;
  overflow: hidden;
}
.hero .wrap { padding-top: 40px; }
.plate {
  display: inline-block;
  margin: 0;
  padding: 18px 20px;
  background: var(--plate);
  border: 4px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 6px 0 rgba(0, 0, 0, .25);
}
.plate img { display: block; width: 258px; } /* 86 px title x3 */
.by {
  margin: 10px 0 0;
  font-family: var(--pixel); font-size: var(--px2); line-height: 1;
  color: var(--ink);
}
.by a { color: inherit; text-decoration: none; }
.tagline {
  margin: 26px 0 0;
  font-family: var(--pixel); font-size: var(--px3); line-height: 1.2;
  color: #fff;
}
.lead {
  max-width: 34em; margin: 14px auto 0;
  color: #1d1b16; font-size: 18px; font-weight: 600;
}
.cta { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.news { margin: 18px 0 0; font-family: var(--pixel); font-size: var(--px2); line-height: 1.2; }
.news a {
  display: inline-block; padding: 6px 12px;
  color: #1d1b16; text-decoration: none;
  background: var(--gold); border: 2px solid #000; border-radius: 6px;
}
.news a:hover { color: #000; background: var(--cream); }
/* The legends strip is wider than a phone: the band centres it with flex
   (overflow spills equally both sides, .hero clips it), at an integer scale. */
.legends-band {
  display: flex; justify-content: center;
  margin-top: 24px;
}
.legends {
  display: block; flex: none;
  width: 512px; max-width: none; /* feature art x1 on phones */
}

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 12px 18px;
  font-size: var(--px2); line-height: 1; text-align: left;
  color: var(--ink); text-decoration: none;
  background: var(--bg-deep);
  border: 4px solid #000;
  border-radius: 10px;
  box-shadow: inset 0 -4px 0 var(--line), 0 4px 0 rgba(0, 0, 0, .3);
}
.btn b { font-weight: normal; font-size: var(--px3); color: var(--gold); }
.btn:hover { color: #fff; }
.btn-play.is-soon { cursor: default; }
.btn-play.is-soon b { color: var(--cream); }
.play-tri {
  width: 0; height: 0;
  border-left: 22px solid var(--gold);
  border-top: 14px solid transparent;
  border-bottom: 14px solid transparent;
}
.is-soon .play-tri { border-left-color: var(--grass); }
.btn-ghost { background: var(--gold); color: #1d1b16; box-shadow: inset 0 -4px 0 #a07b12, 0 4px 0 rgba(0, 0, 0, .3); }
.btn-ghost:hover { color: #000; }

/* ---- sections ---- */
section { padding: 56px 0; }
section + section { border-top: 2px solid var(--line); }
h2 {
  margin: 0 0 18px;
  font-size: var(--px3); line-height: 1.2;
  color: var(--gold);
}
h3 { margin: 0 0 10px; font-size: var(--px2); line-height: 1.2; color: var(--gold); }
.pitch p { max-width: 40em; color: var(--cream); }
.pitch .big { font-size: 20px; color: var(--ink); }

.stats {
  list-style: none; margin: 30px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
}
.stat {
  background: var(--plate); border: 2px solid var(--line); border-radius: 8px;
  padding: 12px; text-align: center; color: var(--cream); font-size: 15px;
}
.stat b { display: block; font-size: var(--px4); line-height: 1; color: var(--gold); margin-bottom: 6px; }

.features {
  display: grid; gap: 16px; grid-template-columns: 1fr;
  list-style: none; margin: 0; padding: 0;
}
.card {
  background: var(--plate); border: 2px solid var(--line); border-radius: 10px;
  padding: 18px 18px 12px;
}
.card ul { margin: 0; padding-left: 1.1em; color: var(--cream); }
.card li { margin-bottom: 6px; }
.card li::marker { color: var(--gold); content: "\25B8  "; }

/* ---- new in 0.2.0 ---- */
.news-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px; }
.newrow {
  display: grid; gap: 18px; align-items: center;
  background: var(--plate); border: 2px solid var(--line); border-radius: 10px;
  padding: 18px;
}
.newtext ul { margin: 0; padding-left: 1.1em; color: var(--cream); }
.newtext li { margin-bottom: 6px; }
.newtext li::marker { color: var(--gold); content: "\25B8  "; }
.newshots { margin: 0; display: flex; gap: 12px; justify-content: center; }
.newshots img { display: block; width: 216px; border: 4px solid #000; border-radius: 8px; background: #000; }
.newshots.two img { width: calc(50% - 6px); max-width: 216px; }
.newshots a { display: block; flex: 0 1 auto; }
.newshots.three { gap: 8px; }
.newshots.three a { width: calc((100% - 16px) / 3); max-width: 180px; }
.newshots.three img { width: 100%; }

/* ---- trailer: poster + play button; yt.js swaps in the YouTube player on click ---- */
.trailer { max-width: 960px; margin-inline: auto; }
.yt-facade, .yt-frame {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 9;
  background: #000; border: 4px solid #000; border-radius: 8px; overflow: hidden;
}
.yt-facade img { display: block; width: 100%; height: 100%; object-fit: cover; }
.yt-frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.yt-play {
  position: absolute; left: 50%; top: 50%; width: 88px; height: 62px; margin: -31px 0 0 -44px;
  background: var(--ember); border: 4px solid #000; border-radius: 12px;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .3);
}
.yt-play::after {
  content: ""; position: absolute; left: 32px; top: 13px;
  border-left: 24px solid #fff; border-top: 14px solid transparent; border-bottom: 14px solid transparent;
}
.yt-facade:hover .yt-play, .yt-facade:focus-visible .yt-play { background: var(--gold); }
.yt-facade:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.yt-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

.shots {
  list-style: none; margin: 0 -16px; padding: 4px 16px 16px;
  display: flex; gap: 14px;
  overflow-x: auto; scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
}
.shots li { flex: 0 0 auto; scroll-snap-align: center; }
.shots a { display: block; border: 4px solid #000; border-radius: 8px; overflow: hidden; background: #000; }
.shots img { display: block; width: 216px; height: auto; }
.hint { color: var(--muted); font-size: 15px; margin: 6px 0 0; }

.closer { text-align: center; }
.closer p { color: var(--cream); }
.closer .cta { margin-top: 18px; }

/* ---- footer ---- */
footer {
  background: var(--bg-deep);
  border-top: 2px solid var(--line);
  padding: 28px 0 36px;
  color: var(--muted); font-size: 15px;
}
footer .links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 12px; font-family: var(--pixel); font-size: var(--px2); line-height: 1.2; }
footer .links a { color: var(--cream); text-decoration: none; }
footer .links a:hover { color: var(--gold); }
footer p { margin: 6px 0; }
footer p a { color: var(--muted); }

/* ---- privacy / text pages ---- */
.doc { padding: 40px 0 56px; }
.doc .wrap { max-width: 760px; }
.doc h1 { margin: 0; font-size: var(--px4); line-height: 1.1; color: var(--gold); }
.doc .meta { color: var(--muted); margin: 10px 0 24px; }
.doc h2 { font-size: var(--px2); margin: 34px 0 8px; }
.doc p, .doc li { color: var(--cream); }
.doc strong { color: var(--ink); }
.summary {
  background: var(--plate); border: 2px solid var(--line); border-left: 6px solid var(--gold);
  border-radius: 8px; padding: 14px 18px; margin: 0 0 8px;
}
.summary p { margin: 0; color: var(--ink); }
.notfound { text-align: center; padding: 72px 0; }
.notfound h1 { font-size: var(--px4); color: var(--gold); margin: 0 0 12px; }
.notfound p { color: var(--cream); }

/* ---- wider screens ---- */
@media (min-width: 560px) {
  .plate img { width: 344px; } /* x4 */
  .stats { grid-template-columns: repeat(3, 1fr); }
  .features { grid-template-columns: repeat(2, 1fr); }
  .shots img { width: 270px; }
  .legends { width: 1024px; } /* x2 */
  .newrow { grid-template-columns: 1fr auto; padding: 22px 26px; }
  .newrow:nth-child(even) .newtext { order: 2; }
  .newshots.two img { width: 180px; }
  .newshots.three a { width: 150px; }
}
@media (min-width: 900px) {
  .hero .wrap { padding-top: 56px; }
  .plate { padding: 22px 28px; }
  .plate img { width: 516px; } /* x6 */
  .tagline { font-size: var(--px4); }
  .stats { grid-template-columns: repeat(6, 1fr); }
  .features { grid-template-columns: repeat(3, 1fr); }
  .card:last-child { grid-column: span 3; }
  .shots { flex-wrap: wrap; justify-content: center; overflow: visible; margin: 0; padding: 0; }
  .shots img { width: 228px; }
  .newshots.three a { width: 180px; }
}
@media (min-width: 1600px) {
  .legends { width: 1536px; } /* feature art x3 */
}
@media (max-width: 479px) {
  .nav .opt { display: none; } /* the nav must fit 360 px phones */
  .brand span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}
@media (prefers-reduced-motion: no-preference) {
  .shots { scroll-behavior: smooth; }
}
