/* Autoquill AI - Custom Styles */

/* Root Variables */
:root {
  --background: 0 0% 100%;
  --foreground: 240 10% 3.9%;
}

/* Base Body Styles - Light Mode */
body {
  font-family: 'Inter', sans-serif;
  background-color: #ffffff;
  background-image: radial-gradient(at 0% 0%, rgba(139, 92, 246, 0.03) 0, transparent 50%),
                    radial-gradient(at 100% 100%, rgba(168, 85, 247, 0.04) 0, transparent 50%);
  color: #1f2937;
  overflow-x: hidden;
}

/* Grid Background Pattern */
.grid-bg {
  background-size: 40px 40px;
  mask-image: linear-gradient(to bottom, transparent, 10%, white, 90%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
}

/* Vapi Button Overrides - Ensure it's always on top */
.vapi-btn-container,
#vapi-support-btn {
  z-index: 9999 !important;
  position: fixed !important;
}

/* Custom Scrollbar for Webkit Browsers - Light Mode */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

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

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

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

/* Firefox Scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: #d1d5db #f3f4f6;
}

/* Selection Color */
::selection {
  background-color: #8b5cf6;
  color: white;
}

::-moz-selection {
  background-color: #8b5cf6;
  color: white;
}

/* Focus Visible Styles for Accessibility */
*:focus-visible {
  outline: 2px solid #8b5cf6;
  outline-offset: 2px;
}

/* Smooth Scroll Behavior */
html {
  scroll-behavior: smooth;
}

/* Prevent horizontal overflow */
body,
html {
  max-width: 100vw;
  overflow-x: hidden;
}

/* ============================================
   Screen Reader Only - Accessibility Utility
   ============================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.sr-only:focus,
.sr-only.focus\:not-sr-only:focus {
  position: static;
  width: auto;
  height: auto;
  padding: inherit;
  margin: inherit;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

/* Skip to main content link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #8b5cf6;
  color: white;
  padding: 8px 16px;
  z-index: 10000;
  border-radius: 0 0 8px 0;
  font-weight: 600;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 0;
}

/* ============================================
   Print Styles for SEO & Accessibility
   ============================================ */
@media print {
  body {
    background: white;
    color: black;
  }
  
  .no-print {
    display: none !important;
  }
  
  a[href]::after {
    content: " (" attr(href) ")";
  }
}

/* ============================================
   Reduced Motion - Accessibility
   ============================================ */
@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) {
  :root {
    --accent-color: #a78bfa;
  }
  
  button,
  a {
    border: 2px solid currentColor;
  }
}

/* ============================================
   Mobile Performance Optimizations
   ============================================ */
@media (max-width: 768px) {
  /* Reduce animation complexity on mobile */
  .animate-meteor {
    animation-duration: 3s !important;
  }
  
  /* Simplify backdrop blur on mobile for better performance */
  .backdrop-blur-xl {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }
  
  .backdrop-blur-md {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
  }
  
  /* Reduce shadow complexity on mobile */
  .shadow-2xl {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
  }
  
  /* Optimize gradient backgrounds */
  .blur-\[150px\] {
    filter: blur(80px);
  }
  
  .blur-\[120px\] {
    filter: blur(60px);
  }
  
  /* Simplify transforms on mobile */
  .hover\:-translate-y-0\.5:hover,
  .hover\:-translate-y-1:hover {
    transform: none;
  }
  
  /* Reduce motion for hover states on touch devices */
  @media (hover: none) {
    .group:hover .group-hover\:scale-110,
    .hover\:scale-105:hover {
      transform: none;
    }
  }
}

/* ============================================
   Touch Device Optimizations
   ============================================ */
@media (hover: none) and (pointer: coarse) {
  /* Increase tap targets for touch */
  button,
  a,
  [role="button"] {
    min-height: 44px;
    min-width: 44px;
  }
  
  /* Remove hover effects that don't work on touch */
  .group:hover .group-hover\:opacity-100 {
    opacity: inherit;
  }
}