/* ===== Custom Styles for Savannah Rogers Real Estate ===== */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #050D1A;
}
::-webkit-scrollbar-thumb {
    background: #162A45;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #C9A227;
}

/* Selection color */
::selection {
    background: rgba(201, 162, 39, 0.3);
    color: #fff;
}

/* ===== Reveal Animations ===== */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-up {
    transform: translateY(0);
}
.reveal-left {
    transform: translateX(0);
}
.reveal-right {
    transform: translateX(0);
}

/* When JS adds these, they animate in */
.js-active .reveal-up {
    transform: translateY(30px);
    opacity: 0;
}
.js-active .reveal-left {
    transform: translateX(-30px);
    opacity: 0;
}
.js-active .reveal-right {
    transform: translateX(30px);
    opacity: 0;
}

.js-active .reveal-up.revealed,
.js-active .reveal-left.revealed,
.js-active .reveal-right.revealed {
    transform: translateY(0) translateX(0);
    opacity: 1;
}

/* Staggered delays for grid children */
.reveal-up:nth-child(1) { transition-delay: 0ms; }
.reveal-up:nth-child(2) { transition-delay: 100ms; }
.reveal-up:nth-child(3) { transition-delay: 200ms; }
.reveal-up:nth-child(4) { transition-delay: 300ms; }
.reveal-up:nth-child(5) { transition-delay: 400ms; }
.reveal-up:nth-child(6) { transition-delay: 500ms; }

/* ===== Gold shimmer accent line ===== */
.gold-line {
    background: linear-gradient(90deg, transparent, #C9A227, transparent);
    height: 1px;
}

/* ===== Navbar transition ===== */
#navbar.scrolled {
    background: rgba(5, 13, 26, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(201, 162, 39, 0.1);
}

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

/* ===== Button ripple effect ===== */
button, a {
    position: relative;
    overflow: hidden;
}

/* ===== Input focus glow ===== */
input:focus, select:focus, textarea:focus {
    box-shadow: 0 0 0 1px rgba(201, 162, 39, 0.2);
}

/* ===== Neighborhood card overlay ===== */
.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

/* ===== Testimonial card hover ===== */
.group:hover {
    border-color: rgba(201, 162, 39, 0.3) !important;
    transform: translateY(-2px);
}

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

/* ===== 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-up, .reveal-left, .reveal-right {
        opacity: 1;
        transform: none;
    }
}

/* ===== Loading animation for form ===== */
@keyframes spin {
    to { transform: rotate(360deg); }
}
.animate-spin {
    animation: spin 1s linear infinite;
}

/* ===== Pulse glow for CTA ===== */
@keyframes pulse-gold {
    0%, 100% {
        box-shadow: 0 0 20px rgba(201, 162, 39, 0.2);
    }
    50% {
        box-shadow: 0 0 40px rgba(201, 162, 39, 0.4);
    }
}

/* ===== Custom select arrow ===== */
select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%23C9A227'/%3E%3C/svg%3E");
}
