/* ===== Custom Styles for Dustin Goss Real Estate ===== */

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

/* Selection color */
::selection {
    background: rgba(255, 107, 63, 0.3);
    color: #ffffff;
}

/* ===== Reveal Animations (progressive enhancement) ===== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    }

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

    /* Stagger children */
    .reveal.stagger > * {
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .reveal.stagger.revealed > *:nth-child(1) { transition-delay: 0.05s; }
    .reveal.stagger.revealed > *:nth-child(2) { transition-delay: 0.1s; }
    .reveal.stagger.revealed > *:nth-child(3) { transition-delay: 0.15s; }
    .reveal.stagger.revealed > *:nth-child(4) { transition-delay: 0.2s; }
    .reveal.stagger.revealed > *:nth-child(5) { transition-delay: 0.25s; }
    .reveal.stagger.revealed > *:nth-child(6) { transition-delay: 0.3s; }
    .reveal.stagger.revealed > *:nth-child(7) { transition-delay: 0.35s; }
    .reveal.stagger.revealed > *:nth-child(8) { transition-delay: 0.4s; }
    .reveal.stagger.revealed > *:nth-child(9) { transition-delay: 0.45s; }
}

/* ===== Navbar scroll state ===== */
.navbar-scrolled {
    background: rgba(14, 15, 18, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3) !important;
}

/* ===== Custom scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #1a1c20;
}
::-webkit-scrollbar-thumb {
    background: #454850;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #ff6b3f;
}

/* ===== Button hover glow ===== */
.btn-glow:hover {
    box-shadow: 0 0 40px rgba(255, 107, 63, 0.3) !important;
}

/* ===== Card hover shimmer ===== */
.card-shimmer {
    position: relative;
    overflow: hidden;
}
.card-shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 107, 63, 0.05), transparent);
    transition: left 0.5s;
}
.card-shimmer:hover::after {
    left: 100%;
}

/* ===== Floating animation for hero cards ===== */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(var(--rotate, 0deg)); }
    50% { transform: translateY(-12px) rotate(var(--rotate, 0deg)); }
}

.floating-card-1 { animation: float 6s ease-in-out infinite; --rotate: 2deg; }
.floating-card-2 { animation: float 5s ease-in-out infinite 0.5s; --rotate: -1deg; }
.floating-card-3 { animation: float 7s ease-in-out infinite 1s; --rotate: 1deg; }

/* ===== Gradient text utility ===== */
.text-gradient {
    background: linear-gradient(135deg, #ff8a64, #ff6b3f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== Mobile menu animation ===== */
#mobileMenu {
    animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Form select arrow ===== */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237a7e8a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* ===== 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 {
        opacity: 1 !important;
        transform: none !important;
    }
    .floating-card-1, .floating-card-2, .floating-card-3 {
        animation: none !important;
    }
}

/* ===== Responsive tweaks ===== */
@media (max-width: 640px) {
    .font-heading {
        font-size: clamp(1.75rem, 8vw, 2.5rem);
    }
}
