/* Genie Jam's title screen (index.html): the logo, a red cursor beside three choices, the tagline. */

@font-face {
  font-family: 'Genie Jam 8';
  src: url('../app/fonts/genie-jam-8.woff') format('woff'), url('../app/fonts/genie-jam-8.ttf') format('truetype');
  font-display: swap;
}

:root {
  --black: #000;
  --white: #fcfcfc;
  --gray: #bcbcbc;
  --gray-dark: #7c7c7c;
  --yellow: #f8b800;
  --red: #f83800;
  --pixel: 'Genie Jam 8', ui-monospace, 'Cascadia Mono', Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--black);
  color: var(--white);
  font-family: var(--pixel);
  -webkit-font-smoothing: none;
}

.title {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(20px, 5vh, 48px);
  padding: 24px 16px;
}

.title-logo { margin: 0; }
.title-logo img { display: block; width: min(640px, 90vw); height: auto; }

.title-menu { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }

.pick {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  min-width: 100%;
  padding: 4px 0 4px 1.4em;
  font: inherit;
  font-size: clamp(22px, 5vw, 36px);
  line-height: 1.2;
  color: var(--white);
  background: none;
  border: 0;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
}
.pick:focus { outline: none; }
.pick.small { font-size: clamp(14px, 3vw, 18px); color: var(--gray); }
.pick.small:first-of-type { margin-top: 10px; }
.pick .value { color: var(--yellow); }

/* The cursor: a blinking red arrow beside the chosen line. */
.pick.on::before {
  content: '\25B6';
  position: absolute;
  left: 0;
  color: var(--red);
  animation: blink 0.9s steps(1) infinite;
}
@keyframes blink { 50% { visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .pick.on::before { animation: none; } }

.title-hint { margin: 0; text-align: center; text-wrap: balance; line-height: 1.6; font-size: clamp(12px, 2.6vw, 16px); color: var(--yellow); animation: blink 1.2s steps(1) infinite; }
.title-hint[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .title-hint { animation: none; } }

/* The system page (systems.html): a card per console, the cursor on its name, BACK under them. */
.systems-head { margin: 0; text-align: center; font-weight: normal; font-size: clamp(22px, 5vw, 36px); color: var(--yellow); }
.system-list { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(16px, 4vw, 40px); max-width: 100%; }
.pick.system {
  flex-direction: column;
  align-items: center;
  justify-content: flex-start; /* pictures line up even when a long name (GAME BOY COLOR) takes two lines */
  gap: 12px;
  min-width: 0;
  width: clamp(150px, 40vw, 300px);
  padding: 12px;
  border: 4px solid transparent;
}
.pick.system img {
  display: block;
  width: 100%;
  height: clamp(110px, 28vw, 220px);
  object-fit: contain;
  visibility: hidden;
}
.pick.system.has-picture img { visibility: visible; }
.pick.system.on { border-color: var(--red); }
.pick.system.on::before { content: none; }
.system-name { position: relative; padding-left: 1.4em; font-size: clamp(16px, 4vw, 28px); text-align: center; }
.pick.system.on .system-name::before {
  content: '\25B6';
  position: absolute;
  left: 0;
  color: var(--red);
  animation: blink 0.9s steps(1) infinite;
}
@media (prefers-reduced-motion: reduce) { .pick.system.on .system-name::before { animation: none; } }
/* Once the picture is in, it names the console: the name stays only for screen readers. */
.pick.system.has-picture .system-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.pick.back { min-width: 0; margin-top: 0; }

.title-tag { margin: 0; max-width: 40ch; text-align: center; font-size: clamp(12px, 2.6vw, 16px); line-height: 1.6; color: var(--gray-dark); }
