/* ==========================================
   MIDNIGHT SAVANNAH THEME - Orbit Kenya
   ========================================== */

/* Base dark background */
html,
body {
  background-color: #0A0A0A !important;
}

/* Accent glow overlays */
body::before,
body::after {
  content: '';
  position: fixed;
  width: 60vw;
  height: 60vh;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

body::before {
  top: -20%;
  right: -15%;
  background: radial-gradient(circle, rgba(0, 68, 0, 0.10) 0%, transparent 70%);
}

body::after {
  bottom: -20%;
  left: -15%;
  background: radial-gradient(circle, rgba(68, 0, 0, 0.10) 0%, transparent 70%);
}

/* Glassmorphism card styles */
.glass-card {
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
}

/* ==========================================
   SCROLLBAR STYLES
   ========================================== */

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #0A0A0A;
}

::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

html {
  scroll-behavior: smooth;
}

.lb-container {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 24px;
  color: white;
  position: relative;
  overflow: hidden;
  min-height: 500px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all 0.5s ease;
}

.lb-container.is-patched {
  border-color: rgba(14, 165, 233, 0.4);
  box-shadow: 0 0 40px rgba(14, 165, 233, 0.1);
}

.lb-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: 40px;
  z-index: 10;
}

/* Toggle Styling */
.lb-toggle-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
}

.lb-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 24px;
}

.lb-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.lb-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.1);
  transition: .4s;
  border-radius: 34px;
}

.lb-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked+.lb-slider {
  background-color: #00A528;
}

input:checked+.lb-slider:before {
  transform: translateX(24px);
}

.lb-active-label {
  color: #f8fafc;
}

/* Visual Area */
.lb-visual-area {
  position: relative;
  width: 100%;
  max-width: 320px;
  height: 320px;
  display: flex;
  justify-content: center;
}

.lb-traffic-source {
  position: absolute;
  top: -20px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: #475569;
}

/* Funnel SVG Styling */
.funnel-svg {
  width: 200px;
  height: 250px;
  filter: drop-shadow(0 0 15px rgba(0, 0, 0, 0.5));
}

.funnel-path {
  fill: #1e293b;
  stroke: #334155;
  stroke-width: 1;
  transition: all 0.5s ease;
}

.is-patched .funnel-path {
  stroke: rgba(0, 165, 40, 0.5);
  fill: rgba(0, 68, 0, 0.8);
}

/* Leaks & Points */
.lb-leak-point {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  transition: all 0.5s ease;
  white-space: nowrap;
}

.leak-indicator {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}

/* Positioning Leaks */
.leak-1 {
  top: 40px;
  left: -10px;
}

.leak-2 {
  top: 100px;
  right: -10px;
  flex-direction: row-reverse;
}

.leak-3 {
  top: 160px;
  left: 20px;
}

/* Colors: Bad State */
.lb-leak-point.is-error {
  color: #f87171;
}

.lb-leak-point.is-error .leak-indicator {
  background: rgba(248, 113, 113, 0.2);
  border: 1px solid #f87171;
}

/* Colors: Fixed State */
.is-patched .lb-leak-point {
  color: #00A528;
}

.is-patched .leak-indicator {
  background: rgba(0, 165, 40, 0.2);
  border: 1px solid #00A528;
  content: '✓';
}

/* Particles */
.lb-particle {
  position: absolute;
  width: 6px;
  height: 6px;
  background: #00A528;
  border-radius: 50%;
  top: 10px;
  left: 50%;
  opacity: 0;
  filter: blur(1px);
  box-shadow: 0 0 10px #00A528;
}

/* Animations */
@keyframes leakPathLeft {
  0% {
    transform: translate(-50%, 0);
    opacity: 1;
  }

  30% {
    transform: translate(-80px, 40px);
    opacity: 1;
  }

  100% {
    transform: translate(-140px, 100px);
    opacity: 0;
  }
}

@keyframes leakPathRight {
  0% {
    transform: translate(-50%, 0);
    opacity: 1;
  }

  40% {
    transform: translate(70px, 80px);
    opacity: 1;
  }

  100% {
    transform: translate(120px, 150px);
    opacity: 0;
  }
}

@keyframes successPath {
  0% {
    transform: translate(-50%, 0);
    opacity: 1;
  }

  100% {
    transform: translate(-50%, 260px);
    opacity: 1;
  }
}

/* Particle assignments based on state */
.p-leak-l {
  animation: leakPathLeft 2.5s infinite linear;
}

.p-leak-r {
  animation: leakPathRight 2.2s infinite linear;
}

.p-success {
  animation: successPath 1.5s infinite cubic-bezier(0.45, 0.05, 0.55, 0.95);
}

/* Bucket Styling */
.lb-bucket {
  position: absolute;
  bottom: 0;
  width: 120px;
  height: 44px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  z-index: 5;
}

