/* Templacity Hall explainer (/requests/, between the hero and the shipped rail).
 *
 * Ported from the founder-approved animated mock v2
 * Templacity-cofounder/.audit/hall-explainer-anim-v2-2026-09-19.html.
 * Every class is rbx- prefixed: the mock's .stage, .status, .dots and .callout
 * collide with theme rules. Colours are theme tokens only, so dark mode follows.
 * Visuals only (founder, 2026-09-19): no captions, dots, controls or callout; a ghost
 * cursor clicks through the flow and the loop runs about sixteen seconds.
 * Reduced motion: no autoplay, every transition off, the stage rests on the reply.
 */

.rbx { --rbx-ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif; --rbx-pop: cubic-bezier(.34, 1.56, .64, 1); padding: 48px 0 8px; }
.rbx-panel {
  max-width: 1024px; margin: 0 auto;
  background: var(--paper-soft); border-radius: var(--radius-lg);
  padding: 40px; display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 40px; align-items: start;
}
.rbx-copy h2 { font-family: var(--serif); font-weight: 400; font-size: 30px; letter-spacing: -0.01em; line-height: 1.12; margin: 12px 0 0; }
.rbx-note { margin: 16px 0 0; font-size: 14px; color: var(--ink-muted); line-height: 1.55; max-width: 34ch; }

/* ---- stage ---- */
.rbx-shell { position: relative; min-width: 0; }
.rbx-stage {
  position: relative; min-height: 540px;
  background: radial-gradient(90% 70% at 50% 0%, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 60%), var(--paper);
  border: 1px solid var(--rule-soft);
  border-radius: var(--radius); padding: 30px 26px; overflow: hidden;
}
[data-theme="dark"] .rbx-stage { background: var(--paper); }
.rbx-stage svg { display: block; }

/* ghost cursor: glides to the device chip, Post and Back this, and clicks each */
.rbx-cursor {
  position: absolute; z-index: 7; width: 14px; height: 14px; border-radius: 50%;
  background: var(--ink); box-shadow: 0 0 0 2px var(--paper-soft), 0 5px 12px rgba(27, 26, 23, 0.35);
  top: 45%; left: 50%; opacity: 0; pointer-events: none;
  transition: top .5s var(--ease), left .5s var(--ease), opacity .25s ease, transform .15s ease;
}
.rbx-cursor.is-show { opacity: .88; }
.rbx-cursor.is-click { transform: scale(0.68); }
.rbx-ring { position: absolute; inset: -7px; border-radius: 50%; border: 2px solid var(--ink); opacity: 0; }
.rbx-cursor.is-click .rbx-ring { animation: rbxRipple .5s ease-out; }
@keyframes rbxRipple { 0% { opacity: 0.55; transform: scale(0.55); } 100% { opacity: 0; transform: scale(1.7); } }

