/* Lumobit: one stylesheet, no frameworks, no web fonts. The palette is the game's own:
   brick, moss green and the logo's red on near-black. */

:root {
  color-scheme: dark;
  --bg: #0c0b10;
  --panel: #15131b;
  --line: #2b2733;
  --text: #e7e2d9;
  --muted: #a39d94;
  --red: #d8432f;
  --green: #4ea64a;
  --green-dark: #2f6b2d;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  --measure: 74rem;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1.0625rem/1.65 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
}

a { color: #8fd18b; text-underline-offset: 0.18em; }
a:hover { color: #b6e8b2; }
:focus-visible { outline: 3px solid #ffd45e; outline-offset: 3px; border-radius: 2px; }

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, .brand, .eyebrow, .button, nav, th, kbd, dt, figcaption, .gallery span {
  font-family: var(--mono);
}

/* ---- top bar ---- */

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem max(1rem, calc((100% - var(--measure)) / 2));
  background: rgba(12, 11, 16, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}

.brand {
  color: var(--text);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.08em;
  text-decoration: none;
}
.brand:hover { color: var(--text); }

nav { display: flex; align-items: center; gap: 1.25rem; font-size: 0.95rem; }
nav a { color: var(--muted); text-decoration: none; }
nav a:hover { color: var(--text); }
nav .nav-play {
  color: #0c0b10;
  background: var(--green);
  padding: 0.3rem 0.8rem;
  border-radius: 3px;
  font-weight: 700;
}
nav .nav-play:hover { color: #0c0b10; background: #6cc468; }

/* ---- layout ---- */

main { padding: 0 1rem 3rem; }

section {
  max-width: var(--measure);
  margin: 0 auto;
  padding-top: 3.5rem;
}

h1, h2, h3 { line-height: 1.15; margin: 0 0 1rem; }
h1 { font-size: clamp(2.4rem, 7vw, 4.2rem); letter-spacing: 0.02em; color: #fff; }
h2 { font-size: 1.6rem; color: #fff; }
h2::before { content: "// "; color: var(--red); }
h3 { font-size: 1.15rem; margin-top: 2rem; color: #fff; }

p { margin: 0 0 1.1rem; max-width: 46rem; }
strong { color: #fff; }

/* ---- hero ---- */

.hero { padding-top: 1.75rem; }

/* wide screens: the headline and the Play button next to the picture, both above the fold */
@media (min-width: 62rem) {
  .hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 2.75rem; align-items: center; padding-top: 3rem; }
  .hero .intro { order: 1; }
  .hero .screen { order: 2; margin: 0; }
}

.screen {
  margin: 0 0 2rem;
  border: 2px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 0 0 4px #000, 0 18px 60px rgba(216, 67, 47, 0.18);
}

.eyebrow {
  margin: 0 0 0.4rem;
  color: var(--red);
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.lede { font-size: 1.25rem; color: #f3eee5; max-width: 40rem; }

.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; margin-top: 1.5rem; }

.button {
  display: inline-block;
  padding: 0.85rem 1.6rem;
  background: var(--green);
  color: #0c0b10;
  font-size: 1.15rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 2px;
  /* a stepped, pixel-art shadow */
  box-shadow: 4px 4px 0 var(--green-dark), 4px 4px 0 2px #000;
  transition: transform 0.08s, box-shadow 0.08s, background 0.08s;
}
.button:hover { color: #0c0b10; background: #6cc468; transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--green-dark), 5px 5px 0 2px #000; }
.button:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--green-dark), 1px 1px 0 2px #000; }

.hint { color: var(--muted); font-size: 0.95rem; max-width: 22rem; }

/* shown on phones and tablets only: no keyboard, no gamepad (yet) */
.touch-note {
  display: none;
  margin-top: 1rem;
  padding: 0.7rem 1rem;
  border-left: 4px solid var(--red);
  background: var(--panel);
  color: var(--muted);
  font-size: 0.95rem;
}
@media (hover: none) and (pointer: coarse) { .touch-note { display: block; } }

/* ---- gallery ---- */

.gallery {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 28rem), 1fr));
  gap: 1.25rem;
}
.gallery li { background: var(--panel); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.gallery span { display: block; padding: 0.55rem 0.9rem 0.7rem; color: var(--muted); font-size: 0.85rem; }

/* ---- controls ---- */

.table-wrap { overflow-x: auto; max-width: 52rem; margin: 1.25rem 0 1.5rem; border: 1px solid var(--line); border-radius: 4px; }

table { width: 100%; border-collapse: collapse; background: var(--panel); font-size: 0.98rem; }
th, td { padding: 0.55rem 1rem; text-align: left; border-bottom: 1px solid var(--line); }
tbody tr:last-child > * { border-bottom: 0; }
thead th { color: var(--muted); font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; background: #100e15; }
tbody th { color: #fff; font-weight: 600; white-space: nowrap; }

kbd {
  display: inline-block;
  min-width: 1.7em;
  padding: 0.05em 0.45em;
  text-align: center;
  font-size: 0.9em;
  color: #fff;
  background: #26222f;
  border: 1px solid #4a4457;
  border-bottom-width: 3px;
  border-radius: 4px;
}

.tips { margin: 0 0 1rem; padding-left: 1.2rem; max-width: 46rem; }
.tips li { margin-bottom: 0.5rem; }

/* ---- about ---- */

.specs { max-width: 52rem; margin: 1.5rem 0; display: grid; gap: 0; border: 1px solid var(--line); border-radius: 4px; background: var(--panel); }
.specs div { display: grid; grid-template-columns: 8rem 1fr; gap: 1rem; padding: 0.65rem 1rem; border-bottom: 1px solid var(--line); }
.specs div:last-child { border-bottom: 0; }
.specs dt { color: var(--muted); font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase; padding-top: 0.15rem; }
.specs dd { margin: 0; }

.note { color: var(--muted); font-size: 0.95rem; }

@media (max-width: 34rem) {
  .specs div { grid-template-columns: 1fr; gap: 0.1rem; }
  nav { gap: 0.8rem; font-size: 0.85rem; }
  nav a:not(.nav-play) { display: none; }
  nav a[href="#controls"] { display: inline; }
}

/* ---- footer ---- */

footer {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}
footer p { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button { transition: none; }
}
