/* Performance Optimized Styles for TACIT Home */
body { 
  font-family: 'SF Pro Text', -apple-system, BlinkMacSystemFont, system-ui, sans-serif; 
  text-rendering: optimizeSpeed;
}

/* Responsive height for spline container */
.spline-container {
  height: 750px;
}

@media (max-width: 1024px) {
  .spline-container {
    height: 650px;
  }
}

@media (max-width: 768px) {
  .spline-container {
    height: 500px;
  }
}

@media (max-width: 640px) {
  .spline-container {
    height: 450px;
  }
}



/* Reduce excessive gaps between sections */
section {
  scroll-margin-top: 2rem;
}

/* Mobile Menu Styles - High Specificity */
#mobileMenu.md.hidden {
  display: none !important;
}

#mobileMenu.md.flex {
  display: flex !important;
}

#mobileMenu.hidden {
  transform: translateY(-10px) !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transition: all 0.3s ease !important;
}

#mobileMenu:not(.hidden) {
  transform: translateY(0) !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

#mobile-menu-toggle:active {
  transform: scale(0.95) !important;
}

/* Ensure menu is above other content */
#mobileMenu {
  z-index: 60 !important;
  backdrop-filter: blur(12px) !important;
}

/* Touch-friendly interaction areas */
#mobile-menu-toggle {
  min-height: 44px !important;
  min-width: 44px !important;
}

#mobile-menu-close {
  min-height: 44px !important;
  min-width: 44px !important;
}

@media (max-width: 767px) {
  #mobileMenu {
    position: fixed !important;
    top: 5rem !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  #mobileMenu {
    transition: none !important;
  }
}

.sf-pro-display { 
  font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, system-ui, sans-serif; 
}

/* Animation Classes */
.fade-in { 
  opacity: 0; 
  animation: fadeIn 1.2s ease-out forwards; 
}

.slide-up { 
  transform: translateY(40px); 
  opacity: 0; 
  animation: slideUp 1s ease-out forwards; 
}

.blur-in { 
  filter: blur(10px); 
  opacity: 0; 
  animation: blurIn 1.5s ease-out forwards; 
  will-change: filter, opacity;
}

/* Staggered Animation Delays */
.stagger-1 { animation-delay: 0.2s; }
.stagger-2 { animation-delay: 0.4s; }
.stagger-3 { animation-delay: 0.6s; }
.stagger-4 { animation-delay: 0.8s; }
.stagger-5 { animation-delay: 1s; }
.stagger-6 { animation-delay: 1.2s; }

/* Keyframes */
@keyframes fadeIn { to { opacity: 1; } }
@keyframes slideUp { to { transform: translateY(0); opacity: 1; } }
@keyframes blurIn { to { filter: blur(0); opacity: 1; } }

/* Glass Effect */
.glass-effect { 
  backdrop-filter: blur(20px); 
  -webkit-backdrop-filter: blur(20px); 
}

/* Success Story Card Hover Effects */
.success-card { 
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1); 
  position: relative; 
  overflow: hidden; 
  will-change: transform;
}

.success-card::before { 
  content: ''; 
  position: absolute; 
  top: 0; 
  left: -100%; 
  width: 100%; 
  height: 100%; 
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent); 
  transition: left 0.8s ease-in-out; 
  z-index: 1; 
}

.success-card:hover::before { left: 100%; }
.success-card:hover { 
  transform: translateY(-12px) scale(1.02); 
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.6); 
  border-color: rgba(255,255,255,0.3); 
}

.success-card:hover .card-image { transform: scale(1.1); }
.success-card:hover .card-gradient { opacity: 0.8; }
.success-card:hover .card-content { transform: translateY(-4px); }

.card-image { 
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1); 
  transform: translateZ(0); /* Hardware acceleration */
}

.card-gradient { 
  transition: opacity 0.6s ease; 
}

.card-content { 
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1); 
}

/* Counter Animation */
@keyframes countUp { 
  from { opacity: 0; transform: translateY(20px); } 
  to { opacity: 1; transform: translateY(0); } 
}

.counter { 
  animation: countUp 0.8s ease-out forwards; 
}

/* IDE typing demo */
@keyframes blink { 
  0%, 50% { opacity: 1; } 
  51%, 100% { opacity: 0; } 
}

@keyframes fadeInLine { 
  0% { opacity: 0; transform: translateX(-8px); } 
  100% { opacity: 1; transform: translateX(0); } 
}

/* Glow Button Effects */
.glow-btn {
  position: relative;
  isolation: isolate;
  transition: transform 0.2s ease;
}

.glow-btn::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: radial-gradient(120px 120px at var(--x, 50%) var(--y, 50%), rgba(59,130,246,.35), rgba(168,85,247,.28) 40%, transparent 65%);
  filter: blur(18px);
  opacity: 0;
  transition: opacity .2s ease;
  pointer-events: none;
  z-index: -1;
}

.glow-btn:hover::before { 
  opacity: 1; 
}

.glow-btn:hover {
  transform: translateY(-1px);
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  .fade-in, .slide-up, .blur-in, .counter { 
    animation: none !important; 
    opacity: 1 !important; 
    transform: none !important; 
    filter: none !important; 
  }
  
  .glow-btn::before { 
    transition: none; 
  }
  
  .success-card,
  .card-image,
  .card-gradient,
  .card-content {
    transition: none !important;
  }
}

/* Font Classes (optimized - removed disabled classes that aren't used) */
.font-jakarta { font-family: 'Plus Jakarta Sans', sans-serif !important; }
.font-geist { font-family: 'Geist', sans-serif !important; }

/* Template-specific background */
body.ai-fluent-sales-page {
  background: linear-gradient(180deg, #fdfdfd 0%, #111a2f 60%, #050316 100%);
  min-height: 100%;
}

body.ai-fluent-sales-page::after {
  content: "";
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 45vh;
  pointer-events: none;
  background:
    radial-gradient(120% 120% at 50% 0%, rgba(129, 140, 248, 0.18) 0%, rgba(15, 23, 42, 0.9) 50%, #050316 90%),
    linear-gradient(180deg, rgba(5, 3, 22, 0) 0%, #050316 80%);
  z-index: -1;
  opacity: 0.95;
}
