/* Interactive product demos (Clinicom-style players, DOM simulations) */

.live-demos-section {
  padding: 5rem 0;
}

.live-demos-section .section-lead {
  text-align: center;
  max-width: 36rem;
  margin: 0.5rem auto 2rem;
  color: var(--silver);
  font-size: 1.02rem;
}

.live-demo-tabs {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  justify-content: space-between;
  gap: 0;
  width: 100%;
  max-width: none;
  border-bottom: 1px solid var(--border-dim);
  margin: 0 0 2rem;
  overflow: visible;
}

.live-demo-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--silver);
  font: inherit;
  font-size: clamp(0.72rem, 1.05vw, 0.88rem);
  font-weight: 400;
  padding: 0.75rem 0.35rem;
  cursor: pointer;
  margin-bottom: -1px;
  flex: 1 1 0;
  text-align: center;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
}

.live-demo-tab:hover { color: var(--white); }
.live-demo-tab.is-active {
  color: var(--amber);
  border-bottom-color: var(--amber);
  font-weight: 500;
}

.live-demo-panel { display: none; }
.live-demo-panel.is-active { display: block; }

.live-watch-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.9fr);
  gap: 2rem;
  align-items: center;
}

@media (max-width: 860px) {
  .live-watch-grid { grid-template-columns: 1fr; }
}

.live-demo {
  position: relative;
  background: #061018;
  border: 1px solid rgba(52, 152, 192, 0.28);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
}

.live-demo-chrome {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 0.9rem;
  background: rgba(13, 31, 45, 0.95);
  border-bottom: 1px solid rgba(52, 152, 192, 0.18);
}

.live-demo-chrome span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(122, 157, 175, 0.45);
}

.live-demo-chrome span:nth-child(1) { background: #e57373; }
.live-demo-chrome span:nth-child(2) { background: #f5a623; }
.live-demo-chrome span:nth-child(3) { background: #66bb6a; }

.live-demo-chrome p {
  margin-left: 0.4rem;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--silver);
}

.live-demo-screen {
  position: relative;
  min-height: 340px;
  background:
    radial-gradient(ellipse at top right, rgba(52, 152, 192, 0.12), transparent 50%),
    linear-gradient(165deg, #0a1a24 0%, #09161e 55%, #07121a 100%);
  overflow: hidden;
}

.live-step {
  position: absolute;
  inset: 0;
  padding: 1.1rem 1.15rem 2.6rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s;
  pointer-events: none;
}

.live-step.is-active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.workflow-chip {
  position: absolute;
  left: 0.9rem;
  bottom: 0.75rem;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(9, 22, 30, 0.88);
  border: 1px solid rgba(52, 152, 192, 0.35);
  color: var(--teal-light);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.workflow-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(52, 152, 192, 0.12);
  z-index: 5;
}

.workflow-progress i {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--teal-light), var(--amber));
  transition: width 0.25s linear;
}

.workflow-beats {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.workflow-beats li {
  position: relative;
  padding: 0.35rem 0 0.35rem 1.35rem;
  font-size: 0.92rem;
  color: var(--silver);
  transition: color 0.2s;
}

.workflow-beats li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid rgba(52, 152, 192, 0.4);
  background: transparent;
}

.workflow-beats li.is-done {
  color: rgba(122, 157, 175, 0.75);
}

.workflow-beats li.is-done::before {
  background: var(--teal-light);
  border-color: var(--teal-light);
}

.workflow-beats li.is-active {
  color: var(--white);
  font-weight: 500;
}

.workflow-beats li.is-active::before {
  background: var(--amber);
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.18);
}

.live-demo-caption h3 {
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 0.55rem;
  color: var(--white);
}

.live-demo-caption p {
  color: var(--silver);
  font-size: 0.95rem;
  margin-bottom: 0.85rem;
}

.live-demo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.live-demo-note {
  font-size: 0.8rem;
  color: rgba(122, 157, 175, 0.85);
  margin-top: 0.75rem;
}

/* Shot blocks (full /demo page) */
.shot-block {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.2fr);
  gap: 2rem;
  align-items: center;
  padding: 2.5rem 0;
  border-top: 1px solid var(--border-dim);
}

.shot-block.shot-flip {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.95fr);
}

.shot-block.shot-flip .shot-copy { order: 2; }
.shot-block.shot-flip .live-demo { order: 1; }

