/* ===== INNRadar Promo Animations ===== */

/* --- Keyframes --- */

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

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

@keyframes pulseSoft {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes floatSlow {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  33% { transform: translateY(-5px) rotate(1deg); }
  66% { transform: translateY(-8px) rotate(-1deg); }
}

@keyframes glow {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.02); }
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes shimmer {
  0% { transform: translateX(-100%) rotate(25deg); }
  100% { transform: translateX(200%) rotate(25deg); }
}

@keyframes iconBounce {
  0%, 100% { transform: scale(1); }
  30% { transform: scale(1.2); }
  60% { transform: scale(0.95); }
}

@keyframes borderGlow {
  0%, 100% { box-shadow: 0 0 5px rgba(37, 99, 235, 0.1); }
  50% { box-shadow: 0 0 20px rgba(37, 99, 235, 0.3); }
}

@keyframes particleFloat1 {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.3; }
  25% { transform: translate(10px, -20px) scale(1.1); opacity: 0.5; }
  50% { transform: translate(-5px, -40px) scale(0.9); opacity: 0.3; }
  75% { transform: translate(-15px, -20px) scale(1.05); opacity: 0.4; }
}

@keyframes particleFloat2 {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.2; }
  30% { transform: translate(-15px, -25px) scale(1.2); opacity: 0.4; }
  60% { transform: translate(10px, -45px) scale(0.8); opacity: 0.2; }
}

@keyframes particleFloat3 {
  0%, 100% { transform: translate(0, 0) scale(0.8); opacity: 0.25; }
  40% { transform: translate(20px, -30px) scale(1); opacity: 0.45; }
  80% { transform: translate(-10px, -50px) scale(1.1); opacity: 0.2; }
}

@keyframes accordionSlideDown {
  from { opacity: 0; max-height: 0; padding-top: 0; padding-bottom: 0; }
  to { opacity: 1; max-height: 200px; padding-top: 0; padding-bottom: 1.5rem; }
}

@keyframes accordionSlideUp {
  from { opacity: 1; max-height: 200px; padding-top: 0; padding-bottom: 1.5rem; }
  to { opacity: 0; max-height: 0; padding-top: 0; padding-bottom: 0; }
}

/* --- Animation utility classes --- */

/* Scroll-triggered animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delays for cards */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }
.stagger-6 { transition-delay: 0.6s; }

/* Hero animations */
.hero-badge {
  animation: fadeInDown 0.8s ease-out both;
}

.hero-title {
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-subtitle {
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

.hero-button {
  animation: fadeInUp 0.8s ease-out 0.6s both;
}

.hero-image-wrapper {
  animation: fadeInScale 1s ease-out 0.8s both;
}

.hero-glow {
  animation: glow 4s ease-in-out infinite;
}

.hero-float {
  animation: floatSlow 6s ease-in-out infinite;
}

/* Card hover animations */
.card-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.card-hover:hover .card-icon {
  animation: iconBounce 0.6s ease;
}

.card-icon {
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.card-hover:hover .card-icon {
  background-color: rgba(37, 99, 235, 0.2) !important;
}

/* Tab panel animation */
.tab-panel-animate {
  animation: fadeInScale 0.4s ease-out;
}

/* Popular plan pulse */
.popular-plan {
  animation: pulse 3s ease-in-out infinite;
}

.popular-plan-badge {
  animation: pulseSoft 2s ease-in-out infinite;
}

/* CTA section */
.cta-gradient {
  background-size: 200% 200%;
  animation: gradientShift 8s ease infinite;
}

.cta-button-wrapper {
  position: relative;
  overflow: hidden;
}

.cta-button-wrapper::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    to right,
    transparent 0%,
    rgba(255, 255, 255, 0.1) 50%,
    transparent 100%
  );
  transform: rotate(25deg);
  transition: transform 0.6s;
  pointer-events: none;
}

.cta-button-wrapper:hover::after {
  animation: shimmer 0.8s ease-out;
}

/* Floating particles */
.particle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.particle-1 {
  width: 80px;
  height: 80px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.15) 0%, transparent 70%);
  top: 20%;
  left: 10%;
  animation: particleFloat1 12s ease-in-out infinite;
}

.particle-2 {
  width: 60px;
  height: 60px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.12) 0%, transparent 70%);
  top: 60%;
  right: 15%;
  animation: particleFloat2 15s ease-in-out infinite;
}

.particle-3 {
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.1) 0%, transparent 70%);
  bottom: 20%;
  left: 20%;
  animation: particleFloat3 18s ease-in-out infinite;
}

.particle-4 {
  width: 50px;
  height: 50px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.08) 0%, transparent 70%);
  top: 30%;
  right: 25%;
  animation: particleFloat1 20s ease-in-out infinite reverse;
}

.particle-5 {
  width: 70px;
  height: 70px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.1) 0%, transparent 70%);
  bottom: 30%;
  right: 10%;
  animation: particleFloat2 14s ease-in-out infinite;
}

/* Accordion animation */
.accordion-content {
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
  max-height: 0;
  opacity: 0;
}

.accordion-content.is-open {
  max-height: 300px;
  opacity: 1;
}

/* Section heading animation */
.section-heading {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.section-heading.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Comparison table row animation */
.table-row-animate {
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

.table-row-animate.is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* Smooth reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .animate-on-scroll {
    opacity: 1;
    transform: none;
  }
  
  .particle {
    animation: none !important;
  }
}

/* ===== Navigation styles ===== */
#main-nav {
  background-color: transparent;
  transition: background-color 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}

#main-nav .nav-link {
  color: #334155;
  transition: color 0.2s ease;
  position: relative;
}

#main-nav .nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #2563eb;
  transition: width 0.3s ease;
}

#main-nav .nav-link:hover {
  color: #2563eb;
}

#main-nav .nav-link:hover::after {
  width: 100%;
}

#main-nav .nav-cta {
  background-color: #2563eb;
  color: white;
  border-radius: 8px;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

#main-nav .nav-cta:hover {
  background-color: #1d4ed8;
  transform: translateY(-1px);
}

/* ===== "How it works" section ===== */
.step-number-badge {
  display: flex !important;
  width: 4rem !important;
  height: 4rem !important;
  border-radius: 9999px !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  flex-shrink: 0;
  line-height: 1;
  overflow: hidden;
}

.animate-on-scroll:hover .step-number-badge {
  transform: scale(1.1);
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
}

/* ===== Cookie banner ===== */
#cookie-banner {
  animation: slideUpBanner 0.5s ease-out;
}

@keyframes slideUpBanner {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

/* ===== Back to top button ===== */
#back-to-top {
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

#back-to-top:hover {
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.4);
}

/* ===== Padding top adjustment for fixed nav ===== */
#hero {
  padding-top: 4rem;
}

@media (min-width: 40rem) {
  #hero { padding-top: 5rem; }
}

@media (min-width: 48rem) {
  #hero { padding-top: 6rem; }
}
