/* Custom styles for Rebecca Lavi Realtor */

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

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

/* Section label utility */
.section-label {
  display: flex;
  align-items: center;
}

/* Hero animations */
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(32px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-up {
  animation-name: fade-up;
  animation-duration: 0.8s;
  animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  animation-fill-mode: forwards;
}

/* Scroll reveal */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Navbar scroll state */
#navbar.scrolled {
  background: rgba(254, 252, 251, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

#navbar.scrolled .nav-link {
  color: #4a4542;
}

#navbar.scrolled .nav-link:hover {
  color: #7B2D3B;
}

#navbar.scrolled .menu-line {
  background: #2e2a28;
}

#navbar.scrolled .font-serif {
  color: #1a1816;
}

/* Mobile menu open state */
#mobile-menu.is-open {
  opacity: 1;
  pointer-events: all;
}

/* Mobile menu link hover */
.mobile-link:hover {
  font-style: italic;
}

/* Menu animation */
.menu-line {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

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

/* Nav link underline animation */
.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: #7B2D3B;
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Input focus ring */
input:focus,
textarea:focus {
  border-color: #d94f68 !important;
  box-shadow: 0 0 0 3px rgba(217, 79, 104, 0.1) !important;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
  background: #b8b4af;
}

/* Selection color */
::selection {
  background: rgba(123, 45, 59, 0.15);
  color: #7B2D3B;
}

/* Back to top button */
#back-to-top.is-visible {
  opacity: 1;
  pointer-events: all;
}

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

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

/* Tablet adjustments */
@media (max-width: 767px) {
  .hero-headline {
    font-size: 2.5rem;
  }
}

/* Large desktop */
@media (min-width: 1280px) {
  .hero-headline {
    font-size: 5rem;
  }
}
