/* ==========================================================================
   MsgHub Modern SaaS Landing Page Stylesheet
   Framework: Bootstrap 5.3.3 Extended
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design Tokens & Root Variables
   -------------------------------------------------------------------------- */
:root {
  --msghub-primary: #3b82f6;
  --msghub-primary-hover: #2563eb;
  --msghub-primary-light: rgba(59, 130, 246, 0.1);
  --msghub-secondary: #8b5cf6;
  --msghub-secondary-light: rgba(139, 92, 246, 0.1);
  --msghub-emerald: #10b981;
  --msghub-emerald-light: rgba(16, 185, 129, 0.1);
  --msghub-amber: #f59e0b;
  --msghub-dark: #0b0f19;
  --msghub-dark-card: #131b2e;
  --msghub-dark-border: rgba(255, 255, 255, 0.1);
  --msghub-gray-50: #f8fafc;
  --msghub-gray-100: #f1f5f9;
  --msghub-gray-200: #e2e8f0;
  --msghub-gray-600: #475569;
  --msghub-gray-900: #0f172a;
  
  --msghub-font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --msghub-font-mono: 'Fira Code', 'JetBrains Mono', monospace;
  
  --msghub-shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
  --msghub-shadow-md: 0 12px 32px rgba(15, 23, 42, 0.08);
  --msghub-shadow-lg: 0 24px 48px rgba(15, 23, 42, 0.12);
  --msghub-shadow-glow: 0 0 40px rgba(59, 130, 246, 0.25);
  
  --msghub-radius-lg: 16px;
  --msghub-radius-xl: 24px;
}

/* --------------------------------------------------------------------------
   2. Global Resets & Typography
   -------------------------------------------------------------------------- */
body {
  font-family: var(--msghub-font-sans);
  color: var(--msghub-gray-900);
  background-color: #ffffff;
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--msghub-gray-900);
}

/* Scroll Progress Bar */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--msghub-primary), var(--msghub-secondary), var(--msghub-emerald));
  z-index: 1050;
  transform-origin: 0 50%;
  transform: scaleX(0);
  transition: transform 0.1s linear;
}

@supports (animation-timeline: scroll()) {
  @keyframes grow-progress {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
  }
  #scroll-progress {
    animation: grow-progress auto linear;
    animation-timeline: scroll();
  }
}

/* --------------------------------------------------------------------------
   3. Custom Utilities & Glassmorphism
   -------------------------------------------------------------------------- */
.bg-gradient-soft {
  background: radial-gradient(100% 100% at 50% 0%, rgba(59, 130, 246, 0.06) 0%, rgba(139, 92, 246, 0.03) 50%, rgba(255, 255, 255, 0) 100%);
}

.bg-gradient-hero {
  background: radial-gradient(circle at 50% -20%, rgba(59, 130, 246, 0.15), rgba(139, 92, 246, 0.08) 40%, rgba(248, 250, 252, 0) 70%), #ffffff;
}

.bg-dark-mesh {
  background: radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.15) 0%, transparent 40%),
              radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.15) 0%, transparent 40%),
              var(--msghub-dark);
}

.glass-nav {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  transition: all 0.3s ease;
}

.glass-nav.scrolled {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.glass-card {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--msghub-gray-200);
  border-radius: var(--msghub-radius-lg);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--msghub-shadow-md);
  border-color: rgba(59, 130, 246, 0.3);
}

