/* Custom styles for Kyle Spina Real Estate */

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

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f5f3ef;
}
::-webkit-scrollbar-thumb {
    background: #9bbf93;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #74a16e;
}

/* Navbar transitions */
.nav-text {
    transition: color 0.4s ease;
}
.nav-subtext {
    transition: color 0.4s ease;
}
.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: #3f673d;
    transition: width 0.3s ease;
}
.nav-link:hover::after {
    width: 100%;
}

/* Navbar scrolled state */
.navbar-scrolled .nav-text {
    color: #111c11;
}
.navbar-scrolled .nav-subtext {
    color: #3f673d;
}

/* Floating card animation */
.floating-card {
    animation: float 6s ease-in-out infinite;
}
.floating-card:nth-child(2) {
    animation-delay: -2s;
}
.floating-card:nth-child(3) {
    animation-delay: -4s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-12px);
    }
}

/* Service card hover */
.service-card {
    transform: translateY(0);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(63, 103, 61, 0.15);
}

/* Testimonial card hover */
.testimonial-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px rgba(63, 103, 61, 0.1);
}

/* Area item hover */
.area-item {
    transition: padding-left 0.3s ease;
}
.area-item:hover {
    padding-left: 8px;
}

/* Mobile menu */
.mobile-menu-open {
    opacity: 1 !important;
    pointer-events: all !important;
}

/* Mobile menu links animation */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s 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; }

/* Mobile menu button animation */
#bar1 {
    transition: transform 0.3s ease, opacity 0.3s ease;
}
#bar2 {
    transition: transform 0.3s ease, opacity 0.3s ease;
}
#bar3 {
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.menu-active #bar1 {
    transform: translateY(4px) rotate(45deg);
}
.menu-active #bar2 {
    opacity: 0;
}
.menu-active #bar3 {
    transform: translateY(-4px) rotate(-45deg);
}

/* Scroll reveal animations (below the fold only) */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
    .floating-card {
        animation: none;
    }
    .service-card,
    .testimonial-card,
    .area-item {
        transition: none;
    }
    html {
        scroll-behavior: auto;
    }
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #3f673d;
    outline-offset: 2px;
    border-radius: 2px;
}

/* Selection color */
::selection {
    background: #c5dbbe;
    color: #111c11;
}
