/* ── Demo Page Styles ─────────────────────────────────────────────────────── */

/* Nav: add back link */
.nav-back {
  margin-left: auto;
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.15s;
}
.nav-back:hover { color: var(--accent); }

/* ── Demo Hero ───────────────────────────────────────────────────────────── */
.demo-hero {
  padding: 72px 40px 48px;
  border-bottom: 1px solid var(--border);
}
.demo-hero-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.demo-hero-headline {
  font-family: var(--font-display);
  font-size: clamp(40px, 5.5vw, 72px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}
.demo-hero-sub {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 540px;
  line-height: 1.65;
}

/* ── Scenario Tabs ───────────────────────────────────────────────────────── */
.demo-tabs-bar {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 50;
}
.demo-tabs-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 0;
  padding: 0 40px;
}
.demo-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 18px 28px 16px 0;
  margin-right: 32px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s, border-color 0.15s;
}
.demo-tab:hover { color: var(--text); }
.demo-tab.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}
.tab-num {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
}
.tab-label { letter-spacing: -0.01em; }

/* ── Scenarios Container ─────────────────────────────────────────────────── */
.demo-scenarios {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}
.demo-scenario { display: none; }
.demo-scenario.active { display: block; }

.scenario-layout {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 0;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  min-height: 520px;
}

/* ── Player Column ───────────────────────────────────────────────────────── */
.scenario-player-col {
  border-right: 1px solid var(--border);
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.scenario-tag {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 10px;
}
.scenario-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.scenario-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── Audio Player ────────────────────────────────────────────────────────── */
.audio-player {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.audio-waveform {
  padding: 20px 20px 12px;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}
.waveform-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  flex: 1;
  height: 40px;
}
.wbar {
  flex: 1;
  background: var(--border);
  border-radius: 1px;
  min-height: 4px;
  transition: background 0.2s;
}
/* Subtle breathing animation */
@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.audio-time-display {
  font-family: var(--font-display);
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  display: flex;
  gap: 3px;
  align-items: center;
  flex-shrink: 0;
}
.time-current { color: var(--accent); }
.time-sep { color: var(--border); }

/* Progress track */
.audio-progress-track {
  position: relative;
  height: 3px;
  background: var(--border);
  cursor: pointer;
}
.audio-progress-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width 0.1s linear;
}
.audio-progress-thumb {
  position: absolute;
  top: 50%;
  left: 0%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
  transition: left 0.1s linear;
}

/* Controls */
.audio-controls {
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.btn-play {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, transform 0.1s;
  color: #fff;
}
.btn-play:hover { background: #e04d14; transform: scale(1.05); }
.btn-play:active { transform: scale(0.97); }
.btn-play svg { width: 22px; height: 22px; }
.hidden { display: none !important; }

.audio-meta-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.audio-label {
  font-size: 13px;
  color: var(--text-muted);
}
.audio-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 3px;
}
.audio-badge--simulated {
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(255,92,26,0.2);
}

/* ── Key Moment callout ──────────────────────────────────────────────────── */
.scenario-key-moment {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 20px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
}
.key-moment-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.key-moment-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}
.key-moment-text { font-size: 13px; color: var(--text-muted); line-height: 1.5; }

/* ── Transcript Column ───────────────────────────────────────────────────── */
.scenario-transcript-col {
  display: flex;
  flex-direction: column;
}
.transcript-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.transcript-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.transcript-hint {
  font-size: 11px;
  color: var(--text-muted);
  opacity: 0.5;
}
.transcript-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px 32px;
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: 420px;
  scroll-behavior: smooth;
}
.transcript-body::-webkit-scrollbar { width: 4px; }
.transcript-body::-webkit-scrollbar-track { background: transparent; }
.transcript-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* Transcript lines */
.transcript-line {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 4px;
  margin: 1px 0;
  opacity: 0.45;
  transition: opacity 0.2s, background 0.2s;
}
.transcript-line.done { opacity: 0.35; }
.transcript-line.active {
  opacity: 1;
  background: var(--surface);
}

