/* ===== BASE ===== */
*, *::before, *::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  overflow-x: hidden;
}

::selection {
  background: rgba(212, 168, 67, 0.3);
  color: #f5f5f5;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #0a1128;
}
::-webkit-scrollbar-thumb {
  background: #2c4268;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #d4a843;
}

/* ===== NAVBAR ===== */
.nav-link {
  position: relative;
}

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

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

.nav-link:hover {
  color: #f0d976 !important;
}

/* Navbar scrolled state */
.navbar-scrolled {
  background: rgba(10, 17, 40, 0.95) !important;
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(212, 168, 67, 0.1);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

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

.menu-line {
  display: block;
}

.menu-btn-active .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

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

.menu-btn-active .menu-line:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
  width: 1.5rem;
}

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

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

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

/* ===== HERO ===== */
@keyframes scrollIndicator {
  0% { top: 0; opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

.animate-scroll-indicator {
  animation: scrollIndicator 1.5s ease-in-out infinite;
}

/* ===== SERVICE CARDS ===== */
.service-card {
  position: relative;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.service-card:hover {
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 40px rgba(212, 168, 67, 0.05);
}

/* ===== GALLERY ===== */
.gallery-item {
  cursor: pointer;
}

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 0.5rem;
  border: 1px solid transparent;
  transition: border-color 0.3s ease;
  pointer-events: none;
}

.gallery-item:hover::after {
  border-color: rgba(212, 168, 67, 0.4);
}

/* ===== SCROLL REVEAL (progressive enhancement) ===== */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
  }

  .reveal.revealed {
    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;
}

#back-to-top.visible:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(212, 168, 67, 0.4);
}

/* ===== FORM ===== */
select option {
  background: #1a2744;
  color: #ffffff;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 767px) {
  .font-display {
    word-spacing: -0.02em;
  }
}
