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

body {
  overflow-x: hidden;
}

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

::-webkit-scrollbar-track {
  background: #0A1F3F;
}

::-webkit-scrollbar-thumb {
  background: #34D399;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #10B981;
}

/* Navbar transitions */
.navbar-scrolled {
  background: rgba(10, 31, 63, 0.95) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

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

.navbar-scrolled .nav-logo-sub {
  color: rgba(255, 255, 255, 0.5);
}

.navbar-default .nav-logo-text {
  color: #ffffff;
}

.navbar-default .nav-logo-sub {
  color: rgba(255, 255, 255, 0.5);
}

/* Hero parallax-like subtle movement */
#hero {
  transform: translateZ(0);
  will-change: auto;
}

/* Service card stagger animation */
.service-card {
  opacity: 1;
  transform: translateY(0);
  transition: background-color 0.5s ease, box-shadow 0.5s ease;
}

.service-card:hover {
  box-shadow: inset 0 0 0 1px rgba(52, 211, 153, 0.1);
}

/* Mobile menu transitions */
.mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}

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

.mobile-menu-link {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

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

.mobile-menu.open .mobile-menu-link:nth-child(1) { transition-delay: 0.05s; }
.mobile-menu.open .mobile-menu-link:nth-child(2) { transition-delay: 0.1s; }
.mobile-menu.open .mobile-menu-link:nth-child(3) { transition-delay: 0.15s; }
.mobile-menu.open .mobile-menu-link:nth-child(4) { transition-delay: 0.2s; }

/* Hamburger animation */
#hamburger span {
  transition: transform 0.3s ease, opacity 0.3s ease;
}

#mobile-menu-btn.active #hamburger span:nth-child(1) {
  transform: translateY(4px) rotate(45deg);
}

#mobile-menu-btn.active #hamburger span:nth-child(2) {
  opacity: 0;
  transform: translateX(10px);
}

#mobile-menu-btn.active #hamburger span:nth-child(3) {
  transform: translateY(-4px) rotate(-45deg);
}

/* Form input focus styles */
input:focus,
textarea:focus {
  border-color: #34D399 !important;
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.1);
  outline: none;
}

/* Smooth section transitions */
section {
  position: relative;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  
  .service-card,
  .mobile-menu-link {
    transition: none;
  }
  
  .animate-float {
    animation: none;
  }
}

/* Utility: thin line accents */
.line-accent {
  position: relative;
}

.line-accent::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 48px;
  height: 1px;
  background: #34D399;
}

/* Image hover effects */
img {
  transition: transform 0.6s ease;
}

/* Print styles */
@media print {
  nav, #contact-form, .service-card:hover {
    display: none;
  }
  
  body {
    color: #000;
    background: #fff;
  }
  
  .bg-midnight-800, .bg-midnight-900 {
    background: #fff !important;
    color: #000 !important;
  }
}
