/* ==========================================================================
   Paisan by RICHEMBER - Universal Interactive Platform Tour Modal
   ========================================================================== */

:root {
  --tour-accent: #e8531e;
  --tour-accent-hover: #ff6832;
  --tour-accent-glow: rgba(232, 83, 30, 0.35);
  --tour-bg: #0b0f17;
  --tour-card: #121824;
  --tour-card-border: rgba(255, 255, 255, 0.08);
  --tour-text: #f8fafc;
  --tour-text-muted: #94a3b8;
  --tour-text-dim: #64748b;
  --tour-font-serif: "Instrument Serif", Georgia, serif;
  --tour-font-sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --tour-font-mono: "JetBrains Mono", monospace;
}

/* Tour Overlay */
.paisan-tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(7, 10, 16, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.35s ease;
  overflow-y: auto;
}

.paisan-tour-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Tour Container Window */
.paisan-tour-modal {
  width: 100%;
  max-width: 1180px;
  background: var(--tour-bg);
  border: 1px solid var(--tour-card-border);
  border-radius: 20px;
  box-shadow: 0 25px 80px -15px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.05), 0 0 80px var(--tour-accent-glow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.96) translateY(12px);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--tour-text);
  font-family: var(--tour-font-sans);
  max-height: 90vh;
}

.paisan-tour-overlay.active .paisan-tour-modal {
  transform: scale(1) translateY(0);
}

/* Header */
.paisan-tour-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--tour-card-border);
  background: rgba(18, 24, 36, 0.7);
  flex-wrap: wrap;
  gap: 12px;
}

.tour-header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tour-brand-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--tour-font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--tour-accent);
  background: rgba(232, 83, 30, 0.12);
  border: 1px solid rgba(232, 83, 30, 0.25);
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.tour-brand-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--tour-accent);
  box-shadow: 0 0 8px var(--tour-accent);
  animation: tourPulse 2s infinite;
}

@keyframes tourPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

.tour-header-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--tour-text-muted);
}

.tour-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tour-step-counter {
  font-family: var(--tour-font-mono);
  font-size: 12px;
  color: var(--tour-text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.tour-close-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--tour-text-muted);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tour-close-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

/* Tabs Navigation Bar */
.paisan-tour-tabs {
  display: flex;
  background: rgba(14, 19, 29, 0.95);
  border-bottom: 1px solid var(--tour-card-border);
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0 16px;
}

.paisan-tour-tabs::-webkit-scrollbar {
  display: none;
}

.tour-tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--tour-text-dim);
  font-family: var(--tour-font-sans);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.tour-tab-btn:hover {
  color: var(--tour-text-muted);
}

.tour-tab-btn.active {
  color: #fff;
  border-bottom-color: var(--tour-accent);
}

.tour-tab-btn .tab-num {
  font-family: var(--tour-font-mono);
  font-size: 11px;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--tour-text-muted);
}

.tour-tab-btn.active .tab-num {
  background: var(--tour-accent);
  color: #fff;
  font-weight: 600;
}

/* Progress Bar */
.tour-progress-line {
  height: 3px;
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  position: relative;
}

.tour-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #e8531e, #ff8c42);
  width: 25%;
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 10px rgba(232, 83, 30, 0.5);
}

/* Main Content Stage */
.paisan-tour-body {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  flex: 1;
  min-height: 480px;
  overflow-y: auto;
}

@media (max-width: 900px) {
  .paisan-tour-body {
    grid-template-columns: 1fr;
  }
}

/* Left Narrative Column */
.tour-narrative {
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--tour-card-border);
  background: radial-gradient(circle at 10% 20%, rgba(232, 83, 30, 0.06), transparent 50%), var(--tour-bg);
}

.tour-category-badge {
  font-family: var(--tour-font-mono);
  font-size: 11px;
  color: var(--tour-accent);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tour-category-badge::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 1.5px;
  background: var(--tour-accent);
}

