/* ============================================
   Precision Dental Specialties — Custom Styles
   ============================================ */

/* Base & Smooth Scrolling */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #020617;
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #334155;
}

/* Selection Color */
::selection {
  background: rgba(20, 184, 166, 0.3);
  color: #f1f5f9;
}

/* Reveal Animations — Progressive Enhancement */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* Staggered reveal delays */
.reveal:nth-child(1) { transition-delay: 0.05s; }
.reveal:nth-child(2) { transition-delay: 0.12s; }
.reveal:nth-child(3) { transition-delay: 0.19s; }
.reveal:nth-child(4) { transition-delay: 0.26s; }
.reveal:nth-child(5) { transition-delay: 0.33s; }
.reveal:nth-child(6) { transition-delay: 0.40s; }

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .reveal.revealed {
    opacity: 1;
    transform: none;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Mobile Menu Transitions */
#mobileMenu.menu-open {
  opacity: 1;
  pointer-events: all;
}

#mobileMenu.menu-closed {
  opacity: 0;
  pointer-events: none;
}

#menuIcon.active #bar1 {
  transform: translateY(4px) rotate(45deg);
}
#menuIcon.active #bar2 {
  opacity: 0;
  transform: scaleX(0);
}
#menuIcon.active #bar3 {
  transform: translateY(-4px) rotate(-45deg);
  width: 1.5rem;
}

/* Navbar Scrolled State */
#navbar.scrolled {
  background: rgba(2, 6, 23, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(30, 41, 59, 0.5);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Input Focus Transitions */
input:focus,
textarea:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1);
}

/* Image Hover */
img {
  max-width: 100%;
  height: auto;
}

/* Prevent layout shift on images */
img {
  content-visibility: auto;
}

/* Print Styles */
@media print {
  body {
    background: white;
    color: black;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}
