/* ============================================
   SCENE 3 — DEMO  ·  Interactive AI Demo
   VaaniBank AI — scene-demo.css
   ============================================ */

/* ─── Scene Shell ─────────────────────────────── */
#scene-demo {
  background: linear-gradient(135deg,
    #ffffff 0%,
    #eef2ff 20%,
    #dbe8ff 40%,
    #fff0f0 65%,
    #ffe4e4 80%,
    #f8f0ff 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  isolation: isolate;
}

/* Subtle grid overlay */
#scene-demo::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(27,43,107,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(27,43,107,0.045) 1px, transparent 1px);
  background-size: 52px 52px;
  pointer-events: none;
  z-index: 0;
}

/* Radial vignette — soft edge fade */
#scene-demo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 50%, transparent 30%, rgba(240,245,255,0.7) 100%);
  pointer-events: none;
  z-index: 0;
}

/* ─── Ambient orbs ─────────────────────────────── */
.demo-orbs {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.demo-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
}

/* Navy/blue orb — top left */
.demo-orb-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(27,43,107,0.28) 0%, rgba(59,90,200,0.12) 50%, transparent 70%);
  top: -180px; left: -100px;
  animation: dOrb1 16s ease-in-out infinite alternate;
}

/* Red orb — bottom right */
.demo-orb-2 {
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(232,57,42,0.22) 0%, rgba(255,100,80,0.1) 50%, transparent 70%);
  bottom: -80px; right: -60px;
  animation: dOrb2 13s ease-in-out infinite alternate;
}

/* White-blue orb — center */
.demo-orb-3 {
  width: 550px; height: 550px;
  background: radial-gradient(circle, rgba(197,209,245,0.55) 0%, rgba(220,230,255,0.2) 50%, transparent 70%);
  top: 20%; left: 30%;
  animation: dOrb1 18s ease-in-out 4s infinite alternate;
}

@keyframes dOrb1 {
  from { transform: translate(0,0) scale(1); }
  to   { transform: translate(30px,40px) scale(1.08); }
}
@keyframes dOrb2 {
  from { transform: translate(0,0) scale(1); }
  to   { transform: translate(-20px,-30px) scale(1.05); }
}

/* ─── Inner container ──────────────────────────── */
.demo-inner {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: var(--nav-h) clamp(16px,3vw,48px) 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(10px,1.8vh,20px);
  position: relative;
  z-index: 2;
}

/* ─── Header ───────────────────────────────────── */
.demo-header { text-align: center; }

.demo-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-sora);
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #16a34a;
  background: rgba(22,163,74,0.08);
  border: 1px solid rgba(22,163,74,0.2);
  padding: 5px 13px;
  border-radius: var(--radius-full);
  margin-bottom: 8px;
}

.eyebrow-dot {
  width: 5px; height: 5px;
  background: #16a34a;
  border-radius: 50%;
  animation: edPulse 1.6s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes edPulse {
  0%,100% { opacity:1; box-shadow:0 0 0 0 rgba(22,163,74,.5); }
  50%      { opacity:.6; box-shadow:0 0 0 5px rgba(22,163,74,0); }
}

.demo-title {
  font-family: var(--font-sora);
  font-weight: 800;
  font-size: clamp(1.5rem,2.6vw,2.2rem);
  color: var(--navy);
  line-height: 1.15;
  margin-bottom: 5px;
  letter-spacing: -0.02em;
}

.demo-title .accent-red { color: var(--red); }

.demo-subtitle {
  font-family: var(--font-dm);
  font-size: clamp(0.72rem,1vw,0.85rem);
  color: rgba(27,43,107,0.4);
  letter-spacing: 0.01em;
}

/* ════════════════════════════════════════════════
   STAGE  —  TRUE 3-column: Sidebar | Phone | Dashboard
   ════════════════════════════════════════════════ */
.demo-stage {
  display: grid;
  grid-template-columns: 280px 1fr minmax(0, 300px);
  gap: 20px;
  width: 100%;
  align-items: start;
}

/* ════════════════════════════════════════════════
   COL 1  —  Control Sidebar (Language + Scenario)
   ════════════════════════════════════════════════ */
.demo-sidebar {
  grid-column: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: auto;
  position: relative;
  z-index: 10;
}

.ctrl-card {
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(27,43,107,0.1);
  border-radius: 16px;
  padding: 14px;
  position: relative;
  overflow: visible;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(27,43,107,0.07);
  transition: border-color 0.3s, z-index 0.3s;
  z-index: 1;
}

.ctrl-card:hover { border-color: rgba(27,43,107,0.18); }

.ctrl-card:has(.custom-dropdown.open) {
  z-index: 25;
}

.ctrl-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(27,43,107,0.15), transparent);
  border-radius: 16px 16px 0 0;
}