.lb-bucket-fill {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 20%;
  background: linear-gradient(to top, #00A528, #4ade80);
  transition: height 1s ease;
}

.is-patched .lb-bucket-fill {
  height: 100%;
}

.lb-bucket-text {
  font-size: 11px;
  font-weight: 800;
  color: #f8fafc;
  position: relative;
  z-index: 10;
}

@media (max-width: 640px) {
  .lb-visual-area {
    max-width: 260px;
    transform: scale(0.9);
  }

  .lb-leak-point {
    font-size: 10px;
  }
}

/* --- COMPLETE HERO & BENEFIT VISUALS --- */
.benefit-container {
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  perspective: 1000px;
}

.benefit-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 20px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.benefit-card:hover {
  transform: translateY(-10px) rotateX(5deg) rotateY(-5deg);
  border-color: rgba(0, 165, 40, 0.5);
  box-shadow: 0 20px 40px -10px rgba(0, 165, 40, 0.2);
}

/* Identity Card / Brand Standards */
.brand-spec-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(168, 85, 247, 0.1);
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid rgba(168, 85, 247, 0.2);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #a855f7;
  box-shadow: 0 0 8px #a855f7;
}

.status-text {
  font-size: 10px;
  font-weight: 700;
  color: #d8b4fe;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.brand-progress-bar {
  height: 8px;
  width: 100%;
  background: #1e293b;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 12px;
}

.brand-progress-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #00A528, #F9A800);
}

/* Performance Sparkline */
.sparkline {
  fill: none;
  stroke: #00A528;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: drawLine 3s ease-out forwards infinite;
}

@keyframes drawLine {
  to {
    stroke-dashoffset: 0;
  }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .benefit-container {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}


.container {
  position: relative;
}


#faq {
  scroll-margin-top: 5rem;
}


#services {
  position: relative;
  padding-top: 4rem;
}


main::before {
  content: '';
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 600px;
  background: radial-gradient(circle at center, rgba(0, 165, 40, 0.05) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}


@media (max-width: 640px) {
  .benefit-card {
    padding: 16px;
    min-height: 140px;
  }

  .benefit-container {
    gap: 1rem;
    padding-bottom: 2rem;
  }
}


.sparkline {
  stroke-width: 3;
}


@media (max-width: 640px) {
  #ai-demo form {
    flex-direction: column;
    gap: 12px;
    padding: 16px;
  }

  #ai-demo form input {
    width: 100%;
    /* Ensure textbox is fully visible */
    font-size: 16px;
    /* Prevents iOS auto-zoom on focus */
  }

  #ai-demo form button {
    width: 100%;
    /* Full width button for better thumb-reach */
    justify-content: center;
    padding: 12px;
  }

  #ai-demo .h-\[550px\] {
    height: 650px;
    /* Give more height on mobile for stacked elements */
  }
}

/* Orbit AI Mobile & Formatting Fixes */
#ai-demo .whitespace-pre-wrap {
  line-height: 1.6;
}

#ai-demo b,
#ai-demo strong {
  color: #00A528;
  /* Brand blue for bold text */
  font-weight: 700;
}

@media (max-width: 640px) {
  #ai-demo form {
    flex-direction: column;
    padding: 12px;
  }

  #ai-demo form input {
    width: 100% !important;
    font-size: 16px;
    /* Prevents zoom-in bug */
  }

  #ai-demo form button {
    width: 100%;
    padding: 12px;
    justify-content: center;
  }

  #ai-demo .h-\[550px\] {
    height: 600px;
  }
}

/* --- ORBIT AI MOBILE OPTIMIZATION --- */

/* Fix for the chat input form on mobile */
@media (max-width: 640px) {
  #orbitai form {
    flex-direction: column !important;
    /* Forces vertical stacking */
    gap: 12px !important;
    padding: 16px !important;
  }

  #orbitai form input {
    width: 100% !important;
    /* Full width text box */
    font-size: 16px !important;
    /* Prevents auto-zoom on mobile focus */
    margin: 0 !important;
  }

  #orbitai form button {
    width: 100% !important;
    /* Full width send button */
    justify-content: center !important;
    padding: 14px !important;
    margin: 0 !important;
  }

  /* Adjust chat height for mobile to fit stacked inputs */
  #orbitai .lg\:w-2\/3 {
    height: 600px !important;
  }
}

/* Ensure AI bolding/markdown looks clean */
#orbitai b,
#orbitai strong {
  color: #00A528;
  font-weight: 700;
}

.disclaimer-text {
  font-size: 10px;
  line-height: 1.5;
  color: #475569;
  letter-spacing: 0.05em;

  text-transform: uppercase;
}

/* Global Glassmorphism Panel */
.glass-panel {
  background: rgba(255, 255, 255, 0.03) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}