/* Modern Animation Styles with Brand Colors #cbbeb3, #881b11 */

/* Global Font Family - Lato for body text, Montserrat for headings (Neurable style) */
* {
  font-family: "Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto",
    "Helvetica Neue", Arial, sans-serif !important;
}

body {
  font-family: "Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto",
    "Helvetica Neue", Arial, sans-serif !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6,
.font-heading {
  font-family: "Montserrat", "Lato", -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif !important;
}

@keyframes gradient-flow {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes gradient-x {
  0%,
  100% {
    background-size: 200% 200%;
    background-position: left center;
  }
  50% {
    background-size: 200% 200%;
    background-position: right center;
  }
}

/* Pocket-style Circular Animations */
@keyframes spin-slow {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes spin-reverse-slower {
  from {
    transform: rotate(360deg);
  }
  to {
    transform: rotate(0deg);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes glow-brand {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(136, 27, 17, 0.3);
  }
  50% {
    box-shadow: 0 0 30px rgba(136, 27, 17, 0.6);
  }
}

.animate-fade-in-up {
  animation: fade-in-up 0.8s ease-out forwards;
  opacity: 0;
}

.animate-gradient-x {
  animation: gradient-x 3s ease infinite;
  background-size: 200% 200%;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

.animate-glow {
  animation: glow-brand 2s ease-in-out infinite alternate;
}

/* Pocket-inspired Circular Animations */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes spin-reverse {
  from {
    transform: rotate(360deg);
  }
  to {
    transform: rotate(0deg);
  }
}

.animate-spin-slow {
  animation: spin 20s linear infinite;
}

.animate-spin-slower {
  animation: spin 30s linear infinite;
}

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

/* Hover Effects */
.hover-lift {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Glass Effect */
.glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Brand Color Gradient Text */
.gradient-text {
  background: linear-gradient(45deg, #881b11 0%, #cbbeb3 50%, #881b11 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient-x 3s ease infinite;
}

/* Modern Card Styles */
.modern-card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modern-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Pulse Animation for Loading States */
@keyframes pulse-scale {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.pulse-scale {
  animation: pulse-scale 2s ease-in-out infinite;
}

/* Enhanced contrast for workflow section over particles */
#workflow {
  position: relative;
}

#workflow .bg-white\/95 {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

#workflow .bg-white\/95:hover {
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
}

/* Enhanced text shadows for better readability */
#workflow h2,
#workflow h3 {
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
}

/* Add subtle glow to cards */
#workflow .group {
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* Moving X Animation for Integration Cards */
@keyframes move-x {
  from {
    transform: translateX(var(--move-x-from));
  }
  to {
    transform: translateX(var(--move-x-to));
  }
}

/* Pocket-style Fade In Animation */
@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fade-in 0.6s ease-out forwards;
  opacity: 0;
}

/* Neurable-inspired Background Effects */
@keyframes gradient-mesh {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.bg-gradient-mesh {
  background: linear-gradient(
    135deg,
    rgba(136, 27, 17, 0.03) 0%,
    rgba(203, 190, 179, 0.05) 25%,
    rgba(136, 27, 17, 0.02) 50%,
    rgba(203, 190, 179, 0.04) 75%,
    rgba(136, 27, 17, 0.03) 100%
  );
  background-size: 400% 400%;
  animation: gradient-mesh 15s ease infinite;
}

.bg-gradient-brand-subtle {
  background: linear-gradient(
    180deg,
    rgba(136, 27, 17, 0.02) 0%,
    rgba(203, 190, 179, 0.03) 100%
  );
}

.bg-gradient-radial-brand {
  background: radial-gradient(
    circle,
    rgba(136, 27, 17, 0.15) 0%,
    rgba(203, 190, 179, 0.1) 50%,
    transparent 100%
  );
}

/* Glassmorphism Effect */
.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.3);
  box-shadow: 0 8px 32px rgba(136, 27, 17, 0.08);
}

/* Enhanced Hover Lift Animation */
.hover-lift {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(136, 27, 17, 0.12),
    0 10px 20px rgba(0, 0, 0, 0.08);
}

/* Floating Particle Animation */
@keyframes particle-float {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.6;
  }
  33% {
    transform: translate(30px, -30px) scale(1.1);
    opacity: 0.8;
  }
  66% {
    transform: translate(-20px, -60px) scale(0.9);
    opacity: 0.7;
  }
}

@keyframes particle-float-2 {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.5;
  }
  33% {
    transform: translate(-40px, -40px) scale(1.2);
    opacity: 0.7;
  }
  66% {
    transform: translate(30px, -70px) scale(0.85);
    opacity: 0.6;
  }
}

@keyframes particle-float-3 {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.55;
  }
  33% {
    transform: translate(25px, -50px) scale(0.95);
    opacity: 0.75;
  }
  66% {
    transform: translate(-35px, -35px) scale(1.15);
    opacity: 0.65;
  }
}

