/* ============================================
   Const 1776 — Custom Styles
   ============================================ */

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

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

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

#navbar.scrolled {
  background-color: rgba(10, 29, 58, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

.nav-link {
  position: relative;
}

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

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

/* Mobile menu */
#mobileMenu {
  right: 0;
}

#mobileMenu.open {
  transform: translateX(0);
}

/* ============================================
   Hero Animations
   ============================================ */
.hero-anim {
  opacity: 0;
  transform: translateY(30px);
  animation: heroFadeIn 0.8s ease forwards;
}

.hero-anim:nth-child(1) { animation-delay: 0.1s; }
.hero-anim:nth-child(2) { animation-delay: 0.25s; }
.hero-anim:nth-child(3) { animation-delay: 0.4s; }
.hero-anim:nth-child(4) { animation-delay: 0.55s; }

@keyframes heroFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   Scroll Reveal Animations
   ============================================ */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal[data-reveal] {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible[data-reveal] {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.reveal[data-reveal] .delay-100 { transition-delay: 0.1s; }
.reveal[data-reveal] .delay-200 { transition-delay: 0.2s; }
.reveal[data-reveal] .delay-300 { transition-delay: 0.3s; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .hero-anim {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .reveal[data-reveal] {
    opacity: 1;
    transform: none;
  }

  html {
    scroll-behavior: auto;
  }

  .group:hover img,
  img {
    transition: none;
  }
}

/* ============================================
   Mobile Link Animation
   ============================================ */
.mobile-link {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

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

#mobileMenu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }
#mobileMenu.open .mobile-link:nth-child(5) { transition-delay: 0.3s; }

/* ============================================
   Utility
   ============================================ */
::selection {
  background: #D4A843;
  color: #0A1D3A;
}

/* Focus styles */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #D4A843;
  outline-offset: 2px;
  border-radius: 4px;
}

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

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

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

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