/* ══════════════════════════════════════════════════════════════════════════
   comparison.css – Karşılaştırma sayfası animasyonları ve stilleri
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Karşılaştır butonu parlaması ──────────────────────────────────────── */
@keyframes btn-glow-pulse {
  0%, 100% {
    box-shadow:
      0 4px 20px rgba(16, 185, 129, 0.35),
      0 0 0 0 rgba(16, 185, 129, 0.45);
  }
  50% {
    box-shadow:
      0 8px 40px rgba(16, 185, 129, 0.6),
      0 0 0 10px rgba(16, 185, 129, 0);
  }
}

@keyframes btn-shimmer {
  0%   { background-position: -200% center; }
  100% { background-position:  200% center; }
}

.btn-compare {
  position: relative;
  isolation: isolate;
  animation: btn-glow-pulse 2.5s ease-in-out infinite;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.btn-compare::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 15px;
  background: conic-gradient(
    from 0deg,
    #10b981, #3b82f6, #8b5cf6, #ec4899, #10b981
  );
  z-index: -1;
  opacity: 0;
  transition: opacity 0.35s ease;
  filter: blur(10px);
}

.btn-compare:hover::before,
.btn-compare:focus-visible::before {
  opacity: 0.85;
}

.btn-compare:hover {
  transform: translateY(-2px) scale(1.04);
}

.btn-compare:active {
  transform: translateY(0) scale(0.98);
  animation: none;
}

.btn-compare.loading {
  animation: none;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    #10b981 0%, #3b82f6 25%, #8b5cf6 50%, #3b82f6 75%, #10b981 100%
  );
  background-size: 300% auto;
  animation: btn-shimmer 1.4s linear infinite;
}

/* ── VS Overlay ─────────────────────────────────────────────────────────── */
@keyframes vs-overlay-in  { from { opacity: 0; } to { opacity: 1; } }
@keyframes vs-overlay-out { from { opacity: 1; } to { opacity: 0; } }

@keyframes vs-name-left {
  from { opacity: 0; transform: translateX(-100px) scale(0.8) skewX(6deg); }
  to   { opacity: 1; transform: translateX(0)       scale(1)   skewX(0deg); }
}

@keyframes vs-name-right {
  from { opacity: 0; transform: translateX(100px)  scale(0.8) skewX(-6deg); }
  to   { opacity: 1; transform: translateX(0)       scale(1)   skewX(0deg); }
}

@keyframes vs-badge-slam {
  0%   { opacity: 0; transform: scale(4)    rotate(-12deg); filter: blur(8px); }
  55%  { opacity: 1; transform: scale(0.88) rotate(4deg);   filter: blur(0); }
  75%  { transform: scale(1.1)  rotate(-2deg); }
  90%  { transform: scale(0.97) rotate(1deg); }
  100% { opacity: 1; transform: scale(1)    rotate(0deg); }
}

@keyframes vs-badge-glow {
  0%, 100% {
    text-shadow:
      0 0 20px rgba(251, 191, 36, 0.9),
      0 0 50px rgba(251, 191, 36, 0.45),
      0 0 90px rgba(239, 68, 68, 0.25);
  }
  50% {
    text-shadow:
      0 0 30px rgba(251, 191, 36, 1),
      0 0 80px rgba(251, 191, 36, 0.8),
      0 0 120px rgba(239, 68, 68, 0.5);
  }
}

@keyframes vs-line-expand {
  from { transform: scaleX(0); opacity: 0; }
  to   { transform: scaleX(1); opacity: 1; }
}

@keyframes vs-bg-shift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes spark-burst {
  0%   { opacity: 1; transform: translate(0, 0) scale(1); }
  100% { opacity: 0; transform: translate(var(--tx), var(--ty)) scale(0.1); }
}

@keyframes vs-ripple {
  0%   { transform: scale(0.5); opacity: 0.7; }
  100% { transform: scale(2.5); opacity: 0; }
}

#vs-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  pointer-events: none;
  background: linear-gradient(135deg, #020617 0%, #0f172a 40%, #1e1b4b 70%, #020617 100%);
  background-size: 300% 300%;
}

#vs-overlay.is-active {
  display: flex;
  animation: vs-overlay-in 0.3s ease forwards, vs-bg-shift 4s ease infinite;
}