.ctrl-label {
  font-family: var(--font-sora);
  font-size: 0.55rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(27,43,107,0.35);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.ctrl-label-dot {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--red);
  flex-shrink: 0;
}

/* ─── Language Options ─── */
/* ─── Custom Animated Dropdowns ─── */
.custom-dropdown {
  position: relative;
  width: 100%;
}

.dropdown-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(27, 43, 107, 0.12);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s var(--ease-spring);
  user-select: none;
}

.dropdown-trigger:hover, .dropdown-trigger:focus {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(232, 57, 42, 0.3);
  box-shadow: 0 6px 20px rgba(27, 43, 107, 0.06);
  outline: none;
}

.custom-dropdown.open .dropdown-trigger {
  background: rgba(255, 255, 255, 0.95);
  border-color: var(--red);
  box-shadow: 0 6px 24px rgba(232, 57, 42, 0.12);
}

.trigger-content {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.dropdown-trigger .lang-name {
  color: var(--navy);
  font-weight: 600;
}

.dropdown-trigger .lang-script {
  color: rgba(27, 43, 107, 0.55);
}

.dropdown-trigger .sc-title {
  color: var(--navy);
  font-weight: 700;
}

.dropdown-trigger .sc-badge {
  color: rgba(27, 43, 107, 0.5);
}

.dropdown-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(27, 43, 107, 0.5);
  margin-left: 8px;
  transition: transform 0.3s var(--ease-spring), color 0.3s;
}

.dropdown-arrow svg {
  width: 14px;
  height: 14px;
  stroke-width: 3;
}

.custom-dropdown.open .dropdown-arrow {
  transform: rotate(180deg);
  color: var(--red);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(27, 43, 107, 0.15);
  border-radius: 14px;
  box-shadow: 
    0 12px 36px rgba(27, 43, 107, 0.15),
    0 2px 6px rgba(27, 43, 107, 0.04);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px) scale(0.97);
  transform-origin: top center;
  transition: all 0.3s var(--ease-spring);
  overflow: hidden;
}

.custom-dropdown.open .dropdown-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.dropdown-menu-inner {
  max-height: 240px;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Custom Scrollbar for Dropdown Menu */
.dropdown-menu-inner::-webkit-scrollbar {
  width: 5px;
}
.dropdown-menu-inner::-webkit-scrollbar-track {
  background: transparent;
}
.dropdown-menu-inner::-webkit-scrollbar-thumb {
  background: rgba(27, 43, 107, 0.15);
  border-radius: 10px;
}
.dropdown-menu-inner::-webkit-scrollbar-thumb:hover {
  background: rgba(27, 43, 107, 0.3);
}

/* Option Base inside Menu */
.dropdown-menu-inner .lang-option,
.dropdown-menu-inner .scenario-option {
  width: 100%;
  padding: 8px 12px;
  border-radius: 10px;
  display: flex !important;
  align-items: center;
  gap: 10px;
  border-color: transparent;
  flex-shrink: 0 !important;
  box-shadow: none !important;
  transform: translateY(8px);
  
  /* Stagger Animations */
  opacity: 0;
  transition: 
    opacity 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), 
    transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), 
    background 0.2s, 
    border-color 0.2s;
  transition-delay: 0ms;
}

/* Creative open staggered delay reveal */
.custom-dropdown.open .dropdown-menu-inner .lang-option,
.custom-dropdown.open .dropdown-menu-inner .scenario-option {
  opacity: 1;
  transform: translateY(0) !important;
  transition-delay: calc(var(--i) * 20ms);
}

