/* Custom styles for Vital Chiropractic Center */

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

/* Base reset for custom properties */
:root {
  --color-teal-50: #f0fdfa;
  --color-teal-100: #ccfbf1;
  --color-teal-400: #2dd4bf;
  --color-teal-500: #14b8a6;
  --color-teal-600: #0d9488;
  --color-teal-700: #0f766e;
  --color-teal-800: #115e59;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f8fafc;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Selection color */
::selection {
  background: rgba(13, 148, 136, 0.15);
  color: #0f766e;
}

/* Remove outline for mouse users, keep for keyboard */
:focus:not(:focus-visible) {
  outline: none;
}

:focus-visible {
  outline: 2px solid #0d9488;
  outline-offset: 2px;
}

/* No-underline utility */
.no-underline {
  text-decoration: none;
}

/* Card hover effect */
.card-hover {
  will-change: transform;
}

/* Floating card animations */
.floating-card-1 {
  animation: float1 4s ease-in-out infinite;
}

.floating-card-2 {
  animation: float2 5s ease-in-out infinite;
}

@keyframes float1 {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(0.5deg); }
}

@keyframes float2 {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-6px) rotate(-0.5deg); }
}

/* Reveal animations - progressive enhancement */
.reveal {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Only animate on devices that support it and user prefers motion */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(20px);
  }

  .reveal.revealed {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Navigation scroll state */
nav.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

/* Mobile menu transitions */
#mobileMenu {
  animation: slideDown 0.25s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Subtle pattern for hero background */
#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(13, 148, 136, 0.04) 1px, transparent 0);
  background-size: 32px 32px;
  pointer-events: none;
}

/* Focus styles for form inputs */
input:focus,
textarea:focus {
  border-color: #14b8a6 !important;
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1) !important;
}

/* Print styles */
@media print {
  nav, #contact, .floating-card-1, .floating-card-2 {
    display: none;
  }

  body {
    color: #000;
    background: #fff;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .card-hover:hover {
    border-color: #0f766e !important;
  }
}

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

  html {
    scroll-behavior: auto;
  }
}