.tour-headline {
  font-family: var(--tour-font-serif);
  font-size: 34px;
  line-height: 1.15;
  font-weight: 400;
  letter-spacing: -0.5px;
  color: #fff;
  margin-bottom: 16px;
}

.tour-headline em {
  font-style: italic;
  color: var(--tour-accent);
}

.tour-description {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--tour-text-muted);
  margin-bottom: 24px;
}

/* Interactive Interactive Element inside Narrative */
.tour-feature-highlights {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tour-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 13.5px;
  color: var(--tour-text);
  line-height: 1.5;
}

.tour-feature-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(232, 83, 30, 0.15);
  border: 1px solid rgba(232, 83, 30, 0.3);
  color: var(--tour-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  margin-top: 2px;
}

.tour-feature-item strong {
  color: #fff;
}

/* Narrative Navigation Controls */
.tour-nav-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
  border-top: 1px solid var(--tour-card-border);
  gap: 12px;
}

.tour-btn-prev {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--tour-card-border);
  color: var(--tour-text-muted);
  font-family: var(--tour-font-sans);
  font-size: 13.5px;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tour-btn-prev:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.tour-btn-prev:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.tour-btn-next {
  background: var(--tour-accent);
  border: 1px solid var(--tour-accent);
  color: #fff;
  font-family: var(--tour-font-sans);
  font-size: 13.5px;
  font-weight: 600;
  padding: 10px 22px;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(232, 83, 30, 0.35);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.tour-btn-next:hover {
  background: var(--tour-accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(232, 83, 30, 0.45);
}

/* Right Stage Preview Column */
.tour-stage-preview {
  padding: 32px;
  background: #090d14;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.stage-card-window {
  width: 100%;
  border-radius: 14px;
  background: #111723;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  position: relative;
}

.stage-window-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: #161e2e;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.stage-window-dots {
  display: flex;
  gap: 6px;
}

.stage-window-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
}

