/* EhEye Games: minimal static site. One stylesheet, no build step. */
:root {
  --bg: #faf8f5;
  --fg: #1d2226;
  --muted: #5d666c;
  --line: #e2ddd6;
  --card: #ffffff;
  --accent: #b51716;
  --accent-fg: #ffffff;
  --link: #a01514;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14181c;
    --fg: #ece9e4;
    --muted: #a3aaaf;
    --line: #2c343a;
    --card: #1c2228;
    --accent: #e92025;
    --accent-fg: #ffffff;
    --link: #ff6b6f;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  line-height: 1.6;
  padding-inline: 20px;
}
a { color: var(--link); }
a:focus-visible, .btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.wrap { max-width: 860px; margin-inline: auto; }

header.site {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-block: 20px;
  border-bottom: 1px solid var(--line);
}
.brand { display: block; line-height: 0; text-decoration: none; }
.brand img { display: block; width: auto; height: 48px; max-width: 100%; }
nav.site { display: flex; gap: 20px; }
nav.site a { color: var(--fg); text-decoration: none; font-weight: 500; }
nav.site a:hover, nav.site a[aria-current="page"] { color: var(--link); text-decoration: underline; text-underline-offset: 4px; }

/* the icon has two art files; show the one that suits the theme */
.icon-dark { display: none; }
@media (prefers-color-scheme: dark) {
  .icon-light { display: none; }
  .icon-dark { display: block; }
}

main { padding-block: 40px 56px; }
h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); line-height: 1.15; margin: 0 0 12px; text-wrap: balance; }
h2 { font-size: 1.3rem; margin: 40px 0 12px; }
p.lede { font-size: 1.15rem; color: var(--muted); max-width: 75ch; margin: 0; }
p, li { max-width: 80ch; }

.game {
  margin-top: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
}
.game h3 { margin: 0 0 4px; font-size: 1.5rem; }
.game .tag { color: var(--muted); margin: 0 0 12px; }
.status { display: inline-block; font-size: .85rem; font-weight: 600; padding: 2px 10px; border-radius: 999px; background: var(--line); color: var(--fg); margin-bottom: 12px; }

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--line);
  color: var(--fg);
  background: transparent;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.btn.soon { color: var(--muted); cursor: default; border-style: dashed; }

dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 24px; margin: 0; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; }
@media (max-width: 520px) { dl.facts { grid-template-columns: 1fr; gap: 0; } dl.facts dd { margin-bottom: 10px; } }

.logos { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 8px; }
.logo-tile { border-radius: 10px; border: 1px solid var(--line); padding: 16px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.logo-tile.on-light { background: #ffffff; }
.logo-tile.on-dark { background: #171a1f; }
.logo-tile.on-dark a { color: #ff8a8d; }
.logo-tile img { width: 140px; height: 140px; }

footer.site { border-top: 1px solid var(--line); padding-block: 24px 40px; color: var(--muted); font-size: .9rem; }
footer.site p { margin: 0 0 4px; }

@media (prefers-reduced-motion: no-preference) {
  .btn { transition: transform .1s ease; }
  .btn:not(.soon):hover { transform: translateY(-1px); }
}

/* blog */
.post-list { list-style: none; padding: 0; margin: 24px 0 0; }
.post-list li { max-width: none; padding-block: 20px; border-top: 1px solid var(--line); }
.post-list li:last-child { border-bottom: 1px solid var(--line); }
.post-list h2 { margin: 0 0 4px; font-size: 1.3rem; }
.post-list h2 a { color: var(--fg); text-decoration: none; }
.post-list h2 a:hover { color: var(--link); text-decoration: underline; text-underline-offset: 4px; }
.post-list p { margin: 4px 0 0; }
.meta { color: var(--muted); font-size: .9rem; margin: 0 0 8px; }
article.post h1 { margin-bottom: 8px; }
article.post .meta { margin-bottom: 32px; }
article.post img { max-width: 100%; height: auto; border-radius: 8px; }
article.post pre { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 14px; max-width: 65ch; }
article.post code { font-size: .92em; }
article.post blockquote { margin: 20px 0; padding-left: 16px; border-left: 3px solid var(--line); color: var(--muted); max-width: 65ch; }
.back { margin-top: 40px; }

/* game cards: fixed logo slot on the left so every card's text lines up */
.game { display: grid; grid-template-columns: 160px 1fr; gap: 24px; align-items: start; }
.game .logo, .game .logo-ph { width: 160px; height: 160px; border-radius: 12px; }
.game .logo { display: block; object-fit: contain; }
.game .logo-ph { display: grid; place-items: center; border: 1px dashed var(--line); }
.game .logo-ph img { width: 56px; height: 56px; opacity: .35; }
.game .body { min-width: 0; }
.game .body > :last-child { margin-bottom: 0; }
@media (max-width: 600px) {
  .game { grid-template-columns: 1fr; gap: 16px; }
  .game .logo, .game .logo-ph { width: 128px; height: 128px; }
}

.logo-tile img.wide { width: 300px; max-width: 100%; height: auto; }
.logo-tile.on-dark span { color: #ece9e4; }

p.aside { color: var(--muted); font-size: 1.05rem; margin: 0 0 12px; }

/* 404 page */
.lost { text-align: center; padding-block: 56px 72px; }
.lost p { margin-inline: auto; }
.lost .actions { justify-content: center; margin-top: 28px; }
.dice { display: flex; justify-content: center; gap: 20px; margin-bottom: 28px; }
.die { transform: rotate(-7deg); }
.die:nth-child(2) { transform: rotate(6deg); }
.die:nth-child(3) { transform: rotate(-3deg); }
.die-face { fill: var(--card); stroke: var(--fg); stroke-width: 4; }
.die-pip { fill: var(--accent); }
@media (prefers-reduced-motion: no-preference) {
  .die { animation: tumble .7s ease-out; }
  .die:nth-child(2) { animation-delay: .1s; }
  .die:nth-child(3) { animation-delay: .2s; }
}
@keyframes tumble { from { transform: translateY(-24px) rotate(-200deg); opacity: 0; } }

p.aside .hl { color: var(--accent); font-weight: 700; }
.logo-tile.on-light a { color: #a01514; }
.logo-tile.on-light span { color: #1d2226; }

/* Mailing list signup */
.signup { margin: 16px 0 20px; max-width: 460px; }
.signup label { display: block; font-weight: 600; margin-bottom: 6px; }
.signup .row { display: flex; gap: 10px; flex-wrap: wrap; }
.signup input[type="email"] {
  flex: 1 1 220px; min-width: 0; padding: 10px 12px; font: inherit;
  color: var(--fg); background: var(--card);
  border: 1px solid var(--line); border-radius: 8px;
}
.signup input[type="email"]:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.signup button.btn { font: inherit; font-weight: 600; cursor: pointer; }
.signup .fine { color: var(--muted); font-size: .9rem; margin: 8px 0 0; }
.signup .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