@media (max-width: 860px) {
  .shot-block,
  .shot-block.shot-flip {
    grid-template-columns: 1fr;
  }
  .shot-block.shot-flip .shot-copy,
  .shot-block.shot-flip .live-demo { order: unset; }
}

.shot-copy h3 {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 0.55rem;
}

.shot-copy > p {
  color: var(--silver);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

/* Simulated product UI pieces */
.sim-auth {
  max-width: 300px;
  margin: 1.2rem auto 0;
  padding: 1.25rem 1.2rem;
  background: rgba(13, 31, 45, 0.75);
  border: 1px solid rgba(52, 152, 192, 0.22);
  border-radius: 12px;
}

.sim-brand {
  font-size: 1.15rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 1rem;
}

.sim-brand .dot { color: var(--amber); }

.sim-field {
  margin-bottom: 0.7rem;
}

.sim-field label {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--silver);
  margin-bottom: 0.25rem;
}

.sim-field .sim-input {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  border: 1px solid rgba(52, 152, 192, 0.28);
  background: rgba(9, 22, 30, 0.85);
  color: var(--white);
  font-size: 0.86rem;
  min-height: 2.2rem;
}

.sim-field .sim-input.is-typing::after,
.sim-caret {
  display: inline-block;
  width: 1px;
  height: 0.95em;
  background: var(--teal-light);
  margin-left: 1px;
  vertical-align: text-bottom;
  animation: sim-blink 0.9s step-end infinite;
}

@keyframes sim-blink {
  50% { opacity: 0; }
}

.sim-btn {
  display: block;
  width: 100%;
  margin-top: 0.85rem;
  padding: 0.65rem;
  border: none;
  border-radius: 8px;
  background: var(--amber);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.88rem;
  text-align: center;
}

.sim-btn.is-pulse {
  animation: sim-pulse 1.1s ease-in-out infinite;
}

@keyframes sim-pulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.08); }
}

.sim-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.75rem;
}

.sim-chip {
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(52, 152, 192, 0.3);
  font-size: 0.78rem;
  color: var(--silver);
  background: rgba(13, 31, 45, 0.5);
}

.sim-chip.is-on {
  color: var(--ink);
  background: var(--teal-light);
  border-color: var(--teal-light);
  font-weight: 500;
}

.sim-onboard-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  text-align: center;
}

.sim-onboard-sub {
  font-size: 0.78rem;
  color: var(--silver);
  text-align: center;
  margin-bottom: 0.85rem;
}

.sim-workspace {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 0.75rem;
  height: 100%;
  min-height: 300px;
}

.sim-side {
  background: rgba(6, 16, 24, 0.9);
  border-right: 1px solid rgba(52, 152, 192, 0.16);
  border-radius: 10px 0 0 10px;
  padding: 0.75rem 0.55rem;
  font-size: 0.68rem;
  color: var(--silver);
}

.sim-side strong {
  display: block;
  color: var(--white);
  font-size: 0.78rem;
  margin-bottom: 0.7rem;
  padding: 0 0.25rem;
}

.sim-nav-item {
  padding: 0.4rem 0.45rem;
  border-radius: 6px;
  margin-bottom: 0.2rem;
}

.sim-nav-item.is-on {
  background: rgba(52, 152, 192, 0.18);
  color: var(--white);
}

.sim-main {
  padding: 0.35rem 0.35rem 0 0;
}

.sim-kicker {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-light);
  margin-bottom: 0.25rem;
}

.sim-heading {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.85rem;
}

.sim-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.sim-card {
  padding: 0.7rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(52, 152, 192, 0.22);
  background: rgba(13, 31, 45, 0.55);
  opacity: 0;
  transform: translateY(8px);
}

.live-step.is-active .sim-card {
  animation: sim-rise 0.45s ease forwards;
}

.live-step.is-active .sim-card:nth-child(1) { animation-delay: 0.05s; }
.live-step.is-active .sim-card:nth-child(2) { animation-delay: 0.15s; }
.live-step.is-active .sim-card:nth-child(3) { animation-delay: 0.25s; }
.live-step.is-active .sim-card:nth-child(4) { animation-delay: 0.35s; }

@keyframes sim-rise {
  to { opacity: 1; transform: translateY(0); }
}

