/* ===== Base & Utilities ===== */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
}

::selection {
  background: rgba(201, 168, 76, 0.3);
  color: #f0f4f8;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #0B132B;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, #C9A84C, #1e9e76);
  border-radius: 4px;
}

/* ===== Navbar ===== */
#navbar {
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
}

#navbar.scrolled {
  background: rgba(3, 6, 15, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(201, 168, 76, 0.1);
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, #C9A84C, #3ab88f);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

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

/* ===== Mobile Menu ===== */
#mobileMenu.open {
  opacity: 1;
  pointer-events: all;
}

.menu-line:nth-child(1).open {
  transform: translateY(6px) rotate(45deg);
}
.menu-line:nth-child(2).open {
  opacity: 0;
  transform: scaleX(0);
}
.menu-line:nth-child(3).open {
  transform: translateY(-6px) rotate(-45deg);
}

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

.hero-anim:nth-child(1) { animation-delay: 0.2s; }
.hero-anim:nth-child(2) { animation-delay: 0.4s; }
.hero-anim:nth-child(3) { animation-delay: 0.6s; }
.hero-anim:nth-child(4) { animation-delay: 0.8s; }

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

/* ===== Scroll Dot Animation ===== */
@keyframes scrollDot {
  0% { top: -12px; opacity: 0; }
  50% { opacity: 1; }
  100% { top: 40px; opacity: 0; }
}

.animate-scroll-dot {
  animation: scrollDot 1.5s ease-in-out infinite;
}

/* ===== Service Cards ===== */
.service-card {
  transform: translateY(0);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.service-card:hover {
  transform: translateY(-4px);
}

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

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

/* Default state for revealable elements — always visible */
.reveal {
  transform: translateY(0);
  opacity: 1;
}

/* Only animate when JS adds the animated class */
.reveal.animate-on-scroll {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .reveal.animate-on-scroll,
  .reveal.animate-on-scroll.is-visible,
  .hero-anim,
  .service-card,
  .animate-scroll-dot,
  .nav-link::after,
  a, button {
    transition: none;
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* ===== Gold Shimmer Effect ===== */
@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

/* ===== Focus Styles ===== */
input:focus, select:focus, textarea:focus {
  outline: none;
}

/* ===== Responsive adjustments ===== */
@media (max-width: 640px) {
  .font-serif {
    line-height: 1.2;
  }
}
