/* ============================================================
   CYBERSHIELD SECURITY — Animations Stylesheet
   Contains: keyframes, hover effects, pulse rings,
             scan lines, glow pulses, typed cursor,
             particle shimmer, nav slide-down
   ============================================================ */

/* ============================================================
   1. KEYFRAME DEFINITIONS
   ============================================================ */

/* Floating badge bob */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-8px); }
}

/* Scroll-indicator bounce */
@keyframes bounceDown {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}

/* Mobile nav slides down */
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Pulsing glow ring (used on logo, badges) */
@keyframes pulseRing {
  0%   { transform: scale(0.9);  opacity: 0.7; }
  70%  { transform: scale(1.35); opacity: 0; }
  100% { transform: scale(0.9);  opacity: 0; }
}

/* Soft glow breathe (accent elements) */
@keyframes glowBreath {
  0%, 100% { box-shadow: 0 0 18px rgba(0,229,255,0.25); }
  50%       { box-shadow: 0 0 42px rgba(0,229,255,0.55); }
}

/* Horizontal scan line (hero image overlay) */
@keyframes scanLine {
  0%   { top: -2px;   opacity: 0.6; }
  50%  { opacity: 0.3; }
  100% { top: 100%;   opacity: 0; }
}

/* Infinite horizontal marquee (trusted logos on narrow screens) */
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* Gradient shift on gradient-text elements */
@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Shimmer sweep (skeleton / card highlight) */
@keyframes shimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Spin (loading / icon rotate) */
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Fade-in upward */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Zoom in from scale-0.85 */
@keyframes zoomIn {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 1; transform: scale(1); }
}

/* Counter digit flip */
@keyframes flipUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* Blink cursor for typed effect */
@keyframes blinkCursor {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* Toast slide-in from bottom */
@keyframes toastIn {
  from { transform: translateX(-50%) translateY(100%); opacity: 0; }
  to   { transform: translateX(-50%) translateY(0);    opacity: 1; }
}

/* ============================================================
   2. LOGO PULSE RING
   ============================================================ */
.logo-icon {
  position: relative;
}

.logo-icon::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: var(--radius-lg);
  background: var(--gradient-accent);
  opacity: 0;
  z-index: -1;
  animation: pulseRing 3s ease-out infinite;
}

.navbar.scrolled .logo-icon::before {
  animation-play-state: running;
}

/* ============================================================
   3. HERO SCAN LINE
   Scan line is applied to .hero-img (the image itself) so it
   stays clipped to the image bounds — NOT to .hero-dashboard,
   which must overflow: visible to show the floating badges.
   ============================================================ */
.hero-img {
  position: relative;
}

/* Wrap the image in a positioned container for the pseudo-element */
.hero-img-scan {
  position: relative;
  overflow: hidden;        /* clip scan line to image bounds only */
  border-radius: var(--radius-xl);
  display: block;
}

.hero-img-scan::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(0,229,255,0.6) 40%,
    rgba(0,229,255,0.9) 50%,
    rgba(0,229,255,0.6) 60%,
    transparent 100%
  );
  z-index: 2;
  pointer-events: none;
  animation: scanLine 4s linear infinite;
  border-radius: 2px;
}

/* ============================================================
   4. ANIMATED GRADIENT TEXT
   ============================================================ */
.gradient-text {
  background: linear-gradient(
    270deg,
    #00E5FF,
    #0070FF,
    #00C6FF,
    #00E5FF
  );
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 5s ease infinite;
}

/* ============================================================
   5. SECTION TAG PULSE DOT
   ============================================================ */
.section-tag::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
  display: inline-block;
  flex-shrink: 0;
  animation: pulseRing 2s ease-out infinite;
  box-shadow: 0 0 0 0 rgba(0,229,255,0.6);
}

/* ============================================================
   6. HERO BADGE LIVE DOT
   ============================================================ */
.hero-badge {
  position: relative;
}

.hero-badge i {
  animation: glowBreath 2.5s ease-in-out infinite;
  border-radius: 50%;
}

/* ============================================================
   7. CARD SHIMMER ON HOVER
   ============================================================ */
.service-card,
.feature-card,
.stat-card,
.testimonial-card,
.pricing-card,
.step-content,
.counter-item {
  position: relative;
  overflow: hidden;
}

.service-card::before,
.feature-card::before,
.pricing-card::before,
.testimonial-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    105deg,
    transparent 30%,
    rgba(255,255,255,0.04) 50%,
    transparent 70%
  );
  transform: skewX(-20deg);
  transition: none;
  pointer-events: none;
  z-index: 1;
}

.service-card:hover::before,
.feature-card:hover::before,
.pricing-card:hover::before,
.testimonial-card:hover::before {
  animation: shimmer 0.7s ease-out forwards;
  left: 150%;
}

