/* The demo page, on top of /css/lasa.css. */

.demo-hero {
  background: var(--navy);
  color: var(--on-navy);
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
}
.demo-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-bottom: 1rem;
}
.demo-hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  margin: 0;
}
/* The pointer to the 3D town square: small, quiet, top right. */
.hero-link {
  font-size: 0.9rem;
  color: var(--accent);
  white-space: nowrap;
}
.hero-link::after {
  content: " \2197";  /* north-east arrow */
}
.demo-hero .lead {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  line-height: 1.55;
  max-width: 40rem;
}
.join-card .headphones {
  margin: 0 0 1rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--accent);
  border-left-width: 4px;
  border-radius: 0.4rem;
  color: var(--accent-ink);
  font-size: 0.9rem;
  line-height: 1.45;
}

.demo-grid {
  margin-top: 2.25rem;
  display: grid;
  grid-template-columns: minmax(16rem, 22rem) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 48rem) {
  .demo-grid { grid-template-columns: minmax(0, 1fr); }
}

.join-card, .space-card {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  padding: 1.5rem;
}
.join-card label {
  display: block;
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin-bottom: 0.3rem;
}
.join-card input[type="text"] {
  width: 100%;
  font: inherit;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  margin-bottom: 1rem;
}
.join-card input[type="text"]:focus-visible {
  outline: 2px solid var(--accent-ink);
  outline-offset: 1px;
}
.join-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.join-card .button { border-color: var(--navy); background: var(--navy); color: var(--paper); }
.join-card .button.ghost { background: transparent; color: var(--navy); }
.join-card .button:disabled {
  opacity: 0.45;
  pointer-events: none;
}
.join-card .status {
  margin-top: 1rem;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.join-card .status.error { color: #a03030; }

.space-frame {
  background: var(--paper-tint);
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  overflow: hidden;
}
#space-view {
  display: block;
  width: 100%;
  max-height: 26rem;
  aspect-ratio: 1 / 1;
  margin-inline: auto;
}
.space-grid circle {
  fill: none;
  stroke: var(--line);
  stroke-width: 0.18;
}
.space-grid .origin {
  fill: var(--line);
  stroke: none;
}
.user .glow {
  fill: var(--ink-soft);
  opacity: 0.25;
}
.user .body {
  fill: var(--ink-soft);
  stroke: var(--paper);
  stroke-width: 0.27;
}
.user .facing {
  fill: none;
  stroke: var(--ink-soft);
  stroke-width: 0.48;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.user text {
  font-family: var(--body);
  font-size: 1.8px;
  fill: var(--ink);
  text-anchor: middle;
}
.user.me .body { fill: var(--accent); }
.user.me .glow { fill: var(--accent); opacity: 0.35; }
.user.me .facing { stroke: var(--accent-ink); }
.user.me text { font-weight: 600; }

/* Our own circle drags (move) and its caret drags (turn). */
.user.me { touch-action: none; }
.user.me .body { cursor: grab; }
.user.me .facing-hit {
  fill: transparent;
  cursor: crosshair;
}