.sim-card strong {
  display: block;
  font-size: 0.82rem;
  margin-bottom: 0.2rem;
}

.sim-card span {
  font-size: 0.72rem;
  color: var(--silver);
}

.sim-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.55rem;
  font-size: 0.72rem;
  color: #7dcea0;
}

.sim-status::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7dcea0;
}

.sim-worker-shell {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  height: 100%;
}

.sim-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  font-size: 0.72rem;
}

.sim-tab {
  padding: 0.35rem 0.55rem;
  border-radius: 6px;
  color: var(--silver);
  border: 1px solid transparent;
}

.sim-tab.is-on {
  color: var(--white);
  background: rgba(52, 152, 192, 0.16);
  border-color: rgba(52, 152, 192, 0.28);
}

.sim-auto-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sim-auto-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.8rem;
  border-radius: 10px;
  border: 1px solid rgba(52, 152, 192, 0.22);
  background: rgba(13, 31, 45, 0.55);
}

.sim-auto-row strong {
  display: block;
  font-size: 0.84rem;
}

.sim-auto-row span {
  font-size: 0.72rem;
  color: var(--silver);
}

.sim-toggle {
  width: 34px;
  height: 18px;
  border-radius: 999px;
  background: rgba(122, 157, 175, 0.35);
  position: relative;
  flex-shrink: 0;
}

.sim-toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--white);
  transition: transform 0.25s ease, background 0.25s;
}

.sim-toggle.is-on {
  background: rgba(52, 152, 192, 0.7);
}

.sim-toggle.is-on::after {
  transform: translateX(16px);
  background: var(--amber);
}

.sim-modal {
  max-width: 280px;
  margin: 1.5rem auto 0;
  padding: 1rem;
  border-radius: 12px;
  background: rgba(13, 31, 45, 0.95);
  border: 1px solid rgba(52, 152, 192, 0.3);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

.sim-modal h4 {
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.sim-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--silver);
  font-size: 0.85rem;
}

.sim-tg-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  height: 100%;
}

@media (max-width: 560px) {
  .sim-tg-layout,
  .sim-workspace,
  .sim-cards {
    grid-template-columns: 1fr;
  }
  .sim-side { display: none; }
}

.sim-connect-card,
.sim-tg-phone {
  border-radius: 12px;
  border: 1px solid rgba(52, 152, 192, 0.22);
  background: rgba(13, 31, 45, 0.6);
  padding: 0.85rem;
}

