/* Base */
html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #FAF7F5;
}
::-webkit-scrollbar-thumb {
  background: #7B2D3B;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #a81d47;
}

/* Navbar transitions */
#navbar.scrolled {
  background: rgba(61, 18, 26, 0.95);
  backdrop-filter: blur(20px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

#navbar.scrolled #nav-logo-text,
#navbar.scrolled #nav-logo-sub {
  color: white;
}

#navbar.scrolled .nav-link {
  color: rgba(255, 255, 255, 0.8);
}

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

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

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

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

/* Menu button animation */
.menu-btn.active .menu-line:nth-child(1) {
  top: 11px;
  transform: rotate(45deg);
}
.menu-btn.active .menu-line:nth-child(2) {
  opacity: 0;
}
.menu-btn.active .menu-line:nth-child(3) {
  top: 11px;
  width: 6px;
  transform: rotate(-45deg);
}

/* Service cards */
.service-card {
  will-change: transform;
}

/* Gallery items */
.gallery-item {
  cursor: pointer;
}

/* Scroll reveal base — always visible by default */
.reveal {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(40px);
    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; }
}

/* Hero text animation — only decorative, content is always visible */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-content > * {
    animation: fadeInUp 0.8s ease forwards;
  }
  .hero-content > *:nth-child(1) { animation-delay: 0.2s; }
  .hero-content > *:nth-child(2) { animation-delay: 0.4s; }
  .hero-content > *:nth-child(3) { animation-delay: 0.6s; }
  .hero-content > *:nth-child(4) { animation-delay: 0.8s; }
}

/* Selection color */
::selection {
  background: #7B2D3B;
  color: white;
}
