/* Custom Utilities */
html.lenis {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis-stopped {
  overflow: hidden;
}

body {
  background-color: #faf9f6;
  color: #1e293b;
  overflow-x: hidden;
}

.technical-grid {
  background-size: 50px 50px;
  background-image:
    linear-gradient(to right, rgba(30, 41, 59, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(30, 41, 59, 0.03) 1px, transparent 1px);
}

/* 1. Global Noise Texture */
.noise-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 50;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* 2. Scroll Progress Bar */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #7c2d3b, #f43f5e);
  width: 0%;
  z-index: 100;
  transition: width 0.1s ease-out;
}

.glass-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.btn-primary {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.btn-primary::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, rgba(255, 255, 255, 0.1), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.btn-primary:hover::after {
  transform: translateX(100%);
}

.text-gradient {
  background: linear-gradient(135deg, #1e293b 0%, #7c2d3b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Specific Anim Elements */
.node-connection {
  stroke-dasharray: 6;
  animation: dash 1s linear infinite;
}

@keyframes dash {
  to {
    stroke-dashoffset: -12;
  }
}

@keyframes scan {
  0% {
    top: 0%;
    opacity: 0;
  }

  10% {
    opacity: 1;
  }

  90% {
    opacity: 1;
  }

  100% {
    top: 100%;
    opacity: 0;
  }
}

.animate-scan {
  animation: scan 4s linear infinite;
}

@keyframes scan-y {
  0% {
    transform: translateY(-100%);
  }

  100% {
    transform: translateY(500%);
  }
}

.animate-scan-y {
  animation: scan-y 4s linear infinite;
}

.animate-reverse-spin {
  animation: spin 15s linear infinite reverse;
}

.animation-delay-2000 {
  animation-delay: 2s;
}

/* ===== Form Success Animation ===== */
.success-checkmark-container {
  width: 80px;
  height: 80px;
}

.success-checkmark {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: block;
  stroke-width: 2;
  stroke: #7c2d3b;
  stroke-miterlimit: 10;
}

.success-checkmark-circle {
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  stroke-width: 2;
  stroke-miterlimit: 10;
  stroke: #7c2d3b;
  fill: none;
  animation: success-stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.success-checkmark-check {
  transform-origin: 50% 50%;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  stroke-width: 3;
  stroke-linecap: round;
  animation: success-stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.5s forwards;
}

@keyframes success-stroke {
  100% {
    stroke-dashoffset: 0;
  }
}

@keyframes success-scale {
  0%,
  100% {
    transform: none;
  }
  50% {
    transform: scale3d(1.1, 1.1, 1);
  }
}

.success-checkmark-container.animate {
  animation: success-scale 0.3s ease-in-out 0.8s both;
}

/* Success text fade-in */
.success-title {
  opacity: 0;
  transform: translateY(10px);
  animation: success-fade-up 0.5s ease-out 0.7s forwards;
}

.success-subtitle {
  opacity: 0;
  transform: translateY(10px);
  animation: success-fade-up 0.5s ease-out 0.9s forwards;
}

.success-btn {
  opacity: 0;
  transform: translateY(10px);
  animation: success-fade-up 0.5s ease-out 1.1s forwards;
}

@keyframes success-fade-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Confetti particles */
.success-particles {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 0;
  height: 0;
  pointer-events: none;
}

.success-particle {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  animation: success-particle-burst 1s ease-out forwards;
}

@keyframes success-particle-burst {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: var(--particle-end) scale(0);
  }
}

/* Overlay entrance */
#formSuccessOverlay {
  animation: success-overlay-in 0.4s ease-out forwards;
}

@keyframes success-overlay-in {
  0% {
    opacity: 0;
    transform: scale(0.95);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}