.stage-window-dot.close { background: #ef4444; }
.stage-window-dot.min { background: #eab308; }
.stage-window-dot.max { background: #22c55e; }

.stage-window-url {
  font-family: var(--tour-font-mono);
  font-size: 11px;
  color: var(--tour-text-dim);
  background: rgba(0, 0, 0, 0.3);
  padding: 3px 12px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.stage-window-content {
  padding: 24px;
  min-height: 340px;
}

/* Station 1: Prompt & Agent Studio */
.studio-code-preview {
  background: #090c12;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 16px;
  font-family: var(--tour-font-mono);
  font-size: 12px;
  line-height: 1.6;
  color: #cbd5e1;
  position: relative;
  margin-bottom: 16px;
}

.studio-tag-accent { color: #f97316; font-weight: 600; }
.studio-tag-val { color: #38bdf8; }
.studio-tag-cmt { color: #64748b; font-style: italic; }

.studio-voice-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.studio-pill {
  font-size: 12px;
  font-family: var(--tour-font-mono);
  padding: 6px 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--tour-text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.studio-pill:hover, .studio-pill.active {
  background: rgba(232, 83, 30, 0.15);
  border-color: var(--tour-accent);
  color: #fff;
}

/* Station 2: Live Call Console */
.call-console-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.call-status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--tour-font-mono);
  font-size: 11.5px;
  color: #22c55e;
}

.call-wave-visualizer {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 32px;
  margin-bottom: 16px;
}

.wave-bar {
  width: 4px;
  background: var(--tour-accent);
  border-radius: 999px;
  animation: wavePulse 1s ease-in-out infinite alternate;
}

@keyframes wavePulse {
  0% { height: 6px; opacity: 0.3; }
  100% { height: 28px; opacity: 1; }
}

.wave-bar:nth-child(2) { animation-delay: 0.15s; }
.wave-bar:nth-child(3) { animation-delay: 0.3s; }
.wave-bar:nth-child(4) { animation-delay: 0.45s; }
.wave-bar:nth-child(5) { animation-delay: 0.6s; }
.wave-bar:nth-child(6) { animation-delay: 0.2s; }

.call-dialogue-feed {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13px;
}

.dialogue-bubble {
  padding: 10px 14px;
  border-radius: 10px;
  max-width: 90%;
  line-height: 1.45;
}

.dialogue-bubble.agent {
  background: rgba(232, 83, 30, 0.12);
  border: 1px solid rgba(232, 83, 30, 0.25);
  align-self: flex-start;
  color: #fff;
}

.dialogue-bubble.customer {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  align-self: flex-end;
  color: var(--tour-text);
}

.dialogue-speaker {
  font-family: var(--tour-font-mono);
  font-size: 10px;
  text-transform: uppercase;
  color: var(--tour-text-dim);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Station 3: Campaign & Dialing */
.campaign-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.c-stat-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 12px;
  text-align: center;
}

.c-stat-val {
  font-family: var(--tour-font-mono);
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 2px;
}

.c-stat-lbl {
  font-size: 10px;
  font-family: var(--tour-font-mono);
  color: var(--tour-text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.slider-container {
  background: #090c12;
  padding: 16px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.slider-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-family: var(--tour-font-mono);
  color: var(--tour-text-muted);
  margin-bottom: 8px;
}

.tour-range-slider {
  width: 100%;
  accent-color: var(--tour-accent);
  cursor: pointer;
}

/* Station 4: Cost Calculator & ROI */
.calc-card {
  background: #090c12;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 20px;
}

.calc-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 13.5px;
}

.calc-row:last-child {
  border-bottom: none;
  padding-top: 14px;
}

.calc-big-rate {
  font-family: var(--tour-font-serif);
  font-size: 32px;
  font-style: italic;
  color: var(--tour-accent);
}

.calc-savings-badge {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #4ade80;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--tour-font-mono);
  font-size: 11px;
  font-weight: 600;
}

/* Interactive Hotspot Pins */
.tour-hotspot-pin {
  position: absolute;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--tour-accent);
  border: 2px solid #fff;
  color: #fff;
  font-family: var(--tour-font-mono);
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 0 15px rgba(232, 83, 30, 0.8);
  animation: pinPulse 2s infinite;
  z-index: 10;
  transition: transform 0.2s ease;
}

.tour-hotspot-pin:hover {
  transform: scale(1.2);
}

@keyframes pinPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(232, 83, 30, 0.7); }
  50% { box-shadow: 0 0 0 8px rgba(232, 83, 30, 0); }
}

.tour-hotspot-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 11px;
  line-height: 1.4;
  padding: 6px 10px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: all 0.2s ease;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  z-index: 20;
}

.tour-hotspot-pin:hover .tour-hotspot-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Bottom Bar */
.paisan-tour-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: rgba(14, 19, 29, 0.8);
  border-top: 1px solid var(--tour-card-border);
  font-size: 12px;
  color: var(--tour-text-dim);
}

.tour-footer-shortcuts {
  display: flex;
  align-items: center;
  gap: 14px;
}

.tour-kbd {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--tour-font-mono);
  font-size: 10px;
  color: var(--tour-text-muted);
}

.tour-footer-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.tour-footer-link {
  color: var(--tour-accent);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
  cursor: pointer;
}

.tour-footer-link:hover {
  color: var(--tour-accent-hover);
  text-decoration: underline;
}

/* Floating Tour Preview Trigger Card on Homepage */
.platform-tour-preview-card {
  position: relative;
  cursor: pointer;
}

.platform-tour-preview-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(11, 15, 23, 0.88);
  border: 1px solid rgba(232, 83, 30, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 12px 24px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-family: var(--tour-font-sans);
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(232, 83, 30, 0.4);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.platform-tour-preview-card:hover .platform-tour-preview-badge {
  transform: translate(-50%, -50%) scale(1.06);
  border-color: var(--tour-accent);
  background: rgba(18, 24, 36, 0.96);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8), 0 0 35px rgba(232, 83, 30, 0.6);
}
