/* The game's Terminal look (Look's Terminal.java, docs/concept/menus.md): amber capitals with a soft glow on a warm
   near-black, the chosen line as "> LINE _" on a bar of light with a blinking cursor, a rule under the name, scan
   lines. The letters are the site's own pixel font (font.py); one font pixel is an eighth of the font size. */
@font-face {
  font-family: "Blukach Terminal";
  src: url("/terminal.woff2") format("woff2");
  font-display: block;
}

:root {
  --ink: #ffb028;
  --dim: #966414;
  --faint: #5a3c0c;
  --paper: #0e0902;
  --glow: 0 0 0.4em rgba(255, 176, 40, 0.45);
}

* { box-sizing: border-box; }

html { background: var(--paper); }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background: radial-gradient(130% 110% at 30% 35%, #150e04 0%, var(--paper) 50%, #070401 100%) fixed;
  font: 16px/1.5 "Blukach Terminal", ui-monospace, Consolas, "Liberation Mono", monospace;
  text-transform: uppercase;
  text-shadow: var(--glow);
}

/* The monitor's scan lines over everything: of every four rows the second darkened by 22%, the third by 12%. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, transparent 0 1px, rgba(0, 0, 0, 0.22) 1px 2px, rgba(0, 0, 0, 0.12) 2px 3px, transparent 3px 4px);
}

main { padding: max(2.5rem, 12vh) 8vw 2rem; }

h1 {
  margin: 0;
  font-size: 72px;
  font-weight: normal;
  line-height: 1.125;
  letter-spacing: 0;
}

hr {
  width: min(100%, 560px);
  height: 3px;
  margin: 28px 0 40px;
  border: 0;
  background: var(--dim);
  box-shadow: 0 0 6px rgba(255, 176, 40, 0.35);
}

/* The menu's lines: the first is chosen until the pointer or the keyboard is on another. */
.menu { font-size: 32px; }
.line {
  display: block;
  width: max-content;
  max-width: 100%;
  margin: 0 0 0.5em -0.25em;
  padding: 0.1875em 0.25em;
  line-height: 1.125;
  color: var(--ink);
  text-decoration: none;
}
.mark, .cur { visibility: hidden; }

.line:first-child, .line:hover, .line:focus-visible {
  background: var(--ink);
  color: var(--paper);
  text-shadow: none;
  box-shadow: 0 0 0.3em rgba(255, 176, 40, 0.55);
  outline: none;
}
.line:first-child .mark, .line:hover .mark, .line:focus-visible .mark,
.line:first-child .cur, .line:hover .cur, .line:focus-visible .cur { visibility: visible; }

.menu:has(.line:hover, .line:focus-visible) .line:first-child:not(:hover, :focus-visible) {
  background: none;
  color: var(--ink);
  text-shadow: var(--glow);
  box-shadow: none;
}
.menu:has(.line:hover, .line:focus-visible) .line:first-child:not(:hover, :focus-visible) :is(.mark, .cur) { visibility: hidden; }

/* The cursor blinks as a terminal's: half a second shown, half hidden. */
.cur { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cur { animation: none; } }

.hint { margin: 0.25em 0 0; font-size: 16px; color: var(--dim); }
.state { margin: 48px 0 0; font-size: 24px; color: var(--dim); }

footer {
  margin-top: auto;
  padding: 2rem 8vw;
  color: var(--dim);
  font-size: 16px;
}
footer p { margin: 0; max-width: 60em; }

@media (max-width: 600px) {
  h1 { font-size: 48px; }
  hr { margin: 20px 0 28px; }
  .menu { font-size: 24px; }
  .state { font-size: 16px; margin-top: 32px; }
}
