/* Custom styles for Hanford Apartments */

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

/* Base font settings */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Reveal animations - progressive enhancement, only when JS is available */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.8s ease, transform 0.8s ease;
  }
  
  .reveal.revealed {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Navbar scroll state */
.navbar-scrolled {
  background: rgba(42, 18, 28, 0.95) !important;
  backdrop-filter: blur(20px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #2a121c;
}
::-webkit-scrollbar-thumb {
  background: #a35574;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #c27a96;
}

/* Selection color */
::selection {
  background: #fbbf24;
  color: #2a121c;
}

/* Input autofill styling */
input:-webkit-autofill,
textarea:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 30px rgba(255, 255, 255, 0.1) inset !important;
  -webkit-text-fill-color: white !important;
}

/* Form focus styles */
input:focus,
textarea:focus {
  outline: none;
  border-color: #fbbf24;
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.15);
}

/* Decorative pattern overlay */
.pattern-overlay {
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.03) 1px, transparent 0);
  background-size: 40px 40px;
}

/* Button hover lift effect */
.btn-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.btn-lift:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* Image hover zoom container */
.img-zoom {
  overflow: hidden;
}
.img-zoom img {
  transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.img-zoom:hover img {
  transform: scale(1.05);
}

/* Amenity card hover */
.amenity-card {
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.amenity-card:hover {
  transform: translateY(-4px);
  border-color: rgba(251, 191, 36, 0.5);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* Fade in for hero elements */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-animate {
  animation: fadeInUp 1s ease forwards;
}

.hero-animate-delay-1 {
  animation-delay: 0.2s;
  opacity: 0;
}

.hero-animate-delay-2 {
  animation-delay: 0.4s;
  opacity: 0;
}

.hero-animate-delay-3 {
  animation-delay: 0.6s;
  opacity: 0;
}

/* Mobile menu animation */
#mobile-menu {
  transition: max-height 0.4s ease, opacity 0.3s ease;
}
#mobile-menu.hidden {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
}
#mobile-menu:not(.hidden) {
  max-height: 400px;
  opacity: 1;
}

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