.speaker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding-top: 2px;
  align-self: start;
}
.speaker--ai { color: var(--accent); }
.speaker--lead { color: var(--text-muted); }

.line-text { font-size: 14px; line-height: 1.6; }

/* Handoff callout — special treatment for the transfer moment */
.transcript-line--handoff {
  grid-template-columns: 42px 1fr;
  grid-template-rows: auto auto;
}
.transcript-line--handoff .speaker { grid-row: 1; }
.transcript-line--handoff .line-text { grid-row: 1; }
.handoff-callout {
  grid-column: 1 / -1;
  margin-top: 10px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 16px;
  background: rgba(255,92,26,0.08);
  border: 1px solid rgba(255,92,26,0.25);
  border-radius: 4px;
  font-size: 13px;
  color: var(--text);
  line-height: 1.55;
  opacity: 0;
  transition: opacity 0.3s;
}
.transcript-line--handoff.active .handoff-callout { opacity: 1; }
.handoff-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }

/* ── Demo CTA Section ────────────────────────────────────────────────────── */
.demo-cta-section {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 80px 40px;
  margin-top: 0;
}
.demo-cta-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 440px;
  gap: 80px;
  align-items: start;
}
.demo-cta-headline {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.5vw, 46px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 16px;
  margin-top: 12px;
}
.demo-cta-sub {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 28px;
  max-width: 480px;
}
.demo-cta-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.demo-cta-bullets li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
}
.bullet-check {
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
}

/* ── Form ────────────────────────────────────────────────────────────────── */
.demo-cta-form-wrap {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 36px 32px;
}
.demo-cta-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.form-fields-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-row label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  text-transform: uppercase;
}
.form-row .req { color: var(--accent); }
.form-row input {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  outline: none;
  padding: 12px 16px;
  transition: border-color 0.15s;
  width: 100%;
}
.form-row input::placeholder { color: var(--text-muted); opacity: 0.45; }
.form-row input:focus { border-color: var(--accent); }

.btn-cta-submit {
  margin-top: 20px;
  background: var(--accent);
  border: none;
  border-radius: 4px;
  color: #fff;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  padding: 16px 24px;
  text-align: center;
  transition: background 0.15s, transform 0.1s;
  width: 100%;
}
.btn-cta-submit:hover { background: #e04d14; }
.btn-cta-submit:active { transform: scale(0.98); }
.btn-cta-submit:disabled { opacity: 0.6; cursor: not-allowed; }

.form-fine {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 12px;
  line-height: 1.5;
}

.form-success {
  margin-top: 20px;
  padding: 20px;
  background: rgba(255,92,26,0.08);
  border: 1px solid rgba(255,92,26,0.25);
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  line-height: 1.5;
}
.success-check {
  font-size: 20px;
  color: var(--accent);
  flex-shrink: 0;
}
.form-success.hidden { display: none; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 1000px) {
  .scenario-layout { grid-template-columns: 1fr; }
  .scenario-player-col { border-right: none; border-bottom: 1px solid var(--border); }
  .transcript-body { max-height: 360px; }
  .demo-cta-inner { grid-template-columns: 1fr; gap: 48px; }
  .demo-cta-form-wrap { max-width: 500px; }
}

@media (max-width: 768px) {
  .demo-hero, .demo-cta-section { padding-left: 24px; padding-right: 24px; }
  .demo-tabs-inner { padding: 0 24px; overflow-x: auto; }
  .demo-tab { margin-right: 16px; padding-left: 0; white-space: nowrap; }
  .demo-scenarios { padding: 0 24px; }
  .scenario-player-col { padding: 32px 24px; }
  .transcript-header, .transcript-body { padding-left: 24px; padding-right: 24px; }
  .demo-cta-inner { padding: 0; }
}

@media (max-width: 480px) {
  .demo-hero-headline { font-size: 36px; }
  .scenario-layout { border-left: none; border-right: none; }
  .demo-cta-form-wrap { padding: 24px 20px; }
}