/* Option Hover Effect */
.dropdown-menu-inner .lang-option:hover:not(.active),
.dropdown-menu-inner .scenario-option:hover:not(.active) {
  background: rgba(27, 43, 107, 0.05) !important;
  border-color: rgba(27, 43, 107, 0.08) !important;
  transform: translateX(4px) !important;
}

/* Option Active Effect */
.dropdown-menu-inner .lang-option.active,
.dropdown-menu-inner .scenario-option.active {
  background: linear-gradient(135deg, rgba(27, 43, 107, 0.1), rgba(43, 63, 143, 0.06)) !important;
  border-color: rgba(27, 43, 107, 0.15) !important;
  transform: translateX(4px) !important;
}

/* Custom left active indicators */
.dropdown-menu-inner .lang-option.active::after,
.dropdown-menu-inner .scenario-option.active::after {
  content: '';
  position: absolute;
  left: 2px; top: 25%; bottom: 25%;
  width: 3px;
  background: var(--navy);
  border-radius: 0 3px 3px 0;
}

.dropdown-menu-inner .scenario-option.active::after {
  background: var(--red);
}


.lang-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 11px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  transition: all 0.22s var(--ease-spring);
  font-family: var(--font-dm);
  width: 100%;
  text-align: left;
  position: relative;
  overflow: hidden;
}

.lang-option:hover:not(.active) {
  background: rgba(27,43,107,0.05);
  border-color: rgba(27,43,107,0.1);
  transform: translateX(3px);
}

.lang-option.active {
  background: linear-gradient(135deg, rgba(27,43,107,0.12), rgba(43,63,143,0.08));
  border-color: rgba(27,43,107,0.2);
  box-shadow: 0 4px 16px rgba(27,43,107,0.1);
  transform: translateX(3px);
}

.lang-flag {
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(27,43,107,0.06);
  border-radius: 7px;
  font-family: var(--font-sora);
  font-weight: 800;
  font-size: 0.65rem;
  color: var(--navy);
  letter-spacing: 0.02em;
  flex-shrink: 0;
  border: 1px solid rgba(27,43,107,0.08);
  transition: all 0.22s;
}

.lang-option.active .lang-flag {
  background: rgba(27,43,107,0.12);
  border-color: rgba(27,43,107,0.2);
}

.lang-meta { display: flex; flex-direction: column; gap: 1px; }

.lang-name {
  font-size: 0.73rem;
  font-weight: 600;
  color: rgba(27,43,107,0.5);
  transition: color 0.22s;
  line-height: 1.2;
}

.lang-script {
  font-size: 0.58rem;
  color: rgba(27,43,107,0.3);
  transition: color 0.22s;
}

.lang-option.active .lang-name   { color: var(--navy); }
.lang-option.active .lang-script { color: rgba(27,43,107,0.55); }

.lang-option.active::after {
  content: '';
  position: absolute;
  left: 0; top: 25%; bottom: 25%;
  width: 2px;
  background: linear-gradient(to bottom, var(--navy-light), var(--navy));
  border-radius: 0 2px 2px 0;
}

/* Scenario selector layout replaced by dropdown styles */

.scenario-option {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border-radius: 11px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  transition: all 0.22s var(--ease-spring);
  font-family: var(--font-dm);
  width: 100%;
  text-align: left;
  position: relative;
  overflow: hidden;
}

.scenario-option:hover:not(.active) {
  background: rgba(232,57,42,0.04);
  border-color: rgba(232,57,42,0.1);
  transform: translateX(3px);
}

.scenario-option.active {
  background: rgba(232,57,42,0.08);
  border-color: rgba(232,57,42,0.25);
  box-shadow: 0 4px 16px rgba(232,57,42,0.1);
  transform: translateX(3px);
}

.sc-icon-wrap {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(27,43,107,0.06);
  border-radius: 8px;
  font-size: 0.9rem;
  flex-shrink: 0;
  transition: all 0.22s;
}
.sc-icon-wrap svg {
  width: 14px;
  height: 14px;
  color: rgba(27, 43, 107, 0.6);
  transition: color 0.22s;
}

