/* ============================================
   VR CONNECT AI - VISUAL POLISH LAYER
   Subtle Premium Enhancement - NO STRUCTURE CHANGES
   Pure visual refinement + smooth motion upgrade
============================================ */

/* ============================================
   TYPOGRAPHY MICRO-REFINEMENT
============================================ */
body {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  letter-spacing: -0.015em;
  text-rendering: optimizeLegibility;
}

/* ============================================
   SUBTLE SHADOW ENHANCEMENT
============================================ */
.hero-badge,
.pricing-badge,
.tech-badge-top,
.comp-badge,
.feat-badge,
.faq-badge {
  box-shadow: 
    0 2px 8px rgba(30, 64, 175, 0.08),
    0 1px 3px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.5) !important;
}

/* Card Shadow Refinement - Very Subtle */
.tech-card,
.feat-card,
.pricing-card,
.comp-card,
.arch-card,
.impact-card,
.faq-item,
.trust-item {
  box-shadow: 
    0 4px 12px rgba(15, 23, 42, 0.06),
    0 2px 6px rgba(0, 0, 0, 0.03),
    inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

/* Card Hover Enhancement */
.tech-card:hover,
.feat-card:hover,
.pricing-card:hover,
.comp-card:hover,
.arch-card:hover,
.impact-card:hover {
  box-shadow: 
    0 12px 32px rgba(15, 23, 42, 0.12),
    0 4px 12px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.6) !important;
  transform: translateY(-4px) !important;
}

/* ============================================
   BUTTON MICRO-INTERACTION POLISH
============================================ */
.btn,
.btn-primary,
.btn-glow,
.btn-plan,
.pricing-modal .btn-submit,
button[type="submit"] {
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.btn:hover,
.btn-primary:hover,
.btn-glow:hover,
.btn-plan:hover {
  transform: translateY(-2px) !important;
}

.btn:active,
.btn-primary:active,
.btn-glow:active {
  transform: translateY(0px) !important;
  transition-duration: 0.1s !important;
}

/* Button Icon Slide */
.btn i:last-child,
.btn-arrow {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn:hover i:last-child,
.btn:hover .btn-arrow {
  transform: translateX(3px);
}

/* ============================================
   SUBTLE FLOATING ANIMATION (VERY GENTLE)
============================================ */
@keyframes gentle-float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-6px);
  }
}

/* Apply to hero visual elements */
.mockup-phone {
  animation: gentle-float 7s ease-in-out infinite;
}

.mockup-dashboard {
  animation: gentle-float 8s ease-in-out infinite;
  animation-delay: -2s;
}

.floating-card.card-1 {
  animation: gentle-float 6s ease-in-out infinite;
}

.floating-card.card-2 {
  animation: gentle-float 7s ease-in-out infinite;
  animation-delay: -1.5s;
}

.floating-card.card-3 {
  animation: gentle-float 6.5s ease-in-out infinite;
  animation-delay: -3s;
}

/* ============================================
   PAGE LOAD STAGGER ANIMATION
============================================ */
@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Navbar */
.navbar-modern {
  animation: fade-in-up 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0ms both;
}

/* Hero Elements Stagger */
.hero-badge-wrapper {
  animation: fade-in-up 0.6s cubic-bezier(0.16, 1, 0.3, 1) 100ms both;
}

.hero-title {
  animation: fade-in-up 0.7s cubic-bezier(0.16, 1, 0.3, 1) 180ms both;
}

.hero-subtitle {
  animation: fade-in-up 0.6s cubic-bezier(0.16, 1, 0.3, 1) 280ms both;
}

.hero-cta {
  animation: fade-in-up 0.6s cubic-bezier(0.16, 1, 0.3, 1) 350ms both;
}

.hero-trust {
  animation: fade-in-up 0.6s cubic-bezier(0.16, 1, 0.3, 1) 420ms both;
}

.hero-stats {
  animation: fade-in-up 0.6s cubic-bezier(0.16, 1, 0.3, 1) 490ms both;
}

.hero-visual {
  animation: fade-in-up 0.7s cubic-bezier(0.16, 1, 0.3, 1) 450ms both;
}

