/* Monochrome. Depth comes from value alone — the two side faces of every block
   read darker than its top, which is the only cue separating one prism from the
   next once colour is gone. */

:root {
  --bg: #0a0a0a;
  --ink: #f2f2f2;
  --muted: #8a8a8a;
  --rule: #2a2a2a;
  --face: #4a4a4a;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.65 'Archivo', sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .wordmark {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
}

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--face);
  text-underline-offset: 3px;
}
a:hover { text-decoration-color: var(--ink); }

/* hero */

.hero {
  position: relative;
  height: 100svh;
  min-height: 540px;
  overflow: hidden;
}

#field {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.top {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 1.6rem clamp(1.4rem, 5vw, 4rem);
  z-index: 1;
}

.wordmark {
  font-size: 1.5rem;
  letter-spacing: 0.04em;
}

.hero-copy {
  position: absolute;
  top: 24svh;
  left: clamp(1.4rem, 7vw, 6.5rem);
  max-width: 33rem;
  pointer-events: none;
  z-index: 1;
}
.hero-copy a { pointer-events: auto; }

.hero-copy h1 {
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  line-height: 1.08;
  margin-bottom: 1.1rem;
}

.hero-copy p {
  color: var(--muted);
  max-width: 28rem;
  margin-bottom: 1.6rem;
}

.quiet {
  font-size: 0.95rem;
  color: var(--muted);
}

#tip {
  position: fixed;
  padding: 0.4rem 0.65rem;
  background: var(--bg);
  border: 1px solid var(--face);
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--ink);
  white-space: nowrap;
  pointer-events: none;
  z-index: 3;
}
#tip b { display: block; font-weight: 500; }
#tip i { font-style: normal; color: var(--muted); }

/* sections */

main section, footer {
  max-width: 60rem;
  margin: 0 auto;
  padding: 5.5rem clamp(1.4rem, 5vw, 4rem);
  border-top: 1px solid var(--rule);
}

h2 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  margin-bottom: 2.6rem;
}

/* scroll-built district */

#build {
  max-width: none;
  padding: 0;
  border-top: 0;
  height: 260vh;
  position: relative;
}

.pin {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
}

#grow {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.caption {
  position: absolute;
  left: clamp(1.4rem, 7vw, 6.5rem);
  top: 11svh;
  max-width: 24rem;
  pointer-events: none;
}

.caption strong {
  display: block;
  font: 400 1.7rem/1.25 'Instrument Serif', serif;
  margin-bottom: 0.5rem;
}

.caption span {
  color: var(--muted);
  font-size: 0.95rem;
}

/* the land, live */

.map-wrap {
  height: min(68svh, 560px);
  margin-top: 2.4rem;
}

#land {
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.map-status {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 0.8rem;
}

/* live stats strip */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 1.5rem 2rem;
  margin: 2rem 0 0;
  list-style: none;
}

.stats div { border-left: 1px solid var(--rule); padding-left: 0.9rem; }

.stats dt {
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.stats dd {
  font-family: 'Instrument Serif', serif;
  font-size: 1.6rem;
  line-height: 1.2;
  margin-top: 0.15rem;
}

.stats dd small {
  font-family: 'Archivo', sans-serif;
  font-size: 0.8rem;
  color: var(--muted);
}

#panel {
  margin-top: 1.2rem;
  max-width: 24rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--face);
  font-size: 0.95rem;
}

#panel b {
  display: block;
  font-weight: 500;
  margin-bottom: 0.2rem;
}

#panel p { color: var(--muted); margin: 0.2rem 0; }

#panel button {
  margin-top: 0.7rem;
  padding: 0.45rem 1rem;
  font: 500 0.95rem 'Archivo', sans-serif;
  color: var(--bg);
  background: var(--ink);
  border: 0;
  cursor: pointer;
}
#panel button:disabled { opacity: 0.5; cursor: default; }
#panel button:hover:not(:disabled) { background: #ffffff; }

#panel .txstate { font-size: 0.85rem; min-height: 1.2em; }

footer {
  padding-top: 3rem;
  padding-bottom: 3.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}
footer p { max-width: 38rem; }
footer .fine { margin-top: 1.4rem; font-size: 0.8rem; }

.token-line { margin-top: 1.1rem; font-size: 0.82rem; color: var(--muted); }
.token-line code {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 0.78rem;
  word-break: break-all;
}

@media (max-width: 760px) {
  .top { align-items: center; padding: 1.2rem 1.4rem; }
  .hero-copy { top: 15svh; right: 1.4rem; max-width: none; }
  main section, footer { padding-top: 3.6rem; padding-bottom: 3.6rem; }
}

/* ---- embedded in an overlay ---- */

/* Both overlay pages carry .embed: `hero.html` always, `how.html` when asked
   for with ?embed=1. The frame is the viewport, so the hero fills it exactly
   and its own scrolling is off — the buttons under the frame are the way out. */
.embed body { font-size: 15px; }

.embed body:not(.how-body) { overflow: hidden; }

.embed .hero { height: 100svh; min-height: 0; }
.embed .hero-copy { top: 16svh; }
.embed .hero-copy h1 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); }
