/* Landing page. One memorable moment (the demo); everything else stays quiet. */

body.landing { overflow-x: hidden; }

.l-top {
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.l-top .brand { font-size: 1.35rem; color: var(--text); text-decoration: none; }
.l-signin { font-weight: 600; color: var(--text); text-decoration: none; padding: 8px 2px; }
.l-signin:hover { color: var(--accent); }

.l-hero {
  max-width: 1180px;
  margin: 0 auto;
  padding: 48px 24px 72px;
  display: grid;
  gap: 48px;
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 960px) {
  .l-hero { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 64px; padding-top: 72px; }
}

.l-title {
  font-family: var(--display);
  font-size: clamp(3rem, 7.2vw, 5.9rem);
  font-weight: 780;
  font-stretch: 88%;
  line-height: 0.95;
  letter-spacing: -0.022em;
  margin: 0 0 24px;
}
.l-lede { font-size: 1.15rem; line-height: 1.55; color: var(--muted); max-width: 34em; margin-bottom: 32px; }

.l-join { margin-bottom: 28px; }
.l-join label { font-weight: 600; margin-bottom: 10px; }
.l-join-row { display: flex; gap: 10px; }
.l-join-row .code-input { flex: 1; min-width: 0; font-size: 1.5rem; height: 60px; border-width: 2px; border-color: var(--border); }
.l-join-row .code-input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 4px var(--lilac); }
.l-join-row button { min-width: 108px; height: 60px; font-size: 1.1rem; border-radius: 12px; }

.l-present { display: grid; gap: 10px; justify-items: start; padding-top: 24px; border-top: 1px solid var(--border); }
.l-start { background: transparent; border: 2px solid var(--text); }
.l-start:hover { background: var(--text); color: var(--bg); filter: none; }
.l-path { font-family: var(--display); font-weight: 600; white-space: nowrap; }

/* ---------- demo: speech -> highlighted phrases -> poll card -> answers ---------- */

.demo {
  position: relative;
  margin: 0;
  min-height: 520px;
  padding: 28px 28px 92px;
  border-radius: 28px;
  background: var(--lilac);
  overflow: hidden;
  isolation: isolate;
}
.demo-mic { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; color: var(--muted); margin-bottom: 18px; }
.demo-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ultra); box-shadow: 0 0 0 0 color-mix(in srgb, var(--ultra) 45%, transparent); animation: demo-pulse 1.6s ease-out infinite; }
@keyframes demo-pulse { to { box-shadow: 0 0 0 12px transparent; } }

