﻿/* Ramp-style auto product demo */
.ramp-showcase {
  position: relative;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
}

.showcase-glow {
  position: absolute;
  inset: -20% -10%;
  background: radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.35), transparent 60%);
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
  animation: glowPulse 4s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

.showcase-live {
  position: absolute;
  top: -12px;
  right: 20px;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(220, 38, 38, 0.9);
  border-radius: 999px;
  box-shadow: 0 4px 20px rgba(220, 38, 38, 0.4);
}

.showcase-live::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  animation: liveBlink 1.2s ease-in-out infinite;
}

@keyframes liveBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.ramp-showcase .mockup-card {
  position: relative;
  z-index: 1;
  min-height: 340px;
  display: flex;
  flex-direction: column;
}

.mockup-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.4);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.mockup-url {
  flex: 1;
  margin-left: 8px;
  padding: 6px 12px;
  font-size: 0.72rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.showcase-viewport {
  position: relative;
  flex: 1;
  min-height: 260px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(12, 12, 18, 0.5) 0%, rgba(8, 8, 12, 0.8) 100%);
}

.showcase-viewport::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(16, 185, 129, 0.03) 50%,
    transparent 100%
  );
  background-size: 100% 200%;
  animation: videoScan 6s linear infinite;
  pointer-events: none;
  z-index: 5;
  opacity: 0.5;
}

@keyframes videoScan {
  0% { background-position: 0 -100%; }
  100% { background-position: 0 100%; }
}

.showcase-cursor {
  position: absolute;
  width: 18px;
  height: 18px;
  z-index: 20;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s, left 0.8s cubic-bezier(0.22, 1, 0.36, 1), top 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.showcase-cursor.visible { opacity: 1; }

.showcase-cursor svg { width: 100%; height: 100%; }

.showcase-slide {
  position: absolute;
  inset: 0;
  padding: 20px;
  opacity: 0;
  transform: scale(0.96) translateY(8px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.showcase-slide.active {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}

.showcase-footer {
  padding: 14px 18px;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
}

.showcase-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.showcase-tab {
  padding: 6px 12px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.25s, background 0.25s, border-color 0.25s;
  font-family: var(--font);
}

.showcase-tab:hover { color: var(--text); }

.showcase-tab.active {
  color: var(--violet-bright);
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.35);
}

.showcase-progress {
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.showcase-progress-bar {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--violet), var(--gold));
  border-radius: inherit;
  transition: width 0.1s linear;
}

/* Scene: Dashboard */
.demo-dash-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.demo-dash-stat {
  padding: 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}

.demo-dash-stat label {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.demo-dash-stat strong {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold);
}

.demo-bars {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 100px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.15);
}

.demo-bars span {
  flex: 1;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, var(--violet-bright), var(--violet));
  transform: scaleY(0);
  transform-origin: bottom;
}

.showcase-slide.active .demo-bars span:nth-child(1) { animation: barPop 0.6s 0.2s forwards; height: 45%; }
.showcase-slide.active .demo-bars span:nth-child(2) { animation: barPop 0.6s 0.35s forwards; height: 72%; }
.showcase-slide.active .demo-bars span:nth-child(3) { animation: barPop 0.6s 0.5s forwards; height: 55%; }
.showcase-slide.active .demo-bars span:nth-child(4) { animation: barPop 0.6s 0.65s forwards; height: 88%; }
.showcase-slide.active .demo-bars span:nth-child(5) { animation: barPop 0.6s 0.8s forwards; height: 60%; }
.showcase-slide.active .demo-bars span:nth-child(6) { animation: barPop 0.6s 0.95s forwards; height: 78%; }

@keyframes barPop {
  to { transform: scaleY(1); }
}

/* Scene: Chat */
.demo-chat { display: flex; flex-direction: column; gap: 12px; }

.demo-bubble {
  max-width: 88%;
  padding: 12px 14px;
  border-radius: 16px;
  font-size: 0.82rem;
  line-height: 1.45;
  opacity: 0;
  transform: translateY(10px);
}

.demo-bubble.user {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--violet), var(--violet-bright));
  color: #fff;
  border-bottom-right-radius: 4px;
}

.demo-bubble.bot {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
  color: var(--text-muted);
}

.demo-bubble.bot.answer { color: var(--text); }

.demo-pay {
  align-self: center;
  opacity: 0;
  transform: scale(0.9);
}

