/* Brentwood Apartments — Custom Styles */

/* Base resets and custom properties */
:root {
  --emerald-700: #15803d;
  --emerald-800: #166534;
  --emerald-900: #14532d;
  --cream-50: #fefdf8;
  --cream-100: #fefce8;
}

/* Selection color */
::selection {
  background: #15803d;
  color: white;
}

/* Smooth scrolling for anchor links */
html {
  scroll-padding-top: 80px;
}

/* Focus visible for accessibility */
*:focus-visible {
  outline: 2px solid #15803d;
  outline-offset: 2px;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #fefdf8;
}
::-webkit-scrollbar-thumb {
  background: #166534;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #14532d;
}

/* Mobile menu animations */
#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
#mobile-menu.open {
  max-height: 400px;
}

/* Nav link underline animation */
.nav-link {
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #15803d;
  transition: width 0.3s ease;
}
.nav-link:hover::after {
  width: 100%;
}

/* Stat card hover */
.stat-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(20, 83, 45, 0.15);
}

/* CTA pulse animation */
@keyframes subtle-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(21, 128, 61, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(21, 128, 61, 0); }
}
.cta-pulse:hover {
  animation: subtle-pulse 1.5s infinite;
}

/* Amenity icon hover */
.amenity-icon {
  transition: background 0.3s ease, transform 0.3s ease;
}
.amenity-card:hover .amenity-icon {
  background: #15803d;
  transform: scale(1.1);
}
.amenity-card:hover .amenity-icon svg {
  color: white;
}

/* Scroll reveal — progressive enhancement */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
  }
  .reveal.visible {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Grid pattern background */
.grid-pattern {
  background-image:
    linear-gradient(rgba(21, 128, 61, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(21, 128, 61, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* Image loading placeholder */
img {
  background-color: #dcfce7;
}

/* Print styles */
@media print {
  .navbar, .cta-pulse, #mobile-menu, .reveal { display: none !important; }
  body { background: white !important; color: black !important; }
  a { color: black !important; text-decoration: underline !important; }
}
