/* === Custom Styles for Barkley Real Estate === */

/* Base */
html {
    scroll-behavior: smooth;
}

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

/* === Navigation === */
#navbar {
    background: transparent;
    transition: background 0.5s ease, box-shadow 0.5s ease, padding 0.3s ease;
}

#navbar.scrolled {
    background: rgba(250, 249, 247, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(45, 110, 45, 0.1);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: currentColor;
    transition: width 0.3s ease;
}

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

#navbar.scrolled .nav-link {
    color: #1a3d1a;
}

#navbar.scrolled .nav-link:hover {
    color: #2d6e2d;
}

/* Mobile menu */
.mobile-link {
    color: #1a3d1a;
    transition: color 0.3s ease;
}

.mobile-link:hover {
    color: #2d6e2d;
}

/* === Hero === */
.hero-subtitle,
.hero-title,
.hero-desc,
.hero-cta {
    animation: heroReveal 0.8s ease forwards;
}

.hero-subtitle {
    animation-delay: 0.2s;
}

.hero-title {
    animation-delay: 0.4s;
}

.hero-desc {
    animation-delay: 0.6s;
}

.hero-cta {
    animation-delay: 0.8s;
}

@keyframes heroReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll indicator */
.scroll-indicator {
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% {
        transform: translateY(0);
        opacity: 0.6;
    }
    50% {
        transform: translateY(8px);
        opacity: 1;
    }
}

/* === Reveal Animations === */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Default state for reduced motion - always visible */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === Buttons & Links === */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #2d6e2d;
    outline-offset: 2px;
}

/* === Form === */
input:focus,
textarea:focus {
    border-bottom-color: #2d6e2d !important;
}

/* === Images === */
img {
    max-width: 100%;
    height: auto;
}

/* === Utility === */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* === Responsive adjustments === */
@media (max-width: 767px) {
    .font-serif {
        line-height: 1.15;
    }
}
