/* The site's front page: a game menu in the manner of late-1990s PC games.
   A painting, a title, and a column of text choices that light up, each with a line saying what it does. */

:root {
  --gold: #e3b341;
  --gold-hot: #fff3b0;
  --ink: #cfc8b8;
  --dim: #8d8778;
  --panel: #23211d;
  --edge: #5d574a;
  --bad: #ff8a70;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body { height: 100%; margin: 0; }

body {
  background: #0b0c0a url("/site/bg.jpg") center / cover no-repeat fixed;
  color: var(--ink);
  font: 16px/1.45 "Trebuchet MS", "Segoe UI", Verdana, sans-serif;
}

/* The painting is bright in the middle; the menu sits on a shadow laid over its left side. */
main {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  padding: clamp(20px, 5vh, 56px) clamp(20px, 6vw, 88px);
  background: linear-gradient(90deg, rgba(6, 7, 5, .88) 0, rgba(6, 7, 5, .7) 34rem, rgba(6, 7, 5, 0) 62rem),
              linear-gradient(0deg, rgba(6, 7, 5, .75), rgba(6, 7, 5, 0) 9rem);
}

h1 {
  margin: 0;
  font: 400 clamp(34px, 6.2vw, 68px)/1 Georgia, "Palatino Linotype", "Times New Roman", serif;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #f4efe2;
  text-shadow: 0 2px 0 #000, 0 0 28px rgba(227, 179, 65, .35);
}
h1 span {
  display: block;
  margin-top: .25em;
  font-size: .42em;
  letter-spacing: .62em;
  color: var(--gold);
  animation: ember 5s ease-in-out infinite;
}
@keyframes ember {
  0%, 100% { text-shadow: 0 0 6px rgba(227, 179, 65, .25); }
  50% { text-shadow: 0 0 18px rgba(255, 215, 110, .8); }
}
.tag { margin: 1.1em 0 0; color: var(--dim); letter-spacing: .04em; }

nav { margin-top: clamp(24px, 7vh, 72px); flex: 1; }

#menu { list-style: none; margin: 0; padding: 0; }
#menu li {
  display: grid;
  grid-template-columns: 13.5rem 1fr;
  align-items: baseline;
  gap: 0 1rem;
  max-width: 46rem;
  padding: .5rem 0;
}
#menu li[hidden] { display: none; }
#menu span { color: var(--dim); font-size: .94rem; }

button, .link {
  font: inherit;
  background: none;
  border: 0;
  padding: 0;
  color: var(--gold);
  cursor: pointer;
  text-align: left;
  transition: color 1s, text-shadow 1s; /* lights up at once, fades slowly */
}
#menu button { font-size: 1.32rem; font-weight: bold; letter-spacing: .02em; }
button u { text-decoration-thickness: 2px; text-underline-offset: 3px; }

button:hover, button:focus-visible, .link:hover, .link:focus-visible, a:hover, a:focus-visible {
  color: var(--gold-hot);
  text-shadow: 0 0 5px var(--gold), 0 0 14px var(--gold);
  transition-duration: .02s;
  outline: none;
}
button:active { color: #000; text-shadow: 0 0 6px var(--gold-hot); }
button:focus-visible, a:focus-visible, .link:focus-visible { outline: 1px dotted var(--gold); outline-offset: 4px; }
button:disabled { color: var(--dim); cursor: default; text-shadow: none; }

a { color: var(--gold); text-decoration: none; transition: color 1s, text-shadow 1s; }

footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .4rem 2rem;
  margin-top: 2rem;
  font-size: .82rem;
  color: var(--dim);
}
#who { color: var(--ink); }

/* Message and form boxes: a plain panel, as the old menus drew them. */
dialog {
  width: min(27rem, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  overflow: auto;
  padding: 0;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--edge);
  box-shadow: 0 6px 30px #000;
}
dialog.wide { width: min(38rem, calc(100vw - 2rem)); }
dialog::backdrop { background: rgba(0, 0, 0, .55); }
dialog form { padding: 1.1rem 1.4rem 1.2rem; }
dialog h2 {
  margin: 0 0 .9rem;
  padding-bottom: .55rem;
  border-bottom: 1px solid var(--edge);
  font-size: 1.12rem;
  letter-spacing: .05em;
  color: var(--gold);
}
dialog p { margin: 0 0 .8rem; }
dialog h3 { margin: 1.1rem 0 .35rem; font-size: .95rem; color: var(--gold); letter-spacing: .04em; }
dialog ul { margin: 0 0 .8rem; padding-left: 1.2rem; }
dialog li { margin-bottom: .25rem; }
dialog .note { color: var(--dim); font-size: .88rem; }

label { display: block; margin-bottom: .85rem; font-size: .9rem; color: var(--dim); }
input {
  display: block;
  width: 100%;
  margin-top: .25rem;
  padding: .5rem .6rem;
  font: inherit;
  color: #f4efe2;
  background: #12110f;
  border: 1px solid var(--edge);
  border-radius: 0;
}
input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 6px rgba(227, 179, 65, .5); }

#boxError { color: var(--bad); }
.actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: .4rem 1.8rem; margin-top: 1.1rem; }
.actions button { font-weight: bold; font-size: 1.05rem; }
.actions .side { margin-right: auto; font-weight: normal; font-size: .9rem; }

kbd {
  display: inline-block;
  min-width: 1.6em;
  padding: 0 .35em;
  text-align: center;
  font: .85em/1.5 Consolas, "Courier New", monospace;
  color: #f4efe2;
  background: #12110f;
  border: 1px solid var(--edge);
}
table.keys { border-collapse: collapse; margin-bottom: .6rem; }
table.keys td { padding: .15rem 1rem .15rem 0; vertical-align: top; }
code { font: .9em Consolas, "Courier New", monospace; color: #f4efe2; user-select: all; }

@media (max-width: 40rem) {
  #menu li { grid-template-columns: 1fr; padding: .6rem 0; }
  h1 span { letter-spacing: .4em; }
  main { background: linear-gradient(0deg, rgba(6, 7, 5, .86), rgba(6, 7, 5, .66)); }
}

@media (prefers-reduced-motion: reduce) {
  h1 span { animation: none; }
  button, a, .link { transition: none; }
}