/* composer */
.rbx-composer { position: relative; transition: opacity .4s var(--ease), transform .4s var(--ease); }
.rbx-field {
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 10px;
  background: var(--paper-soft); border: 1px solid var(--rule-soft);
  border-radius: var(--radius); padding: 13px 16px;
  transition: border-color .3s ease, box-shadow .3s ease;
}
.rbx-stage.ph0 .rbx-field.is-live { border-color: var(--ink-muted); box-shadow: 0 0 0 3px var(--rule-soft); }
.rbx-field svg { width: 16px; height: 16px; color: var(--ink-muted); }
.rbx-typed { font-size: 14.5px; min-height: 1.4em; }
.rbx-caret { display: inline-block; width: 1px; height: 1.05em; background: var(--ink); vertical-align: text-bottom; margin-left: 1px; animation: rbxBlink 1s steps(1) infinite; }
@keyframes rbxBlink { 50% { opacity: 0; } }
.rbx-comprow { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.rbx-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.rbx-chip { border: 1px solid var(--rule); color: var(--ink-muted); border-radius: 10px; padding: 6px 12px; font-size: 12.5px; white-space: nowrap; transition: background .25s ease, color .25s ease, border-color .25s ease; }
.rbx-chip.is-on { background: var(--ink); border-color: var(--ink); color: var(--paper-soft); animation: rbxChipPop .45s var(--rbx-pop); }
@keyframes rbxChipPop { 0% { transform: scale(0.82); } 60% { transform: scale(1.12); } 100% { transform: scale(1); } }
.rbx-post { position: relative; display: inline-block; background: var(--ink); color: var(--paper-soft); border-radius: 10px; padding: 10px 16px; font-family: var(--rbx-ui); font-size: 13px; font-weight: 500; white-space: nowrap; }
.rbx-post.is-pressed { animation: rbxPress .35s var(--rbx-pop); }
@keyframes rbxPress { 0% { transform: scale(1); } 40% { transform: scale(0.9); } 100% { transform: scale(1); } }
.rbx-post .rbx-lbl { transition: opacity .2s ease; }
.rbx-post .rbx-tick { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transform: scale(0.5); transition: opacity .25s ease, transform .35s var(--rbx-pop); }
.rbx-post .rbx-tick svg { width: 15px; height: 15px; }
.rbx-post.is-sent .rbx-lbl { opacity: 0; }
.rbx-post.is-sent .rbx-tick { opacity: 1; transform: scale(1); }
.rbx-stage:not(.ph0) .rbx-composer { opacity: 0; transform: translateY(-18px) scale(0.98); pointer-events: none; position: absolute; left: 26px; right: 26px; }

/* card */
.rbx-card {
  background: var(--paper-soft); border-radius: var(--radius);
  border: 2px solid transparent; padding: 20px;
  opacity: 0; transform: translateY(26px) scale(0.94);
  transition: opacity .45s var(--ease), transform .55s var(--rbx-pop), border-color .4s ease, box-shadow .55s ease;
}
.rbx-stage:not(.ph0) .rbx-card { opacity: 1; transform: none; box-shadow: 0 14px 34px -22px rgba(27, 26, 23, 0.35); }
.rbx-stage.ph4 .rbx-card { border-color: var(--ink); }
.rbx-stage.ph5 .rbx-card { opacity: 0.42; transform: scale(0.985); box-shadow: none; }

.rbx-card .rbx-stagger { opacity: 0; transform: translateY(10px); transition: opacity .4s var(--ease), transform .45s var(--rbx-pop); transition-delay: calc(60ms + var(--i, 0) * 50ms); }
.rbx-stage:not(.ph0) .rbx-card .rbx-stagger { opacity: 1; transform: none; }

.rbx-bench {
  display: flex; align-items: center; gap: 7px;
  margin: -20px -20px 0; padding: 0 20px;
  background: var(--ink); color: var(--paper-soft);
  font-family: var(--rbx-ui); font-size: 10.5px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  border-radius: 10px 10px 0 0;
  opacity: 0; max-height: 0; overflow: hidden; transform: translateY(-8px);
  transition: opacity .35s var(--ease), max-height .45s var(--rbx-pop), padding .45s var(--rbx-pop), transform .45s var(--rbx-pop), margin-bottom .45s var(--rbx-pop);
}
.rbx-bench svg { width: 12px; height: 12px; }
.rbx-stage.ph4 .rbx-bench, .rbx-stage.ph5 .rbx-bench { opacity: 1; max-height: 40px; padding-top: 8px; padding-bottom: 8px; margin-bottom: 14px; transform: none; }

.rbx-statusline { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 10px; margin-bottom: 10px; }
.rbx-status {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--rbx-ui); font-size: 10px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  border-radius: 999px; padding: 4px 11px; border: 1px solid transparent;
  transition: background .3s ease, color .3s ease; transform-origin: 50% 100%;
}
.rbx-status.is-flip { animation: rbxFlip .5s var(--rbx-pop); }
@keyframes rbxFlip { 0% { transform: rotateX(90deg); opacity: 0; } 100% { transform: rotateX(0); opacity: 1; } }
.rbx-status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.rbx-status.considering { background: var(--paper); color: var(--ink-muted); border-color: var(--rule-soft); }
.rbx-status.building { background: var(--ship-soft); color: var(--ship); }
.rbx-status.shipped { background: var(--ship); color: var(--paper-soft); }
.rbx-why { font-size: 12.5px; color: var(--ink-muted); }

.rbx-title { font-family: var(--serif); font-weight: 400; font-size: 22px; line-height: 1.15; margin: 0 0 4px; }
.rbx-meta { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--ink-muted); margin-bottom: 4px; }
.rbx-dev { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-muted); border: 1px solid var(--rule-soft); border-radius: 999px; padding: 2px 9px; font-weight: 500; }

