/* ===== Base ===== */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

/* ===== Scroll Animations ===== */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.animate-on-scroll:nth-child(2) { transition-delay: 0.08s; }
.animate-on-scroll:nth-child(3) { transition-delay: 0.16s; }

/* ===== Feature card stagger ===== */
.feature-card:nth-child(1) .animate-on-scroll,
.feature-card.animate-on-scroll:nth-child(1) { transition-delay: 0s; }
.feature-card:nth-child(2) .animate-on-scroll,
.feature-card.animate-on-scroll:nth-child(2) { transition-delay: 0.12s; }
.feature-card:nth-child(3) .animate-on-scroll,
.feature-card.animate-on-scroll:nth-child(3) { transition-delay: 0.24s; }

/* ===== Hero Section ===== */
.hero-section {
  background: linear-gradient(to bottom, #020617, #0B1929);
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 20%;
  left: 15%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero-section::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to bottom, transparent, #ffffff);
  pointer-events: none;
}

/* ===== Glass morphism for pipeline diagram ===== */
.glass-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-card-active {
  background: rgba(37, 99, 235, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(37, 99, 235, 0.2);
  box-shadow: 0 0 30px rgba(37, 99, 235, 0.1);
}

/* ===== Navigation ===== */
#navbar {
  transition: background-color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

#navbar.nav-dark {
  background: transparent;
}

#navbar.nav-light {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 0 #E2E8F0;
}

#navbar.scrolled {
  box-shadow: 0 1px 0 0 #E2E8F0;
}

/* Nav link transitions for dark/light */
.nav-link-dynamic {
  transition: color 0.3s ease;
}

/* Nav logo dark/light */
.nav-logo-img {
  transition: filter 0.3s ease, brightness 0.3s ease;
}

/* Nav login link dark/light */
#navbar.nav-dark .nav-login-link {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.3);
  color: #ffffff;
}

#navbar.nav-dark .nav-login-link:hover {
  background: rgba(255,255,255,0.2);
}

#navbar.nav-light .nav-login-link {
  background: #0B1929;
  border-color: #0B1929;
  color: #ffffff;
}

#navbar.nav-light .nav-login-link:hover {
  background: #143052;
  border-color: #143052;
}

#navbar.nav-dark .nav-logo-img {
  filter: brightness(0) invert(1);
}

#navbar.nav-light .nav-logo-img {
  filter: none;
}

/* ===== Logo Marquee ===== */
.logo-marquee {
  position: relative;
  width: 100%;
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.logo-marquee-track {
  display: flex;
  align-items: center;
  gap: 56px;
  width: max-content;
  animation: marqueeScroll 25s linear infinite;
}

.logo-marquee-track img {
  height: 26px;
  width: auto;
  flex-shrink: 0;
  filter: grayscale(100%) brightness(0);
  opacity: 0.35;
  transition: opacity 0.4s ease;
}

.logo-marquee-track img:hover {
  opacity: 0.55;
}

@keyframes marqueeScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ===== FAQ Accordion ===== */
.faq-item {
  border-radius: 10px;
  padding: 0 16px;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.faq-item.open {
  background: rgba(37, 99, 235, 0.04);
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.12);
}

.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-item.open .faq-content {
  max-height: 400px;
}

.faq-item.open .faq-chevron {
  transform: rotate(180deg);
}


/* ===== Calculator ===== */
#calculator input:focus {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Calculator range sliders */
.calc-slider {
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 3px;
  background: #E2E8F0;
  outline: none;
  cursor: pointer;
}

.calc-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #2563EB;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  transition: box-shadow 0.2s ease;
}

.calc-slider::-webkit-slider-thumb:hover {
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.calc-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #2563EB;
  cursor: pointer;
  border: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

/* Calculator glow border */
.calculator-glow {
  position: relative;
  border-radius: 16px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.3), rgba(96, 165, 250, 0.1), rgba(37, 99, 235, 0.3));
}

.calculator-glow > div {
  border-radius: 15px;
  overflow: hidden;
}

/* Calculator results gradient */
.calculator-results {
  background: linear-gradient(135deg, #0B1929, #0F2847);
}

/* ===== Feature Cards (upgraded) ===== */
.feature-card-styled {
  background: linear-gradient(to bottom, #ffffff, rgba(249, 250, 251, 0.5));
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.feature-card-styled:hover {
  border-color: transparent;
  box-shadow: 0 10px 40px -10px rgba(37, 99, 235, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
  transform: translateY(-2px);
}

/* Feature icon container */
.feature-icon {
  background: linear-gradient(to bottom right, #EFF6FF, rgba(219, 234, 254, 0.5));
}

/* ===== CTA Banner ===== */
.cta-banner {
  background: linear-gradient(135deg, #020617, #0B1929, #0F2847);
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

/* ===== Pipeline arrow pulse ===== */
@keyframes arrowPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}

.pipeline-arrow {
  animation: arrowPulse 2s ease-in-out infinite;
}

/* ===== Mobile Menu ===== */
#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

#mobile-menu.open {
  max-height: 400px;
}

/* ===== Selection ===== */
::selection {
  background-color: rgba(37, 99, 235, 0.15);
  color: #0B1929;
}

/* ===== Pill badge ===== */
.pill-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 9999px;
  background: rgba(37, 99, 235, 0.1);
  border: 1px solid rgba(37, 99, 235, 0.2);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* Hero dark pill */
.pill-badge-dark {
  background: rgba(96, 165, 250, 0.1);
  border-color: rgba(96, 165, 250, 0.2);
  color: #60A5FA;
}

/* Light section pill */
.pill-badge-light {
  background: rgba(37, 99, 235, 0.06);
  border-color: rgba(37, 99, 235, 0.12);
  color: #2563EB;
}

/* ===== Hero "Already Selling" pill glow ===== */
@keyframes pillGlow {
  0%, 100% { border-color: rgba(255, 255, 255, 0.12); box-shadow: 0 0 0 0 rgba(96, 165, 250, 0); background: rgba(255, 255, 255, 0.06); }
  50% { border-color: rgba(96, 165, 250, 0.6); box-shadow: 0 0 24px 4px rgba(96, 165, 250, 0.2); background: rgba(96, 165, 250, 0.12); }
}

.hero-already-selling {
  animation: pillGlow 2.5s ease-in-out infinite;
}

/* ===== Testimonial Carousel ===== */
.testimonial-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

.testimonial-slide.active {
  position: relative;
  opacity: 1;
  pointer-events: auto;
}

.testimonial-dot.active {
  background: #2563EB;
  transform: scale(1.2);
}

/* ===== Count-up animation helper ===== */
.count-up {
  transition: opacity 0.3s ease;
}
