/* ═══════════════════════════════════════════
   SolarDongle — Advanced Animations
   Cursor follower, parallax, scroll reveals, particles
   ═══════════════════════════════════════════ */

/* ── Cursor Follower ── */
.cursor-glow {
  position: fixed;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(46,125,50,0.08) 0%, rgba(46,125,50,0.02) 40%, transparent 70%);
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width 0.4s ease, height 0.4s ease, opacity 0.3s ease;
  will-change: transform;
  mix-blend-mode: normal;
}

.cursor-glow.hovering-card {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(46,125,50,0.12) 0%, rgba(46,125,50,0.04) 40%, transparent 70%);
}

.cursor-dot {
  position: fixed;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.2s ease, height 0.2s ease, background 0.2s ease;
  will-change: transform;
}

.cursor-dot.hovering-link {
  width: 40px;
  height: 40px;
  background: rgba(46,125,50,0.15);
  border: 2px solid var(--primary);
}

/* Hide custom cursor on touch devices */
@media (hover: none) {
  .cursor-glow, .cursor-dot { display: none !important; }
}

/* ── Touch Ripple ── */
.touch-ripple {
  position: fixed;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(46,125,50,0.3) 0%, transparent 70%);
  pointer-events: none;
  z-index: 9997;
  animation: rippleExpand 0.6s ease-out forwards;
}

@keyframes rippleExpand {
  0% { width: 0; height: 0; opacity: 1; transform: translate(-50%, -50%); }
  100% { width: 200px; height: 200px; opacity: 0; transform: translate(-50%, -50%); }
}

/* ── Floating Particles ── */
.particles-container {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.particle {
  position: absolute;
  border-radius: 50%;
  opacity: 0;
  animation: particleFloat linear infinite;
}

@keyframes particleFloat {
  0% { opacity: 0; transform: translateY(100vh) rotate(0deg); }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-100px) rotate(720deg); }
}

/* ── Scroll Reveal Animations ── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.reveal-left {
  opacity: 0;
  transform: translateX(-60px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(60px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-scale.visible {
  opacity: 1;
  transform: scale(1);
}

/* Staggered children */
.stagger-children .reveal:nth-child(1) { transition-delay: 0s; }
.stagger-children .reveal:nth-child(2) { transition-delay: 0.1s; }
.stagger-children .reveal:nth-child(3) { transition-delay: 0.2s; }
.stagger-children .reveal:nth-child(4) { transition-delay: 0.3s; }
.stagger-children .reveal:nth-child(5) { transition-delay: 0.4s; }
.stagger-children .reveal:nth-child(6) { transition-delay: 0.5s; }
.stagger-children .reveal:nth-child(7) { transition-delay: 0.6s; }
.stagger-children .reveal:nth-child(8) { transition-delay: 0.7s; }

/* ── Parallax ── */
.parallax-layer {
  will-change: transform;
  transition: transform 0.1s linear;
}

/* ── Card 3D Tilt ── */
.tilt-card {
  transform-style: preserve-3d;
  transition: transform 0.15s ease-out;
}

.tilt-card:hover {
  box-shadow: 0 20px 60px rgba(0,0,0,0.12);
}

/* ── Gradient Text ── */
.gradient-text {
  background: linear-gradient(135deg, #1B5E20 0%, #2E7D32 50%, #66BB6A 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Glowing Border Card ── */
.glow-card {
  position: relative;
  overflow: hidden;
}

.glow-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(135deg, transparent 30%, rgba(46,125,50,0.3) 50%, transparent 70%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.glow-card:hover::before {
  opacity: 1;
}

/* ── Animated Background Gradient ── */
.animated-bg {
  background: linear-gradient(-45deg, #E8F5E9, #C8E6C9, #A5D6A7, #FFF8E1, #E8F5E9);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
}

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

/* ── Pulse ── */
.pulse {
  animation: pulse 2s ease-in-out infinite;
}

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

/* ── Floating animation ── */
.floating {
  animation: floating 3s ease-in-out infinite;
}

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

/* ── Line Draw ── */
.line-draw path {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  transition: stroke-dashoffset 2s ease;
}

.line-draw.visible path {
  stroke-dashoffset: 0;
}

/* ── Number Counter Glow ── */
.counter-glow {
  text-shadow: 0 0 20px rgba(102,187,106,0.4);
}

/* ── Magnetic Button ── */
.magnetic-btn {
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ── Smooth page transitions ── */
body {
  opacity: 0;
  animation: fadeInPage 0.5s ease forwards;
}

@keyframes fadeInPage {
  to { opacity: 1; }
}

/* ── Marquee for brands ── */
.marquee-track {
  display: flex;
  animation: marquee 30s linear infinite;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
