/* ==========================================================
   Interactive product demo (Arcade-style step-through tour)
   Reuses widget/admin classes from home.css; adds tour chrome.
   ========================================================== */

.demo-page {
  background: var(--green);
  min-height: 100vh;
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  margin: 0;
  padding: 0;
  /* Subtle topographic backdrop, matches landing hero */
  background-image:
    radial-gradient(at 20% 10%, rgba(255,255,255,0.18) 0px, transparent 50%),
    radial-gradient(at 80% 80%, rgba(0,0,0,0.06) 0px, transparent 50%);
}

.tour {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 2rem 1.5rem 6rem;
  box-sizing: border-box;
}

/* ── Stage holds all 5 scenes; only one visible ────────── */
.tour__stage {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scene {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
}
.scene.is-active {
  display: flex;
  animation: sceneIn 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes sceneIn {
  from { opacity: 0; transform: translateY(8px) scale(0.99); }
  to   { opacity: 1; transform: none; }
}

/* ── Browser-frame around each surface ─────────────────── */
.scene__frame {
  background: var(--white);
  border-radius: 16px;
  box-shadow:
    0 30px 80px rgba(0,0,0,0.18),
    0 6px 24px rgba(0,0,0,0.10),
    0 0 0 1px rgba(0,0,0,0.04);
  width: 100%;
  max-width: 980px;
  overflow: hidden;
  position: relative;
}
.scene__chrome {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: #f5f1e4;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.scene__dot { width: 11px; height: 11px; border-radius: 50%; }
.scene__dot--r { background: #ff5f57; }
.scene__dot--y { background: #febc2e; }
.scene__dot--g { background: #28c840; }
.scene__chrome-url {
  margin-left: 0.7rem;
  font-size: 0.78rem;
  color: rgba(0,0,0,0.5);
  letter-spacing: -0.01em;
  font-weight: 500;
}
.scene__body {
  padding: 2rem 2.5rem 2.5rem;
  position: relative;
  min-height: 420px;
}
.scene__body--portal { background: #f7f4ef; }
.scene__body--admin  { background: #fafafa; }

/* ── Scene 3 — pay form bits ───────────────────────────── */
.scene__pay-form {
  margin: 1rem 0 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.scene__pay-row { display: flex; flex-direction: column; gap: 0.3rem; }
.scene__pay-row--split { flex-direction: row; gap: 0.5rem; }
.scene__pay-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(0,0,0,0.45);
}
.scene__pay-input {
  background: var(--white);
  border: 1.5px solid rgba(0,0,0,0.08);
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  font-size: 0.95rem;
  color: var(--ink);
  font-weight: 500;
  letter-spacing: -0.01em;
}
.scene__pay-input--small { flex: 1; }
.scene__pay-input--card {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.scene__pay-card-brand {
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: #1a3993;
}

/* ── Scene 4 — portal ──────────────────────────────────── */
.scene__portal-head { margin-bottom: 1rem; }
.scene__portal-eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(0,0,0,0.45);
}
.scene__portal-title {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-top: 0.2rem;
  color: var(--ink);
}
.scene__portal-card {
  background: var(--white);
  border-radius: 14px;
  padding: 1.1rem 1.25rem;
  border: 1px solid rgba(0,0,0,0.06);
  margin-bottom: 1.25rem;
}
.scene__portal-card-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}
.scene__portal-card-eyebrow {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(0,0,0,0.4);
  margin-bottom: 0.25rem;
}
.scene__portal-card-title {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.scene__portal-card-meta {
  font-size: 0.85rem;
  color: rgba(0,0,0,0.55);
  margin-top: 0.2rem;
}
.scene__portal-status {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(34,197,94,0.12);
  color: #16a34a;
  border-radius: 50px;
  padding: 0.3rem 0.65rem;
}
.scene__portal-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(0,0,0,0.06);
}
.scene__portal-link {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #ef7da5;
  background: rgba(239,125,165,0.1);
  border-radius: 50px;
  padding: 0.4rem 0.85rem;
  text-decoration: none;
}
.scene__portal-link--mute {
  color: rgba(0,0,0,0.6);
  background: rgba(0,0,0,0.05);
}
.scene__portal-tabs {
  display: flex;
  gap: 0.4rem;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  padding-bottom: 0.65rem;
}
.scene__portal-tab {
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(0,0,0,0.5);
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
}
.scene__portal-tab--active {
  background: var(--white);
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* ── Scene 5 — admin strip with expanded card ──────────── */
.scene__admin-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  margin-bottom: 0.8rem;
}
.scene__admin-title {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.scene__admin-pill {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  background: rgba(99,102,241,0.1);
  color: #4f46e5;
  border-radius: 50px;
  padding: 0.3rem 0.7rem;
}
.scene__admin-strip { gap: 0.6rem; }
.scene__admin-card--expanded {
  outline: 2.5px solid #6366f1;
  outline-offset: 3px;
  background: rgba(99,102,241,0.04) !important;
}
.scene__admin-participants {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0.5rem 0 0;
  border-top: 1px solid rgba(0,0,0,0.06);
  font-size: 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.scene__admin-participants li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 500;
  color: rgba(0,0,0,0.75);
}
.scene__admin-participants .scene__admin-participant--mute {
  color: rgba(0,0,0,0.4);
  font-style: italic;
}
.scene__admin-check {
  color: #16a34a;
  font-weight: 700;
}
.scene__admin-check--mute { color: rgba(0,0,0,0.3); }

/* ── Hotspot dot pulsing on each scene ─────────────────── */
.hotspot {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ef7da5;
  box-shadow:
    0 0 0 6px rgba(239,125,165,0.25),
    0 4px 12px rgba(239,125,165,0.4);
  animation: hotspotPulse 1.6s ease-in-out infinite;
  pointer-events: none;
  z-index: 5;
}
@keyframes hotspotPulse {
  0%, 100% { box-shadow: 0 0 0 6px rgba(239,125,165,0.25), 0 4px 12px rgba(239,125,165,0.4); }
  50%      { box-shadow: 0 0 0 12px rgba(239,125,165,0.10), 0 4px 12px rgba(239,125,165,0.4); }
}

/* ── Tooltip ───────────────────────────────────────────── */
.tooltip {
  position: absolute;
  background: var(--white);
  border-radius: 14px;
  padding: 1.1rem 1.4rem;
  width: 320px;
  box-shadow:
    0 16px 40px rgba(0,0,0,0.15),
    0 4px 12px rgba(0,0,0,0.08),
    0 0 0 1px rgba(0,0,0,0.05);
  z-index: 10;
}
.tooltip__step {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ef7da5;
  margin-bottom: 0.4rem;
}
.tooltip__title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  color: var(--ink);
}
.tooltip__body {
  font-size: 0.85rem;
  line-height: 1.5;
  color: rgba(0,0,0,0.65);
  letter-spacing: -0.01em;
}
.tooltip::before {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  background: var(--white);
  transform: rotate(45deg);
  box-shadow: -2px -2px 4px rgba(0,0,0,0.04);
}
.tooltip--right::before { left: -6px; top: 24px; }
.tooltip--top::before   { left: 28px; top: -6px; }
.tooltip--bottom::before { left: 28px; bottom: -6px; }

/* ── Controls (prev/next/dots/counter) ─────────────────── */
.tour__controls {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.8rem;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  border-radius: 50px;
  padding: 0.5rem 0.7rem;
  box-shadow:
    0 6px 24px rgba(0,0,0,0.12),
    0 0 0 1px rgba(0,0,0,0.05);
  z-index: 50;
}
.tour__btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--ink);
  color: var(--white);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.14s, transform 0.14s;
}
.tour__btn:hover:not(:disabled) { transform: translateY(-1px); }
.tour__btn:disabled {
  background: rgba(0,0,0,0.15);
  color: rgba(0,0,0,0.35);
  cursor: not-allowed;
}
.tour__dots {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.4rem;
  align-items: center;
}
.tour__dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.18);
  cursor: pointer;
  transition: background 0.14s, transform 0.14s, width 0.18s;
}
.tour__dot:hover { background: rgba(0,0,0,0.4); }
.tour__dot.is-active {
  background: #ef7da5;
  width: 24px;
  border-radius: 50px;
}
.tour__counter {
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(0,0,0,0.6);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  margin-left: 0.4rem;
  padding: 0 0.5rem;
}

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 760px) {
  .tour { padding: 1rem 1rem 5.5rem; }
  .scene__frame { max-width: 100%; }
  .scene__body { padding: 1rem 1rem 1.5rem; min-height: 320px; }
  .tooltip {
    width: calc(100% - 2rem);
    left: 1rem !important;
    right: 1rem;
    top: auto !important;
    bottom: 5rem !important;
    position: fixed;
  }
  .tooltip::before { display: none; }
  /* Hotspots can drift on small screens — hide rather than mis-anchor */
  .hotspot { display: none; }
  .tour__controls { bottom: 1rem; padding: 0.4rem 0.5rem; gap: 0.5rem; }
  .tour__counter { display: none; }
}
