/* UPSIDE LEAD - Premium Styles */

/* Custom Fonts */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

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

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
}

/* Selection Color */
::selection {
  background: rgba(99, 102, 241, 0.3);
  color: #1e293b;
}

/* Navbar Styles */
#navbar {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

#navbar.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* Animation Keyframes */
@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

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

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

@keyframes fadeInUpDelayed {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  30% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
  }
  50% {
    box-shadow: 0 0 40px rgba(59, 130, 246, 0.5);
  }
}

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

/* Bar animations for hero chart */
@keyframes bar1 {
  0%, 100% { height: 4rem; }
  50% { height: 5rem; }
}
@keyframes bar2 {
  0%, 100% { height: 6rem; }
  50% { height: 7rem; }
}
@keyframes bar3 {
  0%, 100% { height: 5rem; }
  50% { height: 6rem; }
}
@keyframes bar4 {
  0%, 100% { height: 8rem; }
  50% { height: 9rem; }
}
@keyframes bar5 {
  0%, 100% { height: 7rem; }
  50% { height: 8.5rem; }
}
@keyframes bar6 {
  0%, 100% { height: 10rem; }
  50% { height: 11rem; }
}

/* Animation Classes */
.animate-float {
  animation: float 6s ease-in-out infinite;
}

.animate-float-delayed {
  animation: float-delayed 6s ease-in-out infinite;
  animation-delay: 3s;
}

.animate-bar-1 { animation: bar1 3s ease-in-out infinite; }
.animate-bar-2 { animation: bar2 3s ease-in-out infinite; animation-delay: 0.2s; }
.animate-bar-3 { animation: bar3 3s ease-in-out infinite; animation-delay: 0.4s; }
.animate-bar-4 { animation: bar4 3s ease-in-out infinite; animation-delay: 0.6s; }
.animate-bar-5 { animation: bar5 3s ease-in-out infinite; animation-delay: 0.8s; }
.animate-bar-6 { animation: bar6 3s ease-in-out infinite; animation-delay: 1s; }

/* Fade In Animations */
.fade-in-up {
  opacity: 0;
  animation: fadeInUp 0.8s ease-out forwards;
}

.fade-in-up-delayed {
  opacity: 0;
  animation: fadeInUpDelayed 1.2s ease-out forwards;
}

/* Intersection Observer Animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* Service Card Hover Effects */
.service-card {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover {
  transform: translateY(-8px);
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(139, 92, 246, 0.05));
  border-radius: 1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

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

/* Button Styles */
.btn-primary {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: white;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
  background: white;
  color: #374151;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  border: 2px solid #e5e7eb;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  border-color: #3b82f6;
  color: #3b82f6;
}

/* Form Styles */
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: transparent;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

input::placeholder,
textarea::placeholder {
  color: #9ca3af;
}

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

.faq-item:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.faq-question {
  cursor: pointer;
}

.faq-question i {
  transition: transform 0.3s ease;
}

.faq-item.active .faq-question i {
  transform: rotate(180deg);
}

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

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

/* Counter Animation */
.counter {
  font-variant-numeric: tabular-nums;
}

/* Gradient Text Animation */
.gradient-text-animate {
  background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899, #3b82f6);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 5s linear infinite;
}

/* Card Shine Effect */
.card-shine {
  position: relative;
  overflow: hidden;
}

.card-shine::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transform: skewX(-25deg);
  transition: left 0.75s ease;
}

.card-shine:hover::after {
  left: 150%;
}

/* Glassmorphism Effect */
.glass {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Loading Spinner */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(59, 130, 246, 0.2);
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Modal Animations */
.modal-enter {
  animation: modalEnter 0.3s ease-out;
}

@keyframes modalEnter {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* Toast Notification */
.toast {
  animation: toastSlide 0.3s ease-out;
}

@keyframes toastSlide {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Responsive Utilities */
@media (max-width: 768px) {
  .fade-in-up,
  .fade-in-up-delayed {
    animation-duration: 0.5s;
  }
  
  .animate-float,
  .animate-float-delayed {
    animation: none;
  }
}

/* Focus States for Accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* Print Styles */
@media print {
  .no-print {
    display: none !important;
  }
  
  body {
    font-size: 12pt;
    color: black;
    background: white;
  }
  
  a {
    color: black;
    text-decoration: underline;
  }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
  /* Add dark mode styles here if needed */
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  .service-card,
  .glass {
    border-width: 2px;
  }
  
  button,
  a {
    outline-offset: 3px;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
}

/* Custom gradient borders */
.gradient-border {
  position: relative;
  background: white;
  border-radius: 1rem;
}

.gradient-border::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6, #ec4899);
  border-radius: calc(1rem + 2px);
  z-index: -1;
}

/* Smooth image loading */
img {
  opacity: 1;
  transition: opacity 0.3s ease;
}

img[data-src] {
  opacity: 0;
}

/* Line clamp utility */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Backdrop blur fallback */
@supports not (backdrop-filter: blur(20px)) {
  #navbar,
  .glass {
    background: rgba(255, 255, 255, 0.95);
  }
}

/* Hero gradient mesh background */
.hero-mesh {
  background-image: 
    radial-gradient(at 40% 20%, hsla(220, 100%, 74%, 0.2) 0px, transparent 50%),
    radial-gradient(at 80% 0%, hsla(270, 100%, 74%, 0.2) 0px, transparent 50%),
    radial-gradient(at 0% 50%, hsla(330, 100%, 74%, 0.2) 0px, transparent 50%),
    radial-gradient(at 80% 50%, hsla(180, 100%, 74%, 0.2) 0px, transparent 50%),
    radial-gradient(at 0% 100%, hsla(220, 100%, 74%, 0.2) 0px, transparent 50%),
    radial-gradient(at 80% 100%, hsla(270, 100%, 74%, 0.2) 0px, transparent 50%);
}

/* Button ripple effect */
.ripple {
  position: relative;
  overflow: hidden;
}

.ripple::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.3) 10%, transparent 10.01%);
  background-repeat: no-repeat;
  background-position: 50%;
  transform: scale(10, 10);
  opacity: 0;
  transition: transform 0.5s, opacity 0.5s;
}

.ripple:active::after {
  transform: scale(0, 0);
  opacity: 0.3;
  transition: 0s;
}

/* Stagger animation delay classes */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }
.stagger-6 { animation-delay: 0.6s; }
