/* groundwork.house home page: the hero. The example block floats on the page itself (no frame or panel behind it, only
   the soft shadow the renderer draws under it), with one quiet line of text under it: what the build is doing while it
   builds, what it made once built. The block is not for handling: the stage takes no pointer, wheel or keys. */
.hero { padding-top: clamp(32px, 4.5vw, 64px); }
.hero-copy { display: grid; justify-items: center; gap: 18px; text-align: center; }
.hero-lede { max-width: 52rem; margin-bottom: 6px; }

.hero-frame { position: relative; margin: clamp(20px, 2.4vw, 32px) 0 0; display: grid; gap: 10px; }
.hero-stage {
  position: relative; width: 100%; height: clamp(400px, calc(100svh - 420px), 640px);
  isolation: isolate;
}
.hero-stage #stage { pointer-events: none; }
.hero-poster, .hero-poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.hero-poster[hidden] { display: none; }
@media (max-width: 700px) { .hero-stage { height: auto; aspect-ratio: 4 / 3.6; } }

/* the readout: one centered line under the block. Its two lines (building, built) share one place and cross-fade; the
   step's words cross-fade inside a box as wide as the longest, the count and the clock tick in boxes as wide as their
   largest figures, so nothing on the line shifts while it reads. */
.hero-read {
  display: grid; justify-items: center; margin: 0; min-height: var(--lh-callout);
  font-size: var(--fs-callout); line-height: var(--lh-callout); letter-spacing: var(--tr-text);
  color: var(--gw-mute); white-space: nowrap;
  opacity: 0; transition: opacity var(--t-med) ease;
}
.hero-read:focus { outline: none; }
.hero-read.is-on { opacity: 1; }
.hero-line {
  grid-area: 1 / 1; display: inline-flex; align-items: center;
  opacity: 0; visibility: hidden;
  transition: opacity 280ms ease, visibility 0s linear 280ms;
}
/* (the line going out first, the other coming in after it: two lines of words over each other never read) */
.hero-line.is-on { opacity: 1; visibility: visible; transition: opacity 420ms ease 260ms, visibility 0s; }
.hero-sep { padding: 0 0.55em; opacity: 0.7; }
.hero-step { display: inline-grid; justify-items: end; color: var(--gw-ink); }
.hero-step > span { grid-area: 1 / 1; opacity: 0; transition: opacity 180ms ease; }
.hero-step > span.is-on { opacity: 1; transition: opacity 300ms ease 170ms; }
.hero-box { display: inline-grid; justify-items: end; margin-right: 0.28em; color: var(--gw-ink); }
.hero-box:last-child { margin-right: 0; }
.hero-box > span { grid-area: 1 / 1; }
.hero-size { visibility: hidden; }
.hero-done #read-made { color: var(--gw-ink); }
.hero-done .num { color: var(--gw-ink); }
.hero-real { font-size: var(--fs-footnote); }
.hero-again {
  display: inline-grid; place-items: center; width: 28px; height: 28px; margin: -4px -4px -4px 8px; padding: 0;
  border: 0; border-radius: 50%; background: transparent; color: var(--gw-mute); cursor: pointer;
  transition: color var(--t-fast) ease, background-color var(--t-fast) ease;
}
.hero-again:hover { color: var(--gw-ink); background: color-mix(in srgb, var(--gw-ink) 7%, transparent); }
.hero-again:focus-visible { outline-offset: 0; border-radius: 50%; }
.hero-cap { text-align: center; max-width: 64ch; margin-inline: auto; }
/* the map data's credit (OpenStreetMap's licence asks for it on or one click from the map): quiet, under the line */
.hero-credit {
  margin: -4px 0 0; text-align: center; color: var(--gw-mute);
  font-size: var(--fs-caption1); line-height: var(--lh-caption1); letter-spacing: var(--track-caption);
}
.hero-credit a { color: inherit; text-decoration: none; }
.hero-credit a:hover { color: var(--gw-ink-2); text-decoration: underline; }
@media (max-width: 520px) {
  .hero-read { font-size: var(--fs-footnote); line-height: var(--lh-footnote); white-space: normal; }
  .hero-line { flex-wrap: wrap; justify-content: center; }
}
/* (a still in place of the build, or no motion: the line says what the build made and took, and no more) */
.hero-read.is-still .hero-real, .hero-read.is-still .hero-again { display: none; }
@media (prefers-reduced-motion: reduce) { .hero-real, .hero-again { display: none; } }