.scenario-option.active .sc-icon-wrap {
  background: rgba(232,57,42,0.12);
}
.scenario-option.active .sc-icon-wrap svg {
  color: var(--red);
}

.sc-info { display: flex; flex-direction: column; gap: 1px; }

.sc-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(27,43,107,0.5);
  transition: color 0.22s;
  line-height: 1.2;
}

.sc-badge {
  font-size: 0.54rem;
  color: rgba(27,43,107,0.3);
  font-weight: 500;
  transition: color 0.22s;
}

.scenario-option.active .sc-title { color: var(--red); }
.scenario-option.active .sc-badge { color: rgba(232,57,42,0.5); }

/* ════════════════════════════════════════════════
   CENTER  —  Phone Mockup (unchanged dark phone)
   ════════════════════════════════════════════════ */
.demo-phone-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.phone-ground-glow {
  width: 220px; height: 16px;
  background: radial-gradient(ellipse, rgba(27,43,107,0.3) 0%, transparent 70%);
  position: absolute;
  bottom: -14px;
  left: 50%; transform: translateX(-50%);
  filter: blur(8px);
  z-index: 0;
}

.demo-phone {
  width: 262px;
  height: clamp(440px,52vh,530px);
  background: #0A0E1A;
  border-radius: 46px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.06),
    0 0 0 9px #0D1020,
    0 0 0 12px rgba(255,255,255,0.04),
    0 40px 100px rgba(0,0,0,0.25),
    0 0 60px rgba(27,43,107,0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  z-index: 2;
}

.demo-phone::before {
  content: '';
  position: absolute;
  right: -4px; top: 110px;
  width: 3px; height: 58px;
  background: #1a1f35;
  border-radius: 0 2px 2px 0;
  box-shadow: 0 75px 0 #1a1f35;
}

.demo-phone::after {
  content: '';
  position: absolute;
  left: -4px; top: 95px;
  width: 3px; height: 32px;
  background: #1a1f35;
  border-radius: 2px 0 0 2px;
  box-shadow: 0 46px 0 #1a1f35, 0 84px 0 #1a1f35;
}

.demo-notch {
  width: 112px; height: 24px;
  background: #000;
  border-radius: 0 0 16px 16px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 22px;
  gap: 5px;
  position: relative;
  z-index: 4;
  flex-shrink: 0;
}

.demo-notch::before {
  content: '';
  width: 8px; height: 8px;
  background: rgba(255,255,255,0.06);
  border-radius: 50%;
}

.demo-notch::after {
  content: '';
  width: 5px; height: 5px;
  background: rgba(74,222,128,0.6);
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(74,222,128,0.4);
}

.demo-statusbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px 4px;
  padding-top: 4px;
  font-family: var(--font-dm);
  font-size: 0.56rem;
  font-weight: 700;
  color: rgba(255,255,255,0.35);
  background: #000;
  flex-shrink: 0;
}

.demo-app-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 12px;
  background: linear-gradient(160deg, #0D1535 0%, #111D4E 100%);
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.app-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--red);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-sora);
  font-weight: 800;
  font-size: 0.72rem;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.12), 0 4px 12px rgba(232,57,42,0.4);
}

.app-info { flex: 1; min-width: 0; }