.demo-pay button {
  padding: 10px 20px;
  border: none;
  border-radius: 999px;
  background: var(--gradient-accent);
  color: #02110a;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: default;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.showcase-slide.active .demo-bubble.user { animation: demoIn 0.5s 0.3s forwards; }
.showcase-slide.active .demo-bubble.bot.tag { animation: demoIn 0.5s 0.9s forwards; }
.showcase-slide.active .demo-pay { animation: demoIn 0.5s 1.4s forwards; }
.showcase-slide.active .demo-bubble.bot.answer { animation: demoIn 0.5s 2.2s forwards; }

@keyframes demoIn {
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Scene: Shop */
.demo-shop {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.demo-product {
  padding: 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  text-align: center;
  opacity: 0;
  transform: translateY(16px);
}

.demo-product i {
  font-size: 2rem;
  color: var(--gold);
  display: block;
  margin-bottom: 8px;
}

.demo-product h4 { margin: 0 0 4px; font-size: 0.85rem; }
.demo-product .price { color: var(--gold); font-weight: 700; font-size: 0.9rem; }

.demo-cart-toast {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(45, 212, 191, 0.12);
  border: 1px solid rgba(45, 212, 191, 0.3);
  font-size: 0.8rem;
  opacity: 0;
  transform: translateY(10px);
}

.showcase-slide.active .demo-product:nth-child(1) { animation: demoIn 0.5s 0.2s forwards; }
.showcase-slide.active .demo-product:nth-child(2) { animation: demoIn 0.5s 0.5s forwards; }
.showcase-slide.active .demo-cart-toast { animation: demoIn 0.5s 1.2s forwards; }

/* Scene: Kundli */
.demo-form { display: flex; flex-direction: column; gap: 10px; }

.demo-field {
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.demo-field::after {
  content: attr(data-label);
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0.5;
}

.demo-field .fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.25), rgba(16, 185, 129, 0.05));
  border-right: 2px solid var(--violet-bright);
}

.showcase-slide.active .demo-field:nth-child(1) .fill { animation: fieldFill 1s 0.3s forwards; }
.showcase-slide.active .demo-field:nth-child(2) .fill { animation: fieldFill 1s 0.6s forwards; }
.showcase-slide.active .demo-field:nth-child(3) .fill { animation: fieldFill 1s 0.9s forwards; }
.showcase-slide.active .demo-field:nth-child(4) .fill { animation: fieldFill 1s 1.2s forwards; }

@keyframes fieldFill {
  to { width: 85%; }
}

.demo-submit {
  margin-top: 8px;
  padding: 12px;
  text-align: center;
  border-radius: 999px;
  background: var(--gradient-btn);
  color: #02110a;
  font-weight: 700;
  font-size: 0.85rem;
  opacity: 0;
  transform: scale(0.95);
}

.showcase-slide.active .demo-submit { animation: demoIn 0.5s 1.6s forwards; }

/* Full-width product film (Ramp tabs section) */
.ramp-film {
  padding: 80px 0 100px;
  background: linear-gradient(180deg, var(--bg) 0%, #020a07 50%, var(--bg) 100%);
  border-top: 1px solid var(--border);
  overflow: hidden;
}

.ramp-film-header {
  text-align: center;
  max-width: 560px;
  margin: 0 auto 48px;
  padding: 0 24px;
}

.ramp-film-header h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  margin: 0 0 12px;
}

.ramp-film-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
  padding: 0 24px;
}

.ramp-film-stage {
  max-width: 960px;
  margin: 0 auto;
}

.ramp-film-tab {
  padding: 10px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.3s;
  font-family: var(--font);
}

.ramp-film-tab.active {
  color: var(--text);
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.15);
}

.ramp-film-stage {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

.ramp-film-screen {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-hover);
  background: rgba(14, 14, 20, 0.9);
  box-shadow: 0 48px 96px rgba(0, 0, 0, 0.5), 0 0 80px rgba(16, 185, 129, 0.1);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  position: relative;
}

.ramp-film-screen .showcase-slide {
  padding: 32px 40px;
}

.ramp-film-screen .demo-bars { height: 140px; }
.ramp-film-screen .demo-chat { justify-content: center; min-height: 100%; }

@media (max-width: 992px) {
  .ramp-showcase { max-width: 100%; }
  .hero-mockup { animation: fadeUp 1s ease forwards 0.4s; }
  @keyframes floatCard {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
  }
}

@media (prefers-reduced-motion: reduce) {
  .showcase-slide,
  .showcase-viewport::before,
  .showcase-glow,
  .showcase-live::before {
    animation: none !important;
  }
  .showcase-slide { transition: opacity 0.3s; }
}
