/* ==========================================
   APPSGAIN TECHNOLOGIES – Animations & Utilities
   ========================================== */

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

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

/* ---- Scroll Reveal ---- */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}
.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal-left.visible {
  opacity: 1;
  transform: none;
}
.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal-right.visible {
  opacity: 1;
  transform: none;
}
.reveal-group > * {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal-group.visible > *:nth-child(1) { opacity: 1; transform: none; transition-delay: 0s; }
.reveal-group.visible > *:nth-child(2) { opacity: 1; transform: none; transition-delay: 0.1s; }
.reveal-group.visible > *:nth-child(3) { opacity: 1; transform: none; transition-delay: 0.2s; }
.reveal-group.visible > *:nth-child(4) { opacity: 1; transform: none; transition-delay: 0.3s; }
.reveal-group.visible > *:nth-child(5) { opacity: 1; transform: none; transition-delay: 0.4s; }
.reveal-group.visible > *:nth-child(6) { opacity: 1; transform: none; transition-delay: 0.5s; }
.reveal-group.visible > *:nth-child(7) { opacity: 1; transform: none; transition-delay: 0.6s; }
.reveal-group.visible > *:nth-child(8) { opacity: 1; transform: none; transition-delay: 0.7s; }
.reveal-group.visible > *:nth-child(9) { opacity: 1; transform: none; transition-delay: 0.8s; }

/* ---- Glassmorphism ---- */
.glass {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.15);
}
.glass-dark {
  background: rgba(13,27,62,0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.10);
}
.glass-light {
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.5);
  box-shadow: 0 8px 32px rgba(13,27,62,0.12);
}