.app-name {
  font-family: var(--font-sora);
  font-weight: 700;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.92);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-status {
  font-family: var(--font-dm);
  font-size: 0.56rem;
  color: rgba(255,255,255,0.3);
  margin-top: 1px;
  transition: color 0.3s;
}
.app-status.s-online     { color: #4ade80; }
.app-status.s-listening  { color: #fbbf24; }
.app-status.s-processing { color: #60a5fa; }

.app-lang-chip {
  font-family: var(--font-dm);
  font-weight: 700;
  font-size: 0.54rem;
  color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 3px 9px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
  transition: all 0.25s;
  letter-spacing: 0.04em;
}

.demo-chat {
  flex: 1;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  overflow-y: auto;
  background: #06090F;
  scrollbar-width: none;
}
.demo-chat::-webkit-scrollbar { display: none; }

.chat-welcome-card {
  background: linear-gradient(135deg, rgba(27,43,107,0.6) 0%, rgba(17,29,78,0.8) 100%);
  border: 1px solid rgba(197,209,245,0.1);
  border-radius: 14px 14px 14px 4px;
  padding: 12px 14px;
  animation: bubIn 0.4s var(--ease-spring);
}

.cwc-icon { font-size: 1.3rem; margin-bottom: 3px; }
.cwc-title {
  font-family: var(--font-sora);
  font-size: 0.7rem;
  font-weight: 700;
  color: rgba(255,255,255,0.85);
  margin-bottom: 3px;
}
.cwc-sub {
  font-family: var(--font-dm);
  font-size: 0.58rem;
  color: rgba(255,255,255,0.32);
  line-height: 1.45;
}

.chat-bubble {
  padding: 9px 12px;
  border-radius: 14px;
  font-family: var(--font-dm);
  font-size: 0.76rem;
  line-height: 1.5;
  max-width: 88%;
  animation: bubIn 0.35s var(--ease-spring);
  word-break: break-word;
}

.chat-bubble.original {
  background: linear-gradient(135deg, #1B2B6B 0%, #2A3F8F 100%);
  color: rgba(255,255,255,0.88);
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 16px rgba(27,43,107,0.4);
}

.chat-bubble.translated {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.82);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  backdrop-filter: blur(8px);
}

.translate-tag {
  font-size: 0.52rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #4ade80;
  margin-bottom: 3px;
}

.bubble-meta {
  font-size: 0.5rem;
  color: rgba(255,255,255,0.2);
  margin-top: 4px;
  font-family: var(--font-dm);
}

@keyframes bubIn {
  from { transform: translateY(10px) scale(0.93); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}

.typing-indicator {
  display: none;
  align-items: center;
  gap: 4px;
  padding: 9px 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px 12px 12px 4px;
  align-self: flex-start;
  width: fit-content;
}
.typing-indicator.visible { display: flex; }

.typing-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  animation: tdBounce 1.2s ease-in-out infinite;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes tdBounce {
  0%,100% { transform: translateY(0); opacity: .3; }
  50%      { transform: translateY(-5px); opacity: .9; }
}

.demo-voice-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  padding: 9px 16px 14px;
  background: #06090F;
  border-top: 1px solid rgba(255,255,255,0.04);
  flex-shrink: 0;
}

.voice-waves {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 20px;
}

.voice-waves span {
  display: block;
  width: 3px; height: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
  transition: all 0.25s var(--ease-spring);
}

.voice-waves.active span { background: var(--red); }
.voice-waves.active span:nth-child(1) { animation: vw .7s 0.00s ease-in-out infinite alternate; }
.voice-waves.active span:nth-child(2) { animation: vw .7s 0.08s ease-in-out infinite alternate; }
.voice-waves.active span:nth-child(3) { animation: vw .7s 0.18s ease-in-out infinite alternate; }
.voice-waves.active span:nth-child(4) { animation: vw .7s 0.10s ease-in-out infinite alternate; }
.voice-waves.active span:nth-child(5) { animation: vw .7s 0.04s ease-in-out infinite alternate; }
.voice-waves.active span:nth-child(6) { animation: vw .7s 0.14s ease-in-out infinite alternate; }

@keyframes vw {
  from { height: 4px; opacity: .5; }
  to   { height: 18px; opacity: 1; }
}

.voice-bar-label {
  font-family: var(--font-dm);
  font-size: 0.56rem;
  color: rgba(255,255,255,0.15);
  transition: color 0.3s;
}
.demo-voice-bar.listening .voice-bar-label { color: rgba(232,57,42,0.7); }

/* ════════════════════════════════════════════════
   RIGHT  —  AI Intelligence Dashboard
   (kept dark for contrast against white bg)
   ════════════════════════════════════════════════ */
.demo-dashboard {
  grid-column: 3;
  background: rgba(13,16,32,0.95);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 22px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: auto;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  align-self: start;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.04) inset,
    0 32px 80px rgba(27,43,107,0.18),
    0 0 40px rgba(27,43,107,0.1);
}

.demo-dashboard::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(197,209,245,0.3), transparent);
}