#vs-overlay.is-out {
  animation: vs-overlay-out 0.4s ease forwards;
}

/* Mesh/grid overlay on VS bg */
#vs-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(16, 185, 129, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 185, 129, 0.05) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.vs-layout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1.5rem, 5vw, 4rem);
  padding: 2rem;
  width: 100%;
  max-width: 900px;
}

.vs-name {
  flex: 1;
  font-size: clamp(1.2rem, 3.5vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  word-break: break-word;
  max-width: 35vw;
}

.vs-name--left {
  text-align: right;
  color: #6ee7b7;
  animation: vs-name-left 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s both;
}

.vs-name--right {
  text-align: left;
  color: #93c5fd;
  animation: vs-name-right 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s both;
}

.vs-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.vs-badge {
  font-size: clamp(3rem, 9vw, 6.5rem);
  font-weight: 900;
  color: #fbbf24;
  letter-spacing: -0.04em;
  line-height: 1;
  animation:
    vs-badge-slam 0.75s cubic-bezier(0.34, 1.56, 0.64, 1) 0.45s both,
    vs-badge-glow 1.6s ease-in-out 1.2s infinite;
}

.vs-line {
  height: 2px;
  width: 100px;
  background: linear-gradient(90deg, transparent, rgba(251, 191, 36, 0.7), transparent);
  border-radius: 1px;
  transform-origin: center;
}

.vs-line--top {
  animation: vs-line-expand 0.4s ease 0.85s both;
}

.vs-line--bot {
  animation: vs-line-expand 0.4s ease 0.9s both;
}

.vs-ripple {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 120px;
  height: 120px;
  margin: -60px 0 0 -60px;
  border: 2px solid rgba(251, 191, 36, 0.4);
  border-radius: 50%;
  animation: vs-ripple 1.2s ease-out 1.0s both;
  pointer-events: none;
}

.vs-ripple:nth-child(2) {
  animation-delay: 1.15s;
  border-color: rgba(16, 185, 129, 0.35);
}

.vs-spark {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  animation: spark-burst var(--dur, 0.9s) ease-out var(--delay, 0.5s) both;
}

/* ── Reveal on scroll ────────────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity  0.65s ease,
    transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.18s; }
.reveal-delay-3 { transition-delay: 0.28s; }
.reveal-delay-4 { transition-delay: 0.38s; }

/* ── Card entrance ───────────────────────────────────────────────────────── */
@keyframes card-from-left {
  from { opacity: 0; transform: translateX(-48px) scale(0.95); }
  to   { opacity: 1; transform: translateX(0)      scale(1);   }
}

@keyframes card-from-right {
  from { opacity: 0; transform: translateX(48px) scale(0.95); }
  to   { opacity: 1; transform: translateX(0)     scale(1);   }
}

@keyframes section-rise {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: translateY(0); }
}

.anim-card-left  { animation: card-from-left  0.55s cubic-bezier(0.22, 1, 0.36, 1) both; }
.anim-card-right { animation: card-from-right 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both; }
.anim-section    { animation: section-rise    0.6s  cubic-bezier(0.22, 1, 0.36, 1) both; }

/* ── Form card glow on focus ─────────────────────────────────────────────── */
.comparison-form-card {
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.comparison-form-card:focus-within {
  box-shadow:
    0 0 0 1px rgba(16, 185, 129, 0.2),
    0 8px 40px rgba(16, 185, 129, 0.08),
    0 20px 60px rgba(59, 130, 246, 0.06);
  transform: translateY(-2px);
}

/* ── Hero pulse orbs ─────────────────────────────────────────────────────── */
@keyframes orb-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(20px, -15px) scale(1.05); }
  66%       { transform: translate(-10px, 10px) scale(0.97); }
}

.comparison-orb {
  animation: orb-float var(--dur, 8s) ease-in-out var(--delay, 0s) infinite;
}

/* ── Scroll progress indicator on hero ───────────────────────────────────── */
@keyframes hero-fade-in {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-content > * {
  animation: hero-fade-in 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-content > *:nth-child(1) { animation-delay: 0.1s; }
.hero-content > *:nth-child(2) { animation-delay: 0.2s; }
.hero-content > *:nth-child(3) { animation-delay: 0.3s; }
