/* ============================================
   Susan Whitfield — Charleston Real Estate
   Custom Styles & Animations
   ============================================ */

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

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

/* Selection Color */
::selection {
    background-color: #3f5a3d;
    color: #faf9f6;
}

/* ============================================
   Navbar
   ============================================ */
#navbar {
    background-color: transparent;
}

#navbar.scrolled {
    background-color: rgba(250, 249, 246, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(45, 71, 50, 0.08);
}

#navbar.scrolled .nav-logo-text {
    color: #1f2d21;
}

#navbar.scrolled .nav-logo-sub {
    color: #557550;
}

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

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

/* ============================================
   Service Cards
   ============================================ */
.service-card {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px -20px rgba(45, 71, 50, 0.25);
}

/* ============================================
   Scroll Reveal Animations
   Progressive enhancement — content is visible
   by default; JS adds the animation state.
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                    transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .reveal[data-reveal-delay="1"] { transition-delay: 0.1s; }
    .reveal[data-reveal-delay="2"] { transition-delay: 0.2s; }
    .reveal[data-reveal-delay="3"] { transition-delay: 0.3s; }
    .reveal[data-reveal-delay="4"] { transition-delay: 0.4s; }
    .reveal[data-reveal-delay="5"] { transition-delay: 0.5s; }

    /* Reveal is triggered by JS adding .revealed class */
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fallback: if JS is disabled, everything is already visible */
.no-js .reveal {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   Form Styles
   ============================================ */
select option {
    color: #2d4732;
    background-color: #faf9f6;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #9db796;
}

/* ============================================
   Utility: Subtle patterns
   ============================================ */
.hero-pattern {
    background-image: radial-gradient(circle at 20% 80%, rgba(198, 212, 190, 0.3) 0%, transparent 50%),
                      radial-gradient(circle at 80% 20%, rgba(157, 183, 150, 0.2) 0%, transparent 50%);
}