.text-gradient {
  background: linear-gradient(135deg, var(--msghub-primary) 0%, var(--msghub-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-emerald {
  background: linear-gradient(135deg, var(--msghub-emerald) 0%, var(--msghub-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.badge-glow {
  background: var(--msghub-primary-light);
  color: var(--msghub-primary);
  border: 1px solid rgba(59, 130, 246, 0.2);
  padding: 0.4rem 0.9rem;
  border-radius: 50rem;
  font-weight: 600;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.badge-glow .pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--msghub-primary);
  border-radius: 50%;
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(59, 130, 246, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}

/* --------------------------------------------------------------------------
   4. Component Styles
   -------------------------------------------------------------------------- */

/* Buttons */
.btn-primary-gradient {
  background: linear-gradient(135deg, var(--msghub-primary) 0%, #2563eb 100%);
  color: #ffffff;
  border: none;
  font-weight: 600;
  padding: 0.75rem 1.75rem;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
  transition: all 0.25s ease;
}

.btn-primary-gradient:hover, .btn-primary-gradient:focus-visible {
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.45);
}

.btn-outline-custom {
  border: 1.5px solid var(--msghub-gray-200);
  background: #ffffff;
  color: var(--msghub-gray-900);
  font-weight: 600;
  padding: 0.75rem 1.75rem;
  border-radius: 12px;
  transition: all 0.25s ease;
}

.btn-outline-custom:hover {
  background: var(--msghub-gray-100);
  border-color: var(--msghub-gray-600);
  color: var(--msghub-gray-900);
}

/* Hero Dashboard Graphic */
.hero-mockup-container {
  position: relative;
  border-radius: var(--msghub-radius-xl);
  padding: 8px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(59, 130, 246, 0.3), rgba(139, 92, 246, 0.3));
  box-shadow: var(--msghub-shadow-glow), var(--msghub-shadow-lg);
}

.hero-mockup-inner {
  background: var(--msghub-dark);
  border-radius: calc(var(--msghub-radius-xl) - 4px);
  overflow: hidden;
  color: #ffffff;
  border: 1px solid var(--msghub-dark-border);
}

.dashboard-header {
  background: rgba(255, 255, 255, 0.04);
  padding: 12px 20px;
  border-bottom: 1px solid var(--msghub-dark-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.window-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.window-dot.red { background-color: #ff5f56; }
.window-dot.yellow { background-color: #ffbd2e; }
.window-dot.green { background-color: #27c93f; }

.floating-badge-card {
  position: absolute;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  padding: 12px 18px;
  color: #ffffff;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  animation: float 6s ease-in-out infinite;
  z-index: 10;
}

.floating-badge-card.pos-1 {
  top: 10%;
  left: -20px;
  animation-delay: 0s;
}

.floating-badge-card.pos-2 {
  bottom: 12%;
  right: -20px;
  animation-delay: 3s;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Feature Icons & Cards */
.feature-icon-box {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
  background: var(--msghub-primary-light);
  color: var(--msghub-primary);
  transition: all 0.3s ease;
}

.glass-card:hover .feature-icon-box {
  background: var(--msghub-primary);
  color: #ffffff;
  transform: scale(1.08);
}

/* Interactive SMS Simulator */
.simulator-box {
  background: var(--msghub-dark);
  border-radius: var(--msghub-radius-xl);
  border: 1px solid var(--msghub-dark-border);
  box-shadow: 0 20px 50px rgba(11, 15, 25, 0.5);
  overflow: hidden;
}

.simulator-terminal {
  font-family: var(--msghub-font-mono);
  font-size: 0.9rem;
  background: #070a12;
  color: #a7f3d0;
  padding: 1.25rem;
  border-radius: 12px;
  min-height: 180px;
}

.preset-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  font-size: 0.85rem;
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.preset-btn:hover, .preset-btn.active {
  background: var(--msghub-primary);
  color: #ffffff;
  border-color: var(--msghub-primary);
}

/* Workflow Steps */
.step-number {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--msghub-primary-light);
  color: var(--msghub-primary);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

/* Integration Logos Grid */
.integration-card {
  background: #ffffff;
  border: 1px solid var(--msghub-gray-200);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
}

.integration-card:hover {
  border-color: var(--msghub-primary);
  transform: translateY(-5px);
  box-shadow: var(--msghub-shadow-md);
}

/* Pricing Cards */
.pricing-card {
  position: relative;
  background: #ffffff;
  border: 1px solid var(--msghub-gray-200);
  border-radius: var(--msghub-radius-xl);
  padding: 2.5rem 2rem;
  transition: all 0.3s ease;
}

.pricing-card.featured {
  border: 2px solid var(--msghub-primary);
  box-shadow: var(--msghub-shadow-lg), var(--msghub-shadow-glow);
  transform: scale(1.03);
}

.pricing-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--msghub-primary), var(--msghub-secondary));
  color: #ffffff;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.35rem 1rem;
  border-radius: 50rem;
}

/* FAQ Accordion Styling */
.accordion-item {
  border: 1px solid var(--msghub-gray-200);
  border-radius: 12px !important;
  margin-bottom: 0.85rem;
  overflow: hidden;
  background: #ffffff;
}

.accordion-button {
  font-weight: 600;
  font-size: 1.05rem;
  padding: 1.25rem;
  color: var(--msghub-gray-900);
  background-color: #ffffff;
}

.accordion-button:not(.collapsed) {
  color: var(--msghub-primary);
  background-color: var(--msghub-primary-light);
  box-shadow: none;
}

.accordion-button:focus {
  box-shadow: none;
  border-color: rgba(59, 130, 246, 0.5);
}

/* Scroll Animation classes */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Footer Styling */
footer {
  background-color: var(--msghub-gray-900);
  color: #94a3b8;
  font-size: 0.9rem;
}

footer a {
  color: #cbd5e1;
  text-decoration: none;
  transition: color 0.2s ease;
}

footer a:hover {
  color: #ffffff;
}

/* --------------------------------------------------------------------------
   5. Responsive Fine-tuning
   -------------------------------------------------------------------------- */
@media (max-width: 991.98px) {
  .pricing-card.featured {
    transform: scale(1);
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
  }
  .floating-badge-card {
    display: none;
  }
  .display-4 {
    font-size: 2.4rem;
  }
}

@media (max-width: 575.98px) {
  .btn-primary-gradient, .btn-outline-custom {
    width: 100%;
    margin-bottom: 0.5rem;
  }
}
