:root {
  --bg: #0c2340;
  --ink: #e9f2fb;
  --muted: #8fb3d9;
  --rule: #33608f;
  --face: #4d84c3;
}

* { 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, .num {
  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);
}

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

.top nav { display: flex; gap: 1.6rem; }

.top a {
  font-size: 0.95rem;
  color: var(--muted);
  text-decoration: none;
}
.top a:hover { color: var(--ink); }

.hero-copy {
  position: absolute;
  top: 24svh;
  left: clamp(1.4rem, 7vw, 6.5rem);
  max-width: 33rem;
  pointer-events: none;
}
.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: 2;
}
#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;
}

.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
}

.steps .num {
  display: block;
  font-size: 3.6rem;
  line-height: 1;
  color: var(--face);
  margin-bottom: 1rem;
}

.steps h3 {
  font-size: 1.35rem;
  margin-bottom: 0.5rem;
}

.steps p { color: var(--muted); }

/* 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;
}

#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; }

/* questions */

#faq dt {
  font-family: 'Instrument Serif', serif;
  font-size: 1.35rem;
  margin-top: 2.2rem;
}
#faq dt:first-child { margin-top: 0; }

#faq dd {
  color: var(--muted);
  max-width: 38rem;
  margin-top: 0.4rem;
}

/* section reveal, enabled only when art.js runs */

@media (prefers-reduced-motion: no-preference) {
  .js .fade {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }
  .js .fade.in {
    opacity: 1;
    transform: none;
  }
}

#chain p {
  color: var(--muted);
  max-width: 38rem;
}
#chain h2 { margin-bottom: 1.2rem; }

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; }

@media (max-width: 760px) {
  .steps { grid-template-columns: 1fr; gap: 2.4rem; }
  .hero-copy { top: 15svh; right: 1.4rem; }
  main section, footer { padding-top: 3.6rem; padding-bottom: 3.6rem; }
}

.contract-line {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--muted);
  word-break: break-all;
}