/* pinned reply */
.rbx-reply {
  background: var(--ink); color: var(--paper-soft);
  border-radius: 10px; margin: 12px 0 0; padding: 0 17px;
  opacity: 0; transform: translateY(14px) scale(0.98); max-height: 0; overflow: hidden;
  transition: opacity .4s var(--ease), transform .45s var(--rbx-pop), max-height .45s var(--rbx-pop), padding .45s var(--rbx-pop);
}
.rbx-stage:is(.ph2, .ph3, .ph4, .ph5) .rbx-reply { opacity: 1; transform: none; max-height: 170px; padding-top: 15px; padding-bottom: 15px; }
.rbx-who { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; font-family: var(--rbx-ui); font-size: 10.5px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }
.rbx-who svg { width: 12px; height: 12px; }
.rbx-who .rbx-clip { opacity: 0; transform: scale(0.4) rotate(-24deg); transition: opacity .3s ease .15s, transform .45s var(--rbx-pop) .15s; }
.rbx-stage:is(.ph2, .ph3, .ph4, .ph5) .rbx-clip { opacity: 1; transform: none; }
.rbx-who .rbx-pin { opacity: 0.6; font-weight: 500; letter-spacing: 0.02em; text-transform: none; font-size: 11.5px; margin-left: auto; }
.rbx-reply p { margin: 0; font-size: 14px; line-height: 1.55; opacity: 0; transition: opacity .4s ease .3s; }
.rbx-stage:is(.ph2, .ph3, .ph4, .ph5) .rbx-reply p { opacity: 0.92; }

/* vote row */
.rbx-voterow { position: relative; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--rule-soft); }
.rbx-vote {
  position: relative; display: inline-flex; align-items: center; gap: 8px; overflow: hidden;
  color: var(--ink); border: 1px solid var(--rule); border-radius: 10px;
  padding: 9px 15px; font-family: var(--rbx-ui); font-size: 13px; font-weight: 500; white-space: nowrap;
  transition: color .3s ease .45s, border-color .3s ease .45s;
}
.rbx-vote::before { content: ""; position: absolute; inset: 0; background: var(--ink); transform: scaleX(0); transform-origin: 0 50%; transition: transform .4s var(--ease) .45s; }
.rbx-vote > * { position: relative; }
.rbx-stage:is(.ph3, .ph4, .ph5) .rbx-vote { color: var(--paper-soft); border-color: var(--ink); }
.rbx-stage:is(.ph3, .ph4, .ph5) .rbx-vote::before { transform: scaleX(1); }
.rbx-stage:is(.ph4, .ph5) .rbx-vote, .rbx-stage:is(.ph4, .ph5) .rbx-vote::before { transition-delay: 0s; }
.rbx-vote svg { width: 13px; height: 13px; }
.rbx-n { font-variant-numeric: tabular-nums; min-width: 1.4em; text-align: right; display: inline-block; }
.rbx-n.is-bump { animation: rbxBump .3s var(--rbx-pop); }
@keyframes rbxBump { 0% { transform: scale(1); } 45% { transform: scale(1.45); } 100% { transform: scale(1); } }
.rbx-early { font-size: 12px; color: var(--ink-faint); font-style: italic; font-family: var(--serif); }
.rbx-stage:is(.ph3, .ph4, .ph5) .rbx-early { display: none; }

.rbx-plus1 { position: absolute; left: 52px; bottom: 28px; font-family: var(--rbx-ui); font-size: 12px; font-weight: 600; color: var(--ink); pointer-events: none; animation: rbxFloat .8s var(--ease) forwards; }
@keyframes rbxFloat { 0% { opacity: 0; transform: translateY(4px) scale(0.8); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateY(-30px) scale(1.1); } }

