/* Custom styles for Conphalt */

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

/* Selection color */
::selection {
  background-color: rgba(13, 148, 136, 0.2);
  color: #0f172a;
}

/* Navbar scroll state */
.nav-scrolled {
  background-color: rgba(2, 6, 23, 0.95) !important;
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-scrolled .nav-logo-text {
  color: #ffffff !important;
}

.nav-scrolled .nav-link-text {
  color: rgba(255, 255, 255, 0.7) !important;
}

/* Hero section */
#top {
  scroll-margin-top: 0;
}

/* Service card hover effects */
.service-card {
  will-change: transform, box-shadow;
}

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

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

/* Menu icon animation */
.menu-open #menuLine1 {
  transform: translateY(5px) rotate(45deg);
}

.menu-open #menuLine2 {
  transform: translateY(-5px) rotate(-45deg);
}

/* Mobile nav links */
.mobile-nav-link {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

#mobileMenu.open .mobile-nav-link {
  opacity: 1;
  transform: translateY(0);
}

#mobileMenu.open .mobile-nav-link:nth-child(1) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-nav-link:nth-child(2) { transition-delay: 0.15s; }
#mobileMenu.open .mobile-nav-link:nth-child(3) { transition-delay: 0.2s; }
#mobileMenu.open .mobile-nav-link:nth-child(4) { transition-delay: 0.25s; }
#mobileMenu.open .mobile-nav-link:nth-child(5) { transition-delay: 0.3s; }

/* Scroll reveal base */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .reveal.visible {
    opacity: 1;
    transform: translateY(0);
  }
  .reveal-delay-1 { transition-delay: 0.1s; }
  .reveal-delay-2 { transition-delay: 0.2s; }
  .reveal-delay-3 { transition-delay: 0.3s; }
}

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

/* Focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #0d9488;
  outline-offset: 2px;
  border-radius: 4px;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

/* Dark scrollbar for dark sections */
.bg-slate-950::-webkit-scrollbar-track {
  background: #0f172a;
}

.bg-slate-950::-webkit-scrollbar-thumb {
  background: #334155;
}

/* Print styles */
@media print {
  nav, #contact, .bg-slate-950, #gallery {
    display: none;
  }
  
  body {
    color: #0f172a;
    background: white;
  }
  
  a {
    color: #0d9488;
  }
}

/* Reduced motion */
@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;
  }
  
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* High contrast mode */
@media (forced-colors: active) {
  .service-card {
    border: 1px solid ButtonText;
  }
  
  .bg-teal-600 {
    background-color: ButtonText;
  }
}
