/* ==========================================================================
   SAFESTOPHELIX - HELIX VISUAL SYSTEM & ATMOSPHERIC UI
   Inspired by Orbix & Airy Editorial Aesthetics:
   Floating device mockups, ambient blur orbs, glass cards & animated data streams
   ========================================================================== */

/* --------------------------------------------------------------------------
   ATMOSPHERIC AMBIENT GLOW ORBS (Reference aesthetic)
   -------------------------------------------------------------------------- */
.ambient-glow-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.65;
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.ambient-orb-blue {
  background: radial-gradient(circle, rgba(56, 189, 248, 0.35) 0%, rgba(37, 99, 235, 0.15) 60%, transparent 80%);
}

.ambient-orb-warm {
  background: radial-gradient(circle, rgba(251, 191, 36, 0.2) 0%, rgba(245, 158, 11, 0.08) 60%, transparent 80%);
}

.ambient-orb-teal {
  background: radial-gradient(circle, rgba(45, 212, 191, 0.25) 0%, rgba(13, 148, 136, 0.1) 60%, transparent 80%);
}

.ambient-orb-indigo {
  background: radial-gradient(circle, rgba(99, 102, 241, 0.25) 0%, rgba(67, 56, 202, 0.1) 60%, transparent 80%);
}

/* --------------------------------------------------------------------------
   HERO INTERACTIVE VISUAL & FLOATING DEVICE MOCKUP
   -------------------------------------------------------------------------- */
.hero-visual-stage {
  position: relative;
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.device-frame-phone {
  width: 310px;
  height: 620px;
  background: #000000;
  border-radius: 48px;
  padding: 10px;
  box-shadow: 0 35px 80px -15px rgba(18, 20, 26, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.15);
  position: relative;
  z-index: 5;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.device-screen {
  width: 100%;
  height: 100%;
  background: #FAF9F5;
  border-radius: 40px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

.device-notch {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 22px;
  background: #000000;
  border-radius: 20px;
  z-index: 10;
}

/* Floating Glass Cards around Phone (Reference UI) */
.floating-glass-card {
  position: absolute;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 18px;
  padding: 0.9rem 1.25rem;
  box-shadow: 0 20px 40px -10px rgba(18, 20, 26, 0.12), 0 2px 6px rgba(0, 0, 0, 0.04);
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  animation: floatSlow 6s ease-in-out infinite;
}

.floating-glass-card.pos-left {
  top: 18%;
  left: -15%;
  animation-delay: 0s;
}

.floating-glass-card.pos-right {
  top: 32%;
  right: -15%;
  animation-delay: -2s;
}

.floating-glass-card.pos-bottom {
  bottom: 8%;
  left: -8%;
  animation-delay: -4s;
}

@keyframes floatSlow {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(0.5deg); }
}

/* --------------------------------------------------------------------------
   INTERACTIVE CANVAS FINANCIAL TWIN GRAPH
   -------------------------------------------------------------------------- */
.twin-graph-viewport {
  width: 100%;
  height: 480px;
  background: radial-gradient(circle at center, #FFFFFF 0%, #F5F3ED 100%);
  border-radius: 24px;
  border: 1px solid var(--border-light);
  position: relative;
  overflow: hidden;
}

.twin-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.twin-graph-overlay {
  position: absolute;
  bottom: 1.5rem;
  left: 1.5rem;
  right: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.twin-filter-pill-group {
  display: flex;
  gap: 0.4rem;
  pointer-events: auto;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  padding: 0.35rem;
  border-radius: 9999px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-subtle);
}

.twin-filter-btn {
  padding: 0.45rem 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.twin-filter-btn.active {
  background: var(--text-primary);
  color: #FFFFFF;
}

/* --------------------------------------------------------------------------
   DOCUMENT SCANNER SIMULATION
   -------------------------------------------------------------------------- */
.doc-dropzone {
  border: 2px dashed var(--border-medium);
  border-radius: 20px;
  padding: 3rem 2rem;
  text-align: center;
  background: var(--bg-card);
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.doc-dropzone.dragover, .doc-dropzone:hover {
  border-color: var(--helix-blue);
  background: var(--bg-secondary);
}

.scan-laser {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent 0%, #38BDF8 50%, transparent 100%);
  box-shadow: 0 0 15px #38BDF8;
  opacity: 0;
  pointer-events: none;
}

.scan-laser.scanning {
  opacity: 1;
  animation: laserSweep 2s ease-in-out infinite;
}

@keyframes laserSweep {
  0% { top: 0%; }
  50% { top: 100%; }
  100% { top: 0%; }
}

.entity-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: var(--font-mono);
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
}

/* --------------------------------------------------------------------------
   WHAT-IF SCENARIO COMPARISON PANEL
   -------------------------------------------------------------------------- */
.scenario-slider-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.scenario-range-input {
  -webkit-appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: var(--bg-secondary);
  outline: none;
}

.scenario-range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--helix-blue);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
  border: 2px solid #FFFFFF;
  transition: transform 0.15s ease;
}

.scenario-range-input::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* --------------------------------------------------------------------------
   FLOATING AI ASSISTANT CHAT DRAWER ('ASK HELIX')
   -------------------------------------------------------------------------- */
.ask-helix-trigger {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  z-index: 1500;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: var(--bg-dark);
  color: #FFFFFF;
  padding: 0.75rem 1.35rem;
  border-radius: 9999px;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  box-shadow: var(--shadow-float);
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.ask-helix-trigger:hover {
  background: #1E293B;
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.ask-helix-modal {
  position: fixed;
  bottom: 5.5rem;
  left: 2rem;
  width: 440px;
  max-width: calc(100vw - 4rem);
  max-height: 600px;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: 24px;
  box-shadow: var(--shadow-float);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 1500;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.96);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.ask-helix-modal.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.ai-chat-header {
  padding: 1.25rem 1.5rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ai-chat-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ai-msg {
  padding: 1rem 1.25rem;
  border-radius: 16px;
  font-size: 0.9375rem;
  line-height: 1.55;
}

.ai-msg.bot {
  background: var(--bg-secondary);
  color: var(--text-primary);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.ai-msg.user {
  background: var(--helix-blue);
  color: #FFFFFF;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.ai-chat-input-row {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  gap: 0.5rem;
  background: #FFFFFF;
}

.ai-prompt-chip {
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  font-size: 0.8125rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.ai-prompt-chip:hover {
  background: var(--helix-blue-subtle);
  color: var(--helix-blue);
  border-color: var(--helix-blue);
}

@media (max-width: 768px) {
  .floating-glass-card { display: none; }
  .device-frame-phone { width: 280px; height: 560px; }
  .ask-helix-modal { left: 1rem; right: 1rem; width: auto; max-width: none; bottom: 4.5rem; }
  .ask-helix-trigger { left: 1rem; bottom: 1rem; }
}