/* ---- Gradient Text ---- */
.grad-text {
  background: linear-gradient(135deg, #06b6d4, #a78bfa, #2563eb);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.grad-text-warm {
  background: linear-gradient(135deg, #f59e0b, #ef4444, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.grad-text-green {
  background: linear-gradient(135deg, #10b981, #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---- Animated Blobs ---- */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.40;
  pointer-events: none;
  animation: blobMove 14s ease-in-out infinite;
}
.blob-1 {
  width: 420px; height: 420px;
  background: radial-gradient(circle, #7c3aed, #2563eb);
  top: -100px; left: -80px;
  animation-delay: 0s;
}
.blob-2 {
  width: 320px; height: 320px;
  background: radial-gradient(circle, #06b6d4, #059669);
  top: 40%; right: -60px;
  animation-delay: -5s;
}
.blob-3 {
  width: 260px; height: 260px;
  background: radial-gradient(circle, #e11d48, #d97706);
  bottom: -60px; left: 40%;
  animation-delay: -9s;
}
@keyframes blobMove {
  0%,100% { transform: translate(0,0) scale(1); }
  33%      { transform: translate(28px,-18px) scale(1.06); }
  66%      { transform: translate(-18px,26px) scale(0.94); }
}

/* ---- Floating Tags / Cards ---- */
.float-anim {
  animation: floatY 4s ease-in-out infinite;
}
.float-anim-slow {
  animation: floatY 6s ease-in-out infinite;
  animation-delay: -2s;
}
.float-anim-fast {
  animation: floatY 3s ease-in-out infinite;
  animation-delay: -1s;
}
@keyframes floatY {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

/* ---- Particles Canvas ---- */
#particlesCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* ---- Marquee Carousel ---- */
.marquee-wrap {
  overflow: hidden;
  width: 100%;
}
.marquee-track {
  display: flex;
  gap: 48px;
  width: max-content;
  align-items: center;
  animation: marquee 30s linear infinite;
}
.marquee-wrap:hover .marquee-track {
  animation-play-state: paused;
}
.marquee-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 28px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  box-shadow: 0 2px 12px rgba(13,27,62,0.06);
  transition: box-shadow 0.3s;
}
.marquee-item:hover {
  box-shadow: 0 6px 24px rgba(13,27,62,0.14);
}
.marquee-item i {
  font-size: 1.1rem;
  filter: grayscale(100%);
  opacity: 0.65;
  transition: filter 0.35s ease, opacity 0.35s ease;
}
.marquee-item:hover i {
  filter: grayscale(0%);
  opacity: 1;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* Page Load Entry Curves */
.page-load-fade {
  animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.page-load-slide-up {
  animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.page-load-scale {
  animation: scaleIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}

/* Grid & List Stagger Utilities */
.stagger-list > * {
  opacity: 0;
  transform: translateY(20px);
  animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.stagger-list > *:nth-child(1) { animation-delay: 0.05s; }
.stagger-list > *:nth-child(2) { animation-delay: 0.15s; }
.stagger-list > *:nth-child(3) { animation-delay: 0.25s; }
.stagger-list > *:nth-child(4) { animation-delay: 0.35s; }
.stagger-list > *:nth-child(5) { animation-delay: 0.45s; }
.stagger-list > *:nth-child(6) { animation-delay: 0.55s; }
.stagger-list > *:nth-child(7) { animation-delay: 0.65s; }
.stagger-list > *:nth-child(8) { animation-delay: 0.75s; }


/* ---- Testimonial Slider ---- */
.slider-overflow {
  overflow: hidden;
  width: 100%;
}
.slider-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}
.slider-track .testimonial-card {
  flex: 0 0 100%;
  min-width: 0;
}
.slider-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}
.slider-btn {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--white);
  color: var(--text);
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}
.slider-btn:hover {
  background: var(--violet);
  border-color: var(--violet);
  color: #fff;
}
.slider-dots {
  display: flex;
  gap: 8px;
  align-items: center;
}
.slider-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--border);
  cursor: pointer;
  transition: all 0.3s;
  border: none;
}
.slider-dot.active {
  background: var(--violet);
  width: 24px;
  border-radius: 4px;
}

/* ---- Mobile Drawer ---- */
.mobile-drawer {
  position: fixed;
  top: 0; right: -340px;
  width: 320px;
  height: 100vh;
  background: linear-gradient(180deg, #060c1f 0%, #0d1535 100%);
  border-left: 1px solid rgba(124,58,237,.2);
  z-index: 9999;
  box-shadow: -12px 0 50px rgba(0,0,0,.5);
  transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.mobile-drawer.open {
  right: 0;
}
.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  flex-shrink: 0;
  background: rgba(124,58,237,.08);
}
.drawer-close {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: rgba(255,255,255,.7);
  transition: background 0.2s, color 0.2s;
}
.drawer-close:hover { background: rgba(124,58,237,.3); color: var(--white); }
.drawer-inner {
  padding: 20px 24px 32px;
  flex: 1;
}
.drawer-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}
.drawer-menu li + li { border-top: 1px solid rgba(255,255,255,.07); }
.drawer-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 0;
  font-weight: 500;
  color: rgba(255,255,255,.75);
  font-size: 0.975rem;
  transition: color 0.2s, padding-left 0.2s;
}
.drawer-menu a:hover { color: var(--cyan-light); padding-left: 4px; }
.drawer-menu a i { width: 20px; text-align: center; color: var(--violet); }
.drawer-menu .drawer-sub {
  padding-left: 30px;
  display: none;
}
.drawer-menu .drawer-sub.open { display: block; }
.drawer-menu .drawer-sub a {
  padding: 9px 0;
  font-size: 0.9rem;
  color: rgba(255,255,255,.5);
}
.drawer-menu .drawer-sub a:hover { color: var(--cyan-light); }
.drawer-toggle-btn {
  background: none;
  border: none;
  cursor: pointer;
  margin-left: auto;
  color: rgba(255,255,255,.4);
  font-size: 0.8rem;
  padding: 4px;
  transition: transform 0.25s, color 0.2s;
}
.drawer-toggle-btn:hover { color: var(--violet); }
.drawer-toggle-btn.open { transform: rotate(180deg); }
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(3px);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.drawer-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* ---- Header Scroll Glass ---- */
.header {
  transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}
.header.scrolled {
  background: rgba(255,255,255,0.92) !important;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 4px 32px rgba(13,27,62,0.13) !important;
}

/* ---- Hero Animations ---- */
@keyframes heroFadeIn {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: none; }
}
.hero-badge {
  animation: heroFadeIn 0.7s ease 0.2s both;
}
.hero h1 {
  animation: heroFadeIn 0.7s ease 0.35s both;
}
.hero-desc {
  animation: heroFadeIn 0.7s ease 0.5s both;
}
.hero-btns {
  animation: heroFadeIn 0.7s ease 0.65s both;
}
.hero-metrics {
  animation: heroFadeIn 0.7s ease 0.8s both;
}
.hero-right {
  animation: heroFadeIn 0.8s ease 0.55s both;
}

/* ---- Pulse Ring (Hero CTA) ---- */
@keyframes pulseRing {
  0%   { box-shadow: 0 0 0 0 rgba(124,58,237,0.5); }
  70%  { box-shadow: 0 0 0 14px rgba(124,58,237,0); }
  100% { box-shadow: 0 0 0 0 rgba(124,58,237,0); }
}
.btn-pulse {
  animation: pulseRing 2.2s infinite;
}

/* ---- Shimmer Loading Bar ---- */
@keyframes shimmer {
  0%   { background-position: -468px 0; }
  100% { background-position: 468px 0; }
}
.shimmer {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 37%, #f0f0f0 63%);
  background-size: 800px 100%;
  animation: shimmer 1.5s infinite;
}

/* ---- Counter Number ---- */
@keyframes countUp {
  from { opacity: 0; transform: scale(0.8); }
  to   { opacity: 1; transform: scale(1); }
}
.counter-num {
  animation: countUp 0.6s ease both;
}

/* ---- Card Hover Lift ---- */
.card-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card-lift:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(13,27,62,0.16);
}

/* ---- Section Divider Waves ---- */
.wave-divider {
  width: 100%;
  overflow: hidden;
  line-height: 0;
}
.wave-divider svg {
  display: block;
  width: 100%;
  height: 60px;
}

/* ---- Typewriter cursor ---- */
.typewriter::after {
  content: '|';
  animation: blink 0.8s step-end infinite;
}
@keyframes blink {
  0%,100% { opacity: 1; }
  50%      { opacity: 0; }
}

/* ---- Stagger Fade (for grids) ---- */
.stagger-1 { animation-delay: 0s !important; }
.stagger-2 { animation-delay: 0.1s !important; }
.stagger-3 { animation-delay: 0.2s !important; }
.stagger-4 { animation-delay: 0.3s !important; }
.stagger-5 { animation-delay: 0.4s !important; }
.stagger-6 { animation-delay: 0.5s !important; }

/* ---- Notification Badge Pulse ---- */
@keyframes badgePulse {
  0%,100% { transform: scale(1); }
  50%      { transform: scale(1.15); }
}
.badge-pulse {
  animation: badgePulse 2s ease-in-out infinite;
}

/* ---- Trust Bar (section between hero and services) ---- */
.trust-bar-section {
  background: var(--white);
  padding: 36px 0;
  border-bottom: 1px solid var(--border);
}
.trust-bar-section .section-label {
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 20px;
}

/* ---- Floating Action Tags (hero) ---- */
.floating-tag {
  position: absolute;
  padding: 10px 18px;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 4;
  pointer-events: none;
  white-space: nowrap;
}
.floating-tag.success-tag {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
  top: 12%;
  right: -16px;
}
.floating-tag.rating-tag {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
  bottom: 18%;
  left: -16px;
}
.floating-tag i { font-size: 1rem; }

/* ---- Hero Visual Card ---- */
.hero-visual-card {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  padding: 32px;
  min-height: 380px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 600;
  margin: 4px;
  cursor: default;
}
.pill-blue   { background: rgba(37,99,235,0.18);  border: 1px solid rgba(37,99,235,0.3);  color: #93c5fd; }
.pill-violet { background: rgba(124,58,237,0.18); border: 1px solid rgba(124,58,237,0.3); color: #c4b5fd; }
.pill-cyan   { background: rgba(6,182,212,0.18);  border: 1px solid rgba(6,182,212,0.3);  color: #67e8f9; }
.pill-green  { background: rgba(5,150,105,0.18);  border: 1px solid rgba(5,150,105,0.3);  color: #6ee7b7; }
.pill-amber  { background: rgba(217,119,6,0.18);  border: 1px solid rgba(217,119,6,0.3);  color: #fcd34d; }
.pill-rose   { background: rgba(225,29,72,0.18);  border: 1px solid rgba(225,29,72,0.3);  color: #fca5a5; }
.pill-teal   { background: rgba(13,148,136,0.18); border: 1px solid rgba(13,148,136,0.3); color: #5eead4; }
.pill-indigo { background: rgba(67,56,202,0.18);  border: 1px solid rgba(67,56,202,0.3);  color: #a5b4fc; }
.pill-orange { background: rgba(234,88,12,0.18);  border: 1px solid rgba(234,88,12,0.3);  color: #fdba74; }

/* ---- Newsletter Form ---- */
.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 360px;
}
.newsletter-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.newsletter-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.newsletter-input-wrap i {
  position: absolute;
  left: 14px;
  color: rgba(255,255,255,.35);
  font-size: 13px;
  pointer-events: none;
}
.newsletter-form input {
  width: 100%;
  padding: 12px 16px 12px 38px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  outline: none;
  color: #fff;
  font-size: 0.875rem;
  font-family: var(--font-body);
  transition: border-color 0.3s, background 0.3s;
}
.newsletter-form input:focus {
  border-color: rgba(124,58,237,.5);
  background: rgba(124,58,237,.08);
}
.newsletter-form input::placeholder { color: rgba(255,255,255,.35); }
.newsletter-form button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 20px;
  background: linear-gradient(135deg, var(--violet), var(--blue));
  color: #fff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--font-main);
  letter-spacing: 0.3px;
  transition: opacity 0.3s, transform 0.2s, box-shadow 0.3s;
  box-shadow: 0 4px 18px rgba(124,58,237,.35);
}
.newsletter-form button:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(124,58,237,.45);
}

/* ---- Team Card Hover Overlay ---- */
.team-card {
  position: relative;
  overflow: hidden;
}
.team-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(124,58,237,0.88), rgba(37,99,235,0.88));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  opacity: 0;
  transition: opacity 0.35s ease;
  border-radius: inherit;
}
.team-card:hover .team-card-overlay { opacity: 1; }
.team-overlay-links {
  display: flex;
  gap: 12px;
}
.team-overlay-links a {
  width: 44px; height: 44px;
  background: rgba(255,255,255,0.2);
  border: 2px solid rgba(255,255,255,0.5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.1rem;
  transition: background 0.25s;
}
.team-overlay-links a:hover { background: rgba(255,255,255,0.35); }

/* ---- Progress Bar ---- */
.progress-bar-wrap {
  height: 6px;
  border-radius: 3px;
  background: var(--border);
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--violet), var(--cyan));
  width: 0;
  transition: width 1.2s ease;
}

/* ---- Sticky Services Nav ---- */
.sticky-nav-wrap {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 16px rgba(13,27,62,0.06);
}
