/* EelNet Sales Site - Animations & Effects */

/* ========================================
   Scroll Reveal Animations
   ======================================== */

/* Base reveal state - elements start hidden */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Staggered delays for grid items */
.reveal-delay-1 {
  transition-delay: 0.1s;
}

.reveal-delay-2 {
  transition-delay: 0.2s;
}

.reveal-delay-3 {
  transition-delay: 0.3s;
}

.reveal-delay-4 {
  transition-delay: 0.4s;
}

/* ========================================
   Hero Section Animations
   ======================================== */

/* Staggered hero entrance */
.hero .hero-badge {
  animation: fadeInUp 0.6s ease 0.2s both;
}

.hero .hero-title {
  animation: fadeInUp 0.6s ease 0.3s both;
}

.hero .hero-description {
  animation: fadeInUp 0.6s ease 0.4s both;
}

.hero .hero-cta {
  animation: fadeInUp 0.6s ease 0.5s both;
}

.hero .hero-visual {
  animation: fadeInUp 0.6s ease 0.6s both;
}

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

/* Network node pulse effect */
.node-server .node-icon {
  animation: serverPulse 3s ease-in-out infinite;
}

@keyframes serverPulse {
  0%, 100% {
    box-shadow: 0 0 30px rgba(0, 217, 255, 0.3);
  }
  50% {
    box-shadow: 0 0 50px rgba(0, 217, 255, 0.5);
  }
}

/* Peer nodes subtle hover */
.node-peer .node-icon {
  transition: all 0.3s ease;
}

.node-peer:hover .node-icon {
  border-color: var(--accent-purple);
  box-shadow: 0 0 20px rgba(189, 147, 249, 0.3);
  transform: scale(1.05);
}

.node-peer:hover .node-icon svg {
  color: var(--accent-purple);
}


/* ========================================
   Card Hover Effects
   ======================================== */

.feature-card,
.pricing-card,
.docs-link {
  position: relative;
  overflow: hidden;
}

/* Shimmer effect on hover */
.feature-card::before,
.pricing-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 217, 255, 0.05),
    transparent
  );
  transition: left 0.5s ease;
  pointer-events: none;
}

.feature-card:hover::before,
.pricing-card:hover::before {
  left: 100%;
}

/* Icon rotation on hover */
.feature-icon {
  transition: transform 0.3s ease, background 0.3s ease;
}

.feature-card:hover .feature-icon {
  transform: rotate(-5deg) scale(1.1);
  background: rgba(0, 217, 255, 0.15);
}

/* ========================================
   Code Block Effects
   ======================================== */

/* Typing cursor effect for code blocks */
.code-block::after {
  content: '';
  display: inline-block;
  width: 2px;
  height: 1.2em;
  background: var(--accent-cyan);
  margin-left: 4px;
  animation: blink 1s step-end infinite;
  vertical-align: text-bottom;
}

@keyframes blink {
  0%, 50% {
    opacity: 1;
  }
  51%, 100% {
    opacity: 0;
  }
}

/* Code tab switching */
.code-panel {
  animation: fadeIn 0.3s ease;
}

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

/* ========================================
   Button Effects
   ======================================== */

.btn {
  position: relative;
  overflow: hidden;
}

/* Ripple effect on click */
.btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.4s ease, height 0.4s ease;
}

.btn:active::after {
  width: 300px;
  height: 300px;
}

/* Primary button glow pulse */
.btn-primary {
  animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% {
    box-shadow: 0 2px 10px rgba(0, 217, 255, 0.3);
  }
  50% {
    box-shadow: 0 2px 20px rgba(0, 217, 255, 0.5);
  }
}

.btn-primary:hover {
  animation: none;
}

/* ========================================
   FAQ Accordion Animation
   ======================================== */

.faq-answer {
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              padding 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-question {
  transition: color 0.2s ease;
}

.faq-question:hover span {
  color: var(--accent-cyan);
}

.faq-item.active .faq-question span {
  color: var(--accent-cyan);
}

/* ========================================
   Form Focus Effects
   ======================================== */

.form-group input,
.form-group select,
.form-group textarea {
  transition: border-color 0.2s ease, 
              box-shadow 0.2s ease,
              transform 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  transform: translateY(-1px);
}

/* Label slide up on focus */
.form-group {
  position: relative;
}

/* ========================================
   Header Scroll Effect
   ======================================== */

.header {
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.header.scrolled {
  background: rgba(10, 14, 20, 0.98);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* ========================================
   Pricing Card Featured Glow
   ======================================== */

.pricing-card-featured {
  animation: featuredGlow 3s ease-in-out infinite;
}

@keyframes featuredGlow {
  0%, 100% {
    box-shadow: 0 0 40px rgba(0, 217, 255, 0.15);
  }
  50% {
    box-shadow: 0 0 60px rgba(0, 217, 255, 0.25);
  }
}

/* Badge shimmer */
.pricing-badge {
  position: relative;
  overflow: hidden;
}

.pricing-badge::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% {
    left: -100%;
  }
  50%, 100% {
    left: 100%;
  }
}

/* ========================================
   Loading States
   ======================================== */

.loading {
  position: relative;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid transparent;
  border-top-color: var(--accent-cyan);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ========================================
   Mobile Menu Animation
   ======================================== */

.nav-links {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.3s ease,
              visibility 0.3s ease;
}

.nav-links li {
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.nav-links.active li {
  opacity: 1;
  transform: translateX(0);
}

.nav-links.active li:nth-child(1) { transition-delay: 0.05s; }
.nav-links.active li:nth-child(2) { transition-delay: 0.1s; }
.nav-links.active li:nth-child(3) { transition-delay: 0.15s; }
.nav-links.active li:nth-child(4) { transition-delay: 0.2s; }
.nav-links.active li:nth-child(5) { transition-delay: 0.25s; }

/* ========================================
   Footer Link Hover
   ======================================== */

.footer-links a {
  position: relative;
  display: inline-block;
}

.footer-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent-cyan);
  transition: width 0.3s ease;
}

.footer-links a:hover::after {
  width: 100%;
}

/* ========================================
   Scroll Progress Indicator (Optional)
   ======================================== */

.scroll-progress {
  position: fixed;
  top: var(--header-height);
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
  z-index: 1001;
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 0.1s linear;
}

/* ========================================
   Reduced Motion
   ======================================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .reveal {
    opacity: 1;
    transform: none;
  }
}