/* ============================================================
   8. BUTTON GLOW PULSE
   ============================================================ */
.btn-primary {
  animation: glowBreath 3s ease-in-out infinite;
}

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

/* ============================================================
   9. BACK-TO-TOP SPIN ON HOVER
   ============================================================ */
.back-to-top:hover i {
  animation: spin 0.4s ease-out;
}

/* ============================================================
   10. NAV LINK ACTIVE INDICATOR SLIDE
   ============================================================ */
.nav-link.active {
  color: var(--color-text);
}

/* ============================================================
   11. SERVICE ICON HOVER ROTATE
   ============================================================ */
.service-card:hover .service-icon,
.feature-card:hover .feature-icon,
.step-content:hover .step-icon {
  /* Defined in style.css — rotate(-8deg) scale(1.1) */
}

/* ============================================================
   12. FLOATING BADGE STAGGERED FLOAT
   ============================================================ */
.float-badge--tl { animation: float 3.2s ease-in-out infinite 0.0s; }
.float-badge--tr { animation: float 3.2s ease-in-out infinite 0.8s; }
.float-badge--bl { animation: float 3.2s ease-in-out infinite 1.6s; }
.float-badge--br { animation: float 3.2s ease-in-out infinite 2.4s; }

/* ============================================================
   13. SCROLL INDICATOR
   ============================================================ */
.scroll-indicator {
  animation: bounceDown 2s ease-in-out infinite;
}

/* ============================================================
   14. STAT CARD NUMBER FLIP (triggered by JS adding .animate class)
   ============================================================ */
.stat-number.animate,
.counter-number.animate {
  animation: flipUp 0.4s ease-out forwards;
}

/* ============================================================
   15. TRUSTED LOGO MARQUEE (activates below 640px via JS class)
   ============================================================ */
.trusted-logos.marquee-active {
  overflow: hidden;
  flex-wrap: nowrap;
  justify-content: flex-start;
  mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
}

.trusted-logos.marquee-active .trusted-logos-inner {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  animation: marquee 18s linear infinite;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ============================================================
   16. CONTACT FORM SUCCESS ANIMATION
   ============================================================ */
.form-success-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(34,197,94,0.1);
  border: 2px solid rgba(34,197,94,0.4);
  font-size: 2rem;
  color: var(--color-success);
  margin: 0 auto var(--space-4);
  animation: zoomIn 0.4s ease-out, glowBreath 2s ease-in-out 0.5s infinite;
}

/* ============================================================
   17. PROCESS STEP NUMBER GLOW
   ============================================================ */
.step-number {
  position: relative;
  display: inline-block;
}

.process-step:hover .step-number {
  color: var(--color-accent);
  opacity: 1;
  text-shadow: 0 0 20px rgba(0,229,255,0.5);
  transition: all var(--transition-base);
}

/* ============================================================
   18. PRICING CARD FEATURED GLOW PULSE
   ============================================================ */
.pricing-card--featured {
  animation: glowBreath 4s ease-in-out infinite;
}

.pricing-card--featured:hover {
  animation: none;
}

/* ============================================================
   19. FAQ ICON ROTATION (reinforced here)
   ============================================================ */
.faq-icon {
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              color 0.2s ease;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

/* ============================================================
   20. HERO CONTENT ENTRANCE (initial page load)
   ============================================================ */
.hero-content {
  animation: fadeInUp 0.8s ease-out 0.1s both;
}

.hero-visual {
  animation: zoomIn 0.8s ease-out 0.3s both;
}

/* ============================================================
   21. NAVBAR TRANSITION ON SCROLL
   ============================================================ */
.navbar {
  transition: background var(--transition-base),
              border-color var(--transition-base),
              box-shadow var(--transition-base);
}

/* ============================================================
   22. SOCIAL LINK LIFT
   ============================================================ */
.social-link {
  transition: color var(--transition-base),
              border-color var(--transition-base),
              transform var(--transition-base),
              box-shadow var(--transition-base);
}

/* ============================================================
   23. ABOUT IMAGE HOVER ZOOM
   ============================================================ */
.about-img-wrapper {
  overflow: hidden;
}

.about-img {
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.about-img-wrapper:hover .about-img {
  transform: scale(1.04);
}

/* ============================================================
   24. TESTIMONIAL QUOTE MARK PULSE
   ============================================================ */
.testimonial-card:hover .testimonial-quote::before {
  color: var(--color-accent);
  opacity: 0.9;
  transition: all var(--transition-base);
}

/* ============================================================
   25. FOOTER LINKS UNDERLINE SLIDE
   ============================================================ */
.footer-links-col ul li a {
  position: relative;
}

.footer-links-col ul li a::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-accent);
  transition: width var(--transition-base);
}

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