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

body {
  overflow-x: hidden;
}

::selection {
  background-color: rgba(212, 168, 83, 0.3);
  color: #fdfbf7;
}

/* === Scrollbar === */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #080808;
}
::-webkit-scrollbar-thumb {
  background: #3d3528;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #5a4a2e;
}

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

.animate-fade-in-up {
  animation-name: fadeInUp;
  animation-duration: 0.8s;
  animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  animation-iteration-count: 1;
}

@keyframes scrollLine {
  0% {
    opacity: 0;
    transform: scaleY(0);
    transform-origin: top;
  }
  50% {
    opacity: 1;
    transform: scaleY(1);
    transform-origin: top;
  }
  51% {
    transform-origin: bottom;
  }
  100% {
    opacity: 0;
    transform: scaleY(0);
    transform-origin: bottom;
  }
}

.animate-scroll-line {
  animation: scrollLine 1.8s ease-in-out infinite;
}

/* === Reveal on Scroll (progressive enhancement) === */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal[data-revealed="false"] {
  opacity: 0;
  transform: translateY(40px);
}

@media (prefers-reduced-motion: no-preference) {
  .reveal[data-revealed="false"] {
    opacity: 0;
    transform: translateY(40px);
  }
}

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

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: linear-gradient(90deg, #d4a853, #e8c97a);
  transition: width 0.3s ease;
}

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

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

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

/* === Service Card Hover Glow === */
.group:hover .group-hover\:-translate-y-1 {
  box-shadow: 0 20px 60px -20px rgba(139, 94, 60, 0.15);
}

/* === Gold Button Glow === */
button[type="submit"]:hover,
a[href^="tel"]:hover {
  box-shadow: 0 0 40px rgba(212, 168, 83, 0.3);
}

/* === Form Focus States === */
input:focus,
select:focus,
textarea:focus {
  box-shadow: 0 0 0 3px rgba(212, 168, 83, 0.1);
}

/* === Selection highlight === */
input::placeholder,
textarea::placeholder {
  color: #5a4a3a;
}

/* === Map filter for dark mode === */
iframe[title*="location"] {
  border-radius: 0.75rem;
}

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

@media (min-width: 1024px) {
  .reveal {
    transition-delay: 0.1s;
  }
}
