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

body {
  background-color: #0F0D0B;
  color: #F5EDE6;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #0F0D0B;
}
::-webkit-scrollbar-thumb {
  background: #292524;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #C2956A;
}

/* Selection */
::selection {
  background: rgba(194, 149, 106, 0.3);
  color: #F5EDE6;
}

/* Hero Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-anim {
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
}

.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; }

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

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

/* Navbar */
#navbar {
  background: transparent;
}

#navbar.scrolled {
  background: rgba(15, 13, 11, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(194, 149, 106, 0.1);
  box-shadow: 0 4px 40px rgba(0, 0, 0, 0.3);
}

/* Mobile Menu */
.mobile-link {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s 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; }

/* Menu lines animation */
.menu-line {
  display: block;
}

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

/* Service card image hover */
.group img {
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.group:hover img {
  transform: scale(1.05);
}

/* Image lazy load fade-in */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.6s ease;
}
img[loading="lazy"].loaded {
  opacity: 1;
}

/* Gallery image hover container */
.col-span-2 .group:hover img,
.rounded-2xl.overflow-hidden:hover img {
  transform: scale(1.05);
}

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

/* Map grayscale override */
.grayscale {
  filter: grayscale(0.8);
  transition: filter 0.7s ease;
}

.grayscale:hover {
  filter: grayscale(0);
}

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .hero-anim,
  .scroll-reveal {
    animation: none;
    opacity: 1;
    transform: none;
    transition: none;
  }
  img {
    transition: none;
  }
}

/* Print styles */
@media print {
  #navbar,
  #mobile-menu-btn,
  .scroll-reveal {
    display: none !important;
  }
  body {
    background: white;
    color: black;
  }
}
