/* Global styles for Crisper landing page */

/* Smooth scrolling enhancement */
html {
  scroll-behavior: smooth;
}

/* Custom animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Form animations */
.form-animate {
  animation: fadeInUp 0.6s ease-out;
}

/* Custom focus styles */
input:focus, button:focus {
  outline: 2px solid transparent;
  outline-offset: 2px;
}

/* Gradient text effect */
.gradient-text {
  background: linear-gradient(135deg, #000000, #029400);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Enhanced hover effects for cards */
.feature-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Custom scrollbar for dark mode */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.dark ::-webkit-scrollbar-track {
  background: #374151;
}

::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

.dark ::-webkit-scrollbar-thumb {
  background: #6b7280;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

.dark ::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* Loading animation */
.loading-dots::after {
  content: '';
  animation: pulse 1.5s infinite;
}

/* Background pattern for hero section */
.hero-pattern {
  background-image: radial-gradient(circle at 2px 2px, rgba(0,0,0,0.15) 1px, transparent 0);
  background-size: 20px 20px;
}

.dark .hero-pattern {
  background-image: radial-gradient(circle at 2px 2px, rgba(255,255,255,0.1) 1px, transparent 0);
}

/* Enhanced button styles */
.btn-primary {
  position: relative;
  overflow: hidden;
}

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

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

/* Form validation styles */
.input-error {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 1px #ef4444;
}

.input-success {
  border-color: #10b981 !important;
  box-shadow: 0 0 0 1px #10b981;
}

/* Mobile optimizations */
@media (max-width: 640px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  /* Improved mobile form spacing */
  .mobile-form-spacing {
    gap: 1rem;
  }
  
  /* Mobile card adjustments */
  .mobile-card-padding {
    padding: 1.5rem;
  }
}

/* Print styles */
@media print {
  .no-print {
    display: none !important;
  }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .feature-card {
    border-width: 2px;
    border-color: currentColor;
  }
}

/* Custom utilities */
.text-shadow {
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.backdrop-blur-strong {
  backdrop-filter: blur(20px);
}

/* Integration badge hover effects */
.integration-badge {
  transition: all 0.3s ease;
}

.integration-badge:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Form field enhancements */
.form-field {
  position: relative;
}

.form-field input:focus + .form-label {
  transform: translateY(-1.5rem) scale(0.875);
  color: #000000;
}

.dark .form-field input:focus + .form-label {
  color: #ffffff;
}

/* Success animation */
.success-checkmark {
  animation: checkmark 0.6s ease-in-out;
}

@keyframes checkmark {
  0% {
    transform: scale(0) rotate(45deg);
  }
  50% {
    transform: scale(1.2) rotate(45deg);
  }
  100% {
    transform: scale(1) rotate(45deg);
  }
}

/* Loading state improvements */
.btn-loading {
  position: relative;
  color: transparent !important;
}

.btn-loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid transparent;
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}