/* ============================================
   STRATIFY DIGITAL — PREMIUM ANIMATIONS
   ============================================ */

/* --- Particle Canvas Background --- */
#particle-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
}

/* --- Page Load Transition --- */
.page-loader {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #061a5a, #0A2472);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 20px;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
.page-loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 2rem;
  color: #fff;
  letter-spacing: -0.02em;
}
.loader-logo span { color: #00C6FF; }
.loader-bar {
  width: 200px; height: 3px;
  background: rgba(255,255,255,0.15);
  border-radius: 99px;
  overflow: hidden;
}
.loader-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #1E90FF, #00C6FF);
  border-radius: 99px;
  animation: loaderFill 1.2s cubic-bezier(.4,0,.2,1) forwards;
}
@keyframes loaderFill {
  from { width: 0; }
  to { width: 100%; }
}

/* --- Cursor Glow --- */
.cursor-glow {
  width: 400px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(30,144,255,0.08) 0%, transparent 70%);
  position: fixed;
  pointer-events: none;
  z-index: 1;
  transform: translate(-50%, -50%);
  transition: left 0.12s ease, top 0.12s ease;
}

/* --- Scroll Reveal Variants --- */
.reveal { opacity: 0; transform: translateY(36px); transition: opacity 0.7s cubic-bezier(.22,1,.36,1), transform 0.7s cubic-bezier(.22,1,.36,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal-left { opacity: 0; transform: translateX(-40px); transition: opacity 0.7s cubic-bezier(.22,1,.36,1), transform 0.7s cubic-bezier(.22,1,.36,1); }
.reveal-left.in { opacity: 1; transform: none; }
.reveal-right { opacity: 0; transform: translateX(40px); transition: opacity 0.7s cubic-bezier(.22,1,.36,1), transform 0.7s cubic-bezier(.22,1,.36,1); }
.reveal-right.in { opacity: 1; transform: none; }
.reveal-scale { opacity: 0; transform: scale(0.88); transition: opacity 0.65s cubic-bezier(.22,1,.36,1), transform 0.65s cubic-bezier(.22,1,.36,1); }
.reveal-scale.in { opacity: 1; transform: scale(1); }

/* Stagger siblings */
.stagger > *:nth-child(1) { transition-delay: 0s; }
.stagger > *:nth-child(2) { transition-delay: 0.08s; }
.stagger > *:nth-child(3) { transition-delay: 0.16s; }
.stagger > *:nth-child(4) { transition-delay: 0.24s; }
.stagger > *:nth-child(5) { transition-delay: 0.32s; }
.stagger > *:nth-child(6) { transition-delay: 0.40s; }

/* --- Hero Text Typewriter --- */
.typewriter {
  display: inline-block;
  border-right: 3px solid #00C6FF;
  white-space: nowrap;
  overflow: hidden;
  animation: blink-caret 0.8s step-end infinite;
}
@keyframes blink-caret { from,to { border-color: transparent } 50% { border-color: #00C6FF } }

/* --- Hero Floating Particles --- */
.hero-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}
.hp {
  position: absolute;
  border-radius: 50%;
  background: rgba(0, 198, 255, 0.5);
  animation: floatParticle var(--dur, 6s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}
@keyframes floatParticle {
  0%   { transform: translateY(0) translateX(0) scale(1); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 0.6; }
  100% { transform: translateY(-120px) translateX(var(--dx, 20px)) scale(0.5); opacity: 0; }
}

/* --- Hero shimmer text --- */
.hero h1 {
  background: linear-gradient(120deg, #fff 0%, #cfe1ff 40%, #fff 60%, #7ec8ff 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: textShimmer 4s linear infinite;
}
@keyframes textShimmer {
  to { background-position: 200% center; }
}

/* --- Magnetic Button Effect --- */
.btn-primary, .btn-ghost, .nav-cta {
  transition: transform 0.25s cubic-bezier(.22,1,.36,1), box-shadow 0.25s ease, filter 0.25s ease !important;
  will-change: transform;
}

/* --- Cards Enhanced Hover --- */
.card {
  transition: transform 0.35s cubic-bezier(.22,1,.36,1), box-shadow 0.35s ease, border-color 0.3s ease !important;
}
.card:hover {
  transform: translateY(-8px) scale(1.015) !important;
  box-shadow: 0 20px 50px rgba(10,36,114,.16) !important;
}

/* Card icon animated gradient */
.card .icon {
  background: linear-gradient(135deg, var(--accent), var(--highlight));
  background-size: 200% 200%;
  animation: iconGrad 3s ease infinite;
}
@keyframes iconGrad {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* --- Counting numbers glitch effect --- */
.stat .num {
  position: relative;
}

/* --- Hero image tilt --- */
.hero-img {
  animation: heroFloat 7s ease-in-out infinite;
}
@keyframes heroFloat {
  0%, 100% { transform: perspective(1000px) rotateY(-6deg) rotateX(2deg) translateY(0); }
  50%       { transform: perspective(1000px) rotateY(-4deg) rotateX(1deg) translateY(-12px); }
}
.hero-img:hover {
  animation: none;
  transform: perspective(1000px) rotateY(-1deg) rotateX(0deg) scale(1.02) !important;
}

/* --- Section line accent --- */
.section-title::after {
  content: '';
  display: block;
  width: 60px; height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--highlight));
  border-radius: 99px;
  margin: 14px auto 0;
  animation: lineExpand 1s ease forwards;
  transform-origin: center;
}
@keyframes lineExpand {
  from { width: 0; opacity: 0; }
  to   { width: 60px; opacity: 1; }
}

/* --- Testimonial card shimmer border --- */
.t-card {
  position: relative;
  overflow: hidden;
}
.t-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, transparent 40%, rgba(30,144,255,0.4) 60%, transparent 80%);
  background-size: 300% 300%;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: borderShimmer 3s linear infinite;
  pointer-events: none;
}
@keyframes borderShimmer {
  0%   { background-position: 100% 0%; }
  100% { background-position: -100% 100%; }
}

/* --- Process step connector line --- */
.process {
  position: relative;
}
.process::before {
  content: '';
  position: absolute;
  top: 38px; left: 10%; right: 10%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--highlight), transparent);
  z-index: 0;
  animation: lineGrow 1.5s ease 0.5s both;
  transform-origin: left;
}
@keyframes lineGrow {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}
.step { z-index: 1; }
.step .n {
  animation: pulseNum 2s ease-in-out infinite;
}
@keyframes pulseNum {
  0%, 100% { box-shadow: 0 0 0 0 rgba(30,144,255,0.4); }
  50%       { box-shadow: 0 0 0 10px rgba(30,144,255,0); }
}

