/* Custom Styles for Home Buying Clarity */

/* Base Reset & Smooth Scrolling */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    background-color: #050A18;
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #050A18;
}
::-webkit-scrollbar-thumb {
    background: #1A3560;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #34D399;
}

/* Navbar */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
    background: rgba(5, 10, 24, 0.9);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

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

.mobile-nav-link {
    position: relative;
}

.mobile-nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1px;
    background: #34D399;
    transition: width 0.3s ease;
}

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

/* Hero Animations */
.hero-badge {
    animation: fadeInDown 0.8s ease forwards;
    opacity: 0;
}

.hero-title {
    animation: fadeInUp 0.8s ease 0.2s forwards;
    opacity: 0;
}

.hero-subtitle {
    animation: fadeInUp 0.8s ease 0.4s forwards;
    opacity: 0;
}

.hero-cta {
    animation: fadeInUp 0.8s ease 0.6s forwards;
    opacity: 0;
}

.hero-trust {
    animation: fadeInUp 0.8s ease 0.8s forwards;
    opacity: 0;
}

.scroll-indicator {
    animation: fadeInUp 0.8s ease 1s forwards;
    opacity: 0;
}

.scroll-line {
    animation: scrollLine 2s ease-in-out infinite;
}

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scrollLine {
    0%, 100% {
        opacity: 0.3;
        transform: scaleY(0.5);
        transform-origin: top;
    }
    50% {
        opacity: 1;
        transform: scaleY(1);
        transform-origin: top;
    }
}

/* Section Labels */
.section-label {
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.6s ease;
}

.section-title {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease 0.1s;
}

.section-desc {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease 0.2s;
}

.section-label.visible,
.section-title.visible,
.section-desc.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Service Cards */
.service-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease, border-color 0.5s ease, background 0.5s ease;
}

.service-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.service-card:nth-child(1) { transition-delay: 0s; }
.service-card:nth-child(2) { transition-delay: 0.1s; }
.service-card:nth-child(3) { transition-delay: 0.2s; }
.service-card:nth-child(4) { transition-delay: 0.3s; }
.service-card:nth-child(5) { transition-delay: 0.4s; }
.service-card:nth-child(6) { transition-delay: 0.5s; }

/* About Section */
.about-image {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.8s ease;
}

.about-image.visible {
    opacity: 1;
    transform: translateX(0);
}

.about-text {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.8s ease 0.2s;
}

.about-text.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Process Steps */
.process-step {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.process-step.visible {
    opacity: 1;
    transform: translateY(0);
}

.process-step:nth-child(1) { transition-delay: 0s; }
.process-step:nth-child(2) { transition-delay: 0.15s; }
.process-step:nth-child(3) { transition-delay: 0.3s; }
.process-step:nth-child(4) { transition-delay: 0.45s; }

/* Testimonial Cards */
.testimonial-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease, border-color 0.5s ease;
}

.testimonial-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.testimonial-card:nth-child(1) { transition-delay: 0s; }
.testimonial-card:nth-child(2) { transition-delay: 0.15s; }
.testimonial-card:nth-child(3) { transition-delay: 0.3s; }

/* Contact Section */
.contact-info {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.8s ease;
}

.contact-info.visible {
    opacity: 1;
    transform: translateX(0);
}

.contact-form {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.8s ease 0.2s;
}

.contact-form.visible {
    opacity: 1;
    transform: translateX(0);
}

/* CTA Button Glow Effect */
.cta-btn {
    position: relative;
    overflow: hidden;
}

.cta-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.5s ease;
}

.cta-btn:hover::before {
    left: 100%;
}

/* Subtle Pattern Overlay */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: radial-gradient(rgba(52, 211, 153, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 0;
}

/* Focus Styles */
input:focus,
textarea:focus,
button:focus {
    outline: none;
}

/* Selection */
::selection {
    background: rgba(52, 211, 153, 0.3);
    color: #fff;
}