.dash-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.dash-title {
  font-family: var(--font-sora);
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(255,255,255,0.8);
  letter-spacing: 0.01em;
}

.dash-live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-sora);
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #4ade80;
  background: rgba(74,222,128,0.08);
  border: 1px solid rgba(74,222,128,0.18);
  padding: 3px 9px;
  border-radius: var(--radius-full);
}

.dash-live-dot {
  width: 5px; height: 5px;
  background: #4ade80;
  border-radius: 50%;
  animation: edPulse 1.6s ease-in-out infinite;
}

.dash-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  flex-shrink: 0;
  min-width: 0;
}

.metric-tile {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  padding: 12px 14px;
  text-align: left;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  min-width: 0;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.metric-tile:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.metric-tile::before {
  content: '';
  position: absolute;
  top: 0; left: 10px; right: 10px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  border-radius: 0 0 999px 999px;
}

.metric-val {
  font-family: var(--font-sora);
  font-size: clamp(0.95rem, 1.4vw, 1.15rem);
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.1;
  transition: color 0.3s;
}

.metric-val.val-flash {
  color: #fbbf24;
  animation: valPop 0.45s var(--ease-spring);
}
@keyframes valPop {
  0%  { transform: scale(0.85); }
  55% { transform: scale(1.14); }
  100%{ transform: scale(1); }
}

.metric-lbl {
  font-family: var(--font-dm);
  font-size: 0.56rem;
  color: rgba(255, 255, 255, 0.35);
  margin-top: 5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.3;
  text-align: left;
}



.demo-run-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 10px;
  border-radius: 12px;
  background: var(--red);
  color: #fff;
  font-family: var(--font-sora);
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  border: none;
  letter-spacing: 0.03em;
  box-shadow: 0 8px 28px rgba(232,57,42,0.4), inset 0 1px 0 rgba(255,255,255,0.15);
  transition: all 0.25s var(--ease-spring);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.demo-run-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
  opacity: 0;
  transition: opacity 0.2s;
}

.demo-run-btn:hover:not(:disabled)::before { opacity: 1; }
.demo-run-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 14px 40px rgba(232,57,42,0.5), inset 0 1px 0 rgba(255,255,255,0.15);
}
.demo-run-btn:active:not(:disabled) {
  transform: translateY(0) scale(0.97);
  box-shadow: 0 4px 12px rgba(232,57,42,0.3);
}
.demo-run-btn.running,
.demo-run-btn:disabled {
  background: rgba(255,255,255,0.06);
  box-shadow: none;
  cursor: not-allowed;
  color: rgba(255,255,255,0.2);
}

.btn-icon-spin { display: inline-block; transition: transform 0.3s; }
.demo-run-btn:hover:not(:disabled) .btn-icon-spin { transform: translateX(3px); }
.demo-run-btn.running .btn-icon-spin { animation: spinIcon 1.2s linear infinite; }

@keyframes spinIcon {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ════════════════════════════════════════════════
   COL 2  —  Center Phone Column
   ════════════════════════════════════════════════ */
.demo-center-col {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.demo-panel-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: rgba(27,43,107,0.5);
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-sora);
}

.panel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.customer-dot {
  background: var(--red);
}

/* ─── Fallback Row ─── */
.demo-fallback-row {
  display: flex;
  width: 100%;
  box-sizing: border-box;
}

/* ─── Actions Group (Multi-row button layout) ─── */
.demo-actions-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  flex-shrink: 0;
  box-sizing: border-box;
}

.actions-row-top {
  display: flex;
  gap: 10px;
  width: 100%;
}

.actions-row-top .demo-run-btn,
.actions-row-top .demo-mic-btn {
  flex: 1;
  min-width: 0;
}

.demo-dashboard .demo-pdf-btn {
  width: 100%;
  box-sizing: border-box;
}

/* ─── Premium iOS-Style Custom Toggle Switch ─── */
.premium-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.25s ease;
  user-select: none;
  box-sizing: border-box;
}

.premium-switch:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
}

.switch-label-text {
  font-family: var(--font-dm);
  font-size: 0.72rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  letter-spacing: 0.02em;
}

