/* Base & Typography */
html {
  scroll-behavior: smooth;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #0f172a;
}
::-webkit-scrollbar-thumb {
  background: #1e3a5f;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #0d9488;
}

/* Selection */
::selection {
  background: rgba(13, 148, 136, 0.3);
  color: #f0fdfa;
}

/* Nav transitions */
.nav-link {
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: #2dd4bf;
  transition: width 0.3s ease;
}
.nav-link:hover::after {
  width: 100%;
}
.nav-link:hover {
  color: #2dd4bf;
}

/* Mobile menu lines animation */
.menu-line {
  display: block;
}
#menuBtn.active .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}
#menuBtn.active .menu-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
#menuBtn.active .menu-line:nth-child(3) {
  width: 24px;
  transform: rotate(-45deg) translate(4px, -4px);
}

/* Mobile links */
.mobile-link {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
#mobileMenu.open .mobile-link {
  opacity: 1;
  transform: translateY(0);
}
#mobileMenu.open .mobile-link:nth-child(1) { transition-delay: 0.05s; }
#mobileMenu.open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.2s; }

/* Service card hover effect */
.service-card {
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #2dd4bf, transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.service-card:hover::before {
  opacity: 1;
}

/* Scroll animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.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; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Navbar scroll state */
.navbar-scrolled {
  background: rgba(8, 14, 26, 0.92) !important;
  backdrop-filter: blur(16px) !important;
  border-bottom: 1px solid rgba(30, 41, 59, 0.5) !important;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Image hover zoom */
img {
  transition: transform 0.5s ease;
}

/* Pulse animation for dot */
@keyframes softPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.animate-pulse {
  animation: softPulse 2s ease-in-out infinite;
}

/* Form focus styles */
input:focus,
select:focus,
textarea:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.15);
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .font-serif {
    line-height: 1.1;
  }
}
