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

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

/* Navigation */
.nav-logo-text {
  transition: color 0.3s ease;
}

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

.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #ff6b4a;
  transition: width 0.3s ease;
  border-radius: 1px;
}

.nav-link:hover::after {
  width: 100%;
}

#navbar.scrolled .nav-link {
  color: #474a52;
}

#navbar.scrolled .nav-link:hover {
  color: #f55030;
}

/* Mobile menu */
#mobileMenu {
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

#mobileMenu.open {
  max-height: 500px;
  opacity: 1;
}

#mobileMenu.closed {
  max-height: 0;
  opacity: 0;
}

.mobile-link {
  transition: color 0.3s ease, padding-left 0.3s ease;
}

.mobile-link:hover {
  color: #ff6b4a;
  padding-left: 8px;
}

/* Scroll reveal */
.scroll-reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Button hover glow */
button:hover, a:hover {
  transform: translateY(-1px);
}

button:active, a:active {
  transform: translateY(0);
}

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

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

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

::-webkit-scrollbar-thumb:hover {
  background: #a1a3aa;
}

/* Selection */
::selection {
  background: #ffd4c7;
  color: #1e2024;
}

/* Input autofill */
input:-webkit-autofill,
textarea:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 30px #ffffff inset !important;
}

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

/* Print */
@media print {
  nav, #contactForm, .scroll-reveal {
    display: block !important;
    opacity: 1 !important;
  }
}
