/* Base & Utilities */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Header scroll state */
header.scrolled {
  background: rgba(253, 248, 244, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

header.scrolled .nav-link {
  color: #57534e;
}

/* Nav links */
.nav-link {
  position: relative;
}

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

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

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

/* Mobile menu */
.mobile-link {
  position: relative;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
}

.mobile-link:hover {
  color: #C4704B;
  border-bottom-color: #F5E0D3;
  padding-left: 8px;
}

/* Mobile menu animation */
#mobileMenu {
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Service cards */
.service-card {
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #C4704B, #E0A487);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
  border-radius: 2px 2px 0 0;
}

.service-card:hover::before {
  transform: scaleX(1);
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* Input focus states */
input:focus,
select:focus,
textarea:focus {
  border-color: #D48463 !important;
  box-shadow: 0 0 0 3px rgba(196, 112, 75, 0.1) !important;
}

/* Form submit button */
button[type="submit"] {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

button[type="submit"]::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

button[type="submit"]:hover::after {
  opacity: 1;
}

button[type="submit"]:active {
  transform: scale(0.98);
}

/* CTA section gradient overlay */
section.bg-gradient-to-br.from-terra-600 {
  background: linear-gradient(135deg, #964A2F 0%, #C4704B 50%, #A67540 100%);
}

/* Hero text gradient for emphasis */
h1 .text-terra-600 {
  background: linear-gradient(135deg, #B55D3C, #C4704B);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Smooth image loading */
img {
  opacity: 1;
  transition: opacity 0.3s ease;
}

img[loading="lazy"] {
  opacity: 0;
}

img[loading="lazy"].loaded {
  opacity: 1;
}

/* Selection color */
::selection {
  background: #F5E0D3;
  color: #643426;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #FDF8F4;
}

::-webkit-scrollbar-thumb {
  background: #E0A487;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #C4704B;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  html {
    scroll-padding-top: 70px;
  }

  h1 .text-terra-600 {
    background: linear-gradient(135deg, #B55D3C, #C4704B);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }
}
