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

body {
  overflow-x: hidden;
}

::selection {
  background: #a8e6cf;
  color: #0f2b3c;
}

/* Marquee Animation */
@keyframes marquee {
  0% { transform: translateX(0%); }
  100% { transform: translateX(-50%); }
}

.animate-marquee {
  animation: marquee 30s linear infinite;
}

/* Reveal Animations */
.reveal-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.reveal-up:nth-child(2) { transition-delay: 0.1s; }
.reveal-up:nth-child(3) { transition-delay: 0.2s; }
.reveal-up:nth-child(4) { transition-delay: 0.3s; }
.reveal-up:nth-child(5) { transition-delay: 0.4s; }

/* Staggered children */
.stagger-children .reveal-up:nth-child(1) { transition-delay: 0.05s; }
.stagger-children .reveal-up:nth-child(2) { transition-delay: 0.15s; }
.stagger-children .reveal-up:nth-child(3) { transition-delay: 0.25s; }
.stagger-children .reveal-up:nth-child(4) { transition-delay: 0.35s; }
.stagger-children .reveal-up:nth-child(5) { transition-delay: 0.45s; }

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

#navbar.scrolled {
  background: rgba(250, 249, 246, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(15, 43, 60, 0.06);
}

/* Nav Links */
.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: #a8e6cf;
  transition: width 0.3s ease;
}

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

/* Mobile Menu */
.mobile-link {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s 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; }
#mobileMenu.open .mobile-link:nth-child(5) { transition-delay: 0.25s; }

/* Hamburger */
.menu-line {
  transition: transform 0.3s ease, opacity 0.3s ease;
}

#menuBtn.active .menu-line:nth-child(1) {
  transform: translateY(3px) rotate(45deg);
}

#menuBtn.active .menu-line:nth-child(2) {
  opacity: 0;
}

#menuBtn.active .menu-line:nth-child(3) {
  transform: translateY(-3px) rotate(-45deg);
  width: 1.25rem;
}

/* Smooth image loading */
img {
  image-rendering: -webkit-optimize-contrast;
}

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

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

::-webkit-scrollbar-thumb {
  background: #0f2b3c/20;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(15, 43, 60, 0.4);
}

/* Focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid #a8e6cf;
  outline-offset: 2px;
}

/* Mobile responsive adjustments */
@media (max-width: 640px) {
  .reveal-up {
    transform: translateY(24px);
  }
}

/* Print styles */
@media print {
  #navbar, .animate-marquee { display: none; }
  body { background: white; }
}