/* ============================================
   SCROLL REVEAL ANIMATION (SUBTLE)
   SAFE FALLBACK: Content visible by default if JS fails
============================================ */
@keyframes scroll-reveal {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Applied via JavaScript IntersectionObserver */
/* CRITICAL: Only hide IF JavaScript successfully added the class */
/* This ensures content is ALWAYS visible even if JS fails */
.reveal-on-scroll {
  opacity: 1; /* DEFAULT: VISIBLE */
}

/* JavaScript will add this class when ready to animate */
.reveal-on-scroll.ready-to-reveal {
  opacity: 0; /* Now safe to hide because JS is working */
}

.reveal-on-scroll.revealed {
  animation: scroll-reveal 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ============================================
   CARD STAGGER IN GRID (3-COLUMN)
============================================ */
.tech-grid .tech-card:nth-child(1),
.features-grid .feat-card:nth-child(1),
.pricing-grid .pricing-card:nth-child(1),
.arch-grid .arch-card:nth-child(1),
.impact-grid .impact-card:nth-child(1) {
  animation-delay: 0ms;
}

.tech-grid .tech-card:nth-child(2),
.features-grid .feat-card:nth-child(2),
.pricing-grid .pricing-card:nth-child(2),
.arch-grid .arch-card:nth-child(2),
.impact-grid .impact-card:nth-child(2) {
  animation-delay: 80ms;
}

.tech-grid .tech-card:nth-child(3),
.features-grid .feat-card:nth-child(3),
.pricing-grid .pricing-card:nth-child(3),
.arch-grid .arch-card:nth-child(3),
.impact-grid .impact-card:nth-child(3) {
  animation-delay: 160ms;
}

.tech-grid .tech-card:nth-child(4),
.features-grid .feat-card:nth-child(4),
.impact-grid .impact-card:nth-child(4) {
  animation-delay: 240ms;
}

.tech-grid .tech-card:nth-child(5),
.features-grid .feat-card:nth-child(5) {
  animation-delay: 320ms;
}

/* ============================================
   ICON MICRO-ANIMATION
============================================ */
.tech-icon-wrapper,
.feat-icon-wrapper,
.plan-icon,
.comp-card-icon,
.arch-card-icon,
.impact-icon,
.node-icon {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tech-card:hover .tech-icon-wrapper,
.feat-card:hover .feat-icon-wrapper,
.pricing-card:hover .plan-icon,
.comp-card:hover .comp-card-icon,
.arch-card:hover .arch-card-icon,
.impact-card:hover .impact-icon,
.flow-node:hover .node-icon {
  transform: scale(1.08) rotate(3deg);
}

/* ============================================
   NAVBAR SCROLL ENHANCEMENT
============================================ */
.navbar-modern.scrolled {
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.08);
}

/* Menu Link Hover */
.menu-link {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.menu-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  transition: width 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.menu-link:hover::after {
  width: 70%;
}

/* ============================================
   PRICING TOGGLE SMOOTH TRANSITION
============================================ */
.billing-toggle {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.billing-label {
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.toggle-switch {
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.toggle-slider {
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Price fade on change */
.price-switching {
  animation: price-fade 0.4s ease;
}

@keyframes price-fade {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

/* ============================================
   FEATURE ITEM HOVER SLIDE
============================================ */
.feature-item,
.plan-features li,
.comp-item-content {
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-item:hover,
.plan-features li:hover,
.comp-item:hover .comp-item-content {
  transform: translateX(3px);
}

.feature-item i,
.plan-features li i {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.feature-item:hover i,
.plan-features li:hover i {
  transform: scale(1.12);
}

/* ============================================
   FAQ ACCORDION SMOOTH
============================================ */
.faq-item {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-question {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-question:hover {
  background: rgba(59, 130, 246, 0.04);
}

.question-toggle i {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.faq-answer {
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   BACK TO TOP BUTTON POLISH
============================================ */
#backToTop,
.back-to-top-btn {
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#backToTop:hover,
.back-to-top-btn:hover {
  transform: translateY(-3px);
}

#backToTop i,
.back-to-top-btn i {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#backToTop:hover i,
.back-to-top-btn:hover i {
  transform: translateY(-2px);
}

/* ============================================
   SOCIAL LINK HOVER
============================================ */
.social-link-new,
.social-link {
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.social-link-new:hover,
.social-link:hover {
  transform: translateY(-3px) rotate(5deg);
}

/* ============================================
   TRUST BADGE HOVER
============================================ */
.trust-item,
.pricing-trust .trust-item {
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.trust-item:hover,
.pricing-trust .trust-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.1);
}

/* ============================================
   MODAL SMOOTH ENTRANCE
============================================ */
.pricing-modal-overlay,
.modern-modal-overlay {
  animation: modal-fade-in 0.3s ease;
}

@keyframes modal-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.pricing-modal,
.modern-modal {
  animation: modal-slide-up 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modal-slide-up {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ============================================
   BADGE DOT PULSE (VERY SUBTLE)
============================================ */
.badge-dot,
.live-dot,
.status-dot {
  animation: subtle-pulse 2.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes subtle-pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.85;
    transform: scale(1.05);
  }
}

/* ============================================
   CHART BAR GROWTH ANIMATION
============================================ */
.chart-bar,
.dash-metric,
.mini-chart .chart-bar {
  animation: bar-grow 1s ease-out both;
}

.chart-bar:nth-child(1) { animation-delay: 0.1s; }
.chart-bar:nth-child(2) { animation-delay: 0.2s; }
.chart-bar:nth-child(3) { animation-delay: 0.3s; }
.chart-bar:nth-child(4) { animation-delay: 0.4s; }
.chart-bar:nth-child(5) { animation-delay: 0.5s; }
.chart-bar:nth-child(6) { animation-delay: 0.6s; }
.chart-bar:nth-child(7) { animation-delay: 0.7s; }

@keyframes bar-grow {
  from {
    transform: scaleY(0);
    opacity: 0;
  }
  to {
    transform: scaleY(1);
    opacity: 1;
  }
}

/* ============================================
   GRADIENT TEXT SUBTLE SHIMMER
============================================ */
.highlight-text {
  background-size: 200% auto;
  animation: gradient-shift 8s linear infinite;
}

@keyframes gradient-shift {
  0%, 100% {
    background-position: 0% center;
  }
  50% {
    background-position: 100% center;
  }
}

/* ============================================
   SHINE EFFECT ON HOVER (VERY SUBTLE)
============================================ */
.tech-card-shine,
.feat-card-shine,
.pricing-card-shine {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.2) 50%,
    transparent 100%
  );
  pointer-events: none;
  transition: left 0.6s ease;
}

.tech-card:hover .tech-card-shine,
.feat-card:hover .feat-card-shine,
.pricing-card:hover .pricing-card-shine {
  left: 100%;
}

/* ============================================
   LOGO HOVER ANIMATION
============================================ */
.navbar-logo,
.logo-link-premium {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.navbar-logo:hover,
.logo-link-premium:hover {
  transform: scale(1.03);
}

.logo-icon,
.logo-icon-premium {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.navbar-logo:hover .logo-icon,
.logo-link-premium:hover .logo-icon-premium {
  transform: rotate(-5deg);
}

/* ============================================
   FORM INPUT FOCUS ENHANCEMENT
============================================ */
input:focus,
textarea:focus,
select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  transition: box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   MOBILE OPTIMIZATIONS
============================================ */
@media (max-width: 768px) {
  /* Disable heavy animations on mobile */
  .mockup-phone,
  .mockup-dashboard,
  .floating-card {
    animation: none;
  }
  
  /* Simpler hover effects */
  .tech-card:hover,
  .feat-card:hover,
  .pricing-card:hover {
    transform: translateY(-2px) !important;
  }
  
  /* Faster transitions on mobile */
  * {
    transition-duration: 0.2s !important;
  }
}

/* ============================================
   REDUCED MOTION SUPPORT
============================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .mockup-phone,
  .mockup-dashboard,
  .floating-card,
  .badge-dot,
  .live-dot,
  .highlight-text {
    animation: none !important;
  }
  
  /* Keep essential transitions */
  .menu-link,
  .btn,
  .card {
    transition-duration: 0.15s !important;
  }
}

/* ============================================
   PERFORMANCE OPTIMIZATION
============================================ */
.mockup-phone,
.mockup-dashboard,
.floating-card,
.tech-card,
.feat-card,
.pricing-card {
  will-change: transform;
}

.hero-gradient-orb {
  will-change: transform, opacity;
}

/* Remove will-change after animation completes */
@media (hover: hover) {
  .tech-card:not(:hover),
  .feat-card:not(:hover),
  .pricing-card:not(:hover) {
    will-change: auto;
  }
}

/* ============================================
   END OF VISUAL POLISH LAYER
   All changes are additive and non-destructive
   Layout structure remains untouched
============================================ */