.rbx-social { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.rbx-social > * { opacity: 0; transform: scale(0.6); transition: opacity .3s ease, transform .4s var(--rbx-pop); }
.rbx-stage:is(.ph3, .ph4, .ph5) .rbx-social > * { opacity: 1; transform: none; }
.rbx-stage.ph3 .rbx-social > *:nth-child(1) { transition-delay: .8s; }
.rbx-stage.ph3 .rbx-social > *:nth-child(2) { transition-delay: .95s; }
.rbx-stage.ph3 .rbx-social > *:nth-child(3) { transition-delay: 1.1s; }
.rbx-stage.ph3 .rbx-social > *:nth-child(4) { transition-delay: 1.25s; }
.rbx-avatars { display: flex; }
.rbx-av {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: var(--paper); border: 1px solid var(--rule);
  font-family: var(--rbx-ui); font-size: 9px; font-weight: 600; color: var(--ink-muted);
  margin-left: -6px;
}
.rbx-av:first-child { margin-left: 0; }
.rbx-badge { display: inline-flex; align-items: center; gap: 4px; background: var(--gold-soft); color: var(--gold); font-family: var(--rbx-ui); font-size: 10.5px; font-weight: 600; border-radius: 999px; padding: 3px 9px; white-space: nowrap; }
.rbx-badge svg { width: 10px; height: 10px; }
.rbx-minidev { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-muted); border: 1px solid var(--rule-soft); border-radius: 999px; padding: 2px 8px; white-space: nowrap; }

/* shipped rail card */
.rbx-ship {
  position: relative; overflow: hidden; margin-top: 16px;
  background: var(--paper-soft); border-radius: var(--radius); padding: 16px 18px;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; align-items: center;
  border: 1px solid var(--rule-soft);
  opacity: 0; transform: translateY(30px) scale(0.96);
  transition: opacity .45s var(--ease) .1s, transform .55s var(--rbx-pop) .1s, box-shadow .5s ease .1s;
}
.rbx-stage.ph5 .rbx-ship { opacity: 1; transform: none; box-shadow: 0 16px 36px -24px rgba(27, 26, 23, 0.4); }
.rbx-ship::after { content: ""; position: absolute; top: 0; bottom: 0; width: 60px; background: linear-gradient(105deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0)); left: -80px; transform: skewX(-18deg); }
[data-theme="dark"] .rbx-ship::after { background: linear-gradient(105deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0)); }
.rbx-stage.ph5 .rbx-ship::after { animation: rbxShine .9s .5s var(--ease); }
@keyframes rbxShine { to { left: 110%; } }
.rbx-ship-hub { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-muted); }
.rbx-ship-name { font-family: var(--serif); font-size: 20px; line-height: 1.15; }
.rbx-ship-origin { font-size: 12.5px; color: var(--ink-muted); grid-column: 1; }
.rbx-ship-buy { grid-row: 1 / span 3; grid-column: 2; display: inline-flex; align-items: center; background: var(--ink); color: var(--paper-soft); border-radius: 10px; padding: 10px 15px; font-family: var(--rbx-ui); font-size: 12.5px; font-weight: 500; line-height: 1; white-space: nowrap; }

.rbx-mote { position: absolute; top: -12px; width: 7px; height: 10px; border-radius: 2px; pointer-events: none; animation: rbxFall 1.05s var(--ease) forwards; }
.rbx-mote.ink { background: var(--ink); }
.rbx-mote.gold { background: var(--gold); }
.rbx-mote.ship { background: var(--ship); }
@keyframes rbxFall { 0% { opacity: 0; transform: translateY(0) rotate(0); } 12% { opacity: 1; } 100% { opacity: 0; transform: translateY(130px) rotate(240deg); } }

@media (max-width: 860px) {
  .rbx { padding-top: 32px; }
  .rbx-panel { grid-template-columns: minmax(0, 1fr); padding: 24px 18px; gap: 22px; border-radius: var(--radius); }
  .rbx-note { max-width: none; }
  .rbx-stage { min-height: 750px; padding: 22px 16px 18px; }
  .rbx-stage:not(.ph0) .rbx-composer { left: 16px; right: 16px; }
  .rbx-card { padding: 16px; }
  .rbx-bench { margin: -16px -16px 0; padding-left: 16px; padding-right: 16px; }
  .rbx-comprow { flex-direction: column; align-items: stretch; }
  .rbx-post { align-self: flex-end; }
  .rbx-ship { grid-template-columns: minmax(0, 1fr); }
  .rbx-ship-buy { grid-row: auto; grid-column: 1; justify-self: start; margin-top: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .rbx *, .rbx *::before, .rbx *::after { transition: none !important; animation: none !important; }
}