.switch-control-wrap {
  position: relative;
  width: 38px;
  height: 20px;
  flex-shrink: 0;
}

.switch-checkbox {
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
  position: absolute;
}

.switch-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.15);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 20px;
}

.switch-slider::before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: #ffffff;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.switch-checkbox:checked + .switch-slider {
  background-color: var(--red);
  box-shadow: 0 0 10px rgba(232, 57, 42, 0.45);
}

.switch-checkbox:checked + .switch-slider::before {
  transform: translateX(18px);
}

/* ─── Mic & PDF Buttons ─── */
.demo-mic-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 10px;
  border-radius: 12px;
  background: #16a34a;
  color: #fff;
  font-family: var(--font-sora);
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  border: none;
  letter-spacing: 0.03em;
  box-shadow: 0 8px 28px rgba(22, 163, 74, 0.4), inset 0 1px 0 rgba(255,255,255,0.15);
  transition: all 0.25s var(--ease-spring);
  position: relative;
  overflow: hidden;
}

.demo-mic-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
  opacity: 0;
  transition: opacity 0.2s;
}

.demo-mic-btn:hover:not(:disabled)::before {
  opacity: 1;
}

.demo-mic-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 14px 40px rgba(22, 163, 74, 0.5), inset 0 1px 0 rgba(255,255,255,0.15);
}

.demo-mic-btn:active:not(:disabled) {
  transform: translateY(0) scale(0.97);
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
}

.demo-mic-btn.mic-recording {
  background: #dc2626;
  box-shadow: 0 8px 28px rgba(220, 38, 38, 0.4);
  animation: micPulse 1s ease-in-out infinite;
}

.demo-mic-btn.mic-recording:hover {
  box-shadow: 0 14px 40px rgba(220, 38, 38, 0.5);
}

@keyframes micPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220,38,38,0.4); }
  50%       { box-shadow: 0 0 0 8px rgba(220,38,38,0); }
}

.demo-pdf-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 10px;
  border-radius: 12px;
  background: var(--navy);
  color: #fff;
  font-family: var(--font-sora);
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  border: none;
  letter-spacing: 0.03em;
  box-shadow: 0 8px 28px rgba(27, 43, 107, 0.25), inset 0 1px 0 rgba(255,255,255,0.15);
  transition: all 0.25s var(--ease-spring);
  position: relative;
  overflow: hidden;
}

.demo-pdf-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
  opacity: 0;
  transition: opacity 0.2s;
}

.demo-pdf-btn:hover:not(:disabled)::before {
  opacity: 1;
}

.demo-pdf-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 14px 40px rgba(27, 43, 107, 0.35), inset 0 1px 0 rgba(255,255,255,0.15);
}

.demo-pdf-btn:active:not(:disabled) {
  transform: translateY(0) scale(0.97);
  box-shadow: 0 4px 12px rgba(27, 43, 107, 0.2);
}

/* ════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════ */
@media (max-width: 1100px) {
  .demo-stage {
    grid-template-columns: 240px 1fr minmax(0, 260px);
    gap: 14px;
  }
}

@media (max-width: 900px) {
  .demo-stage {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 14px;
  }
  .demo-sidebar {
    grid-column: 1 / -1;
    flex-direction: row;
    gap: 10px;
    z-index: 15;
  }
  .ctrl-card { flex: 1; }
  .dropdown-trigger .lang-script,
  .dropdown-trigger .sc-badge {
    display: none;
  }
  .demo-center-col {
    grid-column: 1;
  }
  .demo-dashboard {
    grid-column: 2;
    height: auto;
  }
  .demo-phone { height: 420px; }
}

@media (max-width: 640px) {
  .demo-stage {
    grid-template-columns: 1fr;
  }
  .demo-sidebar { flex-direction: column; }
  .ctrl-card { flex: none; }
  .demo-center-col { grid-column: 1; }
  .demo-dashboard { grid-column: 1; }
  .demo-phone { height: 340px; }
  .demo-stage { padding: 0 8px; }
  .demo-title { font-size: 1.3rem; }
  .ctrl-card { padding: 10px; }
}

@media (max-width: 480px) {
  .demo-phone { height: 300px; }
}
