/* ===== CUSTOM STYLES ===== */

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #ecfdf5;
}
::-webkit-scrollbar-thumb {
  background: #065f46;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #047857;
}

/* Selection */
::selection {
  background: #d1fae5;
  color: #064e3b;
}

/* ===== NAVBAR ===== */
#navbar {
  background: rgba(254, 253, 247, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(6, 95, 70, 0.06);
}

#navbar.scrolled {
  background: rgba(254, 253, 247, 0.95);
  box-shadow: 0 4px 30px rgba(6, 95, 70, 0.07);
}

.nav-link {
  position: relative;
}

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

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

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

#mobile-menu.close {
  opacity: 0;
  pointer-events: none;
}

.mobile-link {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease, color 0.2s 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; }

/* Hamburger animation */
.hamburger-line {
  transition: transform 0.3s ease, opacity 0.2s ease;
}

#mobile-toggle.active .hamburger-line:nth-child(1) {
  transform: translateY(4px) rotate(45deg);
}

#mobile-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

#mobile-toggle.active .hamburger-line:nth-child(3) {
  transform: translateY(-4px) rotate(-45deg);
  width: 1.25rem;
}

/* ===== HERO ANIMATIONS ===== */
.reveal-hero {
  opacity: 1;
  transform: none;
  animation: heroSlideIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.reveal-hero-delay {
  opacity: 1;
  transform: none;
  animation: heroSlideIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
  opacity: 0;
  transform: translateY(20px);
}

@keyframes heroSlideIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== SCROLL REVEAL ===== */
.reveal {
  opacity: 1;
  transform: none;
}

.reveal-card {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .reveal-card {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .reveal.visible,
  .reveal-card.visible {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== IMAGE HOVER ===== */
.group:hover .group-hover\:scale-105 {
  transform: scale(1.05);
}

/* ===== BUTTON HOVER ===== */
button, a[href^="tel:"], a[href^="mailto:"] {
  -webkit-tap-highlight-color: transparent;
}

/* ===== FORM FOCUS ===== */
input:focus, textarea:focus {
  outline: none;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .font-serif.text-5xl {
    font-size: 2.5rem;
  }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}
