/* 3D Mesh Gradient Background */
@keyframes meshGradient {
  0% {
    background-position: 0% 0%, 100% 0%, 0% 100%, 100% 100%;
  }

  25% {
    background-position: 50% 50%, 0% 0%, 100% 100%, 0% 50%;
  }

  50% {
    background-position: 100% 100%, 50% 50%, 0% 0%, 100% 50%;
  }

  75% {
    background-position: 50% 0%, 100% 50%, 50% 100%, 0% 0%;
  }

  100% {
    background-position: 0% 0%, 100% 0%, 0% 100%, 100% 100%;
  }
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 20% 50%, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 40% 80%, rgba(168, 85, 247, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 90% 10%, rgba(99, 102, 241, 0.05) 0%, transparent 50%);
  background-size: 200% 200%, 200% 200%, 200% 200%, 200% 200%;
  animation: meshGradient 15s ease infinite;
  pointer-events: none;
  z-index: -1;
}

/* Glassmorphism Header Enhancement */
header {
  background: rgba(255, 255, 255, 0.5) !important;
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  transition: all 0.3s ease;
}

.dark header {
  background: rgba(0, 0, 0, 0.5) !important;
}

/* Login Button Styling - Neomórfico */
.safari-login-btn {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow:
    0 8px 16px rgba(139, 92, 246, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(139, 92, 246, 0.05));
}

.safari-login-btn:hover {
  transform: translateY(-2px);
  box-shadow:
    0 12px 24px rgba(139, 92, 246, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -1px 0 rgba(0, 0, 0, 0.15);
}

.safari-login-btn:active {
  transform: translateY(0);
  box-shadow:
    0 4px 8px rgba(139, 92, 246, 0.2),
    inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.safari-login-btn::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 ease;
}

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

/* Safari Capture Section */
.safari-capture-card {
  animation: float 6s ease-in-out infinite;
  box-shadow:
    0 20px 40px rgba(139, 92, 246, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-10px);
  }
}

.safari-capture-card button {
  box-shadow:
    0 8px 16px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
}

.safari-capture-card button:hover {
  transform: scale(1.05) translateY(-2px);
  box-shadow:
    0 12px 24px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

@media (max-width: 768px) {
  .safari-capture-section {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

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

/* Page Transitions */
body {
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Card Hover Effects */
.rounded-lg.border {
  transition: all 0.3s ease;
}

/* Footer Enhancements */
footer a {
  transition: all 0.2s ease;
}

footer a:hover {
  transform: translateX(4px);
}

/* FAQ Accordion Smooth Transitions */
.w-full.space-y-3 [data-state="closed"]>.overflow-hidden {
  max-height: 0 !important;
  opacity: 0;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
  pointer-events: none;
  overflow: hidden !important;
}

.w-full.space-y-3 [data-state="open"]>.overflow-hidden {
  max-height: 2000px !important;
  /* Extremely high to accommodate content */
  opacity: 1;
  pointer-events: auto;
  transition: max-height 0.8s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease;
}

/* Ensure the button icon rotates smoothly */
button[aria-expanded="true"] svg.lucide-chevron-down {
  transform: rotate(180deg);
}

button svg.lucide-chevron-down {
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Contrast & Legibility Enhancements */
:root {
  --muted-foreground: #374151;
  /* Even darker gray (slate-700) for better reading */
  --secondary-foreground: #111827;
}

.dark {
  --muted-foreground: #9ca3af;
  --secondary-foreground: #f9fafb;
}

.text-muted-foreground {
  color: var(--muted-foreground) !important;
}

.text-secondary-foreground {
  color: var(--secondary-foreground) !important;
}

/* Ensure headings are always strong */
h1,
h2,
h3,
h4 {
  color: #111827;
}

.dark h1,
.dark h2,
.dark h3,
.dark h4 {
  color: #f9fafb;
}