/* "Build your receptionist" flow. Framed as hiring a staff member, not
   customising an avatar — the copy and pacing carry that mental model. */

.rb {
  position: fixed;
  inset: auto auto 20px 20px;
  z-index: 2147483001;
  width: min(360px, calc(100vw - 40px));
  font-family: ui-sans-serif, system-ui, "Segoe UI", sans-serif;
}

.rb__panel {
  padding: 20px;
  border-radius: 16px;
  background: rgba(13, 17, 23, .97);
  border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
  color: #e6edf3;
  max-height: min(76vh, 640px);
  overflow-y: auto;
}

.rb__progress { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #7d8894; margin-bottom: 6px; }
.rb__panel h2 { margin: 0 0 4px; font-size: 19px; font-weight: 650; line-height: 1.25; }
.rb__lede { margin: 0 0 12px; font-size: 13px; color: #9fa9b5; }
.rb__hint { margin: 9px 0 0; font-size: 11.5px; color: #7d8894; }

.rb__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 9px; margin-bottom: 12px; }

.rb__card {
  border: 2px solid transparent;
  border-radius: 11px;
  background: rgba(255, 255, 255, .05);
  color: inherit;
  font: inherit;
  cursor: pointer;
  padding: 0 0 6px;
  overflow: hidden;
  text-align: center;
}
.rb__card:hover { border-color: rgba(68, 147, 248, .55); }
.rb__card[data-selected="true"] { border-color: #4493f8; }
.rb__card img { width: 100%; aspect-ratio: 3/4; object-fit: cover; object-position: center top; display: block; margin-bottom: 4px; }
.rb__card strong { font-size: 11.5px; font-weight: 600; }

.rb__input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, .16);
  background: #0d1117;
  color: #e6edf3;
  font: inherit;
  font-size: 15px;
}
.rb__input:focus { outline: 2px solid #4493f8; outline-offset: 1px; }

.rb__options { display: flex; flex-wrap: wrap; gap: 7px; }
.rb__option {
  padding: 8px 13px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .16);
  background: transparent;
  color: #e6edf3;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.rb__option:hover { border-color: #4493f8; }
.rb__option[data-selected="true"] { background: #4493f8; border-color: #4493f8; color: #06131f; font-weight: 600; }

.rb__accent { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; font-size: 13px; color: #9fa9b5; }
.rb__accent input { width: 44px; height: 28px; border: 1px solid rgba(255,255,255,.16); border-radius: 7px; background: none; cursor: pointer; }

.rb__actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 18px; }

.rb__primary {
  padding: 10px 18px;
  border-radius: 9px;
  border: none;
  background: #4493f8;
  color: #06131f;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}
.rb__primary:disabled { opacity: .45; cursor: not-allowed; }

.rb__secondary {
  display: block;
  width: 100%;
  margin-top: 9px;
  padding: 11px 18px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, .22);
  background: transparent;
  color: #e6edf3;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.rb__secondary:hover { border-color: #4493f8; }

.rb__link { background: none; border: none; color: #79b8ff; font: inherit; font-size: 13px; cursor: pointer; padding: 4px 0; text-decoration: underline; }

/* Reveal: the emotional beat. Deliberately uncluttered. */
.rb__reveal { text-align: center; padding-top: 4px; }
.rb__reveal h2 { font-size: 24px; margin-bottom: 6px; }
.rb__ready { margin: 12px 0 16px; font-size: 13px; color: #3fb950; font-weight: 600; }
.rb__reveal .rb__primary { display: block; width: 100%; padding: 12px; }

.rb__transcript { margin-top: 15px; text-align: left; display: flex; flex-direction: column; gap: 6px; }
.rb__line { padding: 8px 11px; border-radius: 9px; font-size: 12.5px; line-height: 1.4; }
.rb__line--caller { background: rgba(255, 255, 255, .07); color: #c9d1d9; }
.rb__line--agent  { background: rgba(68, 147, 248, .16); color: #e6edf3; }
.rb__line--system { background: rgba(63, 185, 80, .14); color: #7ee787; font-size: 11.5px; font-weight: 600; }

@media (max-width: 767px) {
  .rb { inset: auto 10px 10px 10px; width: auto; }
  .rb__panel { max-height: 70vh; padding: 16px; }
}

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

/* Live preview inside the drawer. The homepage hero keeps exactly one visible
   assistant (the phone demo), so the receptionist being built previews here
   rather than as a second person floating beside it. */
.rb__preview { width: 128px; margin: 0 auto 14px; }
.rb__preview .concierge__stage { border-radius: 12px; overflow: hidden; background: #e9ecef; }
.rb__preview .concierge__caption { display: none; }
.rb__preview .concierge__plate { margin-top: 6px; padding: 5px 8px; }
.rb__preview .concierge__plate strong { font-size: 11px; }
.rb__preview .concierge__plate span { font-size: 9px; max-width: 118px; }

/* Homepage CallPilot Assistant Live Presence Showcase */
.rg {
  max-width: 1200px;
  margin: 40px auto 30px;
  padding: 40px 24px 20px;
  text-align: left;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #e6edf3;
  position: relative;
  z-index: 10;
}
.rg__container {
  background: rgba(10, 18, 36, 0.72);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  border: 1px solid rgba(0, 212, 255, 0.22);
  border-radius: 28px;
  padding: 40px;
  box-shadow: 
    0 0 0 1px rgba(0, 212, 255, 0.1),
    0 24px 80px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.rg__header {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 36px;
}
.rg__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 9999px;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.3);
  color: #38bdf8;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.rg__title {
  margin: 0 0 12px;
  font-size: clamp(26px, 3.4vw, 38px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
  line-height: 1.2;
}
.rg__lede {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.6;
  color: #94a3b8;
}

/* Two-column layout: Left Stage (56%), Right Roster (44%) */
.rg__showcase-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 32px;
  align-items: stretch;
}

/* Left Stage Panel */
.rg__stage-panel {
  background: rgba(4, 9, 20, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 22px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.rg__stage-media-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16/10;
  max-height: 320px;
  border-radius: 16px;
  overflow: hidden;
  background: #020617;
  border: 1px solid rgba(0, 212, 255, 0.2);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}
.rg__stage-portrait {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
  z-index: 1;
  transition: opacity 220ms ease;
}
.rg__stage-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
  z-index: 2;
  opacity: 0;
  transition: opacity 220ms ease;
  pointer-events: none;
}
.rg__stage-video.is-active {
  opacity: 1;
}

.rg__badge-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: rgPulseDot 1.8s infinite;
}
@keyframes rgPulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* Floating Live Presence Pill (Top Left of Video) */
.rg__live-status-pill {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  background: rgba(3, 7, 18, 0.78);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(16, 185, 129, 0.4);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #a7f3d0;
  text-transform: uppercase;
}
.rg__live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
  animation: rgPulseDot 1.8s infinite;
}

/* Floating Audio Visualizer Badge (Bottom Left of Video) */
.rg__stage-audio-badge {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border-radius: 9999px;
  background: rgba(3, 7, 18, 0.82);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 212, 255, 0.3);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

/* 4-Bar Soundwave Equalizer */
.rg__soundwave {
  display: inline-flex;
  align-items: center;
  gap: 2.5px;
  height: 14px;
  flex-shrink: 0;
}
.rg__soundwave-bar {
  width: 3px;
  height: 4px;
  border-radius: 2px;
  background: #00d4ff;
  transition: height 160ms ease, background-color 160ms ease;
}
.rg__soundwave.is-speaking .rg__soundwave-bar {
  background: #10b981;
  animation: rgEqualizer 0.8s infinite ease-in-out alternate;
}
.rg__soundwave.is-speaking .rg__soundwave-bar:nth-child(1) {
  animation-delay: 0.05s;
}
.rg__soundwave.is-speaking .rg__soundwave-bar:nth-child(2) {
  animation-delay: 0.25s;
}
.rg__soundwave.is-speaking .rg__soundwave-bar:nth-child(3) {
  animation-delay: 0.15s;
}
.rg__soundwave.is-speaking .rg__soundwave-bar:nth-child(4) {
  animation-delay: 0.35s;
}

@keyframes rgEqualizer {
  0% { height: 3px; }
  100% { height: 14px; }
}

.rg__stage-status-text {
  font-size: 11.5px;
  font-weight: 600;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rg__stage-details {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.rg__stage-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.rg__stage-meta-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.rg__stage-tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #38bdf8;
}
.rg__stage-verified {
  font-size: 11px;
  font-weight: 600;
  color: #10b981;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 2px 8px;
  border-radius: 9999px;
}
.rg__stage-name {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  color: #fff;
}
.rg__stage-tagline {
  margin: 0;
  font-size: 13.5px;
  color: #94a3b8;
}

/* Live Conversational Speech Bubble */
.rg__speech-bubble {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 18px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(0, 212, 255, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 8px 24px rgba(0, 0, 0, 0.25);
}
.rg__speech-bubble-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: #94a3b8;
}
.rg__speech-bubble-sender {
  font-weight: 700;
  color: #38bdf8;
}
.rg__speech-bubble-time {
  font-size: 10.5px;
  color: #64748b;
}
.rg__speech-bubble-text {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: #f1f5f9;
  font-style: normal;
  transition: opacity 120ms ease;
}

.rg__see-all-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.5);
  border: 1px dashed rgba(0, 212, 255, 0.3);
  color: #38bdf8;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 160ms ease;
  margin-top: 4px;
}
.rg__see-all-btn:hover {
  background: rgba(30, 41, 59, 0.8);
  border-color: #00d4ff;
  color: #ffffff;
  transform: translateY(-1px);
}
.rg__expanded-roster {
  margin-top: 8px;
}

.rg__stage-action {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 4px;
}
.rg__cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 12px;
  background: linear-gradient(180deg, #38bdf8, #2563eb);
  color: #ffffff;
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
  text-align: center;
}
.rg__cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  filter: brightness(1.06);
}
.rg__cta-sub {
  font-size: 11.5px;
  color: #64748b;
  text-align: center;
}

/* Right Roster Panel */
.rg__roster-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.rg__roster-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}
.rg__roster-title {
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
}
.rg__roster-counter {
  font-size: 11.5px;
  font-weight: 600;
  color: #38bdf8;
  background: rgba(0, 212, 255, 0.1);
  padding: 2px 8px;
  border-radius: 9999px;
  border: 1px solid rgba(0, 212, 255, 0.2);
}
.rg__roster-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.rg__roster-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.6);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  color: inherit;
  cursor: pointer;
  text-align: left;
  transition: all 180ms ease;
  position: relative;
  overflow: hidden;
}
.rg__roster-card:hover {
  border-color: rgba(0, 212, 255, 0.4);
  background: rgba(30, 41, 59, 0.7);
  transform: translateY(-2px);
}
.rg__roster-card.is-selected {
  border-color: #00d4ff;
  background: rgba(37, 99, 235, 0.16);
  box-shadow: 0 0 18px rgba(0, 212, 255, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.rg__roster-card-thumb-wrap {
  position: relative;
  width: 48px;
  height: 58px;
  flex-shrink: 0;
}
.rg__roster-card-thumb {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  object-fit: cover;
  object-position: center top;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #020617;
}
.rg__roster-card-status-dot {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  border: 1.5px solid #020617;
  box-shadow: 0 0 6px #10b981;
}
.rg__roster-card-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.rg__roster-card-top {
  display: flex;
  align-items: center;
  gap: 6px;
}
.rg__roster-card-name {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rg__roster-card-live-tag {
  font-size: 9.5px;
  font-weight: 700;
  color: #10b981;
  text-transform: uppercase;
}
.rg__roster-card-tagline {
  font-size: 11.5px;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}
.rg__roster-card-check {
  margin-left: auto;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #00d4ff;
  color: #040914;
  font-size: 11px;
  font-weight: 800;
  display: none;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.rg__roster-card.is-selected .rg__roster-card-check {
  display: flex;
}

.rg__roster-trust {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(0, 212, 255, 0.04);
  border: 1px solid rgba(0, 212, 255, 0.15);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.rg__roster-trust-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.rg__trust-icon {
  font-size: 15px;
  line-height: 1.3;
}
.rg__roster-trust-row strong {
  display: block;
  font-size: 12.5px;
  color: #e2e8f0;
  margin-bottom: 2px;
}
.rg__roster-trust-row span {
  font-size: 11.5px;
  color: #94a3b8;
  line-height: 1.45;
}

@media (max-width: 900px) {
  .rg {
    padding: 20px 16px;
    margin: 20px auto;
  }
  .rg__container {
    padding: 24px 18px;
    border-radius: 20px;
  }
  .rg__showcase-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .rg__roster-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 540px) {
  .rg__roster-grid {
    grid-template-columns: 1fr;
  }
}
