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

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

/* Scroll reveal — progressive enhancement, hidden by default for reduced motion */
@media (prefers-reduced-motion: no-preference) {
  .scroll-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);
  }
  .scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Navbar */
#navbar {
  transition: background-color 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}

#navbar.scrolled {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

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

#navbar:not(.scrolled) .nav-logo-text {
  color: #f8fafc;
}

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

.nav-link {
  transition: color 0.2s ease;
}

#navbar:not(.scrolled) .nav-link {
  color: rgba(248, 250, 252, 0.8);
}

#navbar:not(.scrolled) .nav-link:hover {
  color: #5eead4;
}

/* Mobile menu */
#mobileMenu {
  transition: max-height 0.3s ease, opacity 0.3s ease;
}

.mobile-link {
  transition: color 0.2s ease;
}

/* Hero */
#hero {
  position: relative;
}

#hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to top, #f8fafc, transparent);
  pointer-events: none;
}

#services ~ section:first-of-type,
#hero + section {
  padding-top: 0;
}

/* Buttons */
a {
  text-decoration: none;
}

/* Selection */
::selection {
  background-color: #99f6e4;
  color: #042f2e;
}

/* Form focus styles */
input:focus,
textarea:focus {
  outline: none;
}

/* Smooth scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}
