/* === DEMO SIMULATOR STYLES ===
   Owns: interactive scenario picker, phone call UI, transcript bubbles,
         what-happened breakdown, sticky CTA, trust strip.
   Does NOT own: site header/footer, strategy-form, theme variables. */

/* ===== SIMULATOR HERO ===== */
.sim-hero {
  padding: 140px 32px 64px;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}
.sim-hero-eyebrow {
  font-family: 'Syne', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 16px;
}
.sim-hero-headline {
  font-family: 'Syne', sans-serif;
  font-size: clamp(32px, 4.5vw, 60px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 20px;
}
.sim-hero-headline em {
  font-style: normal;
  background: linear-gradient(135deg, var(--accent-2), #60A5FA);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.sim-hero-sub {
  font-size: 18px;
  color: var(--text-2);
  max-width: 560px;
  margin: 0 auto;
}

/* ===== SCENARIO PICKER ===== */
.scenario-section {
  padding: 0 32px 64px;
  max-width: 1100px;
  margin: 0 auto;
}
.scenario-section-label {
  text-align: center;
  font-family: 'Syne', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 24px;
}
.scenario-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media (max-width: 900px) {
  .scenario-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .scenario-grid { grid-template-columns: 1fr; }
}
.scenario-card {
  background: var(--bg-2);
  border: 1.5px solid var(--border-dim);
  border-radius: 16px;
  padding: 24px 20px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
  text-align: left;
  position: relative;
  overflow: hidden;
}
.scenario-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.2s;
}
.scenario-card:hover {
  border-color: rgba(37, 99, 235, 0.5);
  background: var(--bg-3);
  transform: translateY(-2px);
}
.scenario-card.active {
  border-color: var(--accent-2);
  background: var(--bg-3);
}
.scenario-card.active::before { opacity: 1; }
.scenario-card-icon {
  font-size: 28px;
  margin-bottom: 10px;
  display: block;
}
.scenario-card-tag {
  font-family: 'Syne', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 10px;
  display: inline-block;
}
.tag-hvac    { background: rgba(16, 185, 129, 0.12); color: #10B981; }
.tag-roofing { background: rgba(245, 158, 11, 0.12); color: #F59E0B; }
.tag-plumbing { background: rgba(59, 130, 246, 0.12); color: #60A5FA; }
.tag-restoration { background: rgba(239, 68, 68, 0.12); color: #EF4444; }
.scenario-card-title {
  font-family: 'Syne', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.scenario-card-sub {
  font-size: 13px;
  color: var(--text-3);
  line-height: 1.5;
}
.scenario-card-time {
  margin-top: 12px;
  font-size: 11px;
  color: var(--text-3);
}
.scenario-card-time strong {
  color: var(--text-2);
}

/* ===== SIMULATOR STAGE ===== */
.simulator-stage {
  padding: 0 32px 80px;
  max-width: 1100px;
  margin: 0 auto;
  display: none;
}
.simulator-stage.visible { display: block; }

.sim-stage-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}
@media (max-width: 800px) {
  .sim-stage-inner { grid-template-columns: 1fr; }
}

/* --- Phone Call UI --- */
.phone-call-ui {
  position: sticky;
  top: 80px;
}
.phone-shell {
  background: linear-gradient(160deg, #1a2a4a 0%, #0f1e35 100%);
  border: 1.5px solid rgba(59, 130, 246, 0.3);
  border-radius: 28px;
  padding: 24px 20px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(59, 130, 246, 0.1);
  max-width: 340px;
  margin: 0 auto;
}
.phone-status-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.phone-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}
.phone-status-dot.ringing {
  background: #F59E0B;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.6);
  animation: blink 0.8s infinite;
}
.phone-status-dot.idle {
  background: var(--text-3);
  box-shadow: none;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}
.phone-status-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--green);
  font-family: 'Syne', sans-serif;
  letter-spacing: 0.05em;
}
.phone-status-label.ringing { color: #F59E0B; }
.phone-status-label.idle { color: var(--text-3); }
.phone-caller-name {
  font-family: 'Syne', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  text-align: center;
}
.phone-call-duration {
  font-size: 13px;
  color: var(--text-3);
  text-align: center;
  margin-bottom: 16px;
  font-variant-numeric: tabular-nums;
}

/* Audio wave animation */
.audio-wave {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  height: 40px;
  margin-bottom: 16px;
}
.audio-wave span {
  display: block;
  width: 4px;
  border-radius: 2px;
  background: var(--accent-2);
  animation: wave 1.2s ease-in-out infinite;
}
.audio-wave span:nth-child(1) { height: 8px;  animation-delay: 0s; }
.audio-wave span:nth-child(2) { height: 16px; animation-delay: 0.1s; }
.audio-wave span:nth-child(3) { height: 24px; animation-delay: 0.2s; }
.audio-wave span:nth-child(4) { height: 32px; animation-delay: 0.3s; }
.audio-wave span:nth-child(5) { height: 40px; animation-delay: 0.4s; }
.audio-wave span:nth-child(6) { height: 32px; animation-delay: 0.3s; }
.audio-wave span:nth-child(7) { height: 24px; animation-delay: 0.2s; }
.audio-wave span:nth-child(8) { height: 16px; animation-delay: 0.1s; }
.audio-wave span:nth-child(9) { height: 8px;  animation-delay: 0s; }
@keyframes wave {
  0%, 100% { transform: scaleY(0.3); opacity: 0.4; }
  50%       { transform: scaleY(1);   opacity: 1; }
}
.audio-wave.paused span { animation-play-state: paused; }

/* Call result widget */
.call-result-widget {
  margin-top: 16px;
  padding: 14px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 12px;
  display: none;
}
.call-result-widget.visible { display: block; }
.call-result-widget.handoff {
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.3);
}
.crw-icon {
  font-size: 20px;
  margin-bottom: 8px;
  display: block;
  text-align: center;
}
.crw-title {
  font-family: 'Syne', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--green);
  text-align: center;
  margin-bottom: 6px;
}
.call-result-widget.handoff .crw-title { color: var(--accent-2); }
.crw-body {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.5;
}
.crw-body p { margin-bottom: 3px; }

/* SMS preview */
.sms-preview {
  margin-top: 10px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
  border-left: 3px solid var(--accent-2);
}
.sms-label {
  font-size: 10px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}
.sms-body {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.5;
}

/* --- Transcript Bubbles --- */
.transcript-stream {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.bubble-wrap {
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.bubble-wrap.show { opacity: 1; transform: translateY(0); }
.bubble-wrap.caller { align-items: flex-start; }
.bubble-wrap.agent  { align-items: flex-end; }
.bubble-speaker {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
  margin-bottom: 4px;
  font-family: 'Syne', sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.bubble {
  max-width: 86%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.55;
}
.bubble-wrap.caller .bubble {
  background: var(--bg-3);
  border: 1px solid rgba(255,255,255,0.07);
  border-bottom-left-radius: 4px;
  color: var(--text-2);
}
.bubble-wrap.agent .bubble {
  background: rgba(37, 99, 235, 0.18);
  border: 1px solid rgba(37, 99, 235, 0.3);
  border-bottom-right-radius: 4px;
  color: var(--text);
}
.bubble-time {
  font-size: 10px;
  color: var(--text-3);
  margin-top: 4px;
}

/* Typing indicator */
.typing-indicator {
  align-items: flex-end;
  display: none;
}
.typing-indicator.show { display: flex; flex-direction: column; }
.typing-dots {
  display: flex;
  gap: 4px;
  padding: 12px 16px;
  background: rgba(37, 99, 235, 0.18);
  border: 1px solid rgba(37, 99, 235, 0.3);
  border-radius: 16px;
  border-bottom-right-radius: 4px;
  align-items: center;
}
.typing-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-2);
  animation: dot-pulse 1.2s infinite;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dot-pulse {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50%       { opacity: 1;   transform: scale(1.1); }
}

/* Replay button */
.replay-btn {
  display: none;
  margin-top: 16px;
  width: 100%;
  padding: 10px;
  background: transparent;
  border: 1px solid var(--border-dim);
  border-radius: 8px;
  color: var(--text-2);
  font-size: 13px;
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.replay-btn:hover { border-color: var(--accent-2); color: var(--accent-2); }
.replay-btn.show { display: block; }

/* ===== WHAT HAPPENED BREAKDOWN ===== */
.breakdown-section {
  padding: 0 32px 80px;
  max-width: 1100px;
  margin: 0 auto;
  display: none;
}
.breakdown-section.visible { display: block; }
.breakdown-inner {
  background: var(--bg-2);
  border: 1px solid var(--border-dim);
  border-radius: 20px;
  padding: 40px;
}
.breakdown-eyebrow {
  font-family: 'Syne', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 8px;
}
.breakdown-title {
  font-family: 'Syne', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 28px;
}
.breakdown-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.breakdown-step {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.3s, transform 0.3s;
}
.breakdown-step:last-child { border-bottom: none; }
.breakdown-step.show { opacity: 1; transform: translateX(0); }
.bs-time {
  font-size: 11px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
  min-width: 44px;
  padding-top: 2px;
}
.bs-icon {
  font-size: 18px;
  min-width: 24px;
  text-align: center;
}
.bs-text {
  flex: 1;
}
.bs-text strong {
  font-size: 14px;
  color: var(--text);
  display: block;
  margin-bottom: 2px;
}
.bs-text span {
  font-size: 13px;
  color: var(--text-3);
}

/* ===== STICKY CTA BAR ===== */
.sticky-cta-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: rgba(10, 22, 40, 0.97);
  backdrop-filter: blur(16px);
  border-top: 1px solid rgba(37, 99, 235, 0.25);
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.sticky-cta-bar.visible { transform: translateY(0); }
.sticky-cta-text {
  font-size: 14px;
  color: var(--text-2);
  font-weight: 500;
}
.sticky-cta-text strong { color: var(--text); }
.sticky-cta-btn {
  background: var(--accent);
  color: #fff;
  font-family: 'Syne', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 12px 28px;
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s, transform 0.1s;
  display: inline-block;
}
.sticky-cta-btn:hover { background: var(--accent-2); transform: scale(1.03); }
@media (max-width: 600px) {
  .sticky-cta-bar { flex-direction: column; padding: 12px 20px; }
  .sticky-cta-text { text-align: center; font-size: 13px; }
}

/* ===== TRUST STRIP ===== */
.trust-strip {
  padding: 40px 32px;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.05);
  margin-bottom: 80px;
}
.trust-strip p {
  font-size: 13px;
  color: var(--text-3);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.7;
}
.trust-strip strong { color: var(--text-2); }

/* ===== DEMO FINAL CTA ===== */
.demo-final-cta {
  padding: 80px 32px 120px;
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}
.dfc-eyebrow {
  font-family: 'Syne', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 16px;
}
.dfc-headline {
  font-family: 'Syne', sans-serif;
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 16px;
}
.dfc-sub {
  font-size: 16px;
  color: var(--text-2);
  margin-bottom: 32px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}
.dfc-btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-family: 'Syne', sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 16px 40px;
  border-radius: 10px;
  text-decoration: none;
  transition: background 0.2s, transform 0.1s;
}
.dfc-btn:hover { background: var(--accent-2); transform: translateY(-2px); }
.dfc-note {
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-3);
}
