/* ========================================
   INTERACTIVE FEATURE COMPARISON MATRIX
   Sprint #36 - 2026-02-10 5:42 AM
   ======================================== */

/*
  CONVERSION PSYCHOLOGY:
  Comparison tables are PROVEN to increase conversion by 40-55% on SaaS landing pages.
  They address the core objection: "Why should I pay for this?"
  
  Pattern used by: Linear, Notion, Figma, Stripe, Vercel, Supabase
  
  Key principles:
  - Highlight YOUR column (center) with visual emphasis
  - Use checks/crosses for instant scanability
  - Add motion on scroll for engagement
  - Make the "best choice" visually obvious
  - Mobile: stack into cards with clear winner
*/

.comparison-section {
  padding: 120px 20px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, 
    rgba(15, 15, 20, 0) 0%,
    rgba(99, 102, 241, 0.03) 50%,
    rgba(15, 15, 20, 0) 100%
  );
}

.comparison-section::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
  pointer-events: none;
  opacity: 0.5;
  filter: blur(80px);
}

.comparison-container {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* Header */
.comparison-header {
  text-align: center;
  margin-bottom: 80px;
}

.comparison-header h2 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.7) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.comparison-header p {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.6);
  max-width: 600px;
  margin: 0 auto;
}

/* Comparison Grid */
.comparison-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

/* Column Card */
.comparison-column {
  background: rgba(15, 15, 20, 0.6);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 32px;
  position: relative;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

/* Noise Texture */
.comparison-column::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' /%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
  opacity: 0.3;
  pointer-events: none;
  mix-blend-mode: overlay;
}

.comparison-column:hover {
  transform: translateY(-8px);
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: 0 20px 60px rgba(99, 102, 241, 0.2);
}

/* Featured Column (Service) */
.comparison-column.featured {
  background: rgba(99, 102, 241, 0.08);
  border: 2px solid rgba(99, 102, 241, 0.4);
  transform: scale(1.05);
  box-shadow: 
    0 0 0 1px rgba(99, 102, 241, 0.1),
    0 20px 60px rgba(99, 102, 241, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.comparison-column.featured::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, 
    #6366f1 0%, 
    #8b5cf6 50%, 
    #ec4899 100%
  );
}

.comparison-column.featured:hover {
  transform: scale(1.05) translateY(-8px);
  border-color: rgba(99, 102, 241, 0.6);
  box-shadow: 
    0 0 0 1px rgba(99, 102, 241, 0.2),
    0 25px 80px rgba(99, 102, 241, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* Column Header */
.comparison-column-header {
  margin-bottom: 32px;
  position: relative;
  z-index: 1;
}

.comparison-badge {
  display: inline-block;
  padding: 6px 12px;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #a5b4fc;
  margin-bottom: 12px;
}

.featured .comparison-badge {
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  border-color: transparent;
  color: white;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.comparison-column h3 {
  font-size: 1.75rem;
  font-weight: 700;
  color: white;
  margin-bottom: 8px;
}

.comparison-column .subtitle {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.5;
}

/* Feature List */
.comparison-features {
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
  z-index: 1;
}

.comparison-feature {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  opacity: 0;
  transform: translateX(-10px);
  animation: slideInFeature 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.comparison-feature:last-child {
  border-bottom: none;
}

/* Staggered animation delays */
.comparison-feature:nth-child(1) { animation-delay: 0.1s; }
.comparison-feature:nth-child(2) { animation-delay: 0.15s; }
.comparison-feature:nth-child(3) { animation-delay: 0.2s; }
.comparison-feature:nth-child(4) { animation-delay: 0.25s; }
.comparison-feature:nth-child(5) { animation-delay: 0.3s; }
.comparison-feature:nth-child(6) { animation-delay: 0.35s; }
.comparison-feature:nth-child(7) { animation-delay: 0.4s; }
.comparison-feature:nth-child(8) { animation-delay: 0.45s; }
.comparison-feature:nth-child(9) { animation-delay: 0.5s; }
.comparison-feature:nth-child(10) { animation-delay: 0.55s; }

@keyframes slideInFeature {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Feature Icons */
.feature-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.875rem;
  font-weight: 700;
  margin-top: 2px;
}

.feature-icon.check {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.feature-icon.cross {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.feature-icon.partial {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.featured .feature-icon.check {
  background: rgba(34, 197, 94, 0.25);
  color: #22c55e;
  border-color: rgba(34, 197, 94, 0.5);
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.3);
}

/* Feature Text */
.feature-text {
  flex: 1;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
}

.featured .feature-text {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
}

/* CTA Footer */
.comparison-cta {
  text-align: center;
  margin-top: 60px;
}

.comparison-cta p {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 24px;
}

.comparison-cta .cta-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 32px;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 4px 16px rgba(99, 102, 241, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.comparison-cta .cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 8px 24px rgba(99, 102, 241, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.comparison-cta .cta-button::after {
  content: '→';
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.comparison-cta .cta-button:hover::after {
  transform: translateX(4px);
}

/* Mobile Responsive */
@media (max-width: 968px) {
  .comparison-section {
    padding: 80px 20px;
  }

  .comparison-header h2 {
    font-size: 2rem;
  }

  .comparison-header p {
    font-size: 1rem;
  }

  .comparison-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .comparison-column.featured {
    transform: scale(1);
    order: -1; /* Featured column appears first on mobile */
  }

  .comparison-column.featured:hover {
    transform: translateY(-4px);
  }

  .comparison-column h3 {
    font-size: 1.5rem;
  }

  .feature-text {
    font-size: 0.9rem;
  }

  .comparison-cta {
    margin-top: 40px;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .comparison-column,
  .comparison-column.featured,
  .comparison-cta .cta-button {
    transition: none;
    animation: none;
  }

  .comparison-column:hover,
  .comparison-column.featured:hover {
    transform: none;
  }

  .comparison-feature {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .comparison-cta .cta-button:hover::after {
    transform: none;
  }
}

/* Scroll Reveal Integration */
.comparison-section.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.comparison-section.reveal.active {
  opacity: 1;
  transform: translateY(0);
}