.demo-transcript {
  font-family: var(--display);
  font-size: clamp(1.25rem, 2.1vw, 1.65rem);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.01em;
  min-height: 4.2em;
  margin: 0 0 22px;
  max-width: 30em;
  transition: opacity 400ms ease;
}
.demo-transcript .w { opacity: 0; transition: opacity 180ms ease; }
.demo-transcript .w.on { opacity: 1; }
.demo-transcript .hl { position: relative; white-space: nowrap; }
.demo-transcript .hl::before {
  content: '';
  position: absolute;
  inset: 0.08em -0.12em 0.02em;
  background: var(--lemon);
  border-radius: 0.2em;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 420ms cubic-bezier(.2,.7,.2,1);
  z-index: -1;
}
.demo-transcript .hl.lit::before { transform: scaleX(1); }
@media (prefers-color-scheme: dark) { .demo-transcript .hl.lit { color: #17153b; } }

.demo-card {
  background: var(--surface);
  border-radius: 20px;
  padding: 20px 20px 16px;
  box-shadow: 0 1px 0 rgb(23 21 59 / 0.04), 0 18px 40px -18px rgb(23 21 59 / 0.35);
  transform: scale(0.985);
  transition: transform 520ms cubic-bezier(.2,.7,.2,1), box-shadow 520ms ease;
}
/* Between scripts the card stays as an empty draft, so the panel never goes blank. */
.demo-card.on { transform: none; box-shadow: 0 1px 0 rgb(23 21 59 / 0.04), 0 24px 48px -20px rgb(59 59 232 / 0.45); }
.demo-q { font-family: var(--display); font-weight: 750; font-size: 1.2rem; margin: 0 0 14px; letter-spacing: -0.01em; min-height: 1.35em; opacity: 0; transition: opacity 300ms ease; }
.demo-card.on .demo-q { opacity: 1; }
.demo-options { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.demo-opt { position: relative; border-radius: 12px; background: var(--surface-2); min-height: 46px; overflow: hidden; }
.demo-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: color-mix(in srgb, var(--ultra) 30%, transparent); transition: width 260ms ease; }
.demo-opt.correct .demo-fill { background: color-mix(in srgb, var(--good) 34%, transparent); }
.demo-label { position: relative; display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; font-weight: 700; }
.demo-label .txt { opacity: 0; transition: opacity 200ms ease; }
.demo-label .txt.on { opacity: 1; }
.demo-label .n { color: var(--muted); font-variant-numeric: tabular-nums; }
.demo-opt.correct .txt::after { content: ' ✓'; color: var(--good); }
.demo-total { margin: 12px 2px 0; font-size: 0.9rem; color: var(--muted); min-height: 1.2em; }

/* A flying phrase (cloned from the transcript) on its way into the card. */
.demo-fly {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  font-family: var(--display);
  font-weight: 600;
  background: var(--lemon);
  color: #17153b;
  border-radius: 0.25em;
  padding: 0 0.12em;
  white-space: nowrap;
  transform-origin: left top;
}

/* The audience: phones along the bottom edge. */
.demo-crowd {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 26px;
  display: grid;
  grid-template-columns: repeat(24, 1fr);
  gap: 8px;
  justify-items: center;
}
@media (max-width: 700px) { .demo-crowd { grid-template-columns: repeat(12, 1fr); } }
.demo-phone { width: 14px; height: 24px; border-radius: 4px; border: 2px solid color-mix(in srgb, var(--ink) 55%, transparent); position: relative; }
.demo-phone.sent::after { content: ''; position: absolute; inset: 3px; border-radius: 1px; background: var(--ultra); }
.demo-vote { position: absolute; z-index: 4; width: 8px; height: 8px; border-radius: 50%; background: var(--ultra); pointer-events: none; }

/* ---------- how it works ---------- */

.l-how { max-width: 1180px; margin: 0 auto; padding: 24px 24px 72px; }
.l-how h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 28px; }
.l-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px; counter-reset: step; }
@media (min-width: 760px) { .l-steps { grid-template-columns: repeat(3, 1fr); gap: 40px; } }
.l-steps li { counter-increment: step; position: relative; padding-top: 56px; }
.l-steps li::before {
  content: counter(step);
  position: absolute;
  top: 0;
  left: 0;
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 75%;
  font-size: 2.6rem;
  line-height: 1;
  color: var(--ultra);
}
.l-steps h3 { font-size: 1.3rem; margin-bottom: 8px; }
.l-steps p { color: var(--muted); max-width: 32em; }

.l-foot { max-width: 1180px; margin: 0 auto; padding: 28px 24px 48px; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.95rem; }

@media (max-width: 520px) {
  .l-hero { padding-top: 28px; gap: 36px; }
  .demo { min-height: 500px; padding: 22px 18px 84px; border-radius: 22px; }
  .demo-crowd { left: 18px; right: 18px; }
  .l-join-row button { min-width: 84px; }
}

@media (prefers-reduced-motion: reduce) {
  .demo-dot { animation: none; }
  .demo-transcript .w, .demo-card, .demo-fill, .demo-label .txt, .demo-transcript .hl::before { transition: none; }
}
.l-beta { margin: 4px 0 0; padding: 8px 12px; border-radius: 10px; background: color-mix(in srgb, var(--lemon) 55%, transparent); font-size: 0.95rem; }
