/* ═══════════════ BASE / RESET ═══════════════ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  overflow-x: hidden;
}

/* ═══════════════ ANIMATIONS ═══════════════ */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(92, 124, 250, 0.2); }
  50% { box-shadow: 0 0 20px 5px rgba(92, 124, 250, 0.1); }
}

.animate-fade-in {
  animation: fadeIn 0.8s ease-out both;
}

.animate-fade-in-up {
  animation: fadeInUp 0.8s ease-out both;
}

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }

/* Scroll-triggered animations */
.scroll-animate {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-animate.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ═══════════════ HERO GRID BACKGROUND ═══════════════ */
.hero-grid {
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* ═══════════════ SECTION GLOW BACKGROUNDS ═══════════════ */
/* Reusable ambient glow for non-hero sections */
.section-glow {
  position: relative;
}
.section-glow::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 700px;
  height: 400px;
  background: radial-gradient(ellipse at center, rgba(92,124,250,0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.section-glow > * {
  position: relative;
  z-index: 1;
}

/* ═══════════════ FLOATING PARTICLES ═══════════════ */
@keyframes float-slow {
  0%, 100% { transform: translateY(0) translateX(0); }
  33%       { transform: translateY(-18px) translateX(8px); }
  66%       { transform: translateY(8px) translateX(-6px); }
}
@keyframes float-mid {
  0%, 100% { transform: translateY(0) scale(1); }
  50%       { transform: translateY(-12px) scale(1.05); }
}

.float-slow { animation: float-slow 8s ease-in-out infinite; }
.float-mid  { animation: float-mid 5s ease-in-out infinite; }

/* ═══════════════ CARD ENTRANCE ANIMATION ═══════════════ */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate-slide-up {
  animation: slideUp 0.7s ease-out both;
}
.delay-50  { animation-delay: 0.05s; }
.delay-150 { animation-delay: 0.15s; }
.delay-250 { animation-delay: 0.25s; }

/* ═══════════════ GLOW ON SOLUTION CARDS ═══════════════ */
@keyframes borderPulse {
  0%, 100% { border-color: rgba(92,124,250,0.15); }
  50%       { border-color: rgba(92,124,250,0.35); }
}
.card-glow-hover {
  transition: box-shadow 0.35s ease, transform 0.3s ease;
}
.card-glow-hover:hover {
  box-shadow: 0 0 30px rgba(92,124,250,0.12), 0 4px 20px rgba(0,0,0,0.3);
}

/* ═══════════════ TYPING CURSOR (OPTIONAL HERO) ═══════════════ */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}
.cursor-blink {
  animation: blink 1s step-end infinite;
}

/* ═══════════════ NUMBER COUNTER POP ═══════════════ */
@keyframes popIn {
  0%   { transform: scale(0.7); opacity: 0; }
  70%  { transform: scale(1.1); }
  100% { transform: scale(1);   opacity: 1; }
}
.animate-pop-in {
  animation: popIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* ═══════════════ NAVBAR ═══════════════ */
#navbar {
  background: transparent;
}

#navbar.scrolled {
  background: rgba(20, 21, 23, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(55, 58, 64, 0.2);
}

/* ═══════════════ RANGE SLIDER ═══════════════ */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 8px;
  border-radius: 999px;
  background: #373A40;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #5c7cfa;
  cursor: pointer;
  border: 3px solid #1A1B1E;
  box-shadow: 0 0 10px rgba(92, 124, 250, 0.3);
  transition: box-shadow 0.2s;
}

input[type="range"]::-webkit-slider-thumb:hover {
  box-shadow: 0 0 20px rgba(92, 124, 250, 0.5);
}

input[type="range"]::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #5c7cfa;
  cursor: pointer;
  border: 3px solid #1A1B1E;
  box-shadow: 0 0 10px rgba(92, 124, 250, 0.3);
}

/* ═══════════════ FAQ ACCORDION ═══════════════ */
.faq-item {
  transition: all 0.3s ease;
}

.faq-item.active {
  border-color: rgba(92, 124, 250, 0.3);
}

.faq-toggle {
  cursor: pointer;
}

.faq-toggle:hover {
  background: rgba(255, 255, 255, 0.02);
}

.faq-item.active .faq-toggle svg {
  transform: rotate(180deg);
}

.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}

.faq-item.active .faq-content {
  max-height: 500px;
}

/* ═══════════════ CUSTOM SCROLLBAR ═══════════════ */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #141517;
}

::-webkit-scrollbar-thumb {
  background: #373A40;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #5C5F66;
}

/* ═══════════════ SELECTION ═══════════════ */
::selection {
  background: rgba(92, 124, 250, 0.3);
  color: white;
}

/* ═══════════════ FOCUS STYLES ═══════════════ */
input:focus,
select:focus,
textarea:focus,
button:focus-visible {
  outline: 2px solid rgba(92, 124, 250, 0.5);
  outline-offset: 2px;
}

button:focus:not(:focus-visible) {
  outline: none;
}

/* ═══════════════ RESPONSIVE FIXES ═══════════════ */
@media (max-width: 640px) {
  .hero-grid {
    background-size: 40px 40px;
  }
}

/* ═══════════════ PAIN CARDS HOVER GLOW ═══════════════ */
.pain-card {
  position: relative;
}

.pain-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 1rem;
  padding: 1px;
  background: linear-gradient(135deg, transparent, rgba(92, 124, 250, 0.1), transparent);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.pain-card:hover::before {
  opacity: 1;
}

/* ═══════════════ LOADING SKELETON ═══════════════ */
.skeleton {
  background: linear-gradient(90deg, #25262B 25%, #2C2E33 50%, #25262B 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
}

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ═══════════════ MODAL ═══════════════ */
#lead-modal {
  transition: opacity 0.3s ease;
}

#lead-modal.show {
  display: flex !important;
  animation: fadeIn 0.3s ease;
}

#lead-modal > div:last-child {
  animation: fadeInUp 0.3s ease;
}