/* --- CTA Banner animated gradient --- */
.cta-banner {
  background-size: 300% 300% !important;
  animation: ctaGrad 8s ease infinite;
}
@keyframes ctaGrad {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.cta-banner h2 {
  animation: headingGlow 3s ease-in-out infinite;
}
@keyframes headingGlow {
  0%, 100% { text-shadow: 0 0 0 transparent; }
  50%       { text-shadow: 0 0 30px rgba(0,198,255,0.3); }
}

/* --- WhatsApp pulse enhanced --- */
.sticky-cta .wa {
  animation: waPulse 2.4s cubic-bezier(.36,.11,.89,.32) infinite !important;
}
@keyframes waPulse {
  0%   { box-shadow: 0 0 0 0 rgba(37,211,102,0.6), 0 12px 30px rgba(0,0,0,.25); }
  70%  { box-shadow: 0 0 0 16px rgba(37,211,102,0), 0 12px 30px rgba(0,0,0,.25); }
  100% { box-shadow: 0 0 0 0 rgba(37,211,102,0), 0 12px 30px rgba(0,0,0,.25); }
}

/* --- FAQ animated --- */
.faq details p {
  animation: faqSlide 0.3s cubic-bezier(.22,1,.36,1) both;
}
@keyframes faqSlide {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: none; }
}

/* --- Benefit items stagger --- */
.benefit {
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.benefit.in {
  opacity: 1;
  transform: none;
}

/* --- Eyebrow badge animation --- */
.eyebrow {
  position: relative;
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: '';
  width: 20px; height: 2px;
  background: var(--accent);
  display: inline-block;
  animation: eyebrowLine 0.6s ease both;
}
@keyframes eyebrowLine {
  from { width: 0; opacity: 0; }
  to   { width: 20px; opacity: 1; }
}

/* --- Mobile nav CTA fix --- */
@media (max-width: 960px) {
  .nav-links {
    z-index: 100;
    padding: 20px 16px 24px;
    overflow-y: auto;
    max-height: calc(100vh - 72px);
  }
  .nav-cta {
    display: block !important;
    text-align: center;
    margin-top: 8px;
    padding: 13px 18px !important;
    white-space: nowrap;
    overflow: visible;
    width: 100%;
    box-sizing: border-box;
  }
  .hero-cta .btn {
    width: 100%;
    justify-content: center;
    text-align: center;
    padding: 14px 20px;
    font-size: 0.96rem;
    box-sizing: border-box;
    white-space: nowrap;
  }
  .hero-cta {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .hero h1 {
    font-size: clamp(1.6rem, 6vw, 2.4rem);
    line-height: 1.2;
  }
  .hero .lead {
    font-size: 1rem;
  }
  .hero {
    padding: 56px 0 48px;
  }
}

@media (max-width: 560px) {
  .nav { 
    padding: 0 16px; 
    height: 64px;
  }
  .site-header .container {
    padding: 0 16px;
  }
  .nav-cta {
    font-size: 0.88rem !important;
    padding: 11px 14px !important;
  }
  .hero {
    padding: 48px 0 40px;
  }
  .hero h1 {
    font-size: clamp(1.45rem, 5.5vw, 2rem);
  }
  .hero .lead {
    font-size: 0.92rem;
    margin: 12px 0 20px;
  }
}

/* --- Gradient text for headings in sections --- */
.section-title h2 {
  background: linear-gradient(120deg, var(--primary) 0%, #1a4db8 60%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* --- Smooth scroll indicator --- */
.scroll-indicator {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.5);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: fadeIn 1s 2s ease both;
}
.scroll-indicator .mouse {
  width: 22px; height: 34px;
  border: 2px solid rgba(255,255,255,0.35);
  border-radius: 14px;
  position: relative;
}
.scroll-indicator .mouse::after {
  content: '';
  position: absolute;
  top: 5px; left: 50%;
  transform: translateX(-50%);
  width: 4px; height: 6px;
  background: #fff;
  border-radius: 99px;
  animation: scrollDot 1.8s ease-in-out infinite;
}
@keyframes scrollDot {
  0%   { transform: translateX(-50%) translateY(0); opacity: 1; }
  100% { transform: translateX(-50%) translateY(12px); opacity: 0; }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
