/* ================================================
   QuantumVora — Custom Styles
   ================================================ */

/* ---------- Base Resets ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #06060e;
}

::-webkit-scrollbar-thumb {
  background: rgba(139, 92, 246, 0.3);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(139, 92, 246, 0.5);
}

/* ---------- Background Grid Pattern ---------- */
.bg-grid-pattern {
  background-image:
    linear-gradient(rgba(139, 92, 246, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139, 92, 246, 0.08) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* ---------- Navbar States ---------- */
#navbar.scrolled {
  background: rgba(6, 6, 14, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-link.active {
  color: #c4b5fd !important;
}

/* ---------- Tech Tabs ---------- */
.tech-tab {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #94a3b8;
  cursor: pointer;
}

.tech-tab:hover {
  background: rgba(139, 92, 246, 0.08);
  border-color: rgba(139, 92, 246, 0.2);
  color: #e2e8f0;
}

.tech-tab.active {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(6, 182, 212, 0.15));
  border-color: rgba(139, 92, 246, 0.4);
  color: #ffffff;
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.15);
}

/* ---------- Tech Cards ---------- */
.tech-card {
  background: rgba(17, 17, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: default;
  position: relative;
  overflow: hidden;
}

.tech-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  padding: 1px;
  background: linear-gradient(135deg, transparent, transparent);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  transition: background 0.4s ease;
  pointer-events: none;
}

.tech-card:hover::before {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.4), rgba(6, 182, 212, 0.4));
}

.tech-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(139, 92, 246, 0.08);
  border-color: transparent;
}

.tech-card .tech-icon {
  font-size: 2.5rem;
  line-height: 1;
  transition: transform 0.3s ease;
}

.tech-card:hover .tech-icon {
  transform: scale(1.15);
}

.tech-card .tech-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: #e2e8f0;
  letter-spacing: 0.01em;
}

.tech-card .tech-desc {
  font-size: 0.65rem;
  color: #64748b;
  line-height: 1.4;
}

/* Tech card enter animation */
.tech-card.entering {
  animation: techCardEnter 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes techCardEnter {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ---------- Scroll Reveal Animations ---------- */
.scroll-reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.scroll-reveal-stagger .scroll-reveal:nth-child(1) { transition-delay: 0ms; }
.scroll-reveal-stagger .scroll-reveal:nth-child(2) { transition-delay: 80ms; }
.scroll-reveal-stagger .scroll-reveal:nth-child(3) { transition-delay: 160ms; }
.scroll-reveal-stagger .scroll-reveal:nth-child(4) { transition-delay: 240ms; }
.scroll-reveal-stagger .scroll-reveal:nth-child(5) { transition-delay: 320ms; }
.scroll-reveal-stagger .scroll-reveal:nth-child(6) { transition-delay: 400ms; }
.scroll-reveal-stagger .scroll-reveal:nth-child(7) { transition-delay: 480ms; }
.scroll-reveal-stagger .scroll-reveal:nth-child(8) { transition-delay: 560ms; }
.scroll-reveal-stagger .scroll-reveal:nth-child(9) { transition-delay: 640ms; }
.scroll-reveal-stagger .scroll-reveal:nth-child(10) { transition-delay: 720ms; }
.scroll-reveal-stagger .scroll-reveal:nth-child(11) { transition-delay: 800ms; }
.scroll-reveal-stagger .scroll-reveal:nth-child(12) { transition-delay: 880ms; }

/* ---------- Hero Animations ---------- */
.animate-fade-up {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.animation-delay-100 { animation-delay: 100ms; }
.animation-delay-200 { animation-delay: 200ms; }
.animation-delay-300 { animation-delay: 300ms; }
.animation-delay-500 { animation-delay: 500ms; }

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- Pulse Animations ---------- */
@keyframes pulseSlow {
  0%, 100% { opacity: 0.15; transform: scale(1); }
  50% { opacity: 0.25; transform: scale(1.05); }
}

.animate-pulse-slow {
  animation: pulseSlow 6s ease-in-out infinite;
}

.animate-pulse-slow-delay {
  animation: pulseSlow 6s ease-in-out 3s infinite;
}

/* ---------- Floating Animation ---------- */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

/* ---------- Gradient Border Animation ---------- */
@keyframes gradientBorder {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ---------- Form Focus Glow ---------- */
input:focus,
textarea:focus {
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

/* ---------- Selection Color ---------- */
::selection {
  background: rgba(139, 92, 246, 0.3);
  color: #ffffff;
}

/* ---------- Mobile Menu Animation ---------- */
#mobileMenu.open {
  display: block;
  animation: slideDown 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- Back to Top ---------- */
#backToTop.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* ---------- Industry Card Glow ---------- */
.industry-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  opacity: 0;
  transition: opacity 0.5s ease;
  background: radial-gradient(circle at 50% 0%, rgba(139, 92, 246, 0.06), transparent 70%);
  pointer-events: none;
}

.industry-card:hover::after {
  opacity: 1;
}

/* ---------- Service Card Gradient Border ---------- */
.service-card {
  position: relative;
}

.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  padding: 1px;
  background: linear-gradient(135deg, transparent, transparent);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  transition: background 0.5s ease;
  pointer-events: none;
  z-index: 1;
}

.service-card:hover::before {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(6, 182, 212, 0.3));
}

/* ---------- Process Step Hover ---------- */
.process-step > div:nth-child(2) > div {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.process-step:hover > div:nth-child(2) > div {
  transform: scale(1.15);
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.3);
}

/* ---------- Responsive Adjustments ---------- */
@media (max-width: 640px) {
  .tech-card .tech-icon {
    font-size: 2rem;
  }

  .tech-card {
    padding: 1rem;
  }
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .scroll-reveal {
    opacity: 1;
    transform: none;
  }

  .animate-fade-up {
    opacity: 1;
    transform: none;
  }
}