/* Custom styles for Wildwood Inn & Antiques */

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

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.animate-fade-in {
  animation: fadeIn 1s ease-out forwards;
}

/* Scroll reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

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

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

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

::-webkit-scrollbar-thumb:hover {
  background: #1e3129;
}

/* Selection color */
::selection {
  background: #2D4A3E;
  color: #FDFCFA;
}

/* Image optimization */
img {
  will-change: transform;
}

/* Focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid #2D4A3E;
  outline-offset: 2px;
}

/* Mobile menu transitions */
.mobile-link {
  opacity: 0;
  transform: translateY(20px);
  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.1s; }
#mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }
#mobile-menu.open .mobile-link:nth-child(5) { transition-delay: 0.3s; }

/* Menu button animation */
.menu-line {
  transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
}

#menu-btn.active .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

#menu-btn.active .menu-line:nth-child(2) {
  opacity: 0;
}

#menu-btn.active .menu-line:nth-child(3) {
  width: 1.5rem;
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Parallax-like subtle effect for hero */
header {
  will-change: transform;
}

/* Print styles */
@media print {
  nav, #contact-form, #form-success {
    display: none;
  }
  
  body {
    color: #1a1a1a;
    background: white;
  }
  
  a {
    color: #2D4A3E;
  }
}

/* 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;
  }
  
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .bg-forest-600 {
    background-color: #1a3a2a !important;
  }
  
  .text-forest-400 {
    color: #4a7a5a !important;
  }
}
