/* Fusemoji — shared styles.
   Palette and type mirror the game: near-black board, gold accent, monospace. */

:root {
  --bg: #0d0d14;
  --panel: #16161f;
  --edge: rgba(255, 255, 255, 0.10);
  --ink: #f5f5f7;
  --muted: #9a9aa8;
  --gold: #f2bf33;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  line-height: 1.65;
  /* Respects the user's text-size setting — unlike the app today. */
  font-size: clamp(15px, 0.6vw + 13px, 17px);
}

.wrap {
  max-width: 46rem;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

header.site {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-bottom: 2rem;
}

.brand {
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: 0.06em;
  color: var(--ink);
  text-decoration: none;
}
.brand span { color: var(--gold); }

nav.site a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 1.25rem;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
}
nav.site a:hover,
nav.site a:focus-visible { color: var(--gold); }

h1 {
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.75rem;
}

h2 {
  font-size: 1.15rem;
  letter-spacing: 0.03em;
  margin: 2.5rem 0 0.6rem;
  color: var(--gold);
}

h3 {
  font-size: 1rem;
  margin: 1.6rem 0 0.4rem;
}

p, li { color: #dcdce4; }
.lede { font-size: 1.1rem; color: var(--muted); margin-bottom: 2rem; }
.muted { color: var(--muted); }

a { color: var(--gold); }

ul { padding-left: 1.15rem; }
li { margin: 0.35rem 0; }

.card {
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: 14px;
  padding: 1.25rem 1.4rem;
  margin: 1.25rem 0;
}

.badge {
  display: inline-block;
  background: var(--gold);
  color: #16160c;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 0.55rem 1.1rem;
  border-radius: 10px;
  text-decoration: none;
}

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 0.9rem;
  margin: 2rem 0;
}
.tile {
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: 14px;
  padding: 1.1rem;
}
.tile .emoji { font-size: 1.6rem; display: block; margin-bottom: 0.4rem; }
.tile strong { display: block; margin-bottom: 0.2rem; }
.tile span.body { color: var(--muted); font-size: 0.9rem; }

/* Screenshots. width/height are set on the <img> so the box is reserved
   before the file lands — otherwise every image shifts the page as it loads. */
.shot {
  margin: 2rem 0;
}
.shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--edge);
  border-radius: 14px;
  background: var(--panel);
}
.shot figcaption {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 0.6rem;
}

/* FAQ. <details> gives keyboard and screen-reader behaviour for free, and the
   answers stay in the DOM when collapsed so crawlers still read them. */
.faq details {
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: 14px;
  padding: 0.9rem 1.2rem;
  margin: 0.6rem 0;
}
.faq summary {
  cursor: pointer;
  font-weight: 700;
  letter-spacing: 0.01em;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  float: right;
  color: var(--gold);
  font-weight: 800;
}
.faq details[open] summary::after { content: "−"; }
.faq summary:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}
.faq details p { margin: 0.7rem 0 0.2rem; }

footer.site {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--edge);
  color: var(--muted);
  font-size: 0.85rem;
}
footer.site a { color: var(--muted); }
footer.site a:hover { color: var(--gold); }

.updated {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: -0.25rem;
}

@media (prefers-reduced-motion: no-preference) {
  a, .badge { transition: color 120ms ease, opacity 120ms ease; }
}