.sim-tg-phone {
  background: linear-gradient(180deg, #0e2430 0%, #0a1a24 100%);
}

.sim-tg-header {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  font-weight: 500;
  margin-bottom: 0.7rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid rgba(52, 152, 192, 0.18);
}

.sim-tg-header i { color: #29b6f6; font-size: 1rem; }

.sim-bubble {
  max-width: 92%;
  padding: 0.5rem 0.65rem;
  border-radius: 12px;
  font-size: 0.78rem;
  margin-bottom: 0.45rem;
  line-height: 1.4;
}

.sim-bubble--in {
  background: rgba(52, 152, 192, 0.18);
  color: var(--white);
}

.sim-bubble--out {
  background: rgba(41, 182, 246, 0.2);
  margin-left: auto;
  color: var(--white);
}

.sim-badge-ok {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.6rem;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 500;
  color: #7dcea0;
  background: rgba(125, 206, 160, 0.12);
  border: 1px solid rgba(125, 206, 160, 0.3);
}

.section--light .live-demo-caption h3,
.section--light .shot-copy h3,
.section--light .workflow-beats li.is-active {
  color: #0d1f2d;
}

.section--light .live-demo-caption p,
.section--light .shot-copy > p,
.section--light .workflow-beats li,
.section--light .live-demo-note {
  color: #4a6575;
}

.section--light .live-demo-tab { color: #4a6575; }
.section--light .live-demo-tab:hover { color: #0d1f2d; }
.section--light .live-demo-tab.is-active { color: #b7791f; border-bottom-color: #b7791f; }

.live-demos-cta {
  margin-top: 2rem;
  text-align: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

@media (prefers-reduced-motion: reduce) {
  .live-step,
  .sim-card,
  .sim-btn.is-pulse,
  .sim-caret {
    animation: none !important;
    transition: none !important;
  }
}

/* Workspace tools sims */
.sim-tool-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  margin-bottom: 0.7rem;
  font-size: 0.72rem;
}

.sim-tool-bar .sim-tab { cursor: default; }

.sim-mail {
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 0.55rem;
  min-height: 260px;
}

.sim-mail-folders {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.72rem;
  color: var(--silver);
}

.sim-mail-folders .is-on {
  color: var(--white);
  background: rgba(52, 152, 192, 0.16);
  border-radius: 6px;
  padding: 0.35rem 0.45rem;
}

.sim-mail-folders div { padding: 0.35rem 0.45rem; }

.sim-mail-list { display: flex; flex-direction: column; gap: 0.4rem; }

.sim-mail-row {
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid rgba(52, 152, 192, 0.18);
  background: rgba(13, 31, 45, 0.45);
}

.sim-mail-row.is-on {
  border-color: rgba(245, 166, 35, 0.45);
  background: rgba(245, 166, 35, 0.08);
}

.sim-mail-row strong { display: block; font-size: 0.8rem; }
.sim-mail-row span { font-size: 0.7rem; color: var(--silver); }

.sim-mail-reader {
  padding: 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(52, 152, 192, 0.22);
  background: rgba(13, 31, 45, 0.55);
  font-size: 0.8rem;
}

.sim-mail-reader p { color: var(--silver); margin: 0.45rem 0; line-height: 1.45; }

.sim-origin {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 500;
  background: rgba(52, 152, 192, 0.2);
  color: var(--teal-light);
}

.sim-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.25rem;
  margin-bottom: 0.7rem;
}

.sim-cal-cell {
  aspect-ratio: 1;
  border-radius: 6px;
  border: 1px solid rgba(52, 152, 192, 0.14);
  background: rgba(13, 31, 45, 0.4);
  font-size: 0.65rem;
  color: var(--silver);
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 0.2rem 0.3rem;
}

.sim-cal-cell.has-event {
  border-color: rgba(52, 152, 192, 0.45);
  background: rgba(52, 152, 192, 0.14);
  color: var(--white);
}

.sim-cal-cell.is-today {
  outline: 1px solid var(--amber);
}

.sim-nl {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.sim-nl .sim-input { flex: 1; }

.sim-doc-page {
  padding: 0.85rem;
  border-radius: 10px;
  border: 1px solid rgba(52, 152, 192, 0.22);
  background: rgba(255, 255, 255, 0.03);
  min-height: 200px;
}

.sim-doc-page h4 {
  font-size: 0.95rem;
  margin-bottom: 0.55rem;
}

.sim-doc-page p {
  font-size: 0.78rem;
  color: var(--silver);
  line-height: 1.5;
  margin-bottom: 0.45rem;
}

.sim-assist {
  margin-top: 0.7rem;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px dashed rgba(52, 152, 192, 0.4);
  font-size: 0.74rem;
  color: var(--teal-light);
}

.sim-research-side {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 0.55rem;
  min-height: 250px;
}

.sim-paper-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.72rem;
}

.sim-paper-item {
  padding: 0.45rem;
  border-radius: 8px;
  border: 1px solid rgba(52, 152, 192, 0.16);
  color: var(--silver);
}

.sim-paper-item.is-on {
  color: var(--white);
  border-color: rgba(52, 152, 192, 0.4);
  background: rgba(52, 152, 192, 0.12);
}

.sim-progress {
  height: 6px;
  border-radius: 999px;
  background: rgba(52, 152, 192, 0.15);
  overflow: hidden;
  margin: 0.55rem 0;
}

.sim-progress i {
  display: block;
  height: 100%;
  width: 68%;
  background: linear-gradient(90deg, var(--teal-light), var(--amber));
}

.sim-source {
  font-size: 0.7rem;
  color: var(--silver);
  padding: 0.3rem 0;
  border-bottom: 1px solid rgba(52, 152, 192, 0.12);
}

@media (max-width: 560px) {
  .sim-mail,
  .sim-research-side {
    grid-template-columns: 1fr;
  }
  .sim-mail-folders { flex-direction: row; flex-wrap: wrap; }
}

.live-demos-section .container,
.demos-section .container {
  max-width: 1180px;
}
@media (max-width: 900px) {
  .live-demo-tabs { flex-wrap: nowrap; }
  .live-demo-tab { font-size: 0.7rem; padding: 0.65rem 0.25rem; }
}
