/* ===== RESET & BASE ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  background-color: #0a1419;
  color: #fff;
  font-family: 'Inter', system-ui, sans-serif;
  overflow-x: hidden;
}

::selection {
  background: rgba(200, 169, 97, 0.3);
  color: #fff;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #0a1419;
}
::-webkit-scrollbar-thumb {
  background: #3d5a88;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #C8A961;
}

/* ===== HEADER ===== */
#site-header {
  transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#site-header.scrolled {
  background: rgba(10, 20, 25, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.05), 0 20px 40px rgba(0,0,0,0.3);
}

.nav-link {
  position: relative;
}

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

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

/* ===== MOBILE MENU ===== */
#mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}

#mobile-menu.closed {
  opacity: 0;
  pointer-events: none;
}

.mobile-link {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

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

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

#mobile-menu.open .mobile-link:nth-child(5) { transition-delay: 0.3s; }

.menu-btn.active .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}
.menu-btn.active .menu-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.menu-btn.active .menu-line:nth-child(3) {
  width: 24px;
  transform: rotate(-45deg) translate(4px, -4px);
  margin: 0;
}

/* ===== HERO ===== */
.hero-bg {
  will-change: transform;
}

/* ===== SERVICE CARDS ===== */
.service-card {
  will-change: transform;
}

/* ===== GALLERY ===== */
.gallery-item {
  will-change: transform;
}

/* ===== ANIMATIONS ===== */
.reveal {
  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.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* ===== BACK TO TOP ===== */
#back-to-top.visible {
  opacity: 1;
  pointer-events: all;
}

/* ===== FORM ===== */
select option {
  background: #1f3349;
  color: #fff;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  .font-display {
    font-size: 2.5rem;
    line-height: 1.1;
  }
}

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