.particle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(40px);
  z-index: 0;
}

.particle-1 {
  animation: particle-float 20s ease-in-out infinite;
}

.particle-2 {
  animation: particle-float-2 25s ease-in-out infinite;
}

.particle-3 {
  animation: particle-float-3 30s ease-in-out infinite;
}

/* Dark Background for Landing Page - Neurable Style */
.dark-particles-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0a0a0a 100%);
  z-index: -1;
  overflow: hidden;
}

.dark-particles-background::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
      circle at 20% 30%,
      rgba(136, 27, 17, 0.15) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 70%,
      rgba(136, 27, 17, 0.1) 0%,
      transparent 50%
    );
  opacity: 0.5;
}

/* Floating sections above background */
.floating-section {
  position: relative;
  z-index: 10;
}

/* Glass effect for floating sections */
.glass-section {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Dark header for dark background */
.header-dark-bg {
  background: rgba(10, 10, 10, 0.98);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  will-change: transform;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  isolation: isolate;
}

.header-dark-bg .text-gray-900,
.header-dark-bg .text-gray-700,
.header-dark-bg .text-gray-600 {
  color: rgba(255, 255, 255, 0.9) !important;
}

.header-dark-bg .text-gray-600:hover,
.header-dark-bg .text-gray-700:hover {
  color: #ffffff !important;
}

/* Ensure header text is crisp and not blurred */
.header-dark-bg nav,
.header-dark-bg a,
.header-dark-bg span,
.header-dark-bg button {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* Ensure content is above particles */
.content-layer {
  position: relative;
  z-index: 2;
}

/* Enhanced Floating Button Styles */
@keyframes button-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-2px);
  }
}

@keyframes glow-pulse {
  0%,
  100% {
    box-shadow: 0 10px 40px rgba(136, 27, 17, 0.6),
      0 0 0 1px rgba(255, 255, 255, 0.1);
  }
  50% {
    box-shadow: 0 10px 50px rgba(136, 27, 17, 0.8),
      0 0 0 1px rgba(255, 255, 255, 0.2);
  }
}

/* Button glass effect */
.btn-glass {
  position: relative;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-glass:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 20px 60px rgba(255, 255, 255, 0.2),
    0 0 0 1px rgba(255, 255, 255, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Primary button with red gradient */
.btn-primary-glass {
  position: relative;
  background: linear-gradient(135deg, #881b11 0%, #a52219 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 10px 40px rgba(136, 27, 17, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary-glass:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 20px 60px rgba(136, 27, 17, 0.8),
    0 0 80px rgba(136, 27, 17, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Shine effect on buttons */
@keyframes shine {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

.btn-shine::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.5s ease;
}

.btn-shine:hover::before {
  left: 100%;
}

/* Scroll-triggered fade-in animations for sections */
@keyframes fade-slide-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-slide-left {
  from {
    opacity: 0;
    transform: translateX(24px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fade-slide-right {
  from {
    opacity: 0;
    transform: translateX(-24px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scale-fade-in {
  from {
    opacity: 0;
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Workflow-specific animations with lateral movement */
@keyframes workflow-slide-left {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes workflow-slide-right {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes workflow-title-entrance {
  from {
    opacity: 0;
    transform: translateX(-24px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Classes for scroll animations */
.scroll-animate {
  opacity: 0;
  transition: none;
  will-change: opacity, transform;
}

.scroll-animate.animate-in-up {
  animation: fade-slide-up 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.scroll-animate.animate-in-left {
  animation: fade-slide-left 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.scroll-animate.animate-in-right {
  animation: fade-slide-right 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.scroll-animate.animate-in-scale {
  animation: scale-fade-in 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Workflow-specific animation classes */
.scroll-animate.workflow-slide-left {
  animation: workflow-slide-left 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.scroll-animate.workflow-slide-right {
  animation: workflow-slide-right 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.scroll-animate.workflow-title {
  animation: workflow-title-entrance 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Staggered animation delays */
.scroll-animate.delay-100 {
  animation-delay: 0.08s;
}

.scroll-animate.delay-200 {
  animation-delay: 0.12s;
}

.scroll-animate.delay-300 {
  animation-delay: 0.16s;
}

.scroll-animate.delay-400 {
  animation-delay: 0.2s;
}

.scroll-animate.delay-500 {
  animation-delay: 0.24s;
}

.scroll-animate.delay-600 {
  animation-delay: 0.28s;
}
