/* ============================================================
   Visual Effects for Rerius
   - Aurora Background
   - Flame Glow Effects
   - Scroll Transitions
   ============================================================ */

/* --- Aurora Background for Hero --- */
.hero {
  position: relative;
  z-index: 1;
}

/* Replace the static hero background with a dynamic aurora */
.hero::before {
  display: none !important; /* Hide original */
}

.aurora-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: -1;
  pointer-events: none;
  background: var(--bg);
}

.aurora-blob {
  position: absolute;
  width: 800px;
  height: 600px;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.25;
  mix-blend-mode: screen;
  animation: aurora-float 20s infinite alternate ease-in-out;
}

.aurora-blob-1 {
  background: radial-gradient(circle, var(--ember-red) 0%, transparent 70%);
  top: -200px;
  left: -100px;
  animation-duration: 25s;
}

.aurora-blob-2 {
  background: radial-gradient(circle, var(--ember-flame) 0%, transparent 70%);
  top: -100px;
  right: -100px;
  animation-duration: 30s;
  animation-delay: -5s;
}

.aurora-blob-3 {
  background: radial-gradient(circle, var(--ember-amber) 0%, transparent 70%);
  bottom: -200px;
  left: 20%;
  animation-duration: 22s;
  animation-delay: -10s;
}

@keyframes aurora-float {
  0% { transform: translate(0, 0) scale(1) rotate(0deg); }
  33% { transform: translate(5%, 10%) scale(1.1) rotate(5deg); }
  66% { transform: translate(-5%, 5%) scale(0.9) rotate(-5deg); }
  100% { transform: translate(0, 0) scale(1) rotate(0deg); }
}

/* --- Flame Glow Effects --- */
.hero h1 .grad {
  position: relative;
  text-shadow: 0 0 20px rgba(255, 95, 0, 0.3);
  animation: flame-pulse 3s infinite ease-in-out;
}

@keyframes flame-pulse {
  0%, 100% { text-shadow: 0 0 20px rgba(255, 95, 0, 0.3); }
  50% { text-shadow: 0 0 35px rgba(255, 95, 0, 0.6), 0 0 10px rgba(255, 43, 31, 0.4); }
}

.btn-primary {
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(255, 95, 0, 0.2);
  transition: all 0.3s ease;
}

.btn-primary:hover {
  box-shadow: 0 6px 25px rgba(255, 95, 0, 0.4);
  transform: translateY(-2px);
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.btn-primary:hover::after {
  opacity: 1;
  animation: flare 1.5s infinite linear;
}

@keyframes flare {
  from { transform: translate(-20%, -20%) scale(0.5); }
  to { transform: translate(20%, 20%) scale(1.2); }
}

/* --- Scroll Reveal Transitions --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

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

/* Staggered reveal for children */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-stagger.active > * {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger.active > *:nth-child(1) { transition-delay: 0.1s; }
.reveal-stagger.active > *:nth-child(2) { transition-delay: 0.2s; }
.reveal-stagger.active > *:nth-child(3) { transition-delay: 0.3s; }
.reveal-stagger.active > *:nth-child(4) { transition-delay: 0.4s; }
.reveal-stagger.active > *:nth-child(5) { transition-delay: 0.5s; }
.reveal-stagger.active > *:nth-child(6) { transition-delay: 0.6s; }

/* Smooth section transitions */
section {
  transition: background 0.5s ease;
}

/* Hover effects for cards */
.feat-card {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s ease !important;
}

.feat-card:hover {
  transform: translateY(-8px) scale(1.02);
  z-index: 2;
}
