/* =============================================
   Meiling Tang Real Estate — Custom Styles
   ============================================= */

/* Base & Typography */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
}

::selection {
  background-color: #d4a017;
  color: #ffffff;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #1a233b;
}
::-webkit-scrollbar-thumb {
  background: #d4a017;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #b8860b;
}

/* Navigation */
.nav-link {
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background-color: #d4a017;
  transition: width 0.3s ease;
}
.nav-link:hover::after {
  width: 100%;
}

/* Navbar scroll state */
.navbar-scrolled {
  background-color: rgba(255, 255, 255, 0.97) !important;
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 20px rgba(26, 35, 59, 0.08);
}
.navbar-scrolled .nav-link {
  color: #1a233b !important;
}
.navbar-scrolled .mobile-link {
  color: #1a233b !important;
}

/* Mobile menu animation */
#mobile-menu.open {
  transform: translateX(0);
}
#mobile-menu.closed {
  transform: translateX(100%);
}

/* Menu icon animation */
.menu-open .menu-icon span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.menu-open .menu-icon span:nth-child(2) {
  opacity: 0;
}
.menu-open .menu-icon span:nth-child(3) {
  width: 100%;
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Scroll Reveal Animations */
.reveal-up {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal-left {
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal-right {
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .reveal-up,
  .reveal-left,
  .reveal-right {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
}

/* Hero decorative line animation */
@keyframes growDown {
  from { height: 0; }
  to { height: 80px; }
}
.top-decorative {
  animation: growDown 1s ease forwards;
}

/* Gold shimmer on hover for CTA */
@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

/* Form focus states */
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #d4a017 !important;
  box-shadow: 0 0 0 3px rgba(212, 160, 23, 0.15);
}

/* Smooth transitions for all interactive elements */
a, button, input, select, textarea {
  transition: all 0.3s ease;
}

/* Image hover zoom container */
.group:hover .group-hover\:scale-110 {
  transform: scale(1.1);
}

/* Print styles */
@media print {
  header, footer, .reveal-up, .reveal-left, .reveal-right {
    opacity: 1 !important;
    transform: none !important;
  }
  #hero {
    min-height: auto;
    padding: 2rem 0;
  }
}
