/* realmz.gg while Realmz is in development. Tokens: /css/tokens.css,
   copied from apps/www at deploy (specs/visual-language.md). */

* {
  box-sizing: border-box;
}

html {
  background: var(--surface-canvas);
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--fg);
  background: var(--surface-canvas);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent-alt);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.wrap {
  max-width: var(--max);
  margin-inline: auto;
  padding: 0 var(--space);
}

.skip {
  position: absolute;
  inset-inline-start: 0.75rem;
  top: 0.75rem;
  z-index: 20;
  padding: 0.4rem 0.7rem;
  background: var(--surface-raised);
  color: var(--fg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-control);
  transform: translateY(-200%);
}

.skip:focus {
  transform: none;
}

/* Bar */

.bar {
  border-bottom: 1px solid var(--border-soft);
}

.bar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 3.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--fg);
  text-decoration: none;
}

.mark {
  display: block;
}

.wordmark {
  font-weight: 600;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
}

.status {
  font-size: 0.85rem;
  color: var(--fg-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  padding: 0.15rem 0.6rem;
}

/* Hero */

.stage {
  position: relative;
  margin: 0;
  background: #f7d2bd;
}

.stage video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 78vh;
  object-fit: cover;
}

.pause {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  font: inherit;
  font-size: 0.85rem;
  color: #17140f;
  background: rgb(255 250 244 / 80%);
  border: 1px solid rgb(23 20 15 / 18%);
  border-radius: var(--radius-control);
  min-width: 44px;
  min-height: 44px;
  padding: 0 0.9rem;
  cursor: pointer;
  transition: background 150ms;
}

.pause:hover {
  background: rgb(255 250 244 / 95%);
}

.intro {
  padding-top: 2.5rem;
  padding-bottom: 1rem;
}

h1 {
  font-size: clamp(1.75rem, 4.2vw, 2.9rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
  font-weight: 700;
  max-width: 22ch;
  margin: 0 0 1rem;
}

.lede {
  font-size: 1.15rem;
  max-width: 40rem;
  margin: 0 0 0.75rem;
}

.note {
  color: var(--fg-muted);
  margin: 0;
}

h2 {
  font-size: 1.4rem;
  line-height: 1.2;
  margin: 0 0 0.6rem;
  font-weight: 600;
}

main > section + section {
  margin-top: 3.5rem;
}

section > p {
  max-width: 44rem;
}

/* Play and create: sky and brick */

.slabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space);
}

.slab {
  border-radius: var(--radius-card);
  padding: 1.4rem 1.5rem;
  background: var(--surface-panel);
  border: 1px solid var(--border-soft);
  border-top: 4px solid var(--accent);
}

.slab.create {
  border-top-color: var(--brand);
}

.slab p {
  margin: 0 0 0.75rem;
}

.slab .where {
  color: var(--fg-muted);
  margin: 0;
}

/* The islands */

.views {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 1.25rem;
}

.views figure {
  margin: 0;
}

.views img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-card);
  border: 1px solid var(--border-soft);
}

.views figcaption {
  font-size: 0.9rem;
  color: var(--fg-muted);
  margin-top: 0.4rem;
}

/* Where it stands */

.goal {
  font-size: 1.1rem;
}

.steps {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0;
  max-width: 44rem;
}

.steps li {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 0 1rem;
  padding: 0.8rem 0;
  border-top: 1px solid var(--border-soft);
}

.steps li:last-child {
  border-bottom: 1px solid var(--border-soft);
}

.steps p {
  margin: 0;
}

.steps b {
  font-weight: 600;
  margin-right: 0.35rem;
}

.state {
  font-size: 0.85rem;
  color: var(--fg-faint);
  padding-top: 0.15rem;
}

.done .state {
  color: var(--fg);
  font-weight: 600;
}

.now .state {
  color: var(--accent-alt);
}

/* Footer */

.foot {
  margin-top: 4rem;
  border-top: 1px solid var(--border-soft);
  padding: 1.5rem 0 2.5rem;
}

.foot p {
  margin: 0 0 0.3rem;
}

.faint {
  color: var(--fg-faint);
  font-size: 0.9rem;
}

@media (max-width: 760px) {
  .slabs {
    grid-template-columns: 1fr;
  }

  .views {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .steps li {
    grid-template-columns: 1fr;
  }

  .stage video {
    aspect-ratio: 4 / 3;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pause {
    transition: none;
  }
